Skip to content

feat(planning): design defaults name the principles; add lifecycle and reversibility - #8413

Merged
kyle-sexton merged 18 commits into
mainfrom
feat/8334-design-defaults-reversibility
Oct 19, 2026
Merged

kyle-sexton merged 18 commits into
mainfrom
feat/8334-design-defaults-reversibility

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #8334

Summary

/planning:design now names the design principles it applies and points at the planning plugin's bundled design-principles reference. It treats quality requirements already in the Brief as settled. A new Lifecycle and reversibility section, backed by an on-demand reference/reversibility.md, calls each significant decision a one-way or two-way door and prompts an ADR for every one-way door. It also scales design depth by the Quality bar: line and the subdomain.

Fix

  • skills/design/SKILL.md: pointer lines to design-principles.md, design-defaults.md and reversibility.md. The standing text lives in the references (DA-C). Body growth 457 to 468 lines of the 500 cap; the skill gate's WARN on it is accepted.
  • skills/design/reference/design-defaults.md (new): principle-named defaults, the consumer-standards override line, the per-tenant configurability line (labeled vendor guidance), settled Brief NFRs, and the Principles thread written for handoff.
  • skills/design/reference/reversibility.md (new): one-way and two-way doors, the ADR prompt, the existing-style baseline, the greenfield vertical-slice default, and subdomain investment. A prototype skips reversibility and names it deferred.
  • Four eval cases under plugins/planning/evals/ and a changelog fragment for planning.

Verification

Regraded r1, branch / main / no plugin:

Case Branch Main No plugin
design-brief-nfr-not-reasked 0.92 1.00 1.00
design-fact-placed-once 1.00 1.00 0.78
design-one-way-door-adr-prompt 0.83 0.50 0.50
design-prototype-reversibility-deferred 1.00 0.67 0.67
  • The reversibility reference beats main on both of its cases. Each eval file has one case, so the noise verdict is "n too small to call", and these deltas are evidence, not established gains.
  • Two instructions showed no gain over main: the design-principles pointer and the line that treats Brief quality requirements as settled. They are kept by the user's decision. Phase 4's acceptance criterion requires the pointer. NFR-not-reasked and fact-placed-once already score at the ceiling on main, so they cannot show a gain. The pointer also feeds the Principles thread that feat(planning): gate principle and reversibility threads at handoff, plan and plan-reviewer #8335's handoff gate requires.
  • bash scripts/check-changed-skills.sh origin/main exits 0; typos and check-affected pass (pre-push).
  • Left out: no second eval run (the r1 runs were regraded offline after grader-only fixes).

Acceptance criteria

  • grep -c "design-principles.md" on the design SKILL.md is ≥ 1, and the design skill's reversibility reference exists.
  • Eval cases: fact placed once, one-way door gets an ADR prompt, prototype names reversibility deferred, Brief NFR not re-asked; run on main's plugin and the branch's plugin. The no-gain lines are kept by the user's decision; see Verification.
  • bash scripts/check-changed-skills.sh origin/main exits 0.
  • A changelog fragment for the planning plugin.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 16 commits October 18, 2026 23:24
One directive line per foundational principle (SRP, OCP, LSP, ISP, DIP,
composition over inheritance, DRY of knowledge, coupling and cohesion,
information hiding, deep modules and change amplification, YAGNI's
cheap-now test, reuse first), each cited to its defining source with an
as-of date and a recheck trigger. It opens with the scope line and the
consumer-wins override line, and points at /review:quality-gate
code-design for review-time criteria.

Refs: #8332

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lity bar

In an engineering session the interview now reads the consumer's standards
before any bundled default, asks the intent question (second variant known,
category or speculative; existing structure; upstream), and prompts quality
requirements (NFRs) from a new context/nfr-prompts.md, each scaled by the
quality bar. The Brief records Quality bar: and Intent: lines under Captured
assumptions, Quality requirement: lines under Constraints, and an
"Overrides bundled default ... per ..." line when a consumer standard wins.
Unattended, only the user's own words settle the intent question; an
unstated answer is blocked with arbiter USER-RESERVED and the Brief is still
written. Upstream context is recorded as a short summary that leaves private
titles and URLs out of public repositories.

The text lives in context/loop.md; SKILL.md gains one pointer sentence and
keeps its 499 lines. Adds five eval cases and a changelog fragment.

Refs #8333

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add Stumble lines to the unattended intent rules and the quality-requirement
rules, point the quality-bar stumble at /review:quality-gate code-design, and
drop the /planning:design consumer claims. Cross-reference the deferred intent
row to the unattended stop and unconfirmed report, repeat the prototype
ambient-standards exception, and show the bug-fix form in the Brief template.

Tighten the reliability grader to require the degraded-provider behavior and
the second-variant grader to require the variant term inside the question,
with fail samples for both false positives.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d reversibility

