Skip to content

feat(requirements): add PRD-calibration checkpoint for numeric-ceiling FRs (v2.18.5)#238

Merged
pitimon merged 1 commit into
mainfrom
feat/237-prd-calibration-checkpoint
May 24, 2026
Merged

feat(requirements): add PRD-calibration checkpoint for numeric-ceiling FRs (v2.18.5)#238
pitimon merged 1 commit into
mainfrom
feat/237-prd-calibration-checkpoint

Conversation

@pitimon
Copy link
Copy Markdown
Owner

@pitimon pitimon commented May 24, 2026

Summary

Closes #237 — action item from lesson 2026-05-24-v218-4-skill-authoring-double-rescue.md §5 catching FR-007 (ADR-020) PRD-vs-reality drift before merge in v2.18.4.

Adds a new sub-step 4a. Calibrate numeric ceilings against precedent to skills/requirements/SKILL.md Process step 4. When an EARS criterion sets an upper bound on lines/words/characters of a markdown artifact (ADR, guide, skill), the skill now nudges the author to:

  1. Identify the closest precedent in repo by artifact type (docs/adr/ADR-0*.md / guides/*.md / skills/*/SKILL.md)
  2. Measure body excluding YAML frontmatter: awk '/^---$/{c++; next} c>=2' <file> | wc -l
  3. Set the FR ceiling at precedent_max × 1.20, because aspirational round numbers contaminate /consistency-check runs once the artifact lands at its actual required size
  4. Opt out with a one-line FR-comment rationale when no precedent exists or the cap is set by a different constraint (hook token budget, validator string limit, etc.)

Case study: v2.18.4 FR-007 in docs/specs/skill-authoring-guide-235/prd.md shipped at ≤50 lines body against an ADR-017 precedent of ~150 lines and required pre-merge amendment to ≤150. @8-habit-reviewer caught the drift reactively; this checkpoint moves the catch upstream into the authoring step itself (H1 + H5 + H7).

