feat(humanizer): update audit/analysis command templates group B [skip-docs]
Wave 5 Step 14. Threads the humanizer vocabulary through the remaining
six audit/analysis command templates and adds a shape test that locks
the structure plus a pair of anchor must-contains.
- commands/drift.md: --raw pass-through; new/resolved/changed-finding
rendering instructions reference userActionLanguage and
relevanceContext rather than raw severity.
- commands/plugin-health.md: --raw pass-through; finding rendering
groups by userImpactCategory and leads with userActionLanguage.
- commands/config-audit.md (router): replaces the 25-line A/B/C/D/F
prose ladder with a humanized stderr-scorecard reference + three
userActionLanguage-grouped "What you can do next" branches; --raw
threaded through both scan-orchestrator and posture invocations.
- commands/discover.md: --raw pass-through; finding-summary rendering
groups by userImpactCategory.
- commands/analyze.md: --raw pass-through; analyzer-agent prompt now
instructs grouping by userImpactCategory and leading with
userActionLanguage; humanized title/description/recommendation
strings rendered verbatim, no paraphrasing.
- commands/status.md: phase-label humanization table — current_phase
machine field name preserved, user-facing labels translated
("Looking at your config files", "Working out what to recommend",
"Asking what you'd like to focus on", "Putting together your action
plan", "Making the changes", "Double-checking everything worked");
--raw preserves verbatim machine field values.
tests/commands/group-b-shape.test.mjs (new, +8 tests, 772 → 780):
- structural: bash block + Read tool + --raw/$ARGUMENTS plumbing
across all 6 files
- findings-renderers: humanized field reference + no grade-prose
- anchor must-contains per plan: config-audit.md ⊇
userImpactCategory|userActionLanguage; drift.md ⊇ --raw|humanized
- status.md: current_phase preserved + ≥3 humanized phase labels
This commit is contained in:
parent
79b6e29073
commit
6f38a6340e
7 changed files with 234 additions and 49 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: config-audit:status
|
||||
description: Show current session state and available actions
|
||||
allowed-tools: Read, Glob
|
||||
allowed-tools: Read, Glob, Bash
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
|
|
@ -13,18 +13,40 @@ Display current session state and guide next actions.
|
|||
|
||||
```
|
||||
/config-audit status
|
||||
/config-audit status --raw # show the raw v5.0.0 phase identifiers (current_phase: "discover", etc.) instead of humanized labels
|
||||
```
|
||||
|
||||
## Phase-label translation
|
||||
|
||||
The `state.yaml` field `current_phase` is the machine contract — never rename it. The user-facing label is humanized. Map the field value to a plain-language label when rendering (default mode):
|
||||
|
||||
| `current_phase` (machine field, unchanged) | User-facing label |
|
||||
|--------------------------------------------|-------------------|
|
||||
| `discover` | Looking at your config files |
|
||||
| `analyze` | Working out what to recommend |
|
||||
| `interview` | Asking what you'd like to focus on |
|
||||
| `plan` | Putting together your action plan |
|
||||
| `implement` | Making the changes |
|
||||
| `verify` | Double-checking everything worked |
|
||||
|
||||
When `--raw` is in `$ARGUMENTS`, render the raw `current_phase` field value verbatim (no humanization).
|
||||
|
||||
## Implementation
|
||||
|
||||
1. **Find active session**:
|
||||
1. **Parse flags**:
|
||||
```bash
|
||||
RAW_FLAG=""
|
||||
if echo "$ARGUMENTS" | grep -q -- "--raw"; then RAW_FLAG="--raw"; fi
|
||||
```
|
||||
|
||||
2. **Find active session**:
|
||||
```
|
||||
Glob: ~/.claude/config-audit/sessions/*/state.yaml
|
||||
Sort by modification time
|
||||
Use most recent
|
||||
```
|
||||
|
||||
2. **Read session state**:
|
||||
3. **Read session state** with the Read tool:
|
||||
```yaml
|
||||
session_id: "20250126_143022"
|
||||
current_phase: "analyze"
|
||||
|
|
@ -33,7 +55,7 @@ Display current session state and guide next actions.
|
|||
...
|
||||
```
|
||||
|
||||
3. **Display status**:
|
||||
4. **Display status** (default mode — humanized phase labels):
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Config-Audit Session Status
|
||||
|
|
@ -44,11 +66,11 @@ Display current session state and guide next actions.
|
|||
|
||||
PHASE PROGRESS
|
||||
──────────────
|
||||
✓ Phase 1: Discover - 15 files found (current directory)
|
||||
✓ Phase 2: Analyze - report generated
|
||||
○ Phase 3: Interview - not started (optional)
|
||||
○ Phase 4: Plan - not started
|
||||
○ Phase 5: Implement - not started
|
||||
✓ Phase 1: Looking at your config files - 15 files found (current directory)
|
||||
✓ Phase 2: Working out what to recommend - report generated
|
||||
○ Phase 3: Asking what you'd like to focus on - not started (optional)
|
||||
○ Phase 4: Putting together your action plan - not started
|
||||
○ Phase 5: Making the changes - not started
|
||||
|
||||
NEXT ACTION
|
||||
───────────
|
||||
|
|
@ -64,7 +86,9 @@ Display current session state and guide next actions.
|
|||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
4. **If no session found**:
|
||||
In `--raw` mode, replace the humanized phase labels with the verbatim machine field values (`Phase 1: discover`, `Phase 2: analyze`, etc.).
|
||||
|
||||
5. **If no session found**:
|
||||
```
|
||||
No active config-audit session found.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue