2 Commits

Author SHA1 Message Date
YeonGyu-Kim
771d2ffd04 locus(#164): add Phase 0 + v1.5 baseline; revised from 2-phase to 4-phase migration (cycle #85)
Fresh-dogfood validation (cycle #84, #168) proved the original locus premise was
underspecified. v1.0 was never a coherent contract — each verb has a bespoke JSON
shape with no coordination, and bootstrap JSON is completely broken (silent
failure, exit 0 no output).

Revised migration plan:
- Phase 0 (NEW): Emergency fix for silent failures (#168 bootstrap JSON)
- Phase 1 (NEW): v1.5 baseline — minimal JSON invariants across all 14 verbs
  - Every command emits valid JSON with --output-format json
  - Every command has top-level 'kind' field for verb ID
  - Every error envelope follows {error, hint, kind, type}
- Phase 2 (renamed from Phase 1): v2.0 wrapped envelope (opt-in)
- Phase 3 (renamed from Phase 2): v2.0 default
- Phase 4 (renamed from Phase 3): v1.0/v1.5 deprecation

Rationale:
- Can't migrate from 'incoherent' to 'coherent v2.0' in one jump
- Consumers need stable target (v1.5) to transition from
- Silent failures must be fixed BEFORE migration (consumers can't detect breakage)

Effort revision: ~9 dev-days (Phase 0: 1 + Phase 1: 3 + Phase 2: 5) vs original
~6 dev-days for direct v1.0→v2.0 (which would have failed).

Doctrine implication: Fresh-dogfood principle (#9, cycle #73) prevented a multi-day
migration from hitting an unsolvable baseline problem. Evidence-backed mid-design
correction.
2026-04-23 05:32:48 +09:00
YeonGyu-Kim
afc792f1a5 docs: add FIX_LOCUS_164.md — JSON envelope contract migration strategy
Cycle #77 deliverable. Escalates #164 from pinpoint to fix-locus cycle.

Documents:
- 100% divergence across all 14 JSON-emitting verbs (not a partial drift)
- Two envelope shapes: current flat vs. documented nested
- Phased migration: dual-mode → default bump → deprecation (3 phases)
- Shared wrapper helper pattern (json_envelope.rs)
- Per-verb migration template (before/after code)
- Error classification remapping table (cli_parse → parse, etc.)
- 6 acceptance criteria + 3 risk categories
- Rollout timeline: Phase 1 ~6 dev-days, v3.0 cutoff at ~8 months

Ready for author review + pilot implementation decision (which 3 verbs lead).
2026-04-23 04:34:57 +09:00