Skip to content

docs(migration): add Sprint 2 Phase C — Why migrate + Migration steps + Known incompatibilities#66

Merged
suzuke merged 3 commits into
mainfrom
docs/sprint-2-phase-c
Apr 27, 2026
Merged

docs(migration): add Sprint 2 Phase C — Why migrate + Migration steps + Known incompatibilities#66
suzuke merged 3 commits into
mainfrom
docs/sprint-2-phase-c

Conversation

@suzuke

@suzuke suzuke commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

Phase C completes the migration guide. The 7-section skeleton from Phase A now has full content in every section:

Section PR State
§1 Why migrate? #66 (this PR) this PR
§2 CLI flag mapping #63 (Phase A) merged
§3 fleet.yaml schema diff #63 (Phase A) merged
§3.3 outbound_capabilities #65 (Phase A follow-up) merged
§4 Backend invocation diff #64 (Phase B) merged
§5 MCP tool API diff #64 (Phase B) merged
§6 Migration steps this PR this PR
§7 Known incompatibilities and deferred parity this PR this PR

After merge, the migration guide is a complete, ship-ready document covering the full operator migration journey from @suzuke/agend to agend-terminal.

What this PR adds

§1 Why migrate?

Operator-direct, no marketing pitch. Covers:

  • What you gain: native PTY mux, cross-platform (macOS/Linux/Windows), type safety where it matters (group_id/topic_id/outbound_capabilities), async daemon with no per-instance Node process, single source-of-truth BackendPreset table, built-in TUI (agend-terminal app).
  • Why @suzuke/agend is being deprecated: JS Number.MAX_SAFE_INTEGER precision (Discord guild IDs especially), tmux multiplexer locking out Windows, process management overhead via wrapper scripts, implicit channel ACLs.
  • Should you migrate now?: triage between immediate (heavy fleet, Windows operators, TUI dependency, cost-guard usage) vs defer (single Telegram-bound instance, stable config, no precision-sensitive usage).
  • Pre-alpha caveat: pin version, read release notes per upgrade, keep pre-migration backup ≥ 30 days. Cross-links to §6 rollback procedure.

§6 Migration steps

7-stage actionable plan:

  1. Pre-migration audit (TS state inventory via agend ls / topic list / access list / schedule list plus fleet.yaml read-through plus AGENTS.md/GEMINI.md gitignore audit).
  2. Snapshot data (concrete cp / tar / version-string commands).
  3. Choose mode (greenfield recommended unless meaningful historic state; in-place for fleets with non-trivial decision history or template usage).
  4. Workflow change: git worktree per branch — encoded in Rust resume strategy (cwd-keyed sessions) and global CLAUDE.md operator policy. Includes the canonical git worktree add ../my-repo.worktrees/<branch> <branch> pattern.
  5. Cross-link integrate — applies §2/§3/§4/§5 mappings to fleet.yaml, prompts, and runbooks. Each section linked back via the stable anchor.
  6. Post-migration smoke test checklist — 8 items covering daemon start, bot reply, allowlist gate, cross-instance dispatch, set_waiting_on round-trip, cost-guard pre-check, CI watch loop, config reload (with the RUST_LOG=debug reminder for the user_allowlist drop log).
  7. Rollback path — stop, restore $AGEND_HOME backup, re-install pinned version, file agend-terminal issue with daemon.log + redacted fleet.yaml + version string. Keep backup ≥ 30 days post-cutover.

§7 Known incompatibilities and deferred parity

Explicit risk register, organised into five subsections:

  • TS-only commands removed (recap from §2: 14 commands grouped by area).
  • TS-only fleet.yaml fields removed (recap from §3: 14 InstanceConfig fields + 4 top-level keys).
  • TS-only access semantics (pairing mode has no Rust analogue; explicit enumeration into channel.user_allowlist required).
  • Pending parity (Rust roadmap): outbound_capabilities Sprint 23 hard parse error promotion, PTY transport / signal capability matrix pending markers, AGEND_TOOL_SET profile mechanism, cross-channel architecture (Telegram → Discord/Slack via auth.rs::gate_outbound_for_agent), list_instances tags filter parity.
  • Functional limitations during transition: cost_guard not yet per-instance on Rust, Discord un-quote requirement, pairing-mode enumeration.
  • Operator caveats: user_allowlist DEBUG-not-WARN log level, pre-alpha schema instability, no archive format, tmux not used on Rust.

Stable anchors preserved

