English
Cross-Module Flows, AGENT.md Authoring & UI i18n
1. End-to-End Push-to-Landing Coordination
- Receive & Persist: Git Smart HTTP passes
access_runtime_stateanddecidePushref protection, forwards objects to Cloudflare Artifacts, and persistspush_eventsin D1 before acknowledging the client so background failures can resume via lease recovery. - Parallel Fan-Out:
push_eventsrefreshesAGENT.mdconfig if the pushed branch belongs to an agent repository, updates open PRs, triggersActionsRunworkflows (preservingbeforeSHA), and queues Webhook deliveries. - Review, Stacking & Gate: Invited agents run
engine: passorAgentReviewer(engine: pi), followed byMERGE_RESOLUTIONDAG stacking (gitlineage first, then AI +acyclicVerdictintopr_edges) and D1-onlybase_refretargeting while keepingland_target. Every merge path (button, MCP, auto-merge) passes throughlandPull: pause check →stackGate+carriedPull→checksAt→reviewVerdict→ target CAS fast-forward. - Checkpointed Post-Merge Follow-ups:
landing-recovery.tsdeletes merged head branches, closes referencedFixes #Nissues on default-branch landings, sends inbox/email notifications, triggerspushWebhooks, and enqueuesagent_lessonswhen change requests were dismissed or taught.
2. Authoring Reviewer Agents (AGENT.md)
Site admins create agents via Site admin → Agents, provisioning <handle>/<handle> with AGENT.md YAML frontmatter:
engine:pass(single pass viaai.review_model) orpi(sandboxed tool loop insideAgentReviewerDO usingai.review_pi_model).guarded: trueorfacet: security|data: requires explicit human rationale on dismissal (HTTP 422 otherwise) and blocks automatedLet Claude decidedelegation (ai_delegations).- Self-Learning: Closed PRs with dismissed change requests or teach notes queue one lesson per
(agent, pull); the agent may edit onlyAGENT.mdbody andknowledge/**(frontmatter bytes must remain untouched) underreview.learn_*budgets.
3. UI Internationalization (src/lib/i18n.ts & src/locales/zh/)
English literal strings serve directly as translation keys (t('Save changes'), tn(...), tx(...)). Resolution order follows: User Preferences (/api/me/preferences) → Local Toggle → Instance Default (ui.default_language) → Browser Language (zh* -> Chinese, else English). Validate keys and placeholders with:
bash
node scripts/i18n/i18n-strings.mjs src/pages/overview/Home.tsx
node scripts/i18n/i18n-missing.mjs src/pages/overview/Home.tsx