TASKS.md — scaffolder v0.6.4 foundation fixes
TASKS.md — scaffolder v0.6.4 foundation fixes
Section titled “TASKS.md — scaffolder v0.6.4 foundation fixes”Rules for Code
Section titled “Rules for Code”- Always work on a feature branch, never directly on dev or main
- Read CLAUDE.md (currently BUILDER-INSTRUCTIONS.md) and STANDARDS.md before starting any work
- Complete each task fully before moving to the next
- Do not add features not listed here
- Follow Conventional Commits format on every commit
- Update SESSION-NOTES.md at the end of every session
Branch
Section titled “Branch”Create one branch for all tasks: feature/v0.6.4-foundation-fixes
All tasks committed to that branch.
Final PR: feature/v0.6.4-foundation-fixes → dev → main
Version target
Section titled “Version target”v0.6.4
Context
Section titled “Context”These fixes address hardcoded personal values in source code that prevent any other user from running the scaffolder. They also fix version sync issues and add .gitignore entries for internal project management files that should not be published.
Definition of done
Section titled “Definition of done”A task is only complete when:
- File edited correctly
- No hardcoded personal values remain in changed files
-
npm run buildpasses - Committed with correct message format
- No unintended changes to other files
Release checklist (before dev → main PR)
Section titled “Release checklist (before dev → main PR)”- All tasks below complete and committed
- CHANGELOG.md updated for v0.6.4
- Version bumped in package.json
- versions.json updated (latest: “0.6.4”, new version entry added)
- README.md badge updated to v0.6.4
-
npm run buildpasses clean
Build order
Section titled “Build order”Task 1 — Fix hardcoded BASE_DIR in createFolders.ts
Section titled “Task 1 — Fix hardcoded BASE_DIR in createFolders.ts”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: replace hardcoded BASE_DIR with config-derived path in createFolders
File: src/createFolders.ts
Current (line 4):
const BASE_DIR = "/mnt/d/Claude/projects";Change to:
import { getConfig } from "./config";(add to existing imports at top of file)
Then replace the constant with a function parameter or derive from config:
export function createFolders(projectName: string): string { const config = getConfig(); const baseDir = config.defaultDrive ? `${config.defaultDrive}/projects` : "/mnt/d/Claude/projects"; const projectPath = path.join(baseDir, projectName);Remove the old const BASE_DIR line.
Definition of done: No hardcoded path. Falls back gracefully if config.defaultDrive is empty.
Task 2 — Fix hardcoded paths in timeLog.ts
Section titled “Task 2 — Fix hardcoded paths in timeLog.ts”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: replace hardcoded paths with config-derived paths in timeLog
File: src/timeLog.ts
Current (lines 3-4):
const BASE_DIR = "/mnt/d/Claude/projects";const MASTER_TIME_LOG = "/mnt/d/Claude/_system/MASTER-TIME-LOG.md";Change to:
import { getConfig } from "./config";
function getBaseDir(): string { const config = getConfig(); return config.defaultDrive ? `${config.defaultDrive}/projects` : "/mnt/d/Claude/projects";}
function getMasterTimeLogPath(): string { const config = getConfig(); const drive = config.defaultDrive || "/mnt/d/Claude"; // Strip /projects if present since _system/ is at the drive root const root = drive.replace(/\/projects\/?$/, ""); return path.join(root, "_system", "MASTER-TIME-LOG.md");}Then update all references in the file:
- Replace
BASE_DIRwithgetBaseDir()inappendToProjectTimeLogandgetRecentEntriesandgetProjectTimeSummary - Replace
MASTER_TIME_LOGwithgetMasterTimeLogPath()inappendToMasterTimeLog
Note: getConfig() is called per-function-invocation, not at module load. This ensures it always reads current config. The performance cost is negligible (reads a small JSON file).
Definition of done: No hardcoded paths. Both functions derive paths from config. Falls back gracefully.
Task 3 — Fix hardcoded GITHUB_ORG in createGithub.ts
Section titled “Task 3 — Fix hardcoded GITHUB_ORG in createGithub.ts”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: replace hardcoded GITHUB_ORG with config-derived username in createGithub
File: src/createGithub.ts
Current (line 3):
const GITHUB_ORG = "purlshq";Change to:
import { getConfig } from "./config";(add to existing imports)
Then update the function:
export function createGithub(projectPath: string, projectName: string): void { const config = getConfig(); const githubOrg = config.githubUsername || config.defaultGitHub || "purlshq";Replace ALL references to GITHUB_ORG in the file with githubOrg:
- Line:
gh repo create ${GITHUB_ORG}/${projectName}→gh repo create ${githubOrg}/${projectName} - Line:
gh api repos/${GITHUB_ORG}/${projectName}/milestones→gh api repos/${githubOrg}/${projectName}/milestones
Remove the old const GITHUB_ORG line.
Definition of done: No hardcoded username. Falls back to “purlshq” only as last resort (for backward compatibility), but reads from config first.
Task 4 — Fix createDocs.ts dependency on _system/ directory
Section titled “Task 4 — Fix createDocs.ts dependency on _system/ directory”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: use templates/ as primary source instead of _system/ in createDocs
File: src/createDocs.ts
Current (line 5):
const SYSTEM_DIR = "/mnt/d/Claude/_system";Current behavior: STANDARDS.md is copied from _system/STANDARDS.md to project root.
Problem: Other users won’t have an _system/ directory. The build should work entirely from the scaffolder’s own templates/ folder.
Change:
- Remove
const SYSTEM_DIRline entirely - Find the STANDARDS.md copy block (around line 58-62):
// Copy STANDARDS.md from _system to project rootconst standardsTemplatePath = path.join(SYSTEM_DIR, "STANDARDS.md");Change to:
// Copy STANDARDS.md from templates/ to project rootconst standardsTemplatePath = path.join(TEMPLATES_DIR, "STANDARDS.md");- Verify no other references to
SYSTEM_DIRremain in the file. If any exist, replace them withTEMPLATES_DIRequivalents.
Definition of done: Zero references to _system/ in createDocs.ts. All templates sourced from the scaffolder’s own templates/ directory. Build works without _system/ existing.
Task 5 — Fix versions.json latest version
Section titled “Task 5 — Fix versions.json latest version”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: sync versions.json latest to 0.6.3
File: versions.json
Current:
"latest": "0.6.2",Change to:
"latest": "0.6.3",Also add the v0.6.3 entry to the versions object:
"0.6.3": { "breaking": false, "changes": ["Template audit: fix all hardcoded values and stale content across 24 templates and 3 system files"] }Definition of done: latest matches package.json. v0.6.3 entry present.
Task 6 — Fix README.md badge version
Section titled “Task 6 — Fix README.md badge version”Branch: feature/v0.6.4-foundation-fixes
Commit: fix: update README badge to v0.6.3
File: README.md
Current (line 1):
[](package.json)Change to:
[](package.json)Definition of done: Badge matches current version.
Task 7 — Update .gitignore template for internal files
Section titled “Task 7 — Update .gitignore template for internal files”Branch: feature/v0.6.4-foundation-fixes
Commit: feat: add internal project management files to gitignore template
File: src/createFolders.ts — the .gitignore content is defined inline in this file.
Find the .gitignore content array (around line 34) and add these entries at the end, before the empty trailing string:
"","# Internal project management (not published)","sessions/","TIME-LOG.md","STATUS.md",".scaffolder-backup/",Also update templates/ if there is a standalone .gitignore template file. Check — if not, the inline definition in createFolders.ts is the only source.
Definition of done: New projects get a .gitignore that excludes internal session and tracking files by default.
Task 8 — Version bump and CHANGELOG
Section titled “Task 8 — Version bump and CHANGELOG”Branch: feature/v0.6.4-foundation-fixes
Commit: chore: bump version to 0.6.4
Commit: docs: update CHANGELOG for v0.6.4
-
Bump version in
package.jsonto0.6.4 -
Update
versions.json:- Set
"latest": "0.6.4" - Add entry:
"0.6.4": { "breaking": false, "changes": ["Fix hardcoded paths in createFolders, timeLog, createGithub, createDocs", "Use templates/ as primary source instead of _system/", "Add internal file exclusions to .gitignore template", "Sync versions.json and README badge"] } - Set
-
Update
CHANGELOG.md— add at top after the header:
## [0.6.4] — 2026-03-15### Fixed- fix: replace hardcoded BASE_DIR with config-derived path in createFolders- fix: replace hardcoded paths with config-derived paths in timeLog- fix: replace hardcoded GITHUB_ORG with config-derived username in createGithub- fix: use templates/ as primary source instead of _system/ in createDocs- fix: sync versions.json latest to 0.6.3- fix: update README badge to v0.6.3
### Added- feat: add internal project management files to gitignore template- Update README.md badge to v0.6.4:
[](package.json)Definition of done: Version bumped everywhere. CHANGELOG complete. README badge current.
Task 9 — Add migration definition and PR
Section titled “Task 9 — Add migration definition and PR”Branch: feature/v0.6.4-foundation-fixes
Commit: feat: add v0.6.3 to v0.6.4 migration definition
- Create
src/migrations/v0.6.2-to-v0.6.3.ts:
export const migration = { fromVersion: "0.6.2", toVersion: "0.6.3", breaking: false, filesAdded: [], filesChanged: [ "templates/ARCHITECT-REFERENCE.md", "templates/BUILDER-INSTRUCTIONS.md", "templates/PROJECT-INSTRUCTIONS.md", "templates/START-HERE.md", "templates/STATUS.md", "templates/STANDARDS.md", "templates/DECISIONS.md", "templates/CHAT-LOG.md", "templates/HANDOFF.md", ], filesRemoved: [], instructions: "",};- Create
src/migrations/v0.6.3-to-v0.6.4.ts:
export const migration = { fromVersion: "0.6.3", toVersion: "0.6.4", breaking: false, filesAdded: [], filesChanged: [ ".gitignore", ], filesRemoved: [], instructions: "Run npm run build && npm link after updating. Source code changes require rebuild.",};- Update
src/migrations/index.ts— add imports and register both new migrations:
import { migration as v062to063 } from "./v0.6.2-to-v0.6.3";import { migration as v063to064 } from "./v0.6.3-to-v0.6.4";Add both to the migrations array.
- Open PR: feature/v0.6.4-foundation-fixes → dev
- Merge to dev
- Verify:
npm run buildpasses clean - Open PR: dev → main
- Report PR URL to operator for review and merge
- After merge: tag v0.6.4
- Update SESSION-NOTES.md and CONTEXT.md
- Push all changes
Definition of done: Migration chain is complete from v0.6.2 → v0.6.3 → v0.6.4. v0.6.4 tagged on main. All source files free of hardcoded personal values.