Acceptance criteria check (per issue #237)

  • AC1skills/requirements/SKILL.md step 4a includes the 4-step sequence (skills/requirements/SKILL.md:78-82)
  • AC2 — FR-007 case study cited with one-line precedent example (skills/requirements/SKILL.md:81)
  • AC3 — Opt-out clause covers novel-artifact + different-constraint rationales (skills/requirements/SKILL.md:82)
  • AC4 — 7 lines added (well within ≤15 budget); Check 25 description ≤1024 chars + F1 word budget preserved
  • AC5 — Check 26 NEVER/MUST hygiene satisfied via because reason marker (skills/requirements/SKILL.md:81)
  • AC6guides/templates/prd-template.md Success Criteria section shows calibrated-vs-uncalibrated FR-007 example

Out of scope (per issue #237)

  • No validator extension, no PreToolUse hook — runtime enforcement belongs in pitimon/claude-governance per plugin boundary (memory obs #233270)
  • No retroactive PRD audit — existing PRDs in docs/specs/ not touched
  • No extension to non-numeric FR fields — the friction case is specifically numeric ceilings on markdown artifacts

Pre-PR cross-verify (@8-habit-reviewer)

16/17 PASS + 1 LOW (meta-honesty) + 1 N/A (Q13 solo single-skill edit).

The single LOW finding is the kind of recursive honesty this checkpoint preaches: issue #237's own AC #4 (≤15-line cap) was itself an uncalibrated round number. The closest precedent for "sub-step addition to a SKILL.md Process section" is the EARS opt-out paragraph added in v2.5.0 (~4 lines); a strict +20% ceiling would be ~5 lines. The actual implementation landed at 7 lines, slightly over a v2.5.0-derived ceiling.

This does not block merge, because the contamination mechanism only fires when ACs are persisted as spec FRs that /consistency-check reads — issue body ACs are not persisted artifacts. The H8 modeling discipline is to acknowledge the gap rather than gloss it over: AC #4's ≤15-line cap was aspirational; future issue-AC-budget proposals should themselves apply step 4a or declare the opt-out rationale.

Consumer-doctrine bump (per ADR-019)

skills/** + guides/** edits MUST bump per Check 27. Patch grain v2.18.4 → v2.18.5 atomic across:

  • .claude-plugin/plugin.json + .claude-plugin/marketplace.json
  • README.md (badge + footer + What's New section)
  • SELF-CHECK.md (header + per-release row + footer)

Forward-Guardrail Sunset 2026-11-24

Per ADR-017 mechanism (not ADR-016 eviction). Reversal criteria: no /reflect cite, no calibrated FR in subsequent persisted PRDs, FR-007 case remains the only friction signal. If sunset triggers, revert sub-step 4a; the case study + template example remain as authoring lore.

Test plan

  • tests/validate-structure.sh — 358 PASS / 0 FAIL (Check 25, 26, 27 all pass)
  • tests/validate-content.sh — 275 PASS / 0 FAIL / 1 WARN
  • tests/test-skill-graph.sh — 75 PASS / 0 FAIL
  • tests/test-verbosity-hook.sh — 19 PASS / 0 FAIL
  • CI green on PR (link-check + validator suite)
  • Post-merge: tag v2.18.5 + GitHub release with this body as release notes

Refs #237

…g FRs (v2.18.5)

Closes #237 — action item from lesson `2026-05-24-v218-4-skill-authoring-double-rescue.md`
§5 catching FR-007 (ADR-020) PRD-vs-reality drift before merge in v2.18.4.

`skills/requirements/SKILL.md` Process step 4 gains sub-step 4a "Calibrate
numeric ceilings against precedent" (7 lines added, well within issue
AC #4's ≤15-line budget) covering the 4-step authoring sequence:

  1. Identify the closest precedent in repo by artifact type
     (docs/adr/ADR-0*.md, guides/*.md, or skills/*/SKILL.md).
  2. Measure body excluding YAML frontmatter:
     `awk '/^---$/{c++; next} c>=2' <file> | wc -l`.
  3. Set the FR ceiling at `precedent_max × 1.20`, because aspirational
     round numbers contaminate `/consistency-check` runs once the
     artifact lands at its actual required size.
  4. Opt out with a one-line FR-comment rationale when no precedent
     exists or the cap is set by a different constraint
     (hook token budget, validator string limit, etc.).

`guides/templates/prd-template.md` Success Criteria section adds a
calibrated-vs-uncalibrated FR-007 example side by side
(≤180 lines from ADR-017 ~150 × 1.20 vs ≤50 lines uncalibrated).

Case study: v2.18.4 FR-007 in `docs/specs/skill-authoring-guide-235/prd.md`
shipped at ≤50 lines body against an ADR-017 precedent of ~150 lines and
required pre-merge amendment to ≤150. The `8-habit-reviewer` pre-PR pass
caught the drift reactively; this checkpoint moves the catch upstream into
the authoring step itself.

Habits: H1 Be Proactive (prevent reviewer-catch by moving the gate
upstream) + H5 Seek First to Understand (measure precedent before
authoring ceiling — same discipline as reading existing code before
writing new code) + H7 Sharpen the Saw (invest in the meta-tool
`/requirements` that authors specs, per ADR-018 P/PC balance).

Out-of-scope per #237: no validator extension, no PreToolUse hook
(runtime enforcement belongs in `pitimon/claude-governance` per plugin
boundary memory obs #233270); no retroactive PRD audit; no extension
to non-numeric FR fields.

Consumer-doctrine bump per ADR-019 (`skills/**` + `guides/**` edits MUST
bump) atomic across `.claude-plugin/plugin.json`,
`.claude-plugin/marketplace.json`, `README.md` badge + footer + "What's
New", and `SELF-CHECK.md` header + per-release row + footer. Patch grain
matches: authoring-discipline addition, backwards-compatible.

Forward-Guardrail Sunset 2026-11-24 per ADR-017 mechanism (not ADR-016
eviction). Reversal criteria: no `/reflect` cite, no calibrated FR in
subsequent persisted PRDs, FR-007 case remains the only friction signal.

Validator state (pre-commit, all four suites green):
- tests/validate-structure.sh: 358 PASS / 0 FAIL
- tests/validate-content.sh: 275 PASS / 0 FAIL / 1 WARN
- tests/test-skill-graph.sh: 75 PASS / 0 FAIL
- tests/test-verbosity-hook.sh: 19 PASS / 0 FAIL

Pre-PR cross-verify (@8-habit-reviewer) 16/17 PASS + 1 LOW
(meta-honesty: issue AC #4's ≤15-line cap was itself uncalibrated; actual implementation landed at 7 lines so no contamination risk,
but the modeling gap is acknowledged in the PR body).

Refs #237
@pitimon pitimon merged commit ce2effd into main May 24, 2026
3 checks passed
@pitimon pitimon deleted the feat/237-prd-calibration-checkpoint branch May 24, 2026 15:25
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(requirements): add PRD-calibration checkpoint for numeric-ceiling FRs against precedent artifacts

1 participant