Skip to content

GITHUB-ISSUES-2026-03-19-source-path-updates.md

GITHUB-ISSUES-2026-03-19-source-path-updates.md

Section titled “GITHUB-ISSUES-2026-03-19-source-path-updates.md”

Run top to bottom. One operation at a time. Confirm each result before proceeding.

Section titled “Run top to bottom. One operation at a time. Confirm each result before proceeding.”

Reference: docs/plans/plan-0002-folder-structure.md

Section titled “Reference: docs/plans/plan-0002-folder-structure.md”

Reference: D:\Claude_review\structure-review-3\ (working example)

Section titled “Reference: D:\Claude_review\structure-review-3\ (working example)”

This session updates src/ to use the new templates/ paths established in PR #313. Until this session is complete, sc create is broken — it references old paths that no longer exist.

Also in scope this session:

  • Cleanup of stale files in docs/ (STATUS.md, docs/rfcs/, stale docs/ files)
  • Cleanup of stale commands in .claude/commands/
  • Update skill files to reference ai-sessions/ instead of sessions/
  • Promote chore/v0.9.1-changelog branch
  • npm link to install rebuilt sc binary

Working directory: /mnt/d/Claude/projects/scaffolder Launch from: /mnt/d/Claude/projects/scaffolder (NOT engine root)


  1. Confirm working directory and branch: pwd git status

  2. Confirm you are on dev: git branch

  3. Create feature branch: git checkout -b feature/source-path-updates

  4. Confirm: git status

Report branch name before proceeding.


OPERATION 1 — Promote chore/v0.9.1-changelog

Section titled “OPERATION 1 — Promote chore/v0.9.1-changelog”

1a. Check if branch exists: git branch | grep chore/v0.9.1-changelog

If it does not exist locally, check remote:
git branch -r | grep chore/v0.9.1-changelog
If it exists on remote only, fetch it:
git fetch origin chore/v0.9.1-changelog

1b. Merge into dev: git checkout dev git merge chore/v0.9.1-changelog

1c. Push dev: git push origin dev

1d. Delete the branch: git branch -d chore/v0.9.1-changelog git push origin —delete chore/v0.9.1-changelog 2>/dev/null || echo “Remote branch already gone”

1e. Switch back to feature branch: git checkout feature/source-path-updates

1f. Confirm: git log —oneline -5

Report result before proceeding.


Current state: creates sessions/ and sessions/logs/, references sessions/ in .gitignore content, stamps per-project .claude/skills/ subdirs and .github/ISSUE_TEMPLATE/.

Required changes:

  • sessions/ -> ai-sessions/ everywhere
  • sessions/logs/ -> ai-sessions/logs/
  • docs/rfcs/ -> docs/plans/
  • Remove .github/ISSUE_TEMPLATE/ dir creation (issue templates removed per Plan-0002)
  • Remove per-project .claude/skills/ subdirs (session-start, session-end, plan-mode-reminder are engine-level, not per-project)
  • Update .gitignore content: sessions/ -> ai-sessions/
  • Remove STATUS.md and TIME-LOG.md from .gitignore content (files removed)

2a. Read the current file: cat src/createFolders.ts

2b. Make the following changes:

In the dirs array:
- Change: path.join(projectPath, "sessions")
To: path.join(projectPath, "ai-sessions")
- Change: path.join(projectPath, "sessions", "logs")
To: path.join(projectPath, "ai-sessions", "logs")
- Change: path.join(projectPath, "docs", "rfcs")
To: path.join(projectPath, "docs", "plans")
- Remove these lines entirely:
path.join(projectPath, ".github", "ISSUE_TEMPLATE"),
path.join(projectPath, ".claude", "skills", "session-start"),
path.join(projectPath, ".claude", "skills", "session-end"),
path.join(projectPath, ".claude", "skills", "plan-mode-reminder"),
In the .gitignore content array:
- Change: "sessions/"
To: "ai-sessions/"
- Remove: "TIME-LOG.md"
- Remove: "STATUS.md"

2c. Verify: cat src/createFolders.ts

Report the full updated file before proceeding.


Current state: reads templates directly from flat TEMPLATES_DIR root. All files have moved to subdfolders. Also writes deleted files (STATUS.md, TIME-LOG.md, START-HERE.md, RETRO.md) and stamps per-project skills/commands/issue-templates.

3a. Read the current file: cat src/createDocs.ts

3b. Add subpath constants after the TEMPLATES_DIR line: const PROJECT_ROOT_DIR = path.join(TEMPLATES_DIR, “project-root”); const DOCS_TEMPLATE_DIR = path.join(TEMPLATES_DIR, “docs”); const GITHUB_DIR = path.join(TEMPLATES_DIR, “github”);

3c. Remove the TEMPLATE_FILES array and its loop entirely. Replace with explicit writes to docs/features/ in step 3e below.

3d. Update each template read path:

