3.2 KiB
3.2 KiB
Tasks: add-os-status-plugin
1. Plugin scaffold
- 1.1 Create
plugins/os-status/with.claude-plugin/plugin.json(nameos-status, per naming convention; noname:in any SKILL.md — no skills in this change anyway) - 1.2 Add
hooks/hooks.jsonregistering SessionStart →session_start.pyvia${CLAUDE_PLUGIN_ROOT}(5s timeout, matching os-adr's pattern) - 1.3 Write shared modules in Sandi-Metz-lean Python matching os-vault's style:
hooks/checks.py(CheckResult, registry, the three checks),hooks/state.py(.cc-os/snooze/suppress, git-project detection), thinhooks/session_start.pyentry point (run checks, aggregate, print)
2. Checks
- 2.1
subagent_model_env_override: env var +~/.claude/settings.jsonenvblock scan; runs outside git projects too - 2.2
adr_system_present: port logic fromplugins/os-adr/hooks/session_start.py— PRESENT_NOTE wording byte-identical (copy, don't paraphrase); absent-path once-per-day snooze honoring existing.os-adr/suppress - 2.3
vault_hub_note_present: config-first hub lookup (.cc-os/confighub slug), elseproject/<name>facet-tag scan of the vault; missing → warn naming the corrective skill
3. Tests + invariants
- 3.1
tests/hook_test.py-style model-free Python tests: contract (ok/note/warn routing, failure isolation, exit-0 envelope), each check against fixture dirs/fake settings.json, snooze/suppress state transitions, non-git-cwd behavior - 3.2
invariants.md: single-banner, note-not-suppressed, exit-0-always, state-only-in-.cc-os, PRESENT_NOTE byte-identical to os-adr's tuned wording
4. os-adr cutover (atomic)
- 4.1 Remove the SessionStart entry from
plugins/os-adr/hooks/hooks.json(keep the script file until archive; it is the wording source of record for 2.2) - 4.2 Confirm os-adr's tests still pass (hook_test.py may need pruning of SessionStart-registration assertions)
5. Install + verify
- 5.1 Add
os-statusto~/.claude/plugins/.claude-plugin/marketplace.json;claude plugin marketplace update local-plugins;claude plugin install os-status@local-plugins - 5.2
bin/refresh-plugins;claude plugin details os-status@local-plugins(hook registered) andclaude plugin details os-adr@local-plugins(SessionStart gone from resolved cache) - 5.3 Fresh-session smoke test in cc-os (expect: ADR note once, hub-note ok once hub
exists, no env warn) and in a project without
docs/adr/(expect: one banner) - 5.4 Regression canary: export
CLAUDE_CODE_SUBAGENT_MODEL=haikuin a test shell, fresh session, expect the override warn
6. Documentation
- 6.1 ADR in
docs/memory-system/03-architecture-decisions.md: status-check convention, in-process code-location decision (Options A/B rejected with the perspective-review reasoning), deferred items (context field, state-dir consolidation, Phase 2) - 6.2 Update cc-os
CLAUDE.md: Implemented Components entry for os-status; note os-adr's SessionStart behavior moved - 6.3 Mark WS3 plan doc (
docs/plans/ws3-status-convention-plugin.md) as superseded by this change (pointer, status line)