Skip to content

feat(baseline): clear context and branch-first at spec boundaries#29

Merged
protonspy merged 1 commit into
mainfrom
feat/spec-boundary-discipline
Jun 9, 2026
Merged

feat(baseline): clear context and branch-first at spec boundaries#29
protonspy merged 1 commit into
mainfrom
feat/spec-boundary-discipline

Conversation

@protonspy

Copy link
Copy Markdown
Owner

Summary

Folds two spec-boundary workflow-discipline steps into the shipped baseline templates (internal/templater/templates/), so downstream csdd init/update users get them:

  • /clear at each feature/spec boundary — start a spec on a clean context and reset once its PR ships. The Stop hook (test-before-stop.sh) nudges the operator when a spec's tasks.md is fully checked.
  • Branch-first before implementationgit switch -c <type>/<feature> (kebab-case: feat/ fix/ chore/ refactor/ docs/ test/ perf/), enforced by the PreToolUse hook (block-destructive.sh), which now blocks git commit/git push on the default branch.

Touches the CLAUDE.md workflow, the SDD guide loop (§9.2), the wf-development agent, and the test-before-stop / block-destructive hooks. No spec — a direct workflow adjustment requested by the maintainer. (Layer-3 .claude//CLAUDE.md copies are gitignored; this PR carries the baseline .tmpl source, which csdd update dogfoods locally.)

Verification

go vet ./...            ✅
go test -race ./...     ✅  (pre-push gate; all packages green, ~85% cli coverage)
guard-hook behavior     ✅  blocks commit/push on main|master, allows on feature
                            branches, no false-positives, no crash on non-git dirs
gofmt -l .              ⚠️  only 3 pre-existing CRLF-churn files (unrelated, not in this PR)

🤖 Generated with Claude Code

Fold two spec-boundary discipline steps into the shipped baseline templates:
- /clear at each feature/spec boundary — start a spec on a clean context and
  reset once its PR ships; the Stop hook nudges when a spec's tasks are all
  checked.
- Branch-first before implementation — git switch -c <type>/<feature> (kebab
  case), enforced by the PreToolUse hook blocking commit/push on the default
  branch.

Updates the CLAUDE.md workflow, the SDD guide loop, the wf-development agent,
and the test-before-stop / block-destructive hooks. No spec — direct workflow
adjustment requested by the user.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protonspy protonspy merged commit ffb6632 into main Jun 9, 2026
3 checks passed
@protonspy protonspy deleted the feat/spec-boundary-discipline branch June 9, 2026 00:43
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.

1 participant