Skip to content

docs: restructure documentation and fold in the phase 7 notes - #34

Merged
Sandyzzx merged 6 commits into
masterfrom
codex/docs-restructure
Oct 7, 2026
Merged

Sandyzzx merged 6 commits into
masterfrom
codex/docs-restructure

Conversation

@Sandyzzx

@Sandyzzx Sandyzzx commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Documentation restructure, batches 0 through 2. Imported documents keep their original text.

Batch 0 - rules and routing

  • AGENTS.md (new): reading order, the four documentation status levels, and the hard rules (contract changes need a decision record, research is not fact, keep core authoritative docs under ten, language policy, verification discipline).
  • docs/README.md (new): bilingual router, per-reader paths, per-document index, and where new material belongs.
  • .gitignore: the previous rule ignored docs/* and allowlisted five files, so anything else dropped into docs/ silently disappeared. Documentation is now versioned by default; scratch material belongs in the ignored docs/_draft/.
  • src/interfaces.ts: the source header claimed a frozen V0.1 projection while docs/INTERFACES.md calls the V0.1/FROZEN wording historical. The header now points at INTERFACES.md as authoritative.

Batch 1 - local-only documents move in

Now at Was Status
docs/research/phase1-codex-zcode-2026-09-26.md docs/RESEARCH.md RESEARCH
docs/research/desktop-task-refresh-2026-09-28.md docs/ZCODE_DESKTOP_TASK_REFRESH.md RESEARCH
docs/research/start-plan-headless-2026-09-27.md .tasks/notes/START_PLAN_HEADLESS_BLOCKER.md RESEARCH
docs/decisions/roadmap-decisions-2026-09-27.md docs/ROADMAP_DECISIONS.md DECISION
docs/decisions/reliability-repair-plan-v2-2026-10-03.md docs/BRIDGE_RELIABILITY_REPAIR_PLAN.md DECISION
docs/archive/appserver-capability-matrix-2026-09-27.md docs/APPSERVER_CAPABILITY_MATRIX.md ARCHIVED, superseded by the 2026-10-05 probe
docs/archive/mvp-v0.3-2026-09-27.md docs/MVP_V0.3.md ARCHIVED
docs/archive/mcp-sdk-v2-migration-2026-09-27.md docs/MCP_SDK_V2_MIGRATION.md ARCHIVED

Plus docs/PROJECT_STATE.md (current snapshot with its own verification sources) and docs/decisions/README.md.

Batch 2 - decision records

  • ADR-001 Accepted: production execution uses the ZCode app-server; the historical CLI stays a legacy module.
  • ADR-002 Accepted: the Manager owns the task lifecycle; workers enter through an attempt claim.
  • ADR-003 Accepted: the execution directory is prepared by the calling host; the Bridge never creates or deletes it.
  • ADR-004 Proposed: local metadata, rollout, logs and the Desktop index are observation, not a control plane. This is the only one that is not a straight carry-over: the repository had no explicit record of it, so it stays Proposed pending a decision.

ADR-001 to ADR-003 each carry an Evidence section quoting ARCHITECTURE.md / INTERFACES.md / ZCODE_RUNTIME.md.

Batch 2b - Phase 7 notes folded in, then archived

docs/PHASE7_LIVE_PROGRESS.md is now docs/archive/phase7-live-progress.md. Its still-valid content was verified against the current code before being folded in, not copied on trust:

  • docs/ARCHITECTURE.md gains the worker liveness and result-recovery paragraph: heartbeat written every 3 seconds bound to attempt and PID, the 15-second grace before a single negative PID probe counts, and the outcome checkpoint that lets the Manager recover a report when the worker exits before committing its result.
  • docs/INTERFACES.md gains the event-content and replay boundary: public events carry visible text, tool name/state and limited lifecycle metadata only; replay polls session/events after 10 seconds of silence, degrades to live-only subscription when the runtime rejects it or after three consecutive transient failures, and emits a visible session_event_replay_unavailable event either way; session/read is not wired and native state query stays NOT RUN.
  • Verified in code before writing: src/worker/run-task.ts (3,000 ms heartbeat interval, heartbeat fields, outcome-checkpoint.json), src/manager/task-manager.ts (15,000 ms grace), src/adapters/zcode-app-server-adapter.ts (replayIdleMs = 10_000, poll interval, degradation path), and zero session/read references in src/.

Three references outside the documentation were updated: the package.json files list no longer ships the archived note, the src/adapters/zcode-app-server-adapter.ts header comment points at INTERFACES.md / ZCODE_RUNTIME.md, and the archived capability matrix link was rewritten. docs/PROJECT_STATE.md also gained the real permission round trip to its NOT RUN list.

Merge from master

master was merged in after #33 landed. docs/README.md now carries a real index row for docs/research/native-cli-vs-appserver-2026-10-05/README.md instead of a placeholder. The only conflict was .gitignore: this branch replaces the allowlist policy, so the !docs/research/ exceptions that #33 added are dropped as unnecessary under the new rule.

Deliberately not in this batch

Splitting the current authoritative documents into per-topic files. Splitting is content-triggered: a document over roughly 15 KB, or one topic read independently by three or more readers. The authoritative set currently totals about 15 KB, so splitting now would produce stubs.

Local configuration note

docs/ was additionally excluded by a local, unversioned rule in .git/info/exclude (/docs/). That rule is now commented out with an explanatory note. It is a local change and does not appear in this diff.

Validation

  • npm run typecheck - passed
  • npm test - passed: 261 tests, 260 passed, 0 failed, 1 skipped on Windows for POSIX permission bits (~10.8 minutes, includes the B3-05 scale case)
  • npm run build - passed; generated bundles unchanged
  • npm run validate:plugin - passed
  • git diff --check - clean
  • Relative markdown link check across repository documents - no broken links; no remaining references to the old PHASE7_LIVE_PROGRESS.md path

@Sandyzzx Sandyzzx changed the title docs: add agent rules and documentation router docs: add agent rules, router, and bring local documents into the repository Oct 7, 2026
@Sandyzzx Sandyzzx changed the title docs: add agent rules, router, and bring local documents into the repository docs: restructure documentation and fold in the phase 7 notes Oct 7, 2026
@Sandyzzx
Sandyzzx merged commit ed2d402 into master Oct 7, 2026
2 checks passed
@Sandyzzx
Sandyzzx deleted the codex/docs-restructure branch October 7, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant