Commit Graph
5 Commits
Author SHA1 Message Date
Willie 48f1d3767f fix(test): improve extras runbooks with jq assertions, idempotency, and init cleanup
- Replace python3 JSON parsing with native mdproof jq: assertions across
  extras_refactor_json_runbook (7 steps simplified)
- Add cat>> idempotency guards (sed -i cleanup) before YAML appends
- Add ssenv --init default extras cleanup in Step 1 of extras_commands
  and sync_extras runbooks to prevent false failures
- Rename runbook.json → mdproof.json (mdproof only reads mdproof.json)
- Move /tmp cleanup from step_setup to setup (per-runbook, not per-step)
  to avoid breaking cross-step dependencies
- Fix ensure-mdproof.sh to upgrade dev binary to latest release
- Add .mdproof/lessons-learned.md with 5 documented gotchas
- Update cli-e2e-test SKILL.md with assertion types, jq best practices,
  --init extras checklist item, and /mdproof skill collaboration
2026-03-12 16:45:02 +08:00
Willie 09ccd14266 fix(extras): resolve tilde expansion, unify headers, add doctor target warnings
Extras commands had multiple issues with tilde (~) path handling — Go
doesn't expand ~ (that's shell behavior), so paths like ~/.claude/rules
were treated as literal relative paths, creating bogus ~/  directories.

Key fixes:
- Export config.ExpandPath() and call it before os.Stat / sync operations
  in extras_list, sync_extras, extras_collect, and doctor
- Unify extras output headers to match target list style (single "Extras"
  header instead of per-extra headers, fix double-icon bug in list)
- Add per-target reachability warning in doctor for unreachable extras
  targets with expanded path display

Update all 3 E2E runbooks to use extras/<name>/ path layout, add /tmp
cleanup for idempotent re-runs, add migration test step, and create new
comprehensive extras_commands_runbook (18 steps covering init/list/remove/
collect/doctor/tilde/project-mode).

Improve cli-e2e-test skill with 4 new checklist items and 2 rules learned
from test friction (/tmp isolation, symlink write-through, cat>>
idempotency, extras path layout).
2026-03-12 16:45:02 +08:00
Willie ebab63a670 feat(runbook): add build lifecycle hook, verify all 17 runbooks
Add a build hook that runs once before all runbooks, enabling
automatic binary rebuild. Lifecycle is now:
  build (once) → [per runbook: setup → steps → teardown]

Build hook uses os/exec directly (not session executor), outputs
to stderr, and aborts immediately on failure.

Fix all 17 runbooks to pass in devcontainer:
- Adapt to session executor's set -eo pipefail (use cmd || EXIT=$?
  pattern for expected non-zero exits)
- Replace embedded ```bash in heredocs with printf to avoid
  confusing the runbook parser
- Fix negated assertion gotchas (Not FAIL, No such file)
- Remove fragile verify code blocks (multi-block merge issues)
- Fix step number collision (7b → 8, renumber subsequent)
- Use -s flag for batch installs instead of repeated --force
- Add (?m) flag for multi-line regex assertions
2026-03-11 04:53:08 +08:00
Willie ba4f7c9c4d docs(runbook): migrate all 16 runbooks to typed assertion syntax
Convert Expected blocks from natural language descriptions to
matchable assertions: exit_code: N, regex: <pattern>, jq: <expr>,
Not <text>, and plain substring matches. All runbooks now parse
correctly with the assertion engine.
2026-03-11 04:53:08 +08:00
Willie 9b849172ff docs: add sync extras documentation across website, skill, and README
Document the new `sync extras` subcommand and `--all` flag:
- sync.md: add Sync Extras section with config, modes, flowchart, example
- configuration.md: add `extras` field reference with schema table
- file-structure.md: show extras source directories alongside skills
- quick-reference.md: add sync extras and sync --all entries
- SKILL.md + references/sync.md: add extras recipes for AI callers
- README.md: add v0.16.10 to Recent Updates
2026-03-04 12:16:32 +08:00