Skip to content

docs(guides): apply Adopter #2 friction fixes to spec-digest-pattern - #198

Merged
pitimon merged 1 commit into
mainfrom
docs/197-spec-digest-friction-fixes
May 17, 2026
Merged

docs(guides): apply Adopter #2 friction fixes to spec-digest-pattern#198
pitimon merged 1 commit into
mainfrom
docs/197-spec-digest-friction-fixes

Conversation

@pitimon

@pitimon pitimon commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

Closes 6 of 7 items from issue #197 — Adopter #2 report on the v2.15.9 spec-digest pattern from claude-all/netbird-sit (ops/infra archetype). Item 4 architectural fix (PreToolUse hook should distinguish Write vs Edit on .md files) is split to pitimon/claude-governance#34 — runtime enforcement belongs there per plugin boundary.

Fixes

# Item Change
2.1 Bug — grep -A1 false-negative on standard markdown blank-line-after-heading Replace with awk range scan (robust against MD022)
2.2 Bug — verification command misses backtick-wrapped paths (template default) Add companion grep with /-prefix carve-out for ops repos referencing remote paths
2.3 Bug — comma-listed siblings defeat the verification grep Explicit "one path per bullet" guidance in §1 template
3 Enhancement — "stale items deleted" needs explicit day-1 definition Define stale as "exists in canonical form elsewhere", not "more than N days old". Day-1 deletion rule prevents §3 from drifting into a done-list
5 Enhancement — recipe step 3 wording is feature-spec-flavoured Generalize from "data contracts" to "pointer-target file from §1 if any operational fact changed" — covers data contracts, runbooks, server state, changelog
4(c) Stop-gap — doc-blocker hook friction NEW section "Adopting alongside doc-blocker hooks" naming the Write-new vs Edit-tracked conflation + cross-reference to pitimon/claude-governance#34

Out of scope (handled elsewhere)

  • Item 4 architectural fix — opened as pitimon/claude-governance#34. The hook layer is the right place for the Write-vs-Edit distinction.
  • Promotion to /save-spec skilln≥2 adoption criterion is now met (netbox-sit + netbird-sit) and adoption-friction criterion has evidence (this PR). Scope-conflict criterion is implicitly resolved by Adopter feat(skills): add Definition of Done checklist to each workflow skill #2 ("both adopt project-orientation mode without using --persist; the two modes serve different repos"), but should be documented in writing before promotion. Defer to a follow-up issue.

Test plan

  • validate-structure.sh 256/256 PASS
  • validate-content.sh 216 PASS / 0 FAIL / 1 WARN / 0 fitness breaches (after fixing one self-induced Check 12b false-positive — a markdown-link example in a code comment, ironic given that's exactly what the user reported in item 2.2)
  • CI green
  • Reviewer reads the new "Adopting alongside doc-blocker hooks" section and confirms the plugin-boundary framing reads cleanly

Habit mapping

  • H5 (Seek First to Understand) — every fix maps to an explicit cited line in Adopter #2 report: v2.15.9 hub-pattern in an ops/infra repo — friction notes + verification false-negatives #197 + the user's own verbatim suggestions where they supplied them (items 3, 5, and the companion grep in 2.2)
  • H4 (Win-Win) — every fix improves the next adopter's experience; cross-reference to claude-governance#34 leaves a paper trail for future hook-aware adopters
  • H8 (Voice/Conscience) — split into two PRs/issues at the plugin boundary rather than gluing a hook-aware allowlist into the guide

Refs #197, pitimon/claude-governance#34

Closes 6 of 7 items from issue #197 (Adopter #2 report from claude-all/netbird-sit, ops/infra archetype). Item 4 architectural fix split to pitimon/claude-governance#34.

Fixes:
- §3 (Live backlog) — define "stale" threshold explicitly as "exists in canonical form elsewhere", not "more than N days old". Day-1 deletion rule prevents §3 from drifting into a done-list (item 3)
- §4 verification — replace `grep -A1` with awk range scan (robust against blank-line-after-heading per markdownlint MD022) (item 2.1)
- §4 verification — add companion grep for backtick-wrapped paths (template default; the existing markdown-link grep was the only one shipped) with `/`-prefix carve-out for ops repos referencing remote paths (item 2.2)
- §1 template — explicit "one path per bullet" guidance; comma-listed siblings defeat the verification grep (item 2.3)
- CLAUDE.md recipe step 3 — generalize from "data contracts" (feature-spec language) to "pointer-target file from §1 if any operational fact changed" (covers data contracts, runbooks, server state, changelog — whatever the §1 pointers actually reference) (item 5)
- NEW section "Adopting alongside doc-blocker hooks" — stop-gap guidance for adopters whose repo has a PreToolUse hook blocking `.md` operations. Names the Write-new vs Edit-tracked conflation, cross-references the architectural fix tracked in pitimon/claude-governance#34 (item 4(c))

Validator state: validate-structure.sh 256/256 PASS; validate-content.sh 216 PASS / 0 FAIL / 1 WARN / 0 fitness breaches. Caught one self-induced Check 12b false-positive locally (markdown-link example in a code comment); fixed before push.

Refs #197
@pitimon
pitimon merged commit 85f6854 into main May 17, 2026
2 checks passed
@pitimon
pitimon deleted the docs/197-spec-digest-friction-fixes branch May 17, 2026 13:38
pitimon added a commit that referenced this pull request May 17, 2026
…202)

Patch release. Adopter #2 dogfood pass on v2.16.0 /save-spec surfaced 1
correctness bug + 3 quality items — all four fixed in this PR. Closes #201.

N1 (MEDIUM bug, fixed): §1 empty stub used `<filename>.md` which Check 4's
backtick-path grep extracted as <filename>.md (literal angle brackets),
failing [ -e ] and emitting MISS — Definition of Done's "passes 5 verification
commands" claim was provably false on the default scaffold. Stub now uses
plain prose with no backticked .md path.

N2 (LOW, documented): Timestamp reliability profile documented in reference.md.
The skill (no Bash) substitutes the Last updated value from Claude's session-
injected <system-reminder>Current:</system-reminder> context; when absent the
output may carry +00:00 or wrong offset. Adopter guidance: verify after
scaffold, edit manually if wrong. Phase 2 hook for adding Bash if needed.

N3 (LOW UX, fixed): Q2 now accepts "Other (free-text)" newline-separated
paths for ops/infra repos with non-canonical naming
(server-state.md, runbooks/, playbooks/, etc.). SKILL.md Process step 3 + 4
extended; reference.md Example F added.

N4 (LOW doc, fixed): PRD FR-003 deduplicated — references reference.md
Decision-3 as canonical (no paraphrased inline drift hazard).

Validator state: validate-structure.sh 268/268 PASS, validate-content.sh
219+ PASS / 0 FAIL / 1 WARN / 0 fitness breaches.

8-habit-reviewer skipped — Adopter #2 wrote the review in #201; fixes match
their suggested directions verbatim. Sibling closure: #197 now closeable
(5/5 items addressed in v2.16.0 + #198).

Refs #201, #197

Co-authored-by: itarun.p <itarun.p@somapait.com>
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