CLAUDE.md:
- path.join(TEMPLATES_DIR, "CLAUDE.md") -> path.join(PROJECT_ROOT_DIR, "CLAUDE.md")
STANDARDS.md:
- path.join(TEMPLATES_DIR, "STANDARDS.md") -> path.join(PROJECT_ROOT_DIR, "STANDARDS.md")
CHANGELOG.md:
- path.join(TEMPLATES_DIR, "CHANGELOG.md") -> path.join(PROJECT_ROOT_DIR, "CHANGELOG.md")
CURRENT-CODE.md:
- templatePath: path.join(PROJECT_ROOT_DIR, "ai-sessions", "CURRENT-CODE.md")
- destination: path.join(projectPath, "ai-sessions", "CURRENT-CODE.md")
(was: sessions/CURRENT-CODE.md)
README.md:
- path.join(TEMPLATES_DIR, "README.md") -> path.join(PROJECT_ROOT_DIR, "README.md")
.nvmrc:
- path.join(TEMPLATES_DIR, ".nvmrc") -> path.join(PROJECT_ROOT_DIR, ".nvmrc")
.gitattributes:
- path.join(TEMPLATES_DIR, ".gitattributes") -> path.join(PROJECT_ROOT_DIR, ".gitattributes")
NAMING-CONVENTIONS.md:
- templatePath: path.join(PROJECT_ROOT_DIR, "NAMING-CONVENTIONS.md")
- destination: path.join(projectPath, "NAMING-CONVENTIONS.md")
(was: docs/NAMING-CONVENTIONS.md -- moves to project root)
ci.yml:
- path.join(TEMPLATES_DIR, "ci.yml") -> path.join(GITHUB_DIR, "workflows", "ci.yml")
claude-review.yml.disabled:
- path.join(TEMPLATES_DIR, "claude-review.yml.disabled")
-> path.join(GITHUB_DIR, "workflows", "claude-review.yml.disabled")

3e. ADD these new blocks (not written before):

CURRENT-CHAT.md:
- templatePath: path.join(PROJECT_ROOT_DIR, "ai-sessions", "CURRENT-CHAT.md")
- destination: path.join(projectPath, "ai-sessions", "CURRENT-CHAT.md")
- Replace [project-name] and replaceAiNames same as CURRENT-CODE.md
PROJECT-INSTRUCTIONS.md:
- templatePath: path.join(PROJECT_ROOT_DIR, "PROJECT-INSTRUCTIONS.md")
- destination: path.join(projectPath, "PROJECT-INSTRUCTIONS.md")
- Replace [project-name] and replaceAiNames
ARCHITECTURE.md (replaces TEMPLATE_FILES loop):
- templatePath: path.join(DOCS_TEMPLATE_DIR, "features", "ARCHITECTURE.md")
- destination: path.join(docsDir, "features", "ARCHITECTURE.md")
SCHEMA.md (replaces TEMPLATE_FILES loop):
- templatePath: path.join(DOCS_TEMPLATE_DIR, "features", "SCHEMA.md")
- destination: path.join(docsDir, "features", "SCHEMA.md")

3f. REMOVE these blocks entirely (files deleted per Plan-0002): - START-HERE.md — remove entire read/write block - TIME-LOG.md — remove entire read/write block - STATUS.md — remove entire read/write block - RETRO.md — remove entire read/write block - TESTING.md at docs/ root — remove (now in docs/features/ only via 3e above) - API.md at docs/ root — remove (Joker-only template, not stamped into projects) - NAMING-CONVENTIONS.md at docs/ root — handled in 3d (goes to project root now) - .github/ISSUE_TEMPLATE/ block — remove entirely (bug_report, feature_request, chore) - claude-commands stamping block — remove entirely (engine-level now) - claude-skills stamping block — remove entirely (engine-level now)

3g. Verify: cat src/createDocs.ts

Report the full updated file before proceeding.


OPERATION 4 — Update index.ts printDryRun

Section titled “OPERATION 4 — Update index.ts printDryRun”

The dry-run preview shows the old structure. Update to match Plan-0002.

4a. Find printDryRun in src/index.ts and replace the entire console.log block inside it with this structure:

console.log(`Project folder: ${baseDir}/${name}/`);
console.log(`├── .github/`);
console.log(`│ └── workflows/`);
console.log(`│ ├── ci.yml`);
console.log(`│ └── claude-review.yml.disabled`);
console.log(`├── ai-sessions/`);
console.log(`│ ├── CURRENT-CHAT.md`);
console.log(`│ └── CURRENT-CODE.md`);
console.log(`├── docs/`);
console.log(`│ ├── decisions/`);
console.log(`│ │ └── 0001-tech-stack.md`);
console.log(`│ ├── features/`);
console.log(`│ │ ├── ARCHITECTURE.md`);
console.log(`│ │ └── SCHEMA.md`);
console.log(`│ ├── issues/`);
console.log(`│ ├── plans/`);
console.log(`│ └── tasks/`);
console.log(`├── src/`);
console.log(`├── .env.example`);
console.log(`├── .gitattributes`);
console.log(`├── .gitignore`);
console.log(`├── .nvmrc`);
console.log(`├── .scaffolder`);
console.log(`├── CHANGELOG.md`);
console.log(`├── CLAUDE.md`);
console.log(`├── NAMING-CONVENTIONS.md`);
console.log(`├── PROJECT-INSTRUCTIONS.md`);
console.log(`├── README.md`);
console.log(`└── STANDARDS.md`);
console.log(`\nGitHub repo: ${githubUser}/${name} (private)`);