All cross-links use the anchors established in Phase A: {#why-migrate}, {#cli-flag-mapping}, {#fleet-yaml-schema-diff}, {#backend-invocation-diff}, {#mcp-tool-api-diff}, {#migration-steps}, {#known-incompatibilities}.

Stats

  • 2 files changed, 386 insertions(+), 6 deletions(-) (3 placeholder lines × 2 sections × 2 files = 6 deletions for the Phase C placeholders)
  • 196 EN + 196 zh-TW (1:1 mirror)
  • Pure docs, no code

Reviewer dispatch plan

  • ts-reviewer — TS-side full_review: writing quality + cross-link integrity + Phase A/B/follow-up summary fidelity + zh-TW parity + readability for a migrating operator.
  • dev-reviewer-2 (cross-team) — scope_conformance: §1 Rust value prop accuracy (native PTY mux, cross-platform, type safety claims) + §7 known incompatibilities Rust-side fidelity (outbound_capabilities Sprint 23 timeline, capability matrix pending markers, AGEND_TOOL_SET profile state, cross-channel architecture, list_instances tags parity).

🤖 Generated with Claude Code

suzuke and others added 3 commits April 27, 2026 13:03
… + Known incompatibilities

Phase C completes the migration guide. The 7-section skeleton from
Phase A now has full content in every section: Phase A wrote §2 (CLI
flag mapping) + §3 (fleet.yaml schema diff); Phase B wrote §4 (backend
invocation diff) + §5 (MCP tool API diff); Phase A follow-up (#65)
extended §3 with outbound_capabilities; this Phase C lands §1 (Why
migrate?) + §6 (Migration steps) + §7 (Known incompatibilities and
deferred parity).

§1 Why migrate? — operator-direct, no marketing pitch.
- "What you gain": native PTY mux, cross-platform (macOS/Linux/Windows),
  type safety where it matters, async daemon, single source-of-truth
  backend table, built-in TUI.
- "Why @suzuke/agend is being deprecated": JS Number precision, tmux
  multiplexer constraints, process management overhead, implicit
  channel ACLs.
- "Should you migrate now?": triage between immediate vs defer based
  on fleet size, OS coverage, TUI dependency, cost-guard usage.
- "Pre-alpha caveat": pin version, read release notes, keep backup —
  cross-links to §6 rollback procedure and forward to release-notes
  cadence.

§6 Migration steps — 7-stage actionable plan.
1. Pre-migration audit (TS state inventory: ls/topic/access/schedule
   listings, fleet.yaml read-through, AGENTS.md/GEMINI.md gitignore
   audit).
2. Snapshot data (fleet.yaml + $AGEND_HOME tar + version string).
3. Choose mode (greenfield vs in-place); recommend greenfield unless
   meaningful historic state.
4. Workflow change: git worktree per branch (encoded in Rust resume
   strategy + global CLAUDE.md operator policy).
5. Cross-link integrate (apply §2/§3/§4/§5 mappings to fleet.yaml,
   prompts, runbooks).
6. Post-migration smoke test checklist (8 items covering daemon
   start, bot reply, allowlist gate, cross-instance dispatch,
   set_waiting_on round-trip, cost-guard pre-check, CI watch loop,
   config reload).
7. Rollback path (stop, restore $AGEND_HOME backup, reinstall pinned
   version, file agend-terminal issue with daemon.log + redacted
   fleet.yaml + version). Keep backup ≥ 30 days post-cutover.

§7 Known incompatibilities and deferred parity — explicit risk register.
- TS-only commands removed (recap from §2): init, restart, reload,
  logs, fleet history/activity/cleanup, backend trust, topic, access,
  schedule, update, install/uninstall, web, export/import, export-chat,
  health.
- TS-only fleet.yaml fields removed (recap from §3): 14 InstanceConfig
  fields + 4 top-level keys (project_roots, profiles, health_port, stt).
- TS-only access semantics: pairing-mode users must enumerate to
  channel.user_allowlist (Phase A §3.1 referenced).
- Pending parity (Rust roadmap): outbound_capabilities Sprint 23 hard
  parse error promotion, capability matrix pending markers,
  AGEND_TOOL_SET profile mechanism, cross-channel architecture
  (Discord/Slack via auth.rs::gate_outbound_for_agent),
  list_instances tags filter parity.
- Functional limitations during transition: cost_guard not yet
  per-instance on Rust, Discord un-quote requirement, pairing-mode
  enumeration.
- Operator caveats: user_allowlist DEBUG-not-WARN log level,
  pre-alpha schema instability, no archive format, tmux not used on
  Rust.

All cross-links use the established stable anchors:
{#why-migrate} {#cli-flag-mapping} {#fleet-yaml-schema-diff}
{#backend-invocation-diff} {#mcp-tool-api-diff} {#migration-steps}
{#known-incompatibilities}.

zh-TW pair mirrors EN with body in 繁體中文; technical keywords,
file paths, GitHub URLs, anchor IDs preserved in English. Stats
will report after rebase.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three findings from the parallel ts-reviewer + dev-reviewer-2 audit on
PR #66 reviewed_head 9638d5e. All three addressed in EN and zh-TW.

M1 (medium, mandatory) — §7 Pending parity Sprint 11 timeline reframe:

- dev-reviewer-2 F1: doc said "Sprint 11 of the Rust project will run
  real-CLI verification" as future-tense. agend-terminal is at Sprint
  22 (post-#230 merge); Sprint 11 is the *filing* sprint of the
  backlog item, not a future schedule. Real-CLI verification has no
  committed sprint window in the Sprint 22-25 roadmap, and the
  operator has the work itself under review for cancellation.
- Re-worded per reviewer's suggestion: cite the specific backlog id
  `t-20260425040356199333-6`, surface that Sprint 22-25 has not
  committed completion, and surface that the work is under operator
  review.

L1 (low, took the polish) — §1.1 PTY primitive abstraction caveat:

- dev-reviewer-2 F2: "Rust daemon talks to PTYs directly (`openpty`
  on Unix, `ConPTY` on Windows)" elides the `portable-pty` crate
  layer. Materially correct (no tmux, native primitives) but not
  technically precise.
- Polished to "via the cross-platform `portable-pty` crate (which uses
  `openpty` on Unix, `ConPTY` on Windows)" — operator now sees the
  abstraction layer without losing the no-tmux/native-primitives
  takeaway.

O1 (low, took the polish) — §6 step 6 cross-instance dispatch
busy-gate note:

- ts-reviewer O1: smoke test step uses `delegate_task` without noting
  that post-PR #197/#199 (Rust Sprint 21), `delegate_task` against a
  mid-LLM-turn receiver returns BUSY unless `force=true`. Smoke test
  is operationally fine when both agents are idle, but the operator
  who hits busy will ask why.
- Added one-sentence guidance: ensure both agents idle, or pass
  `force: true` to exercise the busy-override path.

ts-lead recommended fixing all three since they are surgical
single-line text edits and doc-quality benefit > revision cost. New
commit on top of 9638d5e per CLAUDE.md (no amend).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…199 → #149/#161)

dev-reviewer-2 cross-team observation on PR #66 reviewed_head 1fc19d4
caught a wrong-PR citation in the §6 step 6 cross-instance dispatch
busy-gate note. The original ts-reviewer O1 finding cited PR #197/#199;
I carried that wording through unchanged. dev-reviewer-2's git blame
on `src/mcp/tools.rs:50-53` (agend-terminal main) shows the correct
provenance:

- Rust PR #149 (Sprint 8: "delegate_task busy gate + interrupt=true +
  timeout stuck detection") — original BUSY-by-default behaviour.
- Rust PR #161 (Sprint 10: "rename delegate_task interrupt→force +
  backwards-compat") — `force`/`force_reason` field rename.
- PR #197 (Sprint 18 PR-AY: Task Board UX Phase 2) — unrelated.
- PR #199 (Sprint 18.5 HOTFIX: fleet-update PTY submit_key +
  fleet_events.jsonl write) — unrelated.

Fix: replace `#197/#199` with explicit `#149` (busy gate) plus `#161`
(force/force_reason rename) so a future operator searching for the
behaviour lands on the right PRs. Semantic content of the bullet
(BUSY default + `force: true` override) was already correct; only the
citation drifted.

EN line 615 + zh-TW line 613, one substitution per file. New commit on
top of 1fc19d4 per CLAUDE.md (no amend).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@suzuke suzuke merged commit 081c547 into main Apr 27, 2026
1 check passed
@suzuke suzuke deleted the docs/sprint-2-phase-c branch April 27, 2026 05:21
suzuke added a commit that referenced this pull request Apr 27, 2026
#67)

Sprint 2 outcome: 4 PRs (#63, #64, #65, #66) ship the canonical TS→Rust
migration guide as docs/migration-to-agend-terminal.md (+ zh-TW pair).
Cross-team coordination with dev-team (agend-terminal Rust) operationalised
general's D3 single-hop dispatch pattern; 7-section guide complete with
stable anchors ready for agend-terminal Sprint 24 input.

Wall time ~1h40m for full pipeline including all phases, audits, polish
cycles, cross-team merge-ordering, and architectural side-fix routing
(F-NEW-OUTBOUND-DROP-LOG-SEVERITY-1 routed to dev-team Sprint 22 P1).
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