1038 Commits

Author SHA1 Message Date
YeonGyu-Kim
fbb0ab4be7 fix(#171): classify unexpected extra arguments errors as cli_parse
Pinpoint #171: typed-error classifier gap discovered during #141 probe cycle #97.

`claw list-sessions --help` emits:
  error: unexpected extra arguments after `claw list-sessions`: --help

This format is used by multiple verbs that reject trailing positional args:
- list-sessions
- plugins (subcommands)
- config (subcommands)
- diff
- load-session

Before fix:
  {"error": "unexpected extra arguments after `claw list-sessions`: --help",
   "hint": null,
   "kind": "unknown",
   "type": "error"}

After fix:
  {"error": "unexpected extra arguments after `claw list-sessions`: --help",
   "hint": "Run `claw --help` for usage.",
   "kind": "cli_parse",
   "type": "error"}

The pattern `unexpected extra arguments after \`claw` is specific enough
that it won't hijack generic prose mentioning "unexpected extra arguments"
in other contexts (sanity test included).

Side benefit: like #169/#170, correctly classified cli_parse errors now
auto-trigger the #247 hint synthesizer.

Related #141 gap not yet closed: `claw list-sessions --help` still errors
instead of showing help (requires separate parser fix to recognize --help
as a distinct path). This classifier fix at least makes the error surface
typed correctly so consumers can distinguish "parse failure" from "unknown"
and potentially retry without the --help flag.

Test added:
- `classify_error_kind_covers_unexpected_extra_args_171` (4 positive cases
  + 1 sanity guard)

Tests: 226/226 pass (+1 from #171).

Typed-error family: #121, #127, #129, #130, #164, #169, #170, #247.
2026-04-23 08:02:12 +09:00
YeonGyu-Kim
5736f364a9 roadmap(#153): file + close pinpoint — binary PATH instructions + verification bridge
Cycle #96 dogfood found practical install-experience gap in USAGE.md.
#153 closed by commit 6212f17 (same branch, same cycle).

Part of discoverability family (#155, help/USAGE parity).

Pinpoint count: 62 filed, 51 genuinely-open + #153 closed this cycle.
2026-04-23 07:52:41 +09:00
YeonGyu-Kim
6212f17c93 docs(#153): add binary PATH installation instructions and verification steps
Pinpoint #153 closure. USAGE.md was missing practical instructions for:
1. Adding the claw binary to PATH (symlink vs export PATH)
2. Verifying the install works (version, doctor, --help)
3. Troubleshooting PATH issues (which, echo $PATH, ls -la)

New subsections:
- "Add binary to PATH" with two common options
- "Verify install" with post-install health checks
- Troubleshooting guide for common failures

Target audience: developers building from source who want to run `claw`
from any directory without typing `./rust/target/debug/claw`.

Discovered during cycle #96 dogfood (10-min reminder cycle).
Tests: 225/225 still pass (doc-only change).
2026-04-23 07:52:16 +09:00
YeonGyu-Kim
0f023665ae roadmap(#170): file + close 4 additional classifier gaps + doc-vs-reality meta-observation
Cycle #95 dogfood probe validated #169 doctrine by finding 4 more gaps.

Meta-observation noted: #169 comment claimed to cover --permission-mode
bogus but actual string pattern differs. Lesson for future classifier
patches: comments name EXACT matched substring, not aspirational coverage.

New kind introduced: slash_command_requires_repl (for interactive-only
slash-command misuse).

Pinpoint count: 62 filed, 52 genuinely-open + #170 closed this cycle.
2026-04-23 07:32:32 +09:00
YeonGyu-Kim
1a4d0e4676 fix(#170): classify 4 additional flag-value/slash-command errors as cli_parse / slash_command_requires_repl
Pinpoint #170: Extended typed-error classifier coverage gap discovered during
dogfood probe 2026-04-23 07:30 Seoul (cycle #95).

The #169 comment claimed to cover `--permission-mode bogus` via the
`unsupported value for --` pattern, but the actual `parse_permission_mode_arg`
message format is `unsupported permission mode 'bogus'` (NO `for --` prefix).
Doc-vs-reality lie in the #169 fix itself — fixed here.

Four classifier gaps closed:

1. `unsupported permission mode '<value>'` → cli_parse
   (from: `parse_permission_mode_arg`)
2. `invalid value for --reasoning-effort: '<value>'; must be ...` → cli_parse
   (from: `--reasoning-effort` validator)
3. `model string cannot be empty` → cli_parse
   (from: empty --model rejection)
4. `slash command /<name> is interactive-only. Start \`claw\` ...` →
   slash_command_requires_repl (NEW kind — more specific than cli_parse)

The fourth pattern gets its own kind (`slash_command_requires_repl`) because
it's a command-mode misuse, not a parse error. Downstream consumers can
programmatically offer REPL-launch guidance.

Side benefit: like #169, the correctly classified cli_parse errors now
auto-trigger the #247 hint synthesizer ("Run `claw --help` for usage.").

Test added:
- `classify_error_kind_covers_flag_value_parse_errors_170_extended`
  (4 positive cases + 2 sanity guards)

Tests: 225/225 pass (+1 from #170).

Typed-error family: #121, #127, #129, #130, #164, #169, #247.

Discovered via systematic probe angle: 'error message pattern audit' \u2014
grep each error emission for pattern, confirm classifier matches.
2026-04-23 07:32:10 +09:00
YeonGyu-Kim
b8984e515b roadmap(#169): file + close pinpoint — invalid CLI flag values now classify as cli_parse
Documents #169 discovery during dogfood probe 2026-04-23 07:00 Seoul.

Pinpoint #169 closed by commit 834b0a9 (same branch, same cycle).

Part of typed-error family (#121, #127, #129, #130, #164, #247).

Pinpoint count: 61 filed, 52 genuinely-open + 1 closed in this cycle.
2026-04-23 07:04:07 +09:00
YeonGyu-Kim
834b0a91fe fix(#169): classify invalid/missing CLI flag values as cli_parse
Pinpoint #169: typed-error classifier gap discovered during dogfood probe.

`claw --output-format json --output-format xml doctor` was emitting:
  {"error": "unsupported value for --output-format: xml ...",
   "hint": null,
   "kind": "unknown",
   "type": "error"}

After fix:
  {"error": "unsupported value for --output-format: xml ...",
   "hint": "Run `claw --help` for usage.",
   "kind": "cli_parse",
   "type": "error"}

The change adds two new classifier branches to `classify_error_kind`:
1. `unsupported value for --` → cli_parse
2. `missing value for --` → cli_parse

Covers all `CliOutputFormat::parse` / `parse_permission_mode_arg` rejections
and any future flag-value validation messages using the same pattern.

Side benefit: the #247 hint synthesizer ("Run `claw --help` for usage.")
now triggers automatically because the error is now correctly classified
as cli_parse. Consumers get both correct kind AND helpful hint.

Test added:
- `classify_error_kind_covers_flag_value_parse_errors_169` (4 positive +
  1 sanity case)

Tests: 224/224 pass (+1 from #169).

Discovered during dogfood probe 2026-04-23 07:00 Seoul, cycle #94.

Refs: #169, typed-error family (#121, #127, #129, #130, #164, #247)
2026-04-23 07:03:40 +09:00
YeonGyu-Kim
80f9914353 docs(#155): add missing slash command documentation to USAGE.md
Pinpoint #155: USAGE.md was missing documentation for three interactive
commands that appear in `claw --help`:
- /ultraplan [task]
- /teleport <symbol-or-path>
- /bughunter [scope]

Also adds full documentation for other underdocumented commands:
- /commit, /pr, /issue, /diff, /plugin, /agents

Converts inline sentence list into structured section 'Interactive slash
commands (inside the REPL)' with brief descriptions for each command.

Closes #155 gap: discovered during dogfood probing of help/USAGE parity.

No code changes. Pure documentation update.
2026-04-23 06:50:47 +09:00
YeonGyu-Kim
94f9540333 test(#168c Task 4): add v1.5 emission baseline shape parity guard
Phase 0 Task 4 of the JSON Productization Program: CI shape parity guard.

This test locks the v1.5 emission baseline (documented in SCHEMAS.md § v1.5
Emission Baseline) so any future PR that introduces shape drift in a documented
verb fails this test at PR time.

Complements Task 2 (no-silent guarantee) by asserting SPECIFIC top-level key
sets, not just 'stdout is non-empty valid JSON'. If a verb adds/removes a
top-level field, this test fails with a clear error message pointing to
SCHEMAS.md § v1.5 Emission Baseline for update guidance.

Coverage:
- 8 success-path verbs with locked shape (help, version, doctor, skills,
  agents, system-prompt, bootstrap-plan, list-sessions)
- 2 error-path cases with locked error envelope shape (prompt-no-arg, doctor --foo)

Key enforcement rules:
- Success envelope: exact key set match per verb
- Error envelope: {error, hint, kind, type} (4 keys, all verbs)
- list-sessions deliberately kept as {command, sessions} (Phase 1 target)

Test design intent:
- Locks CURRENT (possibly imperfect) shape, NOT target shape
- Forces PR authors to update both code + SCHEMAS.md + test together
- Makes Phase 1 shape normalization PRs visible: 'update this test'

Phase 0 now COMPLETE:
- Task 1  Stream routing fix (cycle #89)
- Task 2  No-silent guarantee (cycle #90)
- Task 3  Per-verb emission inventory SCHEMAS.md (cycle #91)
- Task 4  CI shape parity guard (this cycle)

Tests: 18 output_format_contract tests all pass (+1 from Task 4).
v1.5 emission baseline now locked by code + tests + docs.

Refs: #168c, cycle #92, Phase 0 Task 4 (final)
2026-04-23 06:38:18 +09:00
YeonGyu-Kim
e1b0dbf860 docs(#168c Task 3): add v1.5 Emission Baseline per-verb shape catalog to SCHEMAS.md
Phase 0 Task 3 of the JSON Productization Program: per-verb emission inventory.

Documents the actual binary behavior as of v1.5 (post-#168c fix, pre-Phase 1
shape normalization). Reference artifact for consumers building against v1.5,
not a target schema.

Catalog contents:
- 12 verbs using 'kind' field (help, version, doctor, mcp, skills, agents,
  sandbox, status, system-prompt, bootstrap-plan, export, acp)
- 1 verb using 'command' field (list-sessions) — Phase 1 normalization target
- 3 error-only verbs in test env (bootstrap, dump-manifests, state)
- Standard error envelope: {error, hint, kind, type} flat shape
- 9 machine-readable error kinds from classify_error_kind

Emission contract locked by:
- Task 1 (#168c routing fix, cycle #89)
- Task 2 (no-silent guarantee test, cycle #90)
- This catalog (human-readable reference, cycle #91)

Consumer guidance + Phase 1 normalization targets documented.

Phase 0 progress:
- Task 1 Stream routing fix
- Task 2 No-silent guarantee test
- Task 3 Per-verb emission inventory
- Task 4 pending: CI parity test

Refs: #168c, cycle #91, Phase 0 Task 3
2026-04-23 06:36:01 +09:00
YeonGyu-Kim
90c4fd0b66 test(#168c Task 2): add no-silent emission contract guard for 14 verbs
Phase 0 Task 2 of the JSON Productization Program: no-silent guarantee.

The emission contract under --output-format json requires:
1. Success (exit 0) must produce non-empty stdout with valid JSON
2. Failure (exit != 0) must still emit JSON envelope on stdout (#168c)
3. Silent success (exit 0 + empty stdout) is forbidden

This test iterates 12 safe-success verbs + 2 error cases, asserting each
produces valid JSON on stdout. Any verb that regresses to silent emission
or wrong-stream routing will fail this test.

Covered verbs:
- Success: help, version, list-sessions, doctor, mcp, skills, agents,
  sandbox, status, system-prompt, bootstrap-plan, acp
- Error: prompt (no arg), doctor --foo

Phase 0 progress:
- Task 1  Stream routing (#168c fix)
- Task 2  No-silent guarantee (this test)
- Task 3  Per-verb emission inventory (SCHEMAS.md)
- Task 4  CI parity test (regression prevention)

Tests: 17 output_format_contract tests all pass (+1 from Task 2).

Refs: #168c, cycle #90, Phase 0 Task 2
2026-04-23 06:31:44 +09:00
YeonGyu-Kim
6870b0f985 fix(#168c): emit error envelopes to stdout under --output-format json
Under --output-format json, error envelopes were emitted to stderr via
eprintln!. This violated the emission contract: stdout should carry the
contractual envelope (success OR error); stderr is reserved for
non-contractual diagnostics.

Cycle #87 controlled matrix audit found bootstrap/dump-manifests/state
exhibited this pattern (exit 1, stdout 0 bytes, stderr N bytes under
--output-format json).

Fix: change eprintln! to println! for the JSON error envelope path in main().
Text mode continues to route errors to stderr (conventional).

Verification:
- bootstrap --output-format json: stdout now carries envelope, exit 1
- dump-manifests --output-format json: stdout now carries envelope, exit 1
- Text mode: errors still on stderr with [error-kind: ...] prefix (no regression)

Tests:
- Updated assert_json_error_envelope helper to read from stdout (was stderr)
- Added error_envelope_emitted_to_stdout_under_output_format_json_168c
  regression test that asserts envelope on stdout + non-JSON on stderr
- All 16 output_format_contract tests pass

Phase 0 Task 1 complete: emission routing fixed across all error-path verbs.
Phase 0 Task 2 (no-silent CI guarantee) remains.

Refs: #168c (cycle #87 filing), cycle #88 emission contract framing
2026-04-23 06:03:31 +09:00
YeonGyu-Kim
3311266b59 roadmap: Phase 0 locked as 'JSON emission baseline stabilization' (cycle #88)
Per gaebal-gajae framing: Phase 0 addresses EMISSION (stream routing + exit code +
no-silent guarantee), not SHAPE (which moves to Phase 1).

Phase 0 subtasks (1.25 days total):
1. Stream routing fix — bootstrap/dump-manifests/state stderr → stdout for JSON
2. No-silent guarantee — CI asserts every verb emits valid JSON or exits non-zero
3. Per-verb emission inventory — authoritative catalog artifact
4. CI parity test — prevent regressions

Phase 1 now owns shape normalization (list-sessions 'command' → 'kind').
Phase 0 owns emission stability; Phase 1 owns shape consistency; Phase 2+ handles envelope wrapping.

#168b formally closed as INVALID (cycle #84 misread; stderr output routing is real
issue, now tracked as #168c).

Revised pinpoint accounting:
- Filed: 60 (audit trail includes #168b as invalid)
- Genuinely-open: 52
- Phase 0 active: #168c + emission CI
- Phase 1 active: #168a
2026-04-23 05:52:27 +09:00
YeonGyu-Kim
cd6e1cea6f roadmap: #168 split into #168a/#168b/#168c after controlled matrix audit (cycle #87)
Controlled matrix (/tmp/cycle87-audit/matrix.json) tested 16 verbs x 2 envs = 32 cases.

Results:
- #168a CONFIRMED: per-command shape divergence real (13 unique shapes across 13 verbs)
- #168b REFUTED: bootstrap does NOT silent-fail. Exit=1 stderr=483 bytes (not silent).
  Cycle #84 misread exit code (claimed 0, actually 1) and missed stderr output.
- #168c NEW: bootstrap/dump-manifests/state write plain stderr under --output-format json

Phase 0 reworded: 'Fix bootstrap silent failure' (inaccurate) → 'Controlled JSON
baseline audit + minimum invariant normalization' (accurate).

Concrete Phase 0 work (1.5 days):
- Normalize list-sessions 'command' → 'kind' (align with 12/13 verbs)
- Normalize stderr output to JSON for bootstrap/dump-manifests/state
- Document v1.5 baseline shape catalog in SCHEMAS.md
- Add shape parity CI test

Controlled revalidation (per gaebal-gajae cycle #87 direction) prevented Phase 0
from being anchored to a refuted bug. #168b is now closed as refuted; #168a and
#168c are the actual Phase 0 targets.
2026-04-23 05:50:52 +09:00
YeonGyu-Kim
f30aa0b239 roadmap: #168b filed — cycle #86 fresh-dogfood contradicts cycle #84 bootstrap claim (revalidation) 2026-04-23 05:48:56 +09:00
YeonGyu-Kim
7f63e22f29 roadmap: promote #164 from locus to 'JSON Productization Program' (cycle #85b)
gaebal-gajae review reframed the work: this is not 'schema drift management'
but a 'JSON productization program' — taking JSON output from bespoke/incoherent
to reliable/contractual as a product.

Promotion trigger: Fresh-dogfood evidence (#168) proved v1.0 was never coherent.
Migration isn't just schema change; it's productizing JSON output.

Program structure:
- Phase 0: Emergency stabilization (fix #168 bootstrap silent failure)
- Phase 1: v1.5 baseline (normalize invariants across all 14 verbs)
- Phase 2: v2.0 opt-in wrapped envelope
- Phase 3: v2.0 default
- Phase 4: v1.0/v1.5 deprecation

Umbrellas 9+ related pinpoints under coordinated program (#164, #167, #168,
#102, #121, #127, #129, #130, #245).

Program doctrine locked:
1. Fresh-dogfood before migration
2. Honest effort estimates
3. Consumer-first design
4. Evidence-driven revision
5. Documentation as product

Next concrete action: Phase 0 — implement #168 bootstrap JSON fix.
Success metric: A claw can write ONE parser for ALL clawable commands.
2026-04-23 05:34:29 +09:00
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
562f19bcff roadmap: #168 filed — JSON envelope shape inconsistent per-command; bootstrap broken (cycle #84)
Fresh dogfood validation (cycle #84) revealed the binary v1.0 envelope is NOT
consistent across commands:

- list-sessions: {command, sessions}
- doctor: {checks, kind, message, ...}
- bootstrap: (no JSON output at all)
- mcp: {action, kind, status, ...}

Each command has a custom JSON shape. Bootstrap's JSON path is completely broken
(exit 0 but no output). This is not 'v1.0 vs v2.0 design difference' — it's
'no consistent v1.0 ever existed'.

This explains why #164 (envelope migration) is blocked on design: the 'v1.0 from'
was never coherent. The real task is not 'migrate v1.0 to v2.0' but 'migrate
incoherent-per-command shapes to coherent-common-envelope'.

Implications for cycles #76–#82: The P0 doc fixes were correct to mark SCHEMAS.md
as 'aspirational' because the binary never had a consistent contract to document.
The deeper issue: each verb renderer was written independently with no envelope
coordination.

Three options proposed:
- A: accept per-command shapes (status quo + documentation)
- B: enforce common wrapper (FIX_LOCUS_164 full approach)
- C: hybrid (document current incoherence, then migrate 3 pilot verbs)

Recommendation: Option C. Documents truth immediately, enables phased migration.

This filing resolves the #164 design blocker: now we understand what we're
migrating from.
2026-04-23 05:31:09 +09:00
YeonGyu-Kim
43bbf43f01 roadmap: #167 filed — text output format has no contract (cycle #83)
SCHEMAS.md locks JSON envelope contract for all 14 clawable commands.
No corresponding contract for text output (--output-format text).

Text output is ad hoc per-command: no documented format, no column ordering
guarantee, no stability contract. Claws parsing text output have no safety.

Filed as discovery gap from systematic doc audit (cycle #83). Design options:
- Option A: Document text contracts (parallel to JSON) — 4 dev-days
- Option B: Declare text unstable, point to JSON — 1 dev-day (recommended)
- Option C: Defer until post-#164 JSON migration

Related to #164 (JSON migration) and #250 (surface parity audit).
2026-04-23 05:29:45 +09:00
YeonGyu-Kim
8322bb8ec6 roadmap: #166 closed — SCHEMAS.md source misdoc fixed (P0 root cause)
The aspirational SCHEMAS.md doc (v2.0 target) was the source of truth misdocumentation.
Three downstream docs (USAGE, ERROR_HANDLING, CLAUDE) inherited the false claim that
v1.0 binary emits common fields it doesn't actually emit.

Fixing SCHEMAS.md at the source eliminates the root cause for all four P0 instances.

Doc-truthfulness P0 family now complete: 4/4 closed, root cause identified + fixed.
All fixes shipped within 6 cycles (#76 audit → #82 execution).
2026-04-23 05:21:22 +09:00
YeonGyu-Kim
4c9a0a9992 docs: SCHEMAS.md — critical P0 fix: mark as target v2.0, not current v1.0 (#166 filed+closed)
SCHEMAS.md was presenting the target v2.0 schema as the current binary contract.
This is the source of truth document, so the misdocumentation propagated to every
downstream doc (USAGE.md, ERROR_HANDLING.md, CLAUDE.md all inherited the false
premise that v1.0 includes timestamp/command/exit_code/etc).

Fixed with:
1. CRITICAL header at top: marks entire doc as v2.0 target, not v1.0 reality
2. 'TARGET v2.0 SCHEMA' headers on Common Fields section
3. Comprehensive Appendix: v1.0 actual shape + migration timeline + v1.0 code example
4. Links to FIX_LOCUS_164.md + ERROR_HANDLING.md for v1.0 reality
5. FAQ: clarifies the version mismatch and when v2.0 ships

This closes the fourth P0 doc-truthfulness instance (4/4 in family):
- #78 USAGE.md: active misdocumentation (fixed #78)
- #79 ERROR_HANDLING.md: copy-paste trap (fixed #79)
- #165 CLAUDE.md: boundary collapse (fixed #81)
- #166 SCHEMAS.md: aspirational source doc (fixed #82)

Pattern is now crystallized: SCHEMAS.md was the aspirational source;
three downstream docs (USAGE, ERROR_HANDLING, CLAUDE) inherited the false v2.0-as-v1.0
claim. Fix the source (SCHEMAS.md), which eliminates the root cause for all four.
2026-04-23 05:21:07 +09:00
YeonGyu-Kim
86db2e0b03 roadmap: #165 closed with evidence (cycle #81, commit 1a03359)
CLAUDE.md Option A implemented. P0 doc-truthfulness family now at 3 closed +
0 open (all 3 fixed within the same dogfood session).

Taxonomy refinement added: P0 doc-truthfulness has three distinct subclasses:
- active misdocumentation (false sentence) — USAGE.md cycle #78
- copy-paste trap (broken example code) — ERROR_HANDLING.md cycle #79
- target/current boundary collapse (v2.0 as v1.0) — CLAUDE.md cycle #81

All three related to #164 (envelope divergence). Root cause consistent across
family; remedies differ per subclass.
2026-04-23 05:11:42 +09:00
YeonGyu-Kim
1a03359bb4 docs: CLAUDE.md — fix target/current boundary collapse (#165 Option A)
CLAUDE.md was documenting the v2.0 target schema as if it were current binary
behavior. This misled validator/harness implementers into assuming the Rust
binary emits timestamp, command, exit_code, output_format, schema_version fields
when it doesn't.

Fixed by explicitly marking the boundary:
1. SCHEMAS.md section: now clearly labels 'target v2.0 design' and lists both
   v1.0 (actual binary) and v2.0 (target) field shapes
2. Clawable commands requirements: now explicitly separates v1.0 (current) and
   v2.0 (post-FIX_LOCUS_164) envelope requirements
3. Added inline migration note pointing to FIX_LOCUS_164.md

This closes #165 as the third P0 doc-truthfulness fix (Option A: preserve current
truth, add v2.0 target as separate labeled section).

P0 doc-truthfulness family pattern (all three related to #164 envelope divergence):
- #78 USAGE.md: active misdocumentation (fixed cycle #78)
- #79 ERROR_HANDLING.md: copy-paste trap (fixed cycle #79)
- #165 CLAUDE.md: target/current boundary collapse (fixed cycle #81)
2026-04-23 05:11:14 +09:00
YeonGyu-Kim
b34f370645 roadmap: #165 filed — CLAUDE.md documents v2.0 schema as current (P0 active misdoc)
CLAUDE.md claims 'Common fields (all envelopes): timestamp, command, exit_code,
output_format, schema_version' but the actual binary v1.0 doesn't emit these.

This is aspirational (v2.0 target from SCHEMAS.md) documented as current behavior
in a file that's supposed to describe the Python reference harness.

Filed as 3rd member of doc-truthfulness P0 family (joins #78, #79).
Both options documented: update CLAUDE.md for v1.0 OR clarify it's v2.0 aspirational.
Recommendation: Option A (keep CLAUDE.md truthful about actual validation).

Part of broader #164 family (envelope schema divergence across all docs).
2026-04-23 05:10:01 +09:00
YeonGyu-Kim
a9e87de905 roadmap: doctrine refinement — doc-truthfulness severity scale (cycle #79)
Formalizes a 4-level severity scale for documentation-vs-implementation divergence:
- P0: Active misdocumentation (consumer code breaks) — immediate fix
- P1: Stale docs (consumer confused) — high priority
- P2: Incomplete docs (friction, eventual success) — medium
- P3: Terminology drift (confusion but survivable) — low

Parallel to diagnostic-strictness scale (cycles #57–#69). Both are
'truth-over-convenience' constraints.

Evidence: cycles #78–#79 found 2 P0 instances in USAGE.md and ERROR_HANDLING.md,
both related to JSON envelope shape. Root cause: SCHEMAS.md is aspirational (v2.0),
binary still emits v1.0, docs needed to be empirical not aspirational.

Going forward: doc audits compare against actual binary, flag P0 violations
immediately, link forward to migration plans (FIX_LOCUS_164.md).
2026-04-23 05:00:55 +09:00
YeonGyu-Kim
0929180ba8 docs: ERROR_HANDLING.md — fix code examples to match v1.0 envelope (flat shape)
The Python code examples were accessing nested error.kind like envelope['error']['kind'],
but v1.0 emits flat envelopes with error as a STRING and kind at top-level.

Updated:
- Table header: now shows actual v1.0 shape {error: "...", kind: "...", type: "error"}
- match statement: switched from envelope.get('error',{}).get('kind') to envelope.get('kind')
- All ClawError raises: changed from envelope['error']['message'] to envelope.get('error','')
  because error field is a STRING in v1.0, not a nested object
- Added inline comments on every error case noting v1.0 vs v2.0 difference
- Appendix: split into v1.0 (actual/current) and v2.0 (target after FIX_LOCUS_164)

The code examples now work correctly against the actual binary.
This was active misdocumentation (P0 severity) — the Python examples would crash
if a consumer tried to use them.
2026-04-23 05:00:33 +09:00
YeonGyu-Kim
98c675b33b docs: USAGE.md — clarify JSON v1.0 envelope shape + migration notice for #164
The JSON output section was misleading — it claimed the binary emits
exit_code, command, timestamp, output_format, schema_version, and nested
error objects. The binary actually emits v1.0 flat shape (kind at top-level,
error as string, no common metadata fields).

Updated section:
- Documents actual v1.0 success and error envelope shapes
- Lists known issues (missing fields, overloaded kind, flat error)
- Shows how to dispatch on v1.0 (check type=='error' before reading kind)
- Warns users NOT to rely on kind alone
- Links to FIX_LOCUS_164.md for migration plan
- Explains Phase 1/2/3 timeline for v2.0 adoption

This is a doc-only fix that makes USAGE.md truthful about the current behavior
while preparing users for the coming schema migration.
2026-04-23 04:52:17 +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
YeonGyu-Kim
5b9097a7ac roadmap: #164 filed — JSON envelope schema-vs-binary divergence
Binary emits different envelope shape than SCHEMAS.md documents:
- Missing: timestamp, command, exit_code, output_format, schema_version
- Wrong placement: kind is top-level, not nested under error
- Extra: type:error field not in schema
- Wrong type: error is string, not object with operation/target/retryable

Additional issue: 'kind' field is semantically overloaded (verb-id in
success envelopes, error-kind in error envelopes) — violates typed contract.

Filed as 7th member of typed-error family (joins #102, #121, #127, #129, #130, #245).
Recommended fix: Option A — update binary to match schema (principled design).
2026-04-23 04:31:53 +09:00
YeonGyu-Kim
69a15bd707 roadmap: cycle #75 finding — rebase-bridge pattern breaks on multi-conflict branches
Attempted cherry-pick of #248 (1 commit) onto main. Encountered 2 conflict zones
in main.rs (test definitions + error classification). Manual regex cleanup left
orphaned diff markers that Rust compiler rejected.

Decision: Rebase-bridge works for 1-conflict branches, but 2+ conflicts in 12K+-line
files require author context. Revised strategy: push main to origin, request branch
authors rebase locally with IDE support, then merge from updated origin branches.

Estimated timeline: 30 min for branch authors to rebase 8 branches in parallel.
2026-04-23 04:26:21 +09:00
YeonGyu-Kim
41c87309f3 roadmap: cycle #74 checkpoint — rebase blocker identified
Fresh dogfood found no new pinpoints. All core verbs working correctly.

Blocker: 8 remaining review-ready branches on origin have conflicts with
cycle #72's 4 merges. Root cause: remote branches predated the merge chain.

Example: feat/jobdori-127-verb-suffix-flags rebase fails on commit 3/3
because cycle #72 added 15+ new LocalHelpTopic variants.

Recommend: coordinate with branch authors to rebase against new main.
Cycle #74 will post integration checkpoint + queue status.
2026-04-23 04:17:54 +09:00
YeonGyu-Kim
a02527826e roadmap: #163 closed as already-fixed — #130e-A (merged cycle #72) handled help --help
Backlog-truthfulness (cycle #60) validated: fresh dogfood on current main confirmed
#163 was closed by cycle #72's help-parity chain merge. Zero duplicate work.

Cleanup: removed /tmp/jobdori-163 worktree and fix/jobdori-163-help-help-selfref branch.
2026-04-23 04:07:37 +09:00
YeonGyu-Kim
a52a361e16 roadmap: cycle #72 — 4 merges landed, 9 branches integrated via MERGE_CHECKLIST runbook 2026-04-23 04:04:57 +09:00
YeonGyu-Kim
d5373ac5d6 merge: fix/jobdori-161-worktree-git-sha — diagnostic-strictness family
Fix: resolve actual HEAD path in git worktrees for correct Git SHA in build metadata.
In worktrees, .git is a pointer file not a directory, so cargo's rerun-if-changed=.git/HEAD never triggers.

Per MERGE_CHECKLIST.md Cluster 2 (P1 Diagnostic-strictness, isolated):
- 25 lines in build.rs only (no crate-level conflicts)
- Verified: build → commit → rebuild → SHA updates correctly

Diagnostic-strictness family member (joins #122/#122b).

Applied: execution artifact runbook. Cycle #72 integration.
2026-04-23 04:04:17 +09:00
YeonGyu-Kim
a6f4e0d8d1 merge: feat/jobdori-130e-surface-help — help-parity cluster + #251 session-dispatch
Contains linear chain of 6 fixes:
- #251: intercept session-management verbs at top-level parser (dc274a0)
- #130b: enrich filesystem I/O errors with operation + path context (d49a75c)
- #130c: accept --help / -h in claw diff arm (83f744a)
- #130d: accept --help / -h in claw config arm, route to help topic (19638a0)
- #130e-A: route help/submit/resume --help to help topics before credential check (0ca0344)
- #130e-B: route plugins/prompt --help to dedicated help topics (9dd7e79)

Per MERGE_CHECKLIST.md:
- Cluster 1 (Typed-error): #251 (session-dispatch)
- Cluster 3 (Help-parity): #130b, #130c, #130d, #130e-A/B

All changes are in rust/crates/rusty-claude-cli/src/main.rs (dispatch/help routing).
No test regressions expected (fixes add new guards, don't modify existing paths).

Applied: execution artifact runbook. Cycle #72 integration.
2026-04-23 04:03:40 +09:00
YeonGyu-Kim
378b9bf533 merge: docs/jobdori-162-usage-verb-parity — document dump-manifests/bootstrap-plan/acp/export
Completes discoverability chain for 4 verbs:
- dump-manifests — upstream manifest export
- bootstrap-plan — startup component graph
- acp — Zed editor integration status (tracking #76)
- export — session transcript export

Per MERGE_CHECKLIST.md Cluster 6 (P3 Doc-truthfulness):
- Diff: +87 lines in USAGE.md (doc-only)
- Zero code risk
- Parity audit: 12/12 verbs documented (was 8/12)

Applied: execution artifact runbook. Cycle #72 integration.
2026-04-23 04:02:47 +09:00
YeonGyu-Kim
66765ea96d merge: docs/parity-update-2026-04-23 — refresh PARITY.md stats for 2026-04-23
Growth since 2026-04-03:
- Rust LOC: 48,599 → 80,789 (+66%)
- Test LOC: 2,568 → 4,533 (+76%)
- Commits: 292 → 979 (+235%)

Per MERGE_CHECKLIST.md Cluster 6 (P3 Doc-truthfulness, low-risk):
- Diff: 4 lines in PARITY.md only
- Zero code risk
- Merge-ready

Applied: execution artifact runbook. Cycle #72 integration.
2026-04-23 04:02:38 +09:00
YeonGyu-Kim
499d84c04a roadmap: #163 filed — claw help --help emits missing_credentials instead of help topic (help-parity family) 2026-04-23 04:01:24 +09:00
YeonGyu-Kim
6d1c24f9ee roadmap: doctrine refinement — three-tier artifact classification (doc → support → execution) per cycle #70 framing 2026-04-23 03:56:48 +09:00
YeonGyu-Kim
fb1a59e088 docs: add MERGE_CHECKLIST.md — integration support artifact for queue merge sequencing
Provides:
- Recommended merge order (P0 → P1 → P2 → P3 by cluster)
- Per-cluster merge prerequisites and validation steps
- Conflict risk assessment (Cluster 2 #122/#122b have same edit locus)
- Post-merge validation checklist (build + test + dogfood)
- Timeline estimate (~60 min for full 17-branch queue)

Addresses the final integration step: once branches are reviewed, knowing
the safe merge order matters. This artifact pre-answers that question.

Applied doctrine: integration-support artifacts (cycle #64) reduce reviewer
friction. At 17-branch saturation, a merge-safe checklist is first-class work.

Relates to cycle #70 integration throughput initiative.
2026-04-23 03:55:38 +09:00
YeonGyu-Kim
0527dd608d roadmap: #161 closed — shipped on fix/jobdori-161-worktree-git-sha (cycle #69) 2026-04-23 03:46:37 +09:00
YeonGyu-Kim
c5b6fa5be3 fix(#161): resolve actual HEAD path in git worktrees for correct Git SHA in build metadata
Problem: In git worktrees, .git is a pointer file (not a directory), so cargo's
rerun-if-changed=.git/HEAD never triggers when commits are made. This causes
claw version to report a stale SHA after new commits.

Solution: Add resolve_git_head_path() helper that detects worktree mode:
- If .git is a file: parse gitdir pointer, watch <gitdir>/HEAD
- If .git is a directory: watch .git/HEAD (regular repo)

This ensures build.rs invalidates on each commit, making version output truthful.

Verification: Binary built in worktree now reports correct SHA after commits
(before: stale, after: current HEAD).

Relates to ROADMAP #161 (filed cycle #65, implemented cycle #69).
Diagnostic-strictness family member.
Diff: 21 lines added (resolve_git_head_path + conditional rerun-if-changed).
2026-04-23 03:45:59 +09:00
YeonGyu-Kim
d64c7144ff roadmap: doctrine extension — CLI discoverability chain completion as doctrine (from #162 closure framing) 2026-04-23 03:40:43 +09:00
YeonGyu-Kim
2a82cf2856 roadmap: #162 closed — shipped on docs/jobdori-162-usage-verb-parity (cycle #68) 2026-04-23 03:39:36 +09:00
YeonGyu-Kim
48da1904e0 docs(#162): add USAGE.md sections for dump-manifests, bootstrap-plan, acp, export
Parity audit (cycle #67) found 4 verbs were in claw --help but absent from USAGE.md:
- dump-manifests: upstream manifest export for parity work
- bootstrap-plan: startup component graph for debugging
- acp: Zed editor integration status (discoverability only, tracking ROADMAP #76)
- export: session transcript export (requires --resume)

Each section follows the existing USAGE.md pattern:
- Purpose statement
- Example usage
- When-to-use guidance
- Related error modes where applicable

Coverage: 12/12 binary verbs now documented (was 8/12).

Acceptance:
- All 4 verbs have dedicated sections with examples: verified by grep
- Parity audit re-run: 100% coverage

Relates to ROADMAP #162 (filed cycle #67, implemented cycle #68).
Diff: +87 lines, doc-only, zero code risk.
2026-04-23 03:39:19 +09:00
YeonGyu-Kim
de7a0ffde6 roadmap: #162 filed — USAGE.md missing docs for dump-manifests, bootstrap-plan, acp, export verbs (parity audit) 2026-04-23 03:37:09 +09:00
YeonGyu-Kim
36883ba4c2 roadmap: cluster update — #161 elevated to diagnostic-strictness family (per gaebal-gajae reframe) 2026-04-23 03:35:03 +09:00
YeonGyu-Kim
f000fdd7fc docs: add REVIEW_DASHBOARD.md — integration support artifact for 14-branch queue
Consolidates all 14 review-ready branches into a single dashboard showing:
- Priority tiers (P0 typed-error → P3 doc truthfulness)
- Cluster membership and batch-reviewable groups
- Branch inventory with commits, diff size, tests, cluster, expected merge time
- Merge throughput notes and reviewer shortcuts

Per integration-support-artifacts doctrine (cycle #64):
At queue saturation (N>=5), docs that reduce reviewer cognitive load are first-class deliverables.

This dashboard aims to make queue digestion cheap:
- Reviewer can scan tiers in 60 seconds
- Batch recommendations saves context switches
- Per-branch facts pre-answer expected questions
- PR-ready summary reference for #249

Cluster impact:
- 14 branches now have explicit cluster/priority labels
- Batch review patterns identified for ~8 branches
- Merge-friction heatmap surfaces lowest-risk starting points
2026-04-23 03:33:46 +09:00
YeonGyu-Kim
f18f45c0cf roadmap: #161 filed — claw version stale SHA in worktrees (build.rs rerun-if-changed misses worktree HEAD) 2026-04-23 03:31:40 +09:00
YeonGyu-Kim
946e43e0c7 roadmap: doctrine extension — integration support artifacts as first-class deliverable at scale (from #64 framing) 2026-04-23 03:27:19 +09:00