Skip to content

feat(skills): graft enforcement layer onto discipline skills#33

Merged
protonspy merged 1 commit into
mainfrom
feat/harden-discipline-skills
Jun 13, 2026
Merged

feat(skills): graft enforcement layer onto discipline skills#33
protonspy merged 1 commit into
mainfrom
feat/harden-discipline-skills

Conversation

@protonspy

Copy link
Copy Markdown
Owner

Summary

Adapts the superpowers enforcement technique onto csdd's five discipline skills, while preserving their existing csdd evidence discipline. Each skill gains:

  • ## The Iron Law — one inviolable, imperative rule with explicit loophole-closers.
  • ## Rationalizations — an | Excuse | Reality | table that pre-empts the exact excuses an agent uses under pressure, ending in the verbatim "Violating the letter of the rule is violating its spirit."
  • ## Red Flags — STOP — thought-phrased self-checks that send the agent back to the workflow.

It also tightens each description front-matter to be trigger-only (not a workflow summary, which the superpowers method shows makes agents skip the body), and converts each skill's intro into the required ## Goal section.

Spec

harden-discipline-skills (gitignored layer-3, dogfooded locally) — requirements → design → tasks all human-approved; tasks 1–8 complete. development_flow: unit (prose work; per-behavior "test" is csdd skill validate + byte-parity + subagent pressure test).

What changed (committable)

  • internal/templater/templates/skills/{tdd-cycle,verify-change,pr-review,safe-refactor}/SKILL.md.tmpl — the layer-2 shipped baseline, kept byte-identical to the layer-3 copies. csdd-quality-gate is hardened too but is layer-3-only (gitignored), so it's not in this diff.
  • internal/cli/update_test.go — sync the test fixture that pinned verify-change's old description (necessary because R4 rewrote it).
  • internal/cli/cli_test.go — add the four shipped discipline skills to TestShippedWorkflowSkillsValidate as a regression guard.

Notable findings

  • The four shared skills were already failing csdd skill validate (missing ## Goal) before this PR — undetected because no test validated them. Fixed, and the new regression guard locks it in.
  • The bundled MCP server (v0.2.6) silently drops development_flow from spec.json when re-serializing (predates that field). Tracked separately as a follow-up issue.

Verification

```

  • make check ✅ (gofmt clean + vet + race tests, all packages)
  • csdd skill validate (tdd-cycle, verify-change, csdd-quality-gate, pr-review, safe-refactor) ✅ 5/5
  • byte-parity layer-2 ↔ layer-3 (4 shared skills) ✅ empty diffs
  • subagent pressure test (tdd-cycle, verify-change) ✅ both chose the disciplined option, citing the Iron Law
  • code-reviewer (adversarial) ✅ APPROVE, 0 Blockers / 0 Important
  • csdd spec test-report ⚠️ 455 passed · 0 failed · 1 skipped (attention: gotestsum not installed; plain go test via make check is green)
    ```

Risks

  • Pure prose change to shipped skill templates (+ two test-only edits); no Go production logic touched. Downstream users receive the hardened skills on the next csdd init.

🤖 Generated with Claude Code

Adapt the superpowers technique — a stated Iron Law, a Rationalizations table,
and a Red Flags self-check — onto the five discipline skills (tdd-cycle,
verify-change, csdd-quality-gate, pr-review, safe-refactor), preserving their
existing csdd evidence discipline (CLI evidence steps, Completion Criteria,
Verification Before Reporting).

Also convert each skill's intro into the required `## Goal` section — the four
shared skills were previously failing `csdd skill validate` for lack of it — and
tighten each `description` front-matter to be trigger-only, not a workflow summary.

Layer-2 templates are kept byte-identical to their layer-3 copies; csdd-quality-gate
stays layer-3-only. Sync update_test.go's pinned verify-change description and add
the four shipped discipline skills to TestShippedWorkflowSkillsValidate as a
regression guard for their required headings.

Spec: harden-discipline-skills (tasks 1-8)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protonspy protonspy merged commit 55f0fe0 into main Jun 13, 2026
3 checks passed
@protonspy protonspy deleted the feat/harden-discipline-skills branch June 13, 2026 16:37
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