Skip to content

Refactor/s1 project file#62

Merged
natashaannn merged 6 commits into
mainfrom
refactor/s1-project-file
May 9, 2026
Merged

Refactor/s1 project file#62
natashaannn merged 6 commits into
mainfrom
refactor/s1-project-file

Conversation

@natashaannn
Copy link
Copy Markdown
Member

@natashaannn natashaannn commented May 9, 2026

Summary

  • Adds scripts/config/project.ts as the typed foundation for the project-file layer
  • Defines the ProjectFile interface covering version, episode, brandId, tools, params, and artifacts
  • Implements synchronous readProject(cwd?) and writeProject(project, cwd?) helpers backed by Node's built-in fs module
  • Introduces ProjectNotFoundError so callers can distinguish a missing project file from other I/O failures

Why

The pipeline currently has no persistent project model — episode metadata, tool versions, and run parameters live only in CLI flags and are lost between runs. This module becomes the single source of truth that all later pipeline stages (artifact storage, DAG runner, parameter persistence) will import from.

Test plan

Automated

# Run the new unit tests in isolation
npx jest --testPathPattern="tests/integration/project" --no-coverage

# Expected: 6 passing tests across writeProject and readProject

Issues

Closes #10

Adds scripts/config/project.ts as the typed foundation for the project
file layer described in Phase 0 / Sprint 1 Issue #1. All pipeline stages
will eventually read episode metadata, tool versions, and run parameters
from .ragtech/project.json rather than passing them as CLI flags.

Kept synchronous and dependency-free (plain Node fs). writeProject()
creates the .ragtech/ directory if absent and writes pretty-printed JSON.
readProject() throws a typed ProjectNotFoundError when the file is missing
so callers can distinguish a missing project from other I/O failures.

AC: reading existing project file succeeds, writing creates
.ragtech/project.json, read/write roundtrip preserves structure
…able

Sprint 1 Issue #1 (project file configuration layer) is implemented on
refactor/s1-project-file. Added scripts/config/project.ts to the Key
Source Files table so future agents know where the project-file helpers live.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 9, 2026

Deploy Preview for deckcreate ready!

Name Link
🔨 Latest commit 56a8d10
🔍 Latest deploy log https://app.netlify.com/projects/deckcreate/deploys/69fefe7c06d037000885d7ae
😎 Deploy Preview https://deploy-preview-62--deckcreate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…tion

Pattern: integration test placed in scripts/ instead of tests/integration/
Observed in: refactor/s1-project-file — 2026-05-09
@natashaannn
Copy link
Copy Markdown
Member Author

natashaannn commented May 9, 2026

Agent Use Notes

  • Used 7% of Claude session tokens (5H window session) with /implement-issue skill.
  • Attempting self-review in new Claude session with /review-pr skill. Used 5% of 5H session window.
  • Implementing requested changes from review-pr skill used another 1% of 5H session window.
  • After implementing requested changes, I manually followed the test plan in PR to test, which was to run the unit tests in isolation. According to PR, I should expect 6 passing tests. However, the given script yield no tests found. On troubleshooting with the coding agent, it was found that the PR body was outdated as the test file moved to tests/integration/project.test.ts as part of the fix. Running the correct test command yielded the correct result.

Expected agent usage per PR

~13% of 5H session window. This means about 7 PRs can be expected to be done per developer on a $20 Claude plan in a 5H session window.

Note: review-pr skill does not implement requested changes. To consider if we want to add in the skill the instruction of implemented requested changes as well. Currently leaving it to developer to self prompt their coding agent to fix changes.

natashaannn and others added 2 commits May 9, 2026 17:48
Tests use real os.tmpdir() I/O — they are integration tests per
TESTING_STANDARDS and must live in tests/integration/ so that
npm run test:integration picks them up. Also adds a TODO comment
to readProject() flagging the missing schema validation.

Closes review blocker B1 and addresses warning W2 from
docs/review-findings/2026-05-09-refactor-s1-project-file.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@natashaannn natashaannn merged commit a4e77b8 into main May 9, 2026
1 check passed
@natashaannn natashaannn deleted the refactor/s1-project-file branch May 9, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project file scaffold (.ragtech/project.json)

1 participant