Skip to content

feat(architecture): ADR discovery ladder, Gotchas surface, exemplar validation (deepening F5/F6) - #1165

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/1158-architecture-adr-gotchas
Jul 23, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/1158-architecture-adr-gotchas

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #1158

Summary

Final tranche of the SW2030 consumer audit of [email protected] — F5 + F6 plus one appendix item (architecture 0.4.0 → 0.4.1, additive):

  • F6 — ADR discovery ladder. Phase 1 gave ADRs one shallow glob while the glossary got a precise walk-up rule; in the audit run the ADR check found nothing despite the repo having an ADR convention. ADRs now honor a project-declared decisions location, else walk a short ladder of common homes (docs/adr/, docs/decisions/, .adr/, adr-*/*-decision*) from the examined directory up to the repo root.
  • Appendix — exemplar validation. Phase 3's decision tree now validates an exemplar call site by reading it before locking the deepened shape around it (the audit hit an exemplar named before reading that turned out not to fit).
  • F5 — Gotchas surface. Added ## Gotchas recording the real failure history: the ${CLAUDE_PLUGIN_DATA} artifact-path trap (F1) and the unverified scan-claim shipping risk Phase 1.5 guards (F2). check-changed-skills.sh now passes with 0 warnings (was 1).

Test plan

  • scripts/check-changed-skills.sh origin/main — PASS, 0 errors 0 warnings (Gotchas surface now present).
  • scripts/check-changelog-parity.sh --check-bump origin/main — pass (0.4.1 entry).
  • markdownlint-cli2 'plugins/architecture/**/*.md' — 0 issues.

Related

Refs #1156, #1157 (both merged — the F1 and F2/F3/F4 predecessors this was serialized behind).

F5 markdownlint half declined, with evidence: the audit's MD041/MD013/MD060 failures do not reproduce under this repo's .markdownlint-cli2.jsonc — all three are disabled there and markdownlint-cli2 reports 0 issues on the skill. The audit ran under the consuming repo's config; under the plugin repo's own config there is nothing to fix.

🤖 Generated with Claude Code

…alidation (deepening F5/F6)

Final tranche of the SW2030 consumer audit of 0.3.5:

- F6: ADRs now get the same discovery discipline as the domain glossary.
  Honor a project-declared decisions location, else walk a short ladder of
  common homes (docs/adr, docs/decisions, .adr, adr-*/*-decision*) from the
  examined directory up to the repo root — a single default glob missed
  most layouts (in the audit run the ADR check degraded to one shallow glob).
- Appendix: Phase 3 now validates an exemplar call site by reading it before
  locking the deepened shape around it — an exemplar named from memory can
  turn out not to fit.
- F5: added a `## Gotchas` surface recording the observed failure history —
  the ${CLAUDE_PLUGIN_DATA} artifact-path trap (F1) and the unverified
  scan-claim shipping risk Phase 1.5 guards (F2). check-changed-skills now
  passes with 0 warnings.

F5 markdownlint half declined with evidence: the audit's MD041/MD013/MD060
failures do not reproduce under this repo's .markdownlint-cli2.jsonc (all
three disabled; markdownlint-cli2 reports 0 issues). Docs + discovery only;
no pipeline behavior change. architecture 0.4.1.

Closes #1158

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@claude

claude Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 1m 54s —— View job


PR Review

  • Gather context and understand request
  • Read changed files
  • Review plugin.json version bump
  • Review CHANGELOG.md entry
  • Review SKILL.md Gotchas surface (F5)
  • Review deepening.md ADR ladder + exemplar validation (F6 + Appendix)
  • Post findings

Summary

Four files, docs-only, pure additive. No behavior code, no new command execution, no remote calls. All changes look correct; two minor observations below.


plugin.json

plugin.json L4 — version 0.4.0 → 0.4.1. Correct for an additive patch: no existing contracts removed, no behavior changed. Aligns with CLAUDE.md's versioning requirement.


CHANGELOG.md

CHANGELOG.md L6–27

Content is internally consistent with prior entries. One observation:

Non-standard "Declined" section. Keep a Changelog defines Added / Changed / Deprecated / Removed / Fixed / Security — it has no Declined type. The repo has a prior-art pattern of trailing prose annotations (0.4.0 uses "Pure-ADD extension:", 0.3.6 uses "(#1156; topic-docs routing…)"), so this is consistent with local convention. Not a blocker, but worth knowing if this CHANGELOG is ever consumed by an automated parser that expects strict KAC types.

The CHANGELOG abbreviates the ADR ladder as `docs/adr/`, `docs/decisions/`, `.adr/`, … — the full canonical list lives in deepening.md and the CHANGELOG is just a summary. No inconsistency.


SKILL.md — Gotchas surface (F5)

SKILL.md L65–71

Both gotchas are correct and actionable:

  • Gotcha 1 (${CLAUDE_PLUGIN_DATA} trap) correctly cites the topic-docs binding link. The relative path ../../reference/topic-docs.md resolves correctly from skills/improve/SKILL.md → plugins/architecture/reference/topic-docs.md (confirmed present on disk).
  • Gotcha 2 (scan-agent claim shipping) accurately mirrors the Phase 1.5 gate in deepening.md. The failure example ("registered but never composed — a bug in the seam" that one grep disproved) is concrete and memorable.
  • The leading "Observed failure history — patterns that have actually bitten. Add here when a new one surfaces." framing sets a clear contribution bar for future additions. Good.

deepening.md — ADR discovery ladder (F6) + exemplar validation (Appendix)

ADR ladder — deepening.md L9–11

The ladder is well-specified:

  • Consumer-declared location honored first (CLAUDE.md / rules) — repo-agnostic. ✓
  • Walk-up from examined directory to repo root — mirrors how the domain glossary resolves. ✓
  • Covers both docs/adr/ (plural) and doc/adr/ (singular — a real convention in Go and some older projects). ✓
  • Filename wildcards (adr-*, *-decision*) catch flat-directory conventions. ✓
  • Rationale sentence ("ADR placement varies widely; a single default glob misses most of them") is exactly the right justification to carry in the playbook.

Exemplar validation — deepening.md L90

"Read it before locking the shape around it. An exemplar chosen from memory or a candidate's file list can turn out not to fit once actually read; validate the fit first, and if it does not hold, search for a call site that does rather than shaping the interface around the wrong one."

Clear, actionable, scoped correctly to Phase 3 (interview loop, not a scan phase). The "search for a call site that does" recovery path avoids the trap of abandoning the exemplar approach entirely.


CLAUDE.md design rules — checklist

Rule Status
Repo-agnostic (no hardcoded paths) ✓ — all paths are consumer-declared or relative within plugin
Configurable without editing plugin ✓ — consumer CLAUDE.md/rules honored first in ADR ladder
Plugin-form-safe (no ../ reach-outs to repo root) ✓ — only intra-plugin relative links
No PII / secrets ✓ — docs only
Versioned (explicit semver) ✓ — 0.4.1
Security review (code exec, remote MCP, data egress) ✓ — no new execution surface

Verdict: LGTM. The one non-standard item (CHANGELOG "Declined" section) is consistent with repo convention and is not a bug. No corrections needed.

@claude

claude Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 1m 8s —— View job


Security Review — PR #1165

  • Fetch PR diff and identify changed files
  • Read changed files for security analysis
  • Check for injection surfaces, path traversal, unsafe shell expansion
  • Check for secrets/credential handling issues
  • Check for GitHub Actions security patterns
  • Post findings

Findings

No security issues found.

All four changed files are documentation and instruction markdown — no executable code, no shell scripts, no GitHub Actions, no plugin manifest changes beyond a version bump. Detail per file:

plugin.json — Version 0.4.0 → 0.4.1. No new permissions, no MCP server declarations, no remote URLs, no egress surface added.

CHANGELOG.md — Documentation only.

SKILL.md (Gotchas section) — The new ## Gotchas block documents two known failure patterns. The ${CLAUDE_PLUGIN_DATA} entry explicitly warns against using that path for durable artifacts, correctly noting it resolves at the wrong tier and would leak scan output into git if the .claude/ fallback were used instead. This is a net security improvement — it records the correct reasoning for the safer path convention in a discoverable place.

deepening.md (ADR discovery + exemplar validation) — The ADR ladder instruction expands the file-reading scope to a bounded walk from the examined directory up to the repo root. The instruction to "honor" a project-declared decisions path from the consuming project's CLAUDE.md follows the same trust model already in use throughout this plugin (consumer-declared glossary paths, topic-docs conventions). The operation is read-only; the expanded discovery does not introduce write, execution, or egress surface. The exemplar validation addition is a guard that reduces the risk of reasoning over unread files — directionally positive.

No injection surfaces, no secret handling, no pinning regressions, no permission widening.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Findings classified — both bot reviews merge-clean:

Finding Source Classification Disposition
CHANGELOG "Declined (F5, …)" isn't a Keep-a-Changelog standard type claude[bot] review (observation) VALID (accepted, no change) Written as a trailing prose annotation, not a ### Declined heading — matches the local convention the same review cites (0.4.0's "Pure-ADD extension:", 0.3.6's trailing (#…)). Recording the declined half with evidence is deliberate; no strict-KAC parser consumes this file
CHANGELOG abbreviates the ADR ladder with … claude[bot] review (observation) NOT A DEFECT The review itself confirms "No inconsistency" — the full canonical list lives in deepening.md; the CHANGELOG is a summary
Security review claude[bot] security No issues — net positive (records the safer artifact-path reasoning in a discoverable Gotcha; ADR discovery is read-only, same consumer-trust model already in use) —

Codex posted no suggestions (clean). Readiness: 25/25 checks pass, 0 unresolved threads, cooldown cleared.

@kyle-sexton
kyle-sexton merged commit e5b3ac2 into main Jul 23, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the feat/1158-architecture-adr-gotchas branch July 23, 2026 17:10
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.

architecture: ADR discovery ladder, Gotchas surface, exemplar-validation line (deepening F5/F6 + appendix)

1 participant