Skip to content

Commit 1b40ebe

Browse files
nsalvacaonexomodeling-blipCopilotgemini-code-assist[bot]Copilot
authored
feat(solution-audit): elevate to v0.2.0 — scripts, 8th dimension, parallel blueprint review (#39)
* docs: add solution-audit v0.2.0 design doc and implementation plan * feat(solution-audit): add mark-stale.sh script for PostToolUse hook Bash script that reads tool_input JSON from stdin, maps edited file paths to affected audit dimensions, and merges stale dims into .solution-audit-latest.json. Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * fix(solution-audit): mark-stale.sh — atomic write, stdin guard, path normalisation Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add save-progress.sh script for Stop hook Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add check-links.sh for executable link validation Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add check-examples.sh for code block validation Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * fix(solution-audit): fix URL parsing, file count, and crash handling in check-links/examples - check-links.sh: switch Python external URL output to TAB separator and update bash while-read IFS to avoid colon-in-URL splitting on https:// paths - check-examples.sh: count all .md files walked (not just those with validated blocks) so files_checked reflects true population; wrap os.walk loop in try/except to emit __STATS__:ERROR:0 and exit 1 on unhandled crash; remove unused tempfile import Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add PostToolUse stale-marking and Stop WIP hooks Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add reference files for 4 skills missing assessment criteria Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * fix(solution-audit): move COMPLETE marker to Phase 5, explicit Write for merged report Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add spec-gap-analysis skill, spec-reviewer agent, blueprint-review command * feat(solution-audit): add spec-gap-analysis as 8th dimension in /audit Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): wire check-links.sh and check-examples.sh into audit-docs Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * feat(solution-audit): add 8th dimension and WIP persistence to solution-auditor Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * fix(solution-audit): update skill count from 7 to 8 in solution-auditor * chore(solution-audit): bump to v0.2.0, update README with new components Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * Update plugins/solution-audit/.claude-plugin/plugin.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update plugins/solution-audit/commands/audit-docs.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update plugins/solution-audit/scripts/check-examples.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update plugins/solution-audit/agents/solution-auditor.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update plugins/solution-audit/scripts/check-links.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(solution-audit): use braced ${CLAUDE_PLUGIN_ROOT} in hook commands (#40) * Initial plan * fix(solution-audit): use braced ${CLAUDE_PLUGIN_ROOT} in hook commands Co-authored-by: nsalvacao <181968287+nsalvacao@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nsalvacao <181968287+nsalvacao@users.noreply.github.com> Co-authored-by: NUNO MIGUEL DA SILVA SALVACAO <nuno.salvacao@gmail.com> --------- Co-authored-by: Nexo <nexo.modeling@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: nsalvacao <181968287+nsalvacao@users.noreply.github.com>
1 parent 8da763a commit 1b40ebe

19 files changed

Lines changed: 2947 additions & 9 deletions

File tree

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# solution-audit v0.2.0 — Elevation Design
2+
3+
**Date:** 2026-03-10
4+
**Author:** Nuno Salvação
5+
**Status:** Approved
6+
**Scope:** Domain elevation of solution-audit plugin — new components, executable scripts, automation hooks
7+
8+
---
9+
10+
## Context
11+
12+
The solution-audit plugin is conceptually mature (7 audit dimensions, 6 commands, 3 agents) but has zero executable code — all logic lives in agent descriptions. Key workflows used repeatedly in practice are not automated:
13+
- Multi-agent parallel blueprint/spec review with output contracts
14+
- Spec-vs-implementation gap detection (missing as a dimension)
15+
- Progress saving during long analysis sessions (rate-limit resilience)
16+
- Hooks that react to file changes (stale audit signaling)
17+
18+
This design elevates v0.1.0 to v0.2.0 with production-ready automation.
19+
20+
---
21+
22+
## New Components
23+
24+
### 1. Command: `/blueprint-review`
25+
26+
**File:** `commands/blueprint-review.md`
27+
28+
**Purpose:** Orchestrates parallel multi-agent review of a blueprint or spec document with explicit output contracts per agent and rate-limit resilience.
29+
30+
**Usage:**
31+
```
32+
/blueprint-review docs/blueprint.md
33+
/blueprint-review --all # scans docs/, blueprints/, specs/
34+
```
35+
36+
**Behavior:**
37+
1. Locates target file(s) — argument or auto-scan of `docs/`, `blueprints/`, `specs/`
38+
2. Reads the file before spawning any agent
39+
3. Spawns 3 parallel agents via Task tool, each with explicit output file:
40+
- `spec-reviewer``audit-reports/YYYY-MM-DD-spec-gap.md`
41+
- `coherence-analyzer``audit-reports/YYYY-MM-DD-feasibility.md`
42+
- `ux-reviewer``audit-reports/YYYY-MM-DD-ux-risks.md`
43+
4. Each agent writes **incrementally** (per section, not at end) for rate-limit resilience
44+
5. Each agent writes `[IN PROGRESS]` header at start, `[COMPLETE]` or `[PARTIAL - rate limited]` at end
45+
6. Coordinator merges into `audit-reports/YYYY-MM-DD-blueprint-review.md` with:
46+
- Executive summary
47+
- Priority-ranked issues table (cross-agent)
48+
- Per-agent detailed sections
49+
- Clearly marks any incomplete sections
50+
51+
**Rate-limit resilience:** Partial results preserved in individual files even if coordinator never runs.
52+
53+
---
54+
55+
### 2. Skill: `spec-gap-analysis`
56+
57+
**Files:** `skills/spec-gap-analysis/SKILL.md`
58+
59+
**Purpose:** 8th audit dimension — structured comparison of spec/blueprint documents against actual implementation.
60+
61+
**Methodology:**
62+
1. Detect spec documents: scan `specs/`, `blueprints/`, `ADRs/`, `docs/` for files containing "MUST", "SHALL", "requirements", "capabilities", "features"
63+
2. Extract **claims**: features, APIs, behaviors, constraints, integrations
64+
3. Map each claim against real code (Grep + Read)
65+
4. Classify each claim:
66+
- `IMPLEMENTED` — present and functional
67+
- `PARTIAL` — exists but incomplete vs. spec
68+
- `MISSING` — documented, not implemented (ghost feature) → **−15 pts**
69+
- `EXTRA` — implemented, not documented (invisible feature) → **−5 pts**
70+
- `PARTIAL`**−7 pts**
71+
5. Score: starts at 100, subtracts per finding (floor: 0)
72+
73+
**Integrations:** Invoked by `/blueprint-review`, `/audit`, and directly via `/audit spec-gap`.
74+
75+
---
76+
77+
### 3. Agent: `spec-reviewer`
78+
79+
**File:** `agents/spec-reviewer.md`
80+
81+
**Purpose:** Specialized agent for spec-vs-implementation comparison. Deep expertise in detecting drift between documented promises and actual code.
82+
83+
**Trigger phrases:** "review this spec", "check spec against code", "find gaps in implementation", "spec drift"
84+
85+
**Used by:** `/blueprint-review` (as one of 3 parallel agents), also standalone.
86+
87+
**Tools:** Read, Grep, Glob, Bash, Skill
88+
89+
---
90+
91+
### 4. Scripts (new `scripts/` directory)
92+
93+
#### `scripts/check-links.sh`
94+
- Internal links: grep-based extraction + file existence check
95+
- External links: `curl --head --silent --max-time 5` per URL
96+
- Output: list of broken links with `file:line`
97+
- Invoked by `audit-docs --check-links` (replaces LLM-only approach)
98+
- ~80 lines bash
99+
100+
#### `scripts/check-examples.sh`
101+
- Extracts code blocks from markdown (```python, ```bash, etc.)
102+
- bash blocks: `bash -n` (syntax check)
103+
- python blocks: `python3 -c "compile(...)"`
104+
- Output: list of invalid examples with context
105+
- ~60 lines bash
106+
107+
#### `scripts/mark-stale.sh`
108+
- Reads edited file path from stdin (tool_input.file_path)
109+
- Maps to affected audit dimensions:
110+
- `README.md` → product-coherence, documentation-quality
111+
- `docs/**` → documentation-quality
112+
- `src/**`, `lib/**` → architecture-coherence, product-coherence
113+
- `CONTRIBUTING.md`, `INSTALL.md` → onboarding-quality
114+
- Updates `.solution-audit-latest.json` with `"stale": [dimension-names]`
115+
- ~40 lines bash
116+
117+
#### `scripts/save-progress.sh`
118+
- Checks if `.solution-audit-wip.md` exists
119+
- Appends footer: `[SESSION ENDED: YYYY-MM-DD HH:MM]`
120+
- ~30 lines bash
121+
122+
---
123+
124+
### 5. Hooks (improved `hooks/hooks.json`)
125+
126+
#### SessionStart (improved)
127+
Current: shows top 3 pending findings.
128+
New: shows pending findings + stale dimensions + WIP indicator.
129+
130+
```
131+
Solution Audit: [N] pending findings — top: [...]
132+
Stale dimensions: product-coherence, documentation-quality (files changed since last audit)
133+
⚠ WIP in progress: audit-reports/2026-03-09-blueprint-review.md [PARTIAL]
134+
```
135+
136+
#### PostToolUse: Write|Edit → mark stale
137+
```json
138+
{
139+
"matcher": "Write|Edit",
140+
"hooks": [{
141+
"type": "command",
142+
"command": "bash $CLAUDE_PLUGIN_ROOT/scripts/mark-stale.sh",
143+
"timeout": 10
144+
}]
145+
}
146+
```
147+
148+
#### Stop → save WIP
149+
```json
150+
{
151+
"hooks": [{
152+
"type": "command",
153+
"command": "bash $CLAUDE_PLUGIN_ROOT/scripts/save-progress.sh",
154+
"timeout": 10
155+
}]
156+
}
157+
```
158+
159+
---
160+
161+
### 6. Reference Files (4 skills missing them)
162+
163+
| Skill | File | Content |
164+
|-------|------|---------|
165+
| `onboarding-quality` | `references/assessment-criteria.md` | Steps-to-first-success rubrics, cognitive load taxonomy, prerequisite clarity patterns |
166+
| `cli-ux` | `references/ergonomics-patterns.md` | Good/bad flag patterns, help format standards, error message design, POSIX conventions |
167+
| `textual-ux` | `references/tone-patterns.md` | Tone consistency taxonomy, jargon detection patterns, error message anatomy |
168+
| `learnability-workflow` | `references/friction-patterns.md` | Friction taxonomy, progressive disclosure patterns, escape hatch design |
169+
170+
---
171+
172+
## Files Changed
173+
174+
```
175+
solution-audit/
176+
├── .claude-plugin/
177+
│ └── plugin.json [UPDATE: version 0.1.0 → 0.2.0]
178+
├── commands/
179+
│ └── blueprint-review.md [NEW]
180+
├── agents/
181+
│ └── spec-reviewer.md [NEW]
182+
├── skills/
183+
│ ├── spec-gap-analysis/
184+
│ │ └── SKILL.md [NEW]
185+
│ ├── onboarding-quality/
186+
│ │ └── references/
187+
│ │ └── assessment-criteria.md [NEW]
188+
│ ├── cli-ux/
189+
│ │ └── references/
190+
│ │ └── ergonomics-patterns.md [NEW]
191+
│ ├── textual-ux/
192+
│ │ └── references/
193+
│ │ └── tone-patterns.md [NEW]
194+
│ └── learnability-workflow/
195+
│ └── references/
196+
│ └── friction-patterns.md [NEW]
197+
├── hooks/
198+
│ └── hooks.json [UPDATE: add PostToolUse + Stop, improve SessionStart]
199+
└── scripts/ [NEW DIRECTORY]
200+
├── check-links.sh [NEW]
201+
├── check-examples.sh [NEW]
202+
├── mark-stale.sh [NEW]
203+
└── save-progress.sh [NEW]
204+
```
205+
206+
**Total:** 2 new components (command + agent), 1 new skill, 4 new reference files, 4 new scripts, 2 new hooks, 3 updated files.
207+
208+
---
209+
210+
## Version
211+
212+
`0.1.0 → 0.2.0` — minor version bump (additive, non-breaking)

0 commit comments

Comments
 (0)