TASKS.md — scaffolder v0.8.1 staging branch + minor fixes
TASKS.md — scaffolder v0.8.1 staging branch + minor fixes
Section titled “TASKS.md — scaffolder v0.8.1 staging branch + minor fixes”Rules for Code
Section titled “Rules for Code”- Always work on a feature branch, never directly on dev or main
- Read CLAUDE.md and STANDARDS.md before starting any work
- Read sessions/CURRENT.md for project state
- Complete each task fully before moving to the next
- Do not add features not listed here
- Follow Conventional Commits format on every commit
- Update sessions/CURRENT.md at the end of every session
- All merges require PRs
Branch
Section titled “Branch”Create one branch for all tasks: feature/v0.8.1-staging
All tasks committed to that branch.
Final PR: feature/v0.8.1-staging → dev (PR) → staging (PR) → main (PR)
NOTE: This is the first release using the full three-branch flow. Feature → dev → staging → main.
Version target
Section titled “Version target”v0.8.1
Context
Section titled “Context”This release adds staging branch creation to new projects, updates documentation for the three-branch flow with rulesets, and fixes the session-end skill to not assume PRs every session.
Pre-work
Section titled “Pre-work”Before starting Task 1:
- Create GitHub milestone: v0.8.1
- Create GitHub issues for each task (Tasks 1-7)
Definition of done
Section titled “Definition of done”A task is only complete when:
- File edited or created correctly
-
npm run buildpasses - Committed with correct message format
- Corresponding GitHub issue referenced
Build order
Section titled “Build order”Task 1 — Add staging branch creation to createGit.ts
Section titled “Task 1 — Add staging branch creation to createGit.ts”Branch: feature/v0.8.1-staging
Commit: feat: create staging branch alongside main and dev in new projects
File: src/createGit.ts
After the line run("git checkout -b dev");, add:
run("git checkout -b staging main");run("git checkout dev");This creates: main (default) → staging (from main) → dev (active branch after create). The operator ends up on dev, ready to work.
Also update createGithub.ts to push the staging branch. After the existing push lines, add:
run("git push -u origin staging");Definition of done: New projects get three branches: main, staging, dev. All pushed to GitHub. Operator lands on dev. Build passes.
Task 2 — Update session-end skill to not assume PRs
Section titled “Task 2 — Update session-end skill to not assume PRs”Branch: feature/v0.8.1-staging
Commit: fix: update session-end skill to not assume PR every session
File: .claude/skills/session-end/SKILL.md
Update step 1 to:
1. Ensure all work is committed on the current branch: - Run `git status` - If uncommitted changes exist, commit them with an appropriate message - Push the branch - Do NOT create a PR unless the operator requests one or the feature is complete - Sessions often span multiple commits on a feature branch before a PR is neededAlso update templates/claude-skills/session-end/SKILL.md with the same change.
Definition of done: Skill no longer implies PR at every session end. Both copies updated.
Task 3 — Update STANDARDS.md branch strategy for staging and rulesets
Section titled “Task 3 — Update STANDARDS.md branch strategy for staging and rulesets”Branch: feature/v0.8.1-staging
Commit: docs: update STANDARDS.md branch strategy for staging and rulesets
File: templates/STANDARDS.md
Update the branch strategy section:
## Branch strategy- main — production, stable only- staging — pre-production review, PRs from dev merge here for review before main- dev — integration branch, all features merge here first- feature/[name] — one per feature, branched from dev- fix/[name] — for bug fixes, branched from dev- hotfix/[name] — critical fixes, branched from main only
Flow: feature → dev (PR) → staging (PR) → main (PR)
Rules:- All merges require PRs — no direct pushes to main, staging, or dev- Code AI always works on a feature or fix branch- Branch names lowercase, hyphens only, no spaces- Delete feature branches after merging — no clutter- main, dev, and staging are protected by GitHub rulesets (see below)Update the PR workflow section:
## Pull request workflow- feature/* → dev: PR required- fix/* → dev: PR required- dev → staging: PR required (team review checkpoint)- staging → main: PR required (production release)- hotfix/* → main: PR required (emergency only)
PR checklist before merging to main:- [ ] All features in this release are complete and tested- [ ] CHANGELOG.md updated- [ ] Version bumped in package.json- [ ] No console.log or debug code left in- [ ] .env.example up to date- [ ] README.md reflects current stateAdd a new section after branch protection:
## GitHub rulesetsProtected branches (main, dev, staging) are managed via GitHub rulesets:- Require PR before merging- Restrict deletions- Block force pushes- Allowed merge methods: merge and squash only (no rebase)- Required approvals: 0 for solo, 1+ for teams
To configure: Repository Settings → Rules → RulesetsExport your ruleset as JSON for backup and documentation.
Optional future rules (enable when ready):- Require status checks to pass (CI must be green before merge)- Require signed commits (enterprise)- Require conversation resolution (team discussions must be resolved)Definition of done: STANDARDS.md documents three-branch flow and rulesets.
Task 4 — Update CLAUDE.md template for staging branch
Section titled “Task 4 — Update CLAUDE.md template for staging branch”Branch: feature/v0.8.1-staging
Commit: docs: update CLAUDE.md template with staging branch
File: templates/CLAUDE.md
Update branch strategy section:
## Branch strategy- main — production, stable only- staging — pre-production review- dev — integration branch, all features merge here first- feature/[name] — one per feature, branched from dev, deleted after merge- fix/[name] — for bug fixes, branched from dev- hotfix/[name] — critical fixes, branched from main only- [CODE_AI_NAME] always works on a feature or fix branch unless explicitly told otherwise
Flow: feature → dev (PR) → staging (PR) → main (PR)Also update the scaffolder’s own CLAUDE.md at project root with the same branch strategy.
Definition of done: Both CLAUDE.md files reflect three-branch flow.
Task 5 — Update dry run and createFolders documentation
Section titled “Task 5 — Update dry run and createFolders documentation”Branch: feature/v0.8.1-staging
Commit: docs: update dry run output and docs for staging branch
File: src/index.ts — update printDryRun() message at the end:
console.log(`\nGitHub repo: ${githubUser}/${name} (private)`);console.log(`Branches: main, staging, dev`);console.log(`\nRun /sc create "${name}" to create this project.`);File: docs/COMMANDS.md — update sc create description to mention three branches.
File: README.md — update “What you get” to mention staging branch:
- Git with main/staging/dev branches and v0.0.0 tagDefinition of done: All user-facing output mentions three branches.
Task 6 — Update sc help topics for staging flow
Section titled “Task 6 — Update sc help topics for staging flow”Branch: feature/v0.8.1-staging
Commit: docs: update sc help topics for staging branch flow
File: src/scHelp.ts
Update the build topic:
build: `Build workflow:
1. Start a build session: sc build [project] (auto-starts timer and opens Claude Code) 2. Work through tasks in Claude Code 3. Commit and push to feature branch (no PR needed per session) 4. When feature is complete: PR to dev 5. When dev is stable: PR to staging for review 6. When staging approved: PR to main 7. End session: sc exit`,Update the planning topic to reference staging in the review step.
Definition of done: Help text reflects three-branch flow.
Task 7 — Version bump, CHANGELOG, migration, and PR
Section titled “Task 7 — Version bump, CHANGELOG, migration, and PR”Branch: feature/v0.8.1-staging
Commit: chore: bump version to 0.8.1
Commit: docs: update CHANGELOG for v0.8.1
- Bump package.json to 0.8.1
- Update versions.json (latest: “0.8.1”, add entry):
"0.8.1": { "breaking": false, "changes": ["Staging branch created automatically in new projects", "Three-branch flow: feature → dev → staging → main", "GitHub rulesets documented in STANDARDS.md", "Session-end skill updated to not assume PR every session", "All help text updated for staging flow"] }- Update CHANGELOG.md
- Update README badge, STATUS.md
- Create migration
src/migrations/v0.8.0-to-v0.8.1.ts:
export const migration = { fromVersion: "0.8.0", toVersion: "0.8.1", breaking: false, filesAdded: [], filesChanged: [ "CLAUDE.md", "STANDARDS.md", ".claude/skills/session-end/SKILL.md", ], filesRemoved: [], instructions: "Staging branch added to new projects. Existing projects can add staging manually: git checkout -b staging main && git push -u origin staging",};Register in migrations/index.ts.
- PR: feature → dev
- Merge dev
- PR: dev → staging
- Merge staging
- PR: staging → main
- Report PR to operator
- After merge: tag v0.8.1
- Update sessions/CURRENT.md
- Push everything
NOTE: This is the first release going through the full three-branch PR flow. Code should follow it exactly: feature → dev → staging → main, each via PR.
Definition of done: v0.8.1 tagged on main. Three-branch flow proven by this release itself. Build clean.