docs(migration): add Sprint 2 Phase A — CLI flag mapping + fleet.yaml schema diff#63
Merged
Conversation
… schema diff
Establishes the canonical migration reference for moving an existing
@suzuke/agend (TS) install to agend-terminal (Rust). Built incrementally
per Sprint 2 plan — Phase A lands Sections 2 + 3 first because CLI
flags and fleet.yaml schema are the highest-friction surface for
operators. Other sections carry Phase B / Phase C placeholders so
follow-up phases stack without conflict.
Cross-team source-of-truth confirmed via dev-impl-2 (Rust side hot
context, agend-terminal main):
- Rust CLI tree: src/main.rs:165-337 (clap defs, single flat enum)
- Rust fleet.yaml schema: src/fleet.rs:7-183 (FleetConfig +
InstanceConfig + ChannelConfig)
- user_allowlist three-state semantics + drop log line:
src/channel/mod.rs:240-260
- group_id i64 round-trip tests: src/fleet.rs:725-826
Section 2 (CLI flag mapping) — every TS top-level / fleet / backend /
topic / access / schedule subcommand mapped against the Rust flat list.
The Rust surface is significantly leaner: many TS commands (logs,
history, activity, cleanup, init, web, reload, install, uninstall,
restart, export*, attach, topic, access, schedule) have no Rust
equivalent and are explicitly marked Removed with the operator
migration action (read log files directly, edit fleet.yaml, use MCP
tools, etc.). Stable anchor {#cli-flag-mapping} placed for Phase C.
Section 3 (fleet.yaml schema diff) — top-level keys + every
InstanceConfig field diffed. The Rust schema is deliberately leaner;
many TS per-instance knobs (tags, restart_policy, context_guardian,
log_level, tool_set, lightweight, systemPrompt, skipPermissions,
model_failover, cost_guard, workflow, startup_timeout_ms, agent_mode)
are not present in Rust — most have moved to env vars, backend presets,
or per-backend instruction files. Each removal documents the Rust
alternative. Two TS fields kept via serde alias on Rust:
description→role, worktree_source→git_branch.
High-friction calls covered with concrete examples + failure-mode
debugging:
#1 user_allowlist fail-closed default (Rust PR #216) —
- top-level channel.user_allowlist (NOT under access);
- three-state semantics: absent = legacy open + deprecation warn;
[]= lockdown; [ids] = allowlist;
- exact daemon.log line cited
(`outbound notify dropped — channel not authorised
(fail-closed; configure user_allowlist to opt in)`);
- migration debugging checklist included.
#2 group_id strict i64 — REVERSES the TS recommendation. Rust accepts
ONLY bare int form (i64 native, covers full negative supergroup range).
Quoted-string form is rejected at startup with serde error
"expected i64". TS users who quoted per the @suzuke/agend workaround
must un-quote when porting. Same caveat noted for topic_id (also
strict i32).
Stable anchors placed: {#why-migrate} {#cli-flag-mapping}
{#fleet-yaml-schema-diff} {#backend-invocation-diff} {#mcp-tool-api-diff}
{#migration-steps} {#known-incompatibilities}.
zh-TW pair (`docs/migration-to-agend-terminal.zh-TW.md`) translates
banner body and section content while retaining English for GitHub
URLs, agend-terminal keyword, and TS field names.
486 lines total (244 EN + 242 zh-TW), no impl changes — pure docs PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Six findings from the parallel ts-reviewer + dev-reviewer-2 audit on PR #63 reviewed_head 70b255c. Grouped into three areas; each addressed in EN and zh-TW. Area 1 — drop log + group_id framing (HIGH) - Sub-fix 1a (dev-reviewer-2 F1): doc claimed `WARN outbound notify dropped …` but src/channel/mod.rs:251-255 emits the line at `tracing::debug!`. With default `RUST_LOG=info` the line is invisible to grep — operator concludes "config OK" while the bot is silently dropping outbound notifies, the opposite of what the doc was trying to teach. Updated to DEBUG with an `[!IMPORTANT]` callout instructing the operator to set `RUST_LOG=debug` (or `RUST_LOG=agend_terminal= debug`) when reproducing. Architectural fix (raise debug→warn for security-gate visibility) is separately filed by ts-lead to dev-team and not part of this PR. - Sub-fix 1b (ts-reviewer F1): the prior framing claimed "@suzuke/agend taught operators to always quote large negative IDs." That overstated the TS canonical position. TS canonical docs use bare int for Telegram supergroup IDs (docs/configuration.md:23, tests/setup-wizard-config.test.ts:127). Quoted-string was reserved for Discord guild IDs whose 18-19-digit positive snowflakes exceed JS Number.MAX_SAFE_INTEGER (docs/features.md:302, docs/plugin-development.md:293, docs/plugin-adapter-architecture.md: 28,298). Re-framed: bare int is canonical on TS; Discord-quoting was the only quoted-form pattern; Rust i64 covers both with bare int — un-quote any quoted values, especially Discord. Area 2 — schema details (LOW) - Sub-fix 2a (dev-reviewer-2 F2): TeamConfig (src/fleet.rs:175-183) has `orchestrator: Option<String>` between `members` and `description`; the prior diff row missed it. Updated row shape to `{ members, orchestrator?, description? }` and added a sentence describing orchestrator's role (routing target for team-addressed delegate_task; team-tab grouping in the TUI) plus the porting note that leaving orchestrator unset preserves TS-equivalent behaviour. - Sub-fix 2b (ts-reviewer F2): the prior text used `access.allowed_users` as shorthand. Per src/types.ts:57 AccessConfig is nested under ChannelConfig, so the canonical TS path is `channel.access.allowed_users`. Fully qualified at both occurrences (config example callout, debugging step 3) in EN and zh-TW. Area 3 — citation/scope tightening (LOW) - Sub-fix 3a (dev-reviewer-2 F3): the prior text implied src/fleet.rs:725-826 round-trip tests covered quoted-string rejection. They cover only bare-int parsing for representative negative IDs; quoted-string rejection is serde's default behaviour for `i64`-typed fields and is not separately regression-tested. Re-phrased per reviewer's suggested wording, noting future serde drift is unlikely but technically not pinned. - Sub-fix 3b (ts-reviewer F3): TS AccessConfig.mode supports both `"pairing"` and `"locked"` (src/types.ts:29). The prior High-friction #1 covered the locked-mode → user_allowlist path but did not address pairing-mode users (issued via `agend access pair`, redeemed by users to land their IDs in `channel.access.allowed_users`). Rust has no pairing flow equivalent. Added an explicit migration step for pairing-mode operators: enumerate every active user ID into `channel.user_allowlist` directly. zh-TW pair updated identically. Stats: 2 files changed, 30 insertions(+), 26 deletions(-). New commit on top of 70b255c per CLAUDE.md (no amend). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
suzuke
added a commit
that referenced
this pull request
Apr 27, 2026
… API diff (#64) Phase B of the TS→Rust migration guide. Verdicts: ts-impl full_review VERIFIED + dev-reviewer-2 scope_conformance VERIFIED at 51d67f9. Polish revision 28baa19 (16-line citation tighten + 1 clarifying sentence on Kiro behavior) inspected by ts-lead as purely mechanical, no substantive change to operator-facing claims, merged on inspection per PR #63 polish-cycle precedent.
suzuke
added a commit
that referenced
this pull request
Apr 27, 2026
… + Known incompatibilities (#66) Final phase of TS→Rust migration guide. 7-section guide complete. Verdicts: ts-reviewer full_review VERIFIED + dev-reviewer-2 scope_conformance VERIFIED at head 9638d5e. Polish revision 1fc19d4 (M1 medium Sprint 11 timeline reframe + L1 LOW portable-pty crate caveat + O1 LOW busy-gate note for delegate_task smoke test) + micro-fix a9509de (Rust PR #197/#199 → #149/#161 citation correction per dev-reviewer-2 cross-team git-blame). Polish + micro-fix inspected by ts-lead as surgical mechanical, no substantive change. Sprint 2 ledger now complete: Phase A (#63 + #65 follow-up) + Phase B (#64) + Phase C (#66) = 4 PRs landing 7-section migration guide ready for agend-terminal Sprint 24 input.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establishes the canonical migration reference at
docs/migration-to-agend-terminal.md(+ zh-TW pair) for moving an existing@suzuke/agend(TS) install toagend-terminal(Rust). Built incrementally per Sprint 2 plan — Phase A lands the 7-section skeleton plus full content for Sections 2 (CLI flag mapping) and 3 (fleet.yaml schema diff), the highest-friction surfaces for operators porting an existing config.Sections 1, 4, 5, 6, 7 carry
(Phase B)/(Phase C)placeholders so subsequent phases stack without merge conflict. Stable anchors placed ({#cli-flag-mapping},{#fleet-yaml-schema-diff}, etc.) so Phase C link-backs land on stable IDs.This PR is the ts-team Sprint 2 Phase A response to dev-lead's cross-team docs scope dependency for
agend-terminalSprint 24.Cross-team source of truth
dev-impl-2 (Rust hot context) provided the canonical Rust-side facts via single-hop query:
src/main.rs:165-337(clap definitions; single flat enum)src/fleet.rs:7-183(FleetConfig+InstanceConfig+ChannelConfig; serde defaults; snake_case)user_allowlistthree-state semantics + outbound drop log:src/channel/mod.rs:240-260— drop line at L254group_idi64 round-trip tests:src/fleet.rs:725-826High-friction items (per dev-lead)
#1 —
user_allowlistis fail-closed by default (PR #216)channel.user_allowlist, NOT nested underaccess(Rust has noaccesssub-key onchannel).[]→ lockdown (reject all)[ids]→ allowlistoutbound notify dropped — channel not authorised (fail-closed; configure user_allowlist to opt in)(src/channel/mod.rs:254).#2 —
group_idis stricti64, bare int onlyReverses the TS migration guidance. On Rust, the field is strictly typed
i64and serde rejects quoted-string form at startup withexpected i64. Operators who quotedgroup_idper the@suzuke/agendworkaround must un-quote when porting. Same caveat noted fortopic_id(also strictOption<i32>).What's leaner on Rust (covered in the guide, summarised here)
CLI commands removed:
init,restart,reload,install/uninstall,web,export/import,export-chat,logs,attach(kept),fleet logs/history/activity/cleanup/restart,backend trust, all oftopic/access/schedule. Each marked Removed with the operator migration action (read log files, editfleet.yaml, use MCP tools, OS-native services).Fleet.yaml fields removed:
tags,general_topic,restart_policy,context_guardian,log_level,tool_set,lightweight,systemPrompt,skipPermissions,model_failover,cost_guard,workflow,startup_timeout_ms,agent_mode, plus top-levelproject_roots,profiles,health_port,stt. Each row in the diff table documents the Rust alternative (env var, backend preset, per-backend instruction file, or simply N/A).Two TS fields kept via serde alias on Rust:
description→role,worktree_source→git_branch.Reviewer dispatch plan
This PR is dispatched to two reviewers in parallel per ts-lead's directive:
ts-reviewer— TS-side fact accuracy (every TS field/command cited fromsrc/types.ts/src/cli.ts), writing quality, skeleton structure (anchors, Phase markers, banner alignment with PR docs: add deprecation banner to user-facing docs (Sprint 1 Track 1) #61). Standard TS-team Reviewer Contract v1.1.dev-reviewer-2(cross-team) — Rust API correctness only. Boundary: zero TS context, audit only the Rust-side claims and the source pointers (src/main.rs,src/fleet.rs,src/channel/mod.rs). They confirm whether the Rust facts cited match the actual code at those paths.Verdicts must both reach ts-lead before merge gate.
Stats
Files
docs/migration-to-agend-terminal.md(244 lines)docs/migration-to-agend-terminal.zh-TW.md(242 lines)🤖 Generated with Claude Code