/planning:design's design defaults now name SRP, OCP, LSP, ISP, DIP,
composition, reuse and DRY, coupling and cohesion, information hiding,
deep modules and YAGNI and point at reference/design-principles.md. A
new reference/design-defaults.md is applied first: the Brief's quality
bar, consumer standards through the standards-contract ladder, Brief
quality requirements as settled (else the interview's nfr-prompts.md),
generalize-now-or-wait under the interview's unattended rule, and a
per-tenant configurability line labeled vendor guidance.

A new "Lifecycle and reversibility" section points at
reference/reversibility.md: one-way and two-way doors with an ADR
prompt for one-way doors, the consumer's style as baseline with a
greenfield vertical slice as an overridable default, investment by
core, supporting or generic subdomain, scaled by the quality bar.

Four eval cases: one fact placed once (outcome), one-way door ADR
prompt, prototype defers reversibility, Brief NFR not re-asked.

Refs #8334

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ign graders

- A prototype's lifecycle thread now uses the TAGGED-DEFERRED form
  design-handoff accepts, with a revisit trigger as its research tag.
- The Lifecycle and reversibility section skips early-exit, status and
  trivial work, as the design defaults do.
- Stumble lines state the observed gaps; the greenfield slice gains one.
- Four regex graders reject negated mentions and yes/no re-asks, with
  the failing phrasings added as samples.
- The prototype scaffold's Intent line follows the interview format.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The design defaults now write a Principles thread naming the principles
and consumer overrides that shaped the design and how
generalize-now-or-wait was settled, citing the Brief's Intent line
counts. A prototype records it as deferred (prototype), the form
/planning:design-handoff accepts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… blocker grader

Under lock, a quality prompt the request does not cover becomes a captured
assumption with a revisit trigger or is stated as not applying, never a gap
that halts. The Brief template carries the bundled-default override line.
The unattended intent blocker is the run's last line in a fixed shape.

The names-blocker grader targets last_message explicitly, narrows the
negation guard to words directly before "block", lets the USER-RESERVED tag
sit on the next line, and runs offline under Python and JavaScript. Two
grader regexes drop fragments typos flagged, and the performance grader
accepts "300 milliseconds".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…widen two graders

The NFR and consumer-standard cases now say which Loqate result counts as
undeliverable, where the Pay button lives, and (for the standard case)
that checkout fails open, so lock has no domain gap to halt on. No graded
expectation changes.

emits-override-line allows a principle up to 160 characters, and
reads-standard is a trace regex that accepts the standards file read by
Read or by cat, sed, head or tail in Bash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ntent-and-quality-requirements

# Conflicts:
#	plugins/planning/reference/design-principles.md
Both cases now declare the run unattended in the wording the
unattended-blocked case uses, so a domain unknown becomes a captured
assumption or a blocked row and the Brief is still written. The graders
then measure the quality-requirement and override lines rather than lock
halting on the next open question.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uality-requirements' into feat/8334-design-defaults-reversibility
names-one-home accepts a new module that every surface reads and an
upload "limits" context; one-way-with-adr no longer treats "isn't
available" as a negated ADR prompt and accepts "need an ADR";
names-deferred accepts door calls named as decisions hard to undo.
Each kept final message the old pattern failed is now a pass sample,
beside new fail samples.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ults-reversibility

# Conflicts:
#	plugins/planning/skills/interview/context/loop.md
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 19, 2026 12:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T12:40:43.841077Z 2c842e0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c842e04ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0a8c060759a3e0ee236784b36cb0177f565a5a83: 0 finding(s), 0 as inline comments.

Security review (incremental, 2c842e0..0a8c060): no security issues found.

The increment is documentation and eval fixtures only:

  • A changelog fragment, one wording edit.
  • A reworded pointer and stumble note in plugins/planning/skills/design/reference/design-defaults.md.
  • Four new no-code-edit eval graders and their sample JSON files. Each grader is a tool_used check on Edit whose input_match regex asserts the design skill makes zero edits to source files.

I checked the instruction-surface lens. No standing instruction was deleted, narrowed or softened. The two design-defaults.md edits only change a plugin-root path form (${CLAUDE_PLUGIN_ROOT}/... to a relative link) and the stumble rationale text. The new graders add a constraint, not remove one.

The sample files hold only synthetic paths and strings, with no secrets, credentials or machine-specific data. Nothing executes, and no workflow, permission or dependency changed.

I did not read the instruction exception register, because no instruction was removed.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 0a8c060759a3e0ee236784b36cb0177f565a5a83: 0 finding(s), 0 as inline comments.

No findings in the incremental review (2c842e0 → 0a8c060).

I checked these changes:

  • New no-code-edit graders and samples (4 eval cases): Each mirrors the case's existing no-code-write grader and uses the same input_match pattern. The input_match extension in each is correct for its case: .js for design-brief-nfr-not-reasked, .py|.html for design-fact-placed-once, and .py for the other two. Each fail sample's file_path is a path the case's scaffold.sh or expected_outcome names, so the pattern matches it, and each pass sample (a .work/.../design-threads.md edit, or no tool call) does not match.
  • design-defaults.md link change: The nfr-prompts.md citation is now a relative link in the same <plugin-root>/… plus relative-path form the file already uses. ../../interview/context/nfr-prompts.md resolves from skills/design/reference/ to an existing file. I did not run the skill gate's Check 5 here. The PR context says Check 5 wants the ${CLAUDE_PLUGIN_ROOT} form for sibling-skill paths, so the PR's own check-changed-skills.sh run needs to be re-run on the new head to confirm this link passes.
  • Stumble line and changelog fragment: The reworded Principles stumble line and the matching fragment edit are consistent with each other. The fragment's first bullet still mentions the /planning:design-handoff acceptance of the prototype deferral, and that is not contradicted.

These edits touch no paths covered by the .claude/rules/ files that apply, such as the eval-transcript rule: the samples are synthetic, with no machine paths or identifying details. I did not re-review the unchanged files.

kyle-sexton and others added 2 commits October 19, 2026 08:47
…le that holds now

The spoke named its sibling-skill path through the plugin-root token, which the
Read tool never expands; it now uses the <plugin-root> link form. The Principles
thread's stumble and the changelog no longer claim a design-handoff rule that
lands only with #8335.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The no-code graders counted only Write calls, so a run that edited existing
source with Edit still passed. Each case gains a no-code-edit grader with
pass and fail samples.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 19, 2026
kyle-sexton added a commit that referenced this pull request Oct 19, 2026
Its no-code grader counted only Write calls; the same gap review found in
the design cases on #8413.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged via the queue into main with commit 2b43da3 Oct 19, 2026
25 checks passed
@kyle-sexton
kyle-sexton deleted the feat/8334-design-defaults-reversibility branch October 19, 2026 12:58
github-merge-queue Bot pushed a commit that referenced this pull request Oct 19, 2026
…plan and plan-reviewer (#8419)

Closes #8335

## Summary

The planning stages now enforce the threads #8334 (PR #8413) added to
`/planning:design`. `/planning:design-handoff` fails a design that lacks
a principles thread or a lifecycle-and-reversibility thread.
`/planning:plan` Step 2 audits the same two threads and confirms the
Brief carries the `Quality bar:` line that phase-boundary reviews rate
at. `planning:plan-reviewer` flags a plan that puts one fact in several
files or rebuilds existing code.

## Fix

- `skills/design-handoff/SKILL.md`: both threads must be RESOLVED,
directional or TAGGED-DEFERRED, and a prototype names them as deferred.
A failed gate now opens its reply with `Gate: FAIL` and the coverage
table before routing back to `/planning:design`; without that, the
routed design round swallowed the verdict. The skill's fixtures carry
the two threads.
- `skills/plan/SKILL.md` Step 2 and `context/plan-template.md`: the
checklist audits the threads, except under an early-exit
`design-resolution.md`, and confirms the Brief has a `Quality bar:`
line. Implementation already passes that plan-level line to each
phase-boundary review (`implement/SKILL.md:221`), so a phase does not
repeat it. This differs from the issue's "copies the line into each
tagged phase", which would add a copy nothing reads. The template tags
`Review: code-design` on any phase that adds or changes a contract,
type, module, or a fact or rule several files read (Markdown included),
and maps `concurrency` to `/review:quality-gate slice concurrency`.
- `context/plan-reviewer.md` Design alignment: two lines, the
spread-fact/reuse question and the missing-thread finding.
- Eval cases `dh-missing-reversibility-thread-fails` and
`plan-reviewer-flags-spread-fact`, each with Write and Edit no-code
graders; a changelog fragment for planning.

## Verification

- Phase verifier: 9/9 PASS.
- `dh-missing-reversibility-thread-fails`: branch 0.917 (r2, regraded)
vs main 0.25. Main passed the gate and edited PLAN.md in 3 of 3 runs.
- `plan-reviewer-flags-spread-fact`: 1.0 on every arm, no plugin
included, so it cannot measure the plan-reviewer line it targets. The
line is kept by the user's decision because Phase 5 criterion C3
requires it.
- Each eval file has one case, so the noise verdict is "n too small to
call"; these deltas are evidence, not established gains.
- On the merged head: `check-spoke-plugin-root.sh --check` is clean,
`check-affected.sh --tests` reports 8 passed, and `validate-cases.py`
exits 0.
- Left out: no eval rerun after merging main (the merge brought only
#8413's already-reviewed changes and unrelated files). `check-affected`
prints one SKIP, ruff, because the branch changes no Python file.

## Acceptance criteria

- [x] `grep -c "one fact or rule in several files"` on the plan-reviewer
context returns 1.
- [x] Eval cases `dh-missing-reversibility-thread-fails` and
`plan-reviewer-flags-spread-fact`, run with and without the change;
differences above.
- [x] `bash scripts/check-changed-skills.sh origin/main` and `bash
scripts/check-affected.sh --tests` exit 0. The one SKIP line is ruff,
because no Python changed.
- [x] A changelog fragment for the planning plugin.

## Related

- Refs #8326 — spec container
- #8413 — design defaults and reversibility (#8334), merged


🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

feat(planning): design defaults name the principles; add lifecycle and reversibility

1 participant