4b. Verify: grep -A 30 “function printDryRun” src/index.ts

Report before proceeding.


5a. In the managedFiles array: - Change: “sessions/CURRENT-CODE.md” -> “ai-sessions/CURRENT-CODE.md” - Add: “ai-sessions/CURRENT-CHAT.md” - Remove: “SESSION-NOTES.md”, “CONTEXT.md”, “CHAT-LOG.md” - Remove: “START-HERE.md”, “TIME-LOG.md”, “STATUS.md”

5b. In the managedDocs array: - Remove: “SPEC.md”, “TASKS.md”, “PLANNING.md”, “RETRO.md” - Remove: “TESTING.md”, “API.md”, “NAMING-CONVENTIONS.md”

5c. Verify: grep -A 25 “managedFiles” src/updateProject.ts

Report before proceeding.


OPERATION 6 — Update skill files (live .claude/skills/)

Section titled “OPERATION 6 — Update skill files (live .claude/skills/)”

6a. Read and update .claude/skills/session-start/SKILL.md: - All references: sessions/CURRENT.md -> ai-sessions/CURRENT-CODE.md - Any reference to sessions/ -> ai-sessions/

6b. Read and update .claude/skills/session-end/SKILL.md: - All references: sessions/ -> ai-sessions/ - sessions/CURRENT.md -> ai-sessions/CURRENT-CODE.md - sessions/logs/ -> ai-sessions/logs/ - Remove the reminder to upload CURRENT.md to Chat Project Files (MCP handles this now)

6c. Read and update .claude/commands/sc-done.md: - sessions/CURRENT.md -> ai-sessions/CURRENT-CODE.md

6d. Verify all three files look correct.

Report before proceeding.


OPERATION 7 — Update template skill files

Section titled “OPERATION 7 — Update template skill files”

7a. Read and update templates/claude-skills/session-start/SKILL.md: - sessions/CURRENT.md -> ai-sessions/CURRENT-CODE.md - Any sessions/ -> ai-sessions/

7b. Read and update templates/claude-skills/session-end/SKILL.md: - sessions/ -> ai-sessions/ everywhere - Remove upload reminder

7c. Verify both files.

Report before proceeding.


OPERATION 8 — Delete stale commands from .claude/commands/

Section titled “OPERATION 8 — Delete stale commands from .claude/commands/”

8a. Delete: rm .claude/commands/sc-end.md rm .claude/commands/sc-exit.md rm .claude/commands/sc-log.md rm .claude/commands/sc-history.md

8b. Verify remaining commands: ls .claude/commands/

Expected: sc-config.md, sc-create.md, sc-done.md, sc-help.md, sc-queue.md,
sc-ruleset.md, sc-start.md, sc-status.md

Report before proceeding.


OPERATION 9 — Clean up stale scaffolder project files

Section titled “OPERATION 9 — Clean up stale scaffolder project files”

9a. Delete: rm -f STATUS.md rm -rf docs/rfcs/ rm -f docs/ARCHITECTURE.md rm -f docs/SPEC.md rm -f docs/RETRO.md

9b. Check docs/ root for anything else unexpected: ls docs/

Keep: COMMANDS.md, INSTALL.md, MIGRATE.md, UPDATE.md, CUSTOMIZE.md,
README.md, NAMING-CONVENTIONS.md, decisions/, features/, issues/,
plans/, tasks/
Report anything unexpected.

9c. Add docs/tasks/ to .gitignore if not already there: grep “docs/tasks” .gitignore || echo “docs/tasks/” >> .gitignore

9d. Verify: cat .gitignore

Report before proceeding.


10a. Build: npm run build

10b. If build succeeds, run npm link: npm link

10c. Verify version: sc —version

10d. Run dry-run to verify output matches Plan-0002: sc create —dry-run “test-verify”

Expected:
- ai-sessions/ (not sessions/)
- docs/plans/ (not docs/rfcs/)
- No STATUS.md, START-HERE.md, TIME-LOG.md, RETRO.md
- NAMING-CONVENTIONS.md at root (not in docs/)
- PROJECT-INSTRUCTIONS.md at root

Report the full dry-run output before proceeding.


11a. Stage all changes: git add -A

11b. Review: git status

11c. Confirm nothing unexpected. Stop and report if anything looks wrong.

11d. Commit: git commit -m “feat: update src/ paths for Plan-0002 (ai-sessions, docs/plans, project-root templates)”

11e. Push: git push origin feature/source-path-updates

11f. Open PR to dev: gh pr create —base dev —title “feat: source path updates for Plan-0002” —body “Updates createFolders.ts, createDocs.ts, index.ts, updateProject.ts to use new templates/ paths from PR #313. Fixes broken sc create. Removes stale file writes. Updates skill files and stale commands. Cleans up docs/.”

11g. Report PR URL.


Report:

  • PR URL
  • Full sc create —dry-run output
  • sc —version
  • Anything that could not be updated or looked wrong

Do not merge the PR. Operator reviews before merging.