Commit Graph
2 Commits
Author SHA1 Message Date
taodengandClaude Opus 4.8 349d35557b docs(spec): fold in codex review — 4 P1 + 3 P2 fixes
External codex review (read-only) found 7 valid issues; all incorporated
(independently judged worth-keeping, none rejected):

P1 (must-fix before writing-plans):
- Billing wording downgraded: S1 proved cc_entrypoint=cli SIGNAL, not
  actual subscription-pool billing (6/15 split hasn't happened). Banner
  (a), §1.2, §10.2 now say "interactive-use signal; billing inference
  pending post-6/15 validation; OCP canary is first real measurement."
- B gate semantics unified (was self-contradictory T2-only vs T2+T4):
  now two-stage — no B before T2; serialized B (concurrency=1) after T2;
  concurrent B only after T4. §5.2 + §7.3 + §12.
- B tools policy tightened to `--tools ""` strictly for initial B (was
  allowing `--allowedTools subset`). Any subset voids the T2 tools:[]
  proof + the owner-bearer credential wall (§5.5) → separate ADR. §5.2.
- PR-0 bootstrap made TUI-ONLY (gated on CLAUDE_TUI_MODE) so the seed
  + private account fields never touch the default stream-json path.
  §7.1 + §12.1.

P2:
- Quiescence ("file stable ≥10s") REMOVED from v1 completion terminal
  set — a long Opus thinking turn legitimately stalls transcript growth,
  so quiescence would falsely abort valid long turns. v1 = turn_duration
  + tool_use + wall-clock cap only; quiescence deferred to T5. (This
  corrects the T1 spike's own co-equal-quiescence suggestion.) §4.4.
- /mcp verification moved to a separate PREFLIGHT/upgrade-time session
  (running it in a serving turn writes a transcript line + corrupts the
  reader's matching-user-line semantics). §5.2.
- A warm-pool reconciled: reuse PROCESS not conversation context; fresh
  --session-id (or /clear) per request to preserve OpenAI stateless
  semantics. §2.1 + §7.2.

Reviewer credit: external codex review caught the v1-quiescence issue in
our own T1 spike output — incorporated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 17:12:21 +10:00
taodengandClaude Opus 4.8 67bf7fa692 docs(spec): TUI-mode production design spec (validated + reviewed)
Design spec for routing OCP/OLP proxy requests through an interactive
Claude Code session (cc_entrypoint=cli) to keep traffic on the Anthropic
subscription pool post-2026-06-15, so the tool stays usable for Pro
subscribers (whose Agent SDK credit is tiny).

Builds on community PR #101 by jaekwon-park (dtzp555-max/ocp) —
interactive-claude-via-tmux idea — redesigned: native JSONL transcript
read instead of hook->result.json (no --dangerously-skip-permissions,
no JSON-escaping fragility), structural MCP stripping for multi-tenant.

Validated by PI231 spikes (claude v2.1.158, tmux 3.3a):
- S2 transcript output: PASS (deterministic path, escaping-clean,
  turn_duration completion marker)
- S3 submission: PASS (key-token Enter, not literal newline; Ink #15553)
- S1 billing+no-tool: PARTIAL (cc_entrypoint=cli holds with
  --system-prompt; but account-attached managed MCP auto-attaches)
- T1 completion-detect: PARTIAL (turn_duration absent on tool_use turns
  -> mandatory dual-signal guard: turn_duration OR quiescence/wall-clock)
- T3 multiline submit: PASS (prompt-to-file + send-keys -- + separate Enter)
- T6 disable MCP: PASS (--strict-mcp-config is THE mechanism; editing
  .claude.json does NOT work — account/server-driven)

Reviewed by two independent agents (spike-informed + fresh-context opus);
both verdicts sound-with-gaps; all must-fixes folded in.

Deployment A (single-user/multi-device) is implementable as canary.
Deployment B (family/team share) gated on T2 (verify tools:[] in body)
+ T4 (concurrency) — now verification, not open research, since T6
resolved the MCP-disable mechanism.

Status: Draft (pre-implementation). Authority-of-record ADR (new) to
land before code per spec section 12.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 15:29:05 +10:00