|
| 1 | +# Surgical Enhancement Plan for droid-mode SKILL.md |
| 2 | + |
| 3 | +## Change 1: Add Idempotency Statement |
| 4 | +**Location:** After "Key Insight" section |
| 5 | +**Add new section:** |
| 6 | +```markdown |
| 7 | +## Idempotency |
| 8 | + |
| 9 | +All droid-mode commands are safe to rerun: |
| 10 | +- `dm servers` / `dm index` — read-only discovery |
| 11 | +- `dm hydrate` — overwrites previous hydration (timestamped) |
| 12 | +- `dm run` — each run creates a new timestamped trace |
| 13 | + |
| 14 | +No cleanup required between invocations. |
| 15 | +``` |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Change 2: Enhance Success Criteria with Concrete Artifacts |
| 20 | +**Location:** Replace existing "Success Criteria" section |
| 21 | +**Replace with:** |
| 22 | +```markdown |
| 23 | +## Success Criteria |
| 24 | + |
| 25 | +The skill completes successfully when these artifacts exist: |
| 26 | + |
| 27 | +| Artifact | Path | Content | |
| 28 | +|----------|------|---------| |
| 29 | +| Tool cache | `.factory/droid-mode/cache/<server>/tools.json` | Array of tool objects | |
| 30 | +| Hydrated schemas | `.factory/droid-mode/hydrated/<server>/<ts>/schemas.json` | Full JSON schemas | |
| 31 | +| TypeScript types | `.factory/droid-mode/hydrated/<server>/<ts>/types.d.ts` | Generated type definitions | |
| 32 | +| Execution trace | `.factory/droid-mode/runs/<server>/<ts>/run.json` | `{ error: false, result: ... }` | |
| 33 | + |
| 34 | +Verify with: `dm doctor --server X` (should exit 0) |
| 35 | +``` |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Change 3: Add Proof Artifacts Section |
| 40 | +**Location:** After "Verification" section |
| 41 | +**Add new section:** |
| 42 | +```markdown |
| 43 | +## Proof Artifacts |
| 44 | + |
| 45 | +After completing a workflow, produce evidence: |
| 46 | + |
| 47 | +- **Discovery proof**: Screenshot or paste of `dm index --server X` output |
| 48 | +- **Hydration proof**: Confirm `types.d.ts` exists and compiles (`tsc --noEmit`) |
| 49 | +- **Execution proof**: Link to `run.json` trace showing `error: false` |
| 50 | +- **For PRs**: Include trace file or summary in PR description |
| 51 | +``` |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## Change 4: Add Supporting References Section |
| 56 | +**Location:** After "Supporting Files" section |
| 57 | +**Add new section:** |
| 58 | +```markdown |
| 59 | +## References |
| 60 | + |
| 61 | +For project-specific conventions, see: |
| 62 | +- `AGENTS.md` — project-wide agent guidance (if present) |
| 63 | +- `mcp.json` — MCP server configuration |
| 64 | +- `.factory/skills/*/SKILL.md` — related skills that may chain with droid-mode |
| 65 | + |
| 66 | +For droid-mode internals: |
| 67 | +- `README.md` — full CLI documentation |
| 68 | +- `examples/` — sample workflows and hooks |
| 69 | +``` |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## Change 5: Add Machine-Parseable Output Note |
| 74 | +**Location:** In "Artifacts" section, add a note at the end |
| 75 | +**Append:** |
| 76 | +```markdown |
| 77 | +All JSON artifacts are machine-parseable for downstream skill chaining. Workflows can read `tools.json` or `run.json` to inform subsequent steps. |
| 78 | +``` |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## Summary of Changes |
| 83 | + |
| 84 | +| Gap | Fix | Lines Added | |
| 85 | +|-----|-----|-------------| |
| 86 | +| Idempotency not stated | New "Idempotency" section | ~7 | |
| 87 | +| Success criteria vague | Replace with artifact table | ~12 | |
| 88 | +| No proof artifacts | New "Proof Artifacts" section | ~9 | |
| 89 | +| No references to AGENTS.md | New "References" section | ~10 | |
| 90 | +| Machine-parseable not noted | One-liner in Artifacts | ~2 | |
| 91 | + |
| 92 | +**Total additions:** ~40 lines |
| 93 | +**No deletions** except replacing Success Criteria section (~5 lines) |
| 94 | +**Net change:** ~35 lines added |
| 95 | + |
| 96 | +All changes preserve existing instructional content and command documentation. |
0 commit comments