@geminix/gxpm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +148 -0
- package/CANON.md +53 -0
- package/CLAUDE.md +60 -0
- package/CONTEXT.md +49 -0
- package/DEBUG.md +59 -0
- package/ISSUE_CONTEXT.md +25 -0
- package/README.md +143 -0
- package/VERSION +1 -0
- package/agents/cleanup-auditor/cleanup-auditor.md +56 -0
- package/agents/grill-master.md +26 -0
- package/agents/implementer.md +32 -0
- package/agents/review-army/accessibility-reviewer.md +54 -0
- package/agents/review-army/code-quality-reviewer.md +54 -0
- package/agents/review-army/security-reviewer.md +56 -0
- package/agents/review-army/spec-compliance-reviewer.md +51 -0
- package/agents/review-army/test-reviewer.md +55 -0
- package/agents/reviewer.md +59 -0
- package/agents/ship-audit-army/docs-auditor.md +53 -0
- package/agents/ship-audit-army/performance-auditor.md +52 -0
- package/agents/ship-audit-army/security-auditor.md +52 -0
- package/agents/specifier.md +55 -0
- package/agents/triage-officer.md +27 -0
- package/bin/gxpm +17 -0
- package/bin/gxpm-browser +17 -0
- package/bin/gxpm-config +15 -0
- package/bin/gxpm-eval +13 -0
- package/bin/gxpm-global-discover +15 -0
- package/bin/gxpm-init +38 -0
- package/bin/gxpm-investigate +194 -0
- package/bin/gxpm-uninstall +15 -0
- package/bin/gxpm-update-check +165 -0
- package/commands/build.md +40 -0
- package/commands/help.md +53 -0
- package/commands/plan.md +34 -0
- package/commands/refine.md +46 -0
- package/commands/review.md +34 -0
- package/commands/ship.md +37 -0
- package/core/ac-check.ts +20 -0
- package/core/agent-runtime.ts +363 -0
- package/core/artifact-validator.ts +151 -0
- package/core/artifacts.ts +313 -0
- package/core/autopilot.ts +250 -0
- package/core/capabilities.ts +779 -0
- package/core/checkpoint.ts +370 -0
- package/core/cleanup.ts +32 -0
- package/core/command-probe.ts +82 -0
- package/core/config.ts +533 -0
- package/core/contracts/behavior-spec.schema.ts +38 -0
- package/core/contracts/converter.ts +61 -0
- package/core/contracts/host.ts +43 -0
- package/core/converters/converter.ts +93 -0
- package/core/converters/index.ts +8 -0
- package/core/converters/managed-artifact.ts +119 -0
- package/core/converters/parser.ts +159 -0
- package/core/converters/template-renderer.ts +35 -0
- package/core/converters/writer.ts +61 -0
- package/core/dag-executor.ts +426 -0
- package/core/dag-loader.ts +292 -0
- package/core/dag-schemas.ts +150 -0
- package/core/dispatch.ts +125 -0
- package/core/evidence.ts +148 -0
- package/core/gate.ts +269 -0
- package/core/hook-engine.ts +566 -0
- package/core/host-probe.ts +64 -0
- package/core/implement.ts +16 -0
- package/core/isolation-errors.ts +174 -0
- package/core/isolation-resolver.ts +921 -0
- package/core/issue-context.ts +381 -0
- package/core/issue-readiness.ts +457 -0
- package/core/issue-sync.ts +427 -0
- package/core/issues.ts +132 -0
- package/core/land.ts +108 -0
- package/core/orchestrator.ts +54 -0
- package/core/phase-artifact.ts +32 -0
- package/core/phase-gates.ts +130 -0
- package/core/phase-rewind.ts +94 -0
- package/core/plan-lint.ts +61 -0
- package/core/plan.ts +77 -0
- package/core/port-allocation.ts +50 -0
- package/core/pr-check.ts +15 -0
- package/core/preset-system/preset-resolver.ts +221 -0
- package/core/project-init-status.ts +127 -0
- package/core/qa.ts +15 -0
- package/core/resilience.ts +165 -0
- package/core/runs.ts +288 -0
- package/core/safe-path.test.ts +80 -0
- package/core/safe-path.ts +60 -0
- package/core/sdd-gate.test.ts +98 -0
- package/core/sdd-gate.ts +134 -0
- package/core/self-review.ts +62 -0
- package/core/session.ts +70 -0
- package/core/ship.ts +86 -0
- package/core/specify.ts +173 -0
- package/core/state.ts +1002 -0
- package/core/template-engine.ts +152 -0
- package/core/template-resolver.test.ts +70 -0
- package/core/template-resolver.ts +156 -0
- package/core/triage.ts +26 -0
- package/core/verify.ts +15 -0
- package/core/wiki-native.ts +2423 -0
- package/core/wiki.ts +27 -0
- package/core/workflow-event-emitter.ts +163 -0
- package/core/workflows/engine.ts +273 -0
- package/core/workflows/expressions.ts +76 -0
- package/core/workflows/index.ts +38 -0
- package/core/workflows/steps/command.ts +43 -0
- package/core/workflows/steps/gate.ts +47 -0
- package/core/workflows/steps/gxpm.ts +44 -0
- package/core/workflows/steps/linear.ts +31 -0
- package/core/workflows/steps/shell.ts +65 -0
- package/core/workflows/types.ts +62 -0
- package/core/workspace-runtime.ts +227 -0
- package/core/worktree-init-steps.ts +647 -0
- package/core/worktree-init.ts +330 -0
- package/core/worktree-owner.ts +143 -0
- package/docs/GXPM_VERIFY.md +98 -0
- package/docs/INSTALL_FOR_AGENTS.md +113 -0
- package/docs/README.md +57 -0
- package/docs/adr/adr-005-multi-platform-skill-converter.md +72 -0
- package/docs/agents/domain.md +30 -0
- package/docs/agents/issue-tracker.md +30 -0
- package/docs/agents/triage-labels.md +32 -0
- package/docs/architecture/gxpm-architecture-diagram.md +265 -0
- package/docs/architecture/gxpm-current-architecture.md +175 -0
- package/docs/architecture/gxpm-current-flow.md +278 -0
- package/docs/architecture/gxpm-replacement-architecture.md +211 -0
- package/docs/architecture/gxpm-target-architecture.md +449 -0
- package/docs/architecture/gxpm-v0-contract.md +311 -0
- package/docs/architecture/layered-workflow-boundaries.md +193 -0
- package/docs/architecture/preset-system.md +126 -0
- package/docs/architecture/scaffold-northstar.md +23 -0
- package/docs/brainstorms/2026-05-14-bdd-then-tdd-design.md +320 -0
- package/docs/brainstorms/README.md +22 -0
- package/docs/brainstorms/docs-knowledge-system-requirements.md +29 -0
- package/docs/governance/beta-skill-promotion.md +39 -0
- package/docs/governance/development-contract.md +144 -0
- package/docs/governance/gherkin-style.md +90 -0
- package/docs/governance/host-adapter.md +56 -0
- package/docs/governance/skill-authoring.md +87 -0
- package/docs/governance/skill-testing.md +356 -0
- package/docs/governance/template-authoring.md +53 -0
- package/docs/migrations/v0.2.md +51 -0
- package/docs/plans/README.md +23 -0
- package/docs/plans/bdd-then-tdd-plan.md +1767 -0
- package/docs/plans/docs-knowledge-system-plan.md +31 -0
- package/docs/plans/spec-kit-sdd-adoption-plan.md +305 -0
- package/docs/research/agents-md-best-practices.md +207 -0
- package/docs/research/archon-study.md +351 -0
- package/docs/research/claude-hooks-study.md +440 -0
- package/docs/research/codex-hooks-study.md +624 -0
- package/docs/research/everything-claude-code-study.md +252 -0
- package/docs/research/from-skills-to-layered-workflow.md +322 -0
- package/docs/research/gsd-study.md +69 -0
- package/docs/research/kimi-hooks-study.md +274 -0
- package/docs/research/mattpocock-skills-comparison.md +429 -0
- package/docs/research/mattpocock-skills-study.md +275 -0
- package/docs/research/oh-my-codex-study.md +279 -0
- package/docs/research/perplexity-agent-skills-design.md +168 -0
- package/docs/research/pmc-gstack-skill-study.md +122 -0
- package/docs/research/spec-kit-study.md +224 -0
- package/docs/research/superpowers-study.md +209 -0
- package/docs/roadmap/initial-roadmap.md +53 -0
- package/docs/solutions/README.md +45 -0
- package/docs/solutions/artifact-nesting-recovery.md +58 -0
- package/docs/solutions/session-context-restore-practice.md +67 -0
- package/docs/solutions/workflow/version-drift-recovery.md +49 -0
- package/docs/solutions/worktree-gate-recovery.md +62 -0
- package/docs/specs/README.md +28 -0
- package/docs/specs/claude.md +45 -0
- package/docs/specs/codex.md +44 -0
- package/docs/specs/cursor.md +44 -0
- package/hosts/adapters/claude.ts +29 -0
- package/hosts/adapters/codex.ts +27 -0
- package/hosts/adapters/cursor.ts +27 -0
- package/hosts/adapters/kimi.ts +27 -0
- package/hosts/claude.ts +23 -0
- package/hosts/codex.ts +26 -0
- package/hosts/cursor.ts +19 -0
- package/hosts/index.ts +33 -0
- package/hosts/registry.test.ts +52 -0
- package/hosts/registry.ts +57 -0
- package/hosts/schema.ts +58 -0
- package/package.json +52 -0
- package/scripts/browser.ts +185 -0
- package/scripts/cleanup.ts +142 -0
- package/scripts/commands/artifact.ts +115 -0
- package/scripts/commands/autopilot.ts +143 -0
- package/scripts/commands/capability.ts +57 -0
- package/scripts/commands/config.ts +69 -0
- package/scripts/commands/dag.ts +126 -0
- package/scripts/commands/feedback.ts +123 -0
- package/scripts/commands/gate.ts +291 -0
- package/scripts/commands/helpers.ts +126 -0
- package/scripts/commands/hook.ts +66 -0
- package/scripts/commands/init.ts +515 -0
- package/scripts/commands/issue.ts +825 -0
- package/scripts/commands/phase.ts +61 -0
- package/scripts/commands/preset.ts +159 -0
- package/scripts/commands/runtime.ts +199 -0
- package/scripts/commands/specify.ts +71 -0
- package/scripts/commands/upgrade.ts +243 -0
- package/scripts/commands/verify.ts +183 -0
- package/scripts/commands/wiki.ts +242 -0
- package/scripts/commands/workflow.ts +131 -0
- package/scripts/dev-skill.ts +55 -0
- package/scripts/discover-skills.ts +116 -0
- package/scripts/doctor.ts +410 -0
- package/scripts/dogfood-check.ts +125 -0
- package/scripts/eval-functional.ts +218 -0
- package/scripts/eval.ts +246 -0
- package/scripts/gen-skill-docs.ts +201 -0
- package/scripts/global-discover.ts +217 -0
- package/scripts/governance-check.ts +75 -0
- package/scripts/gxpm-check.ts +12 -0
- package/scripts/gxpm.ts +216 -0
- package/scripts/host-config.ts +62 -0
- package/scripts/install-claude-hooks.ts +138 -0
- package/scripts/install-codex-hooks.ts +271 -0
- package/scripts/install-hooks.ts +128 -0
- package/scripts/install-kimi-hooks.ts +92 -0
- package/scripts/install-skill.ts +184 -0
- package/scripts/phase-artifact-commands.ts +100 -0
- package/scripts/post-land-sync.ts +46 -0
- package/scripts/scaffold-check.ts +85 -0
- package/scripts/skill-naming-check.ts +78 -0
- package/scripts/skill-structure-check.ts +157 -0
- package/scripts/skills-lock-check.ts +60 -0
- package/scripts/sync-markdown-artifacts.ts +172 -0
- package/scripts/uninstall.ts +162 -0
- package/scripts/version.ts +47 -0
- package/scripts/wait-pr-ready.ts +407 -0
- package/skills/gxpm/SKILL.md +485 -0
- package/skills/gxpm/SKILL.md.tmpl +422 -0
- package/skills/gxpm/references/CANON.md +53 -0
- package/skills/gxpm/references/key-rules.md +130 -0
- package/skills/gxpm-architecture/SKILL.md +106 -0
- package/skills/gxpm-architecture/references/DEEPENING.md +37 -0
- package/skills/gxpm-architecture/references/INTERFACE-DESIGN.md +44 -0
- package/skills/gxpm-autopilot/SKILL.md +116 -0
- package/skills/gxpm-autopilot/SKILL.md.tmpl +107 -0
- package/skills/gxpm-browser/SKILL.md +105 -0
- package/skills/gxpm-browser/SKILL.md.tmpl +41 -0
- package/skills/gxpm-browser/references/commands.md +43 -0
- package/skills/gxpm-browser/references/evidence-path.md +20 -0
- package/skills/gxpm-build/SKILL.md +78 -0
- package/skills/gxpm-cleanup/SKILL.md +76 -0
- package/skills/gxpm-debug-issue/SKILL.md +39 -0
- package/skills/gxpm-diagnose/SKILL.md +220 -0
- package/skills/gxpm-diagnose/SKILL.md.tmpl +31 -0
- package/skills/gxpm-diagnose/references/feedback-loop.md +34 -0
- package/skills/gxpm-diagnose/references/feedback-loops.md +43 -0
- package/skills/gxpm-diagnose/references/phases.md +60 -0
- package/skills/gxpm-eval/SKILL.md +78 -0
- package/skills/gxpm-explore-codebase/SKILL.md +36 -0
- package/skills/gxpm-explore-codebase/scripts/summarize-communities.ts +51 -0
- package/skills/gxpm-feedback/SKILL.md +122 -0
- package/skills/gxpm-grill/SKILL.md +159 -0
- package/skills/gxpm-grill/SKILL.md.tmpl +77 -0
- package/skills/gxpm-grill/references/documentation-templates.md +56 -0
- package/skills/gxpm-grill/references/process.md +25 -0
- package/skills/gxpm-handoff/SKILL.md +112 -0
- package/skills/gxpm-hygiene/SKILL.md +69 -0
- package/skills/gxpm-implementer/SKILL.md +142 -0
- package/skills/gxpm-implementer/SKILL.md.tmpl +141 -0
- package/skills/gxpm-linear/SKILL.md +282 -0
- package/skills/gxpm-linear/SKILL.md.tmpl +86 -0
- package/skills/gxpm-linear/references/commands.md +75 -0
- package/skills/gxpm-linear/references/workflows.md +120 -0
- package/skills/gxpm-planning/SKILL.md +134 -0
- package/skills/gxpm-prototype/SKILL.md +64 -0
- package/skills/gxpm-refactor-safely/SKILL.md +62 -0
- package/skills/gxpm-review-army/SKILL.md +117 -0
- package/skills/gxpm-review-changes/SKILL.md +36 -0
- package/skills/gxpm-setup/SKILL.md +101 -0
- package/skills/gxpm-specifier/SKILL.md +135 -0
- package/skills/gxpm-tdd/SKILL.md +187 -0
- package/skills/gxpm-tdd/references/interface-design.md +23 -0
- package/skills/gxpm-tdd/references/mocking.md +27 -0
- package/skills/gxpm-tdd/references/red-green-refactor.md +61 -0
- package/skills/gxpm-tdd/references/troubleshooting.md +28 -0
- package/skills/gxpm-tdd/references/workflow.md +50 -0
- package/skills/gxpm-tdd/testing-anti-patterns.tmpl +304 -0
- package/skills/gxpm-triage/SKILL.md +160 -0
- package/skills/gxpm-verify/SKILL.md +107 -0
- package/skills/gxpm-write-skill/SKILL.md +131 -0
- package/skills/gxpm-zoom-out/SKILL.md +69 -0
- package/skills/maintain-hygiene-skills-lock/SKILL.md +54 -0
- package/skills/maintain-hygiene-skills-lock/SKILL.md.tmpl +53 -0
- package/templates/constitution-template.md +63 -0
- package/templates/hooks/gxpm-commit-msg +16 -0
- package/templates/hooks/gxpm-post-checkout +19 -0
- package/templates/hooks/gxpm-post-commit +7 -0
- package/templates/hooks/gxpm-post-merge +29 -0
- package/templates/hooks/gxpm-pre-commit +39 -0
- package/templates/hooks/gxpm-pre-push +33 -0
- package/templates/plan-template.md.tmpl +46 -0
- package/templates/spec-template.md.tmpl +63 -0
- package/templates/specify-stub.tmpl +22 -0
- package/templates/tasks-template.md.tmpl +32 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# Archon 调查
|
|
2
|
+
|
|
3
|
+
日期:2026-05-04
|
|
4
|
+
|
|
5
|
+
## 调查对象
|
|
6
|
+
|
|
7
|
+
- Archon 主仓库:`/Users/x/Desktop/Project/github/archon`
|
|
8
|
+
- 技术栈:Bun + TypeScript + SQLite/PostgreSQL + Hono + Zod OpenAPI
|
|
9
|
+
|
|
10
|
+
## Archon 的核心能力
|
|
11
|
+
|
|
12
|
+
Archon 是一个**面向 AI coding agent 的工作流引擎**。它的核心主张是:把开发流程编码为 YAML 工作流,让 AI 在每个步骤填充智能,但结构由人类拥有且确定可重复。类比:Dockerfile 之于基础设施,GitHub Actions 之于 CI/CD,Archon 之于 AI coding 工作流。
|
|
13
|
+
|
|
14
|
+
关键事实:
|
|
15
|
+
|
|
16
|
+
- **Workflow DAG**:YAML 定义节点和 `depends_on` 边,同层独立节点并发执行。节点类型包括 `prompt`(AI)、`bash`(确定性脚本)、`loop`(迭代直到信号)、`approval`(人工 gate)、`script`(TypeScript/Python)、`command`(命名命令文件)。
|
|
17
|
+
- **Git Worktree 隔离**:每个 workflow run 自动创建独立 worktree,支持并行运行无冲突。`bun run cli workflow run` 默认带隔离,`--no-worktree` 显式退出。
|
|
18
|
+
- **确定性 Phase + Validation Gate**:工作流定义 phase、验证门和产物;AI 填充每步的智能,但结构不变。
|
|
19
|
+
- **Artifacts + Evidence 双轨**:workflow artifacts 写入 `~/.archon/workspaces/owner/repo/artifacts/runs/{id}/`(永不入 git);原始命令输出、截图等作为证据留存。
|
|
20
|
+
- **Multi-Platform**:CLI、Web UI(React + Vite + SSE)、Slack(轮询)、Telegram(Bot API)、GitHub(webhook + gh CLI)、Discord(WebSocket)。统一 conversation 接口。
|
|
21
|
+
- **Session 不可变 + Transition 审计链**:session 之间通过 `parent_session_id` 链接,`transition_reason` 记录为什么创建新 session(plan→execute 等)。
|
|
22
|
+
- **AI Provider 抽象**:`IAgentProvider` 接口,内置 Claude、Codex、Pi(community,~20 LLM backends),provider-specific 选项内部翻译。
|
|
23
|
+
- **Monorepo 分层架构**:9 个 package 按依赖方向严格分层:
|
|
24
|
+
- `@archon/paths`(零依赖)→ `@archon/git` → `@archon/isolation` / `@archon/workflows` → `@archon/core` → `@archon/adapters` → `@archon/server` → `@archon/web` / `@archon/cli`
|
|
25
|
+
- **Rollback-First 工程原则**:小范围变更、明确 blast radius、 risky 变更先定义回滚路径、避免 mixed mega-patches。
|
|
26
|
+
- **No Autonomous Lifecycle Mutation Across Process Boundaries**:当一个进程无法区分“正在别处活跃运行”和“已崩溃孤儿”时,不得基于计时器或陈旧猜测自动将工作标记为失败/取消。必须将模糊状态暴露给用户并提供一键操作。
|
|
27
|
+
- **Bundled Defaults + 层级覆盖**:默认命令和工作流编译嵌入二进制;加载优先级:bundled < global(`~/.archon/`)< project(`.archon/`),同名覆盖。
|
|
28
|
+
- **丰富的变量替换体系**:`$1/$2/$3`、`$ARGUMENTS`、`$ARTIFACTS_DIR`、`$BASE_BRANCH`、`$LOOP_PREV_OUTPUT`、`$REJECTION_REASON` 等,支持节点间数据传递。
|
|
29
|
+
|
|
30
|
+
## Archon 高价值模块
|
|
31
|
+
|
|
32
|
+
- `CLAUDE.md`:829 行的工程合同,涵盖核心原则、类型安全规范(Zod)、Git 工作流、开发命令、架构分层、目录结构、数据库 schema、配置优先级、API 端点、错误处理、日志规范、测试隔离规则等。
|
|
33
|
+
- `.github/pull_request_template.md`:极为严格的 PR 模板,要求 UX Journey(Before/After ASCII 流)、架构图(Before/After + Connection inventory)、Label Snapshot(risk/size/scope/module)、Validation Evidence、Security Impact、Compatibility/Migration、Human Verification、Blast Radius、Rollback Plan。
|
|
34
|
+
- `packages/workflows/`:工作流引擎核心 — loader、router、executor、DAG executor、validator、event-emitter、logger、defaults。
|
|
35
|
+
- `packages/core/src/orchestrator/`:AI conversation 管理、变量替换、session 生命周期。
|
|
36
|
+
- `packages/git/` 与 `packages/isolation/`:worktree 操作、分支管理、隔离环境解析、错误分类器。
|
|
37
|
+
- `packages/providers/`:AI provider 注册表、Claude/Codex/Pi 适配、零 SDK 依赖的 `providers/types` 契约子路径。
|
|
38
|
+
- `packages/server/src/routes/api.ts`:REST API + OpenAPI 规范自动生成(`@hono/zod-openapi`),workflow CRUD、run lifecycle、artifact serving、codebase 管理。
|
|
39
|
+
- `.archon/workflows/defaults/` 与 `.archon/commands/defaults/`:内嵌默认工作流和命令(如 `assist`、`plan`、`implement` 等),通过 `bun run generate:bundled` 编译进二进制。
|
|
40
|
+
- `.archon/config.yaml`:assistant 级别默认配置(model、settingSources、binaryPath 等),支持 workflow-level 覆盖。
|
|
41
|
+
|
|
42
|
+
## Archon 的限制
|
|
43
|
+
|
|
44
|
+
- **单开发者工具定位**:明确声明无多租户复杂度,这意味着团队级权限、并发 claim、角色隔离不在当前范围内。
|
|
45
|
+
- **Workflow YAML 的学习成本**:虽然比代码简单,但要充分利用 DAG、loop、approval、trigger_rule、join semantics 等高级特性,用户需要学习 Archon 的 workflow DSL。
|
|
46
|
+
- **AI Provider 覆盖有限**:虽然支持 Claude、Codex、Pi,但对国内模型或自托管模型的接入仍需社区扩展。
|
|
47
|
+
- **无原生 Issue Tracker 集成**:没有 Linear / GitHub Issues 的状态机绑定,workflow 是通用的,不感知项目管理的 phase gate。
|
|
48
|
+
- **Session 不可变导致上下文累积**:虽然 session 有 transition 审计链,但单个 session 内的上下文仍然会累积;没有 GSD 那种“每个 agent 干净上下文”的显式设计。
|
|
49
|
+
- **Bun 生态依赖**:编译二进制、mock.module() 隔离测试、SQLite 内置等特性强绑定 Bun,迁移到 Node.js 成本高。
|
|
50
|
+
|
|
51
|
+
## gxpm 的借鉴方向
|
|
52
|
+
|
|
53
|
+
Archon 最核心的贡献是**把 AI coding 流程结构化为可拥有、可重复、可隔离的工作流**:
|
|
54
|
+
|
|
55
|
+
1. **Workflow DAG + Phase Gate**:gxpm 的 `triage → plan → dispatch → implement → ... → land` 可借鉴 Archon 的 DAG executor,把线性 phase 链扩展为支持并发验证门(如 `local-verify` 和 `self-review` 可并行)的图结构。
|
|
56
|
+
2. **Git Worktree 隔离**:gxpm 已有 worktree 概念,但 Archon 的“每次 run 自动创建 worktree + 端口自动分配 + 确定性复用”是更成熟的工程实现。`packages/isolation/` 的错误分类器和 provider factory 可直接参考。
|
|
57
|
+
3. **Artifacts + Evidence 双轨**:gxpm 的 `artifacts/*.json`(gate 结论)和 `evidence/`(原始证据)与 Archon 的 artifacts/evidence 分层高度一致,应吸收其路径分配、run-scoped 隔离和不可入 git 的约定。
|
|
58
|
+
4. **PR 模板与安全/回滚门**:Archon 的 PR template 要求 Security Impact、Rollback Plan、Blast Radius、Human Verification,这种“对抗性自查”应成为 gxpm `ship` / `self-review` 阶段的 artifact 字段。
|
|
59
|
+
5. **No Autonomous Lifecycle Mutation**:这条原则对 gxpm 的 orchestrator dry-run 和 claim lifecycle 至关重要 —— gxpm 不应让某个进程基于超时猜测就把 issue 标记为失败。
|
|
60
|
+
6. **Bundled Defaults + 层级覆盖**:gxpm 的 skill 和 workflow 默认值可采用“编译嵌入 + global < project 覆盖”的模式,减少每个项目的初始化成本。
|
|
61
|
+
7. **变量替换与节点间数据传递**:Archon 的 `$nodeId.output`、`$LOOP_PREV_OUTPUT`、`$REJECTION_REASON` 等机制,可为 gxpm 的 artifact 引用和跨-phase 数据传递提供设计参考。
|
|
62
|
+
8. **Monorepo 分层与接口隔离**:Archon 的 package 分层(paths → git → isolation/workflows → core → adapters → server)和 `IAgentProvider` / `IPlatformAdapter` / `IWorkflowStore` 窄接口,是 gxpm 拆分 runtime adapter 的优先参考。
|
|
63
|
+
|
|
64
|
+
## 深度工程实践拆解
|
|
65
|
+
|
|
66
|
+
以下十条是 Archon 最值得 gxpm 直接借鉴的工程实践,按“结构 → 韧性 → 可观测性 → 治理”排序。
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### 1. DAG Executor:拓扑排序 + 并发层 + Trigger Rule + When Condition
|
|
71
|
+
|
|
72
|
+
**代码位置**:`packages/workflows/src/dag-executor.ts`(`executeDagWorkflow`,~2481 行起)、`packages/workflows/src/loader.ts`(`validateDagStructure`)
|
|
73
|
+
|
|
74
|
+
**Archon 怎么做**:
|
|
75
|
+
|
|
76
|
+
1. **拓扑分层**:`buildTopologicalLayers()` 将 DAG 节点按依赖深度分层,同层节点用 `Promise.allSettled` 并发执行。
|
|
77
|
+
2. **Trigger Rule**:每个节点可配 `trigger_rule`,支持 `all_success`(默认)、`one_success`、`none_failed_min_one_success`、`all_done`。例如 code-review workflow 中 5 个并行 review agent 的 synthesize 节点配 `trigger_rule: one_success`,只要有一个 specialist 完成即可进入汇总。
|
|
78
|
+
3. **When Condition**:节点级条件门,支持 `$nodeId.output == 'VALUE'`、`$nodeId.output > '5'`、复合逻辑。解析失败时 **fail-closed**(跳过节点并告警),而不是 fail-open 继续执行。
|
|
79
|
+
4. **Resume 支持**:`priorCompletedNodes` 预填充已完成的节点输出,重新运行workflow 时自动跳过成功节点,只重试失败/未执行节点。
|
|
80
|
+
5. **Session Threading**:同层只有一个节点时,session 可向前传递(`lastSequentialSessionId`);并行层强制 fresh session,避免上下文竞争。
|
|
81
|
+
|
|
82
|
+
**为什么值得借鉴**:
|
|
83
|
+
|
|
84
|
+
gxpm 当前的 phase 是严格线性链(`triage → plan → dispatch → implement → local-verify → ac-check → self-review → ship → ...`)。实际上 `local-verify` 与 `self-review` 可以并行,`ship` 前的多个检查(type-check / lint / test)也可以并发。DAG executor 可以把 gxpm 从“状态机”升级为“执行图”,在不改变 phase gate 语义的前提下缩短总执行时间。
|
|
85
|
+
|
|
86
|
+
**gxpm 落地建议**:
|
|
87
|
+
|
|
88
|
+
- 在 `core/phase-gates.ts` 中引入 `depends_on` 和 `trigger_rule` 概念,允许 artifact initializer 声明前置条件。
|
|
89
|
+
- `gxpm issue transition` 保持线性顺序不变,但 `gxpm run start` 执行时,把多个同层验证 capability 并发派发。
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### 2. Isolation Resolver:六层解析策略 + 错误分类器
|
|
94
|
+
|
|
95
|
+
**代码位置**:`packages/isolation/src/resolver.ts`、`packages/isolation/src/errors.ts`、`packages/isolation/src/providers/worktree.ts`
|
|
96
|
+
|
|
97
|
+
**Archon 怎么做**:
|
|
98
|
+
|
|
99
|
+
`IsolationResolver.resolve()` 按以下顺序决策:
|
|
100
|
+
|
|
101
|
+
1. **Existing** — conversation 已绑定 isolation_env_id,直接复用。
|
|
102
|
+
2. **No codebase** — 无注册 codebase,跳过隔离(`cwd: '/workspace'`)。
|
|
103
|
+
3. **Workflow reuse** — 同一 codebase + 同一 workflow identity 的现有环境可复用。
|
|
104
|
+
4. **Linked issue sharing** — 跨 conversation 的 linked issue 共享隔离环境。
|
|
105
|
+
5. **PR branch adoption** — skill symbiosis:如果 PR branch 已存在对应 worktree,直接采用。
|
|
106
|
+
6. **Create new** — 以上都不满足,新建 worktree。
|
|
107
|
+
|
|
108
|
+
错误处理采用 **classifyIsolationError** 模式:
|
|
109
|
+
|
|
110
|
+
- `known: true` 的错误(权限拒绝、超时、无空间、非 git 仓库)→ 映射为用户友好的 blocked 消息, workflow 终止。
|
|
111
|
+
- `known: false` 的错误(无法提取 owner/repo、branch not found)→ 仍然分类,但 **crash 而不是吞掉**,因为它们是编程/输入 bug 而非基础设施故障。
|
|
112
|
+
|
|
113
|
+
**为什么值得借鉴**:
|
|
114
|
+
|
|
115
|
+
gxpm 当前的 worktree 逻辑靠人工 `cd` 和 hook 提醒(`git worktree add` 之后必须 `cd` 进新 worktree)。Archon 的 resolver 把隔离环境解析自动化、策略化、可测试化。
|
|
116
|
+
|
|
117
|
+
**gxpm 落地建议**:
|
|
118
|
+
|
|
119
|
+
- 把 `gxpm workspace ensure <issue-id>` 升级为 `IsolationResolver`,实现“现有 workspace 复用 → 同 issue 共享 → 新建 worktree”的自动决策。
|
|
120
|
+
- 引入 `core/isolation-errors.ts`,把 git worktree 错误(权限、冲突、非 git)映射为 actionable 用户消息,而不是裸抛 `git worktree add` 的 stderr。
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### 3. 错误分类与韧性架构:classifyError + safeSendMessage + 重试策略
|
|
125
|
+
|
|
126
|
+
**代码位置**:`packages/workflows/src/executor-shared.ts`(`classifyError`)、`packages/workflows/src/dag-executor.ts`(`safeSendMessage`)、`packages/workflows/src/executor.ts`(`safeSendMessage` + `sendCriticalMessage`)
|
|
127
|
+
|
|
128
|
+
**Archon 怎么做**:
|
|
129
|
+
|
|
130
|
+
- `classifyError()` 将错误分为 **FATAL**(认证/权限/额度耗尽)、**TRANSIENT**(网络抖动、超时)、**UNKNOWN**(未识别)。
|
|
131
|
+
- `safeSendMessage()` 对 TRANSIENT 错误静默吞掉(返回 false),对 FATAL 错误直接 throw,对 UNKNOWN 错误追踪连续出现次数(`UNKNOWN_ERROR_THRESHOLD = 3`),超过阈值才 abort。
|
|
132
|
+
- `sendCriticalMessage()` 对关键通知(失败/完成)启用指数退避重试(1s, 2s, 3s...),最大 3 次。
|
|
133
|
+
- DAG 节点默认重试:`DEFAULT_NODE_MAX_RETRIES = 2`,仅对 TRANSIENT 错误重试,FATAL 不重试。
|
|
134
|
+
|
|
135
|
+
**为什么值得借鉴**:
|
|
136
|
+
|
|
137
|
+
gxpm 的 CLI 和 capability 调用目前对网络/平台错误的处理不够分层。一次暂时的网络抖动不应导致整个 issue run 失败,但认证错误也不应被无意义地重试 3 次。
|
|
138
|
+
|
|
139
|
+
**gxpm 落地建议**:
|
|
140
|
+
|
|
141
|
+
- 在 `core/capabilities.ts` 的 contract 中增加 `failureMode` 字段,声明每种 capability 的 FATAL / TRANSIENT / UNKNOWN 分类。
|
|
142
|
+
- `gxpm run start` 的 orchestrator 对 TRANSIENT 失败自动重试(带指数退避),对 FATAL 失败立即终止并写 `run-failure` artifact。
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### 4. 变量替换与节点间数据流:$nodeId.output + buildPromptWithContext
|
|
147
|
+
|
|
148
|
+
**代码位置**:`packages/workflows/src/dag-executor.ts`(`substituteNodeOutputRefs`)、`packages/workflows/src/executor-shared.ts`(`buildPromptWithContext`、`substituteWorkflowVariables`)
|
|
149
|
+
|
|
150
|
+
**Archon 怎么做**:
|
|
151
|
+
|
|
152
|
+
- **Workflow 级变量**:`$1/$2/$3`、`$ARGUMENTS`、`$ARTIFACTS_DIR`、`$BASE_BRANCH`、`$DOCS_DIR`、`$LOOP_PREV_OUTPUT`、`$REJECTION_REASON`。
|
|
153
|
+
- **节点间引用**:`$nodeId.output` 和 `$nodeId.output.field`(JSON 解析后取字段)。在 bash 节点中自动做 shell-quote 转义(`'${value.replaceAll("'", "'\\''")}'`)。
|
|
154
|
+
- **Prompt 构建**:`buildPromptWithContext()` 统一处理所有变量替换,出错时 throw 明确消息(如 `$BASE_BRANCH` 被引用但 auto-detect 失败)。
|
|
155
|
+
- **Loader 验证**:`validateDagStructure()` 在 workflow 加载时就检查 `$nodeId.output` 引用是否指向已知节点,提前发现拼写错误。
|
|
156
|
+
|
|
157
|
+
**为什么值得借鉴**:
|
|
158
|
+
|
|
159
|
+
gxpm 当前的 artifact 和 evidence 之间没有显式的数据流机制。`gxpm artifact read` 是显式命令,但 skill/prompt 模板里无法像 `$nodeId.output` 那样直接引用上游产物。
|
|
160
|
+
|
|
161
|
+
**gxpm 落地建议**:
|
|
162
|
+
|
|
163
|
+
- 在 `SKILL.md.tmpl` 中引入 `{{ARTIFACT_OUTPUT:<type>}}` 占位符,由 `gen-skill-docs.ts` 自动替换为对应 artifact 的读取路径。
|
|
164
|
+
- `gxpm run start` 执行时,维护一个 `nodeOutputs` Map,让同 run 内的不同 capability 可以引用彼此的输出。
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### 5. Session 不可变 + Transition 审计链
|
|
169
|
+
|
|
170
|
+
**代码位置**:`packages/core/src/state/session-transitions.ts`、`packages/core/src/db/sessions.ts`
|
|
171
|
+
|
|
172
|
+
**Archon 怎么做**:
|
|
173
|
+
|
|
174
|
+
- Session 是**不可变**的:任何 transition 都创建新的 linked session,而不是修改现有 session。
|
|
175
|
+
- `parent_session_id` 链接前一个 session,`transition_reason` 记录为什么创建新 session(`first-message`、`plan-to-execute`、`reset-requested`、`isolation-changed` 等)。
|
|
176
|
+
- `TRIGGER_BEHAVIOR` 用 TypeScript 的 `Record<TransitionTrigger, 'creates' | 'deactivates' | 'none'>` 保证编译时穷尽性:新增 trigger 必须分类,否则编译错误。
|
|
177
|
+
- 只有 `plan-to-execute` 是 `creates`(立即 deactivate + create),其他 trigger 只 `deactivates`(下一消息再创建)。
|
|
178
|
+
|
|
179
|
+
**为什么值得借鉴**:
|
|
180
|
+
|
|
181
|
+
gxpm 的 `memory/resume-packet.json` 是追加式更新,但没有 session 级别的不可变保证。如果某个 session 崩溃后恢复,可能读取到 half-written 的 checkpoint。
|
|
182
|
+
|
|
183
|
+
**gxpm 落地建议**:
|
|
184
|
+
|
|
185
|
+
- `gxpm issue checkpoint` 改为创建新的 checkpoint 文件(原子写:`.tmp` → `renameSync`),而不是覆盖现有文件。
|
|
186
|
+
- 在 checkpoint payload 中增加 `parentCheckpointId` 和 `transitionReason`,形成审计链。
|
|
187
|
+
- `gxpm issue resume` 读取最新的 checkpoint 时,同时打印 chain 长度(“这是该 issue 的第 N 个 checkpoint”)。
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### 6. 事件驱动可观测性:WorkflowEventEmitter + fire-and-forget
|
|
192
|
+
|
|
193
|
+
**代码位置**:`packages/workflows/src/event-emitter.ts`
|
|
194
|
+
|
|
195
|
+
**Archon 怎么做**:
|
|
196
|
+
|
|
197
|
+
- 单例 EventEmitter,通过 `getWorkflowEventEmitter()` 全局访问。
|
|
198
|
+
- **类型安全**:每个事件类型都有明确的 TypeScript interface(`WorkflowStartedEvent`、`NodeCompletedEvent`、`LoopIterationFailedEvent` 等)。
|
|
199
|
+
- **Fire-and-forget**:listener 错误永远不会传播到 executor,避免观测逻辑拖垮工作流。
|
|
200
|
+
- **Conversation-scoped 订阅**:Web adapter 通过 `registerRun()` 把 SSE stream 绑定到特定 runId,只接收该 run 的事件。
|
|
201
|
+
- **事件持久化**:关键事件(`node_started`、`node_completed`、`node_failed`)同时写入数据库 `workflow_events` 表,即使 emitter 崩溃也能恢复状态。
|
|
202
|
+
|
|
203
|
+
**为什么值得借鉴**:
|
|
204
|
+
|
|
205
|
+
gxpm 当前的运行时可观测性主要依赖 CLI 输出和文件系统 artifact。缺乏一个统一的事件总线来让 Web UI、CLI、第三方平台实时订阅执行状态。
|
|
206
|
+
|
|
207
|
+
**gxpm 落地建议**:
|
|
208
|
+
|
|
209
|
+
- 在 `core/events.ts` 中建立类型化 EventEmitter,事件类型包括:`phase_transitioned`、`artifact_written`、`capability_started`、`capability_completed`、`evidence_captured`。
|
|
210
|
+
- CLI 默认订阅并打印关键事件;Web UI(未来)通过 SSE 订阅;第三方平台通过 webhook 订阅。
|
|
211
|
+
- 所有事件写入 `.gxpm/issues/<id>/events.jsonl`(追加式),作为 run ledger 的补充。
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### 7. PR 模板对抗性治理:Security Impact / Blast Radius / Rollback Plan
|
|
216
|
+
|
|
217
|
+
**代码位置**:`.github/pull_request_template.md`
|
|
218
|
+
|
|
219
|
+
**Archon 怎么做**:
|
|
220
|
+
|
|
221
|
+
PR 模板强制要求填写以下对抗性字段:
|
|
222
|
+
|
|
223
|
+
- **Security Impact**(必填):新权限?外部网络调用?Secrets 处理变更?文件系统访问范围变更?任何 Yes 必须描述风险和缓解措施。
|
|
224
|
+
- **Compatibility / Migration**:向后兼容?配置/环境变更?数据库迁移?升级步骤?
|
|
225
|
+
- **Human Verification**(必填):个人验证了哪些场景?检查了哪些边界条件?**什么没有验证?**
|
|
226
|
+
- **Side Effects / Blast Radius**(必填):影响哪些子系统?潜在 unintended effects?早期检测的 guardrails/monitoring?
|
|
227
|
+
- **Rollback Plan**(必填):快速回滚命令?feature flag?可观测的失败症状?
|
|
228
|
+
- **Risks and Mitigations**:列出真实风险,不允许写 "None" 敷衍。
|
|
229
|
+
|
|
230
|
+
**为什么值得借鉴**:
|
|
231
|
+
|
|
232
|
+
gxpm 当前的 `ship-readiness` artifact 只要求存在,但没有强制字段列表。Agent 容易跳过 security impact 和 rollback plan 的深入思考。
|
|
233
|
+
|
|
234
|
+
**gxpm 落地建议**:
|
|
235
|
+
|
|
236
|
+
- 在 `docs/governance/development-contract.md` 中定义 `ship-readiness` artifact 的强制 JSON schema:
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"securityImpact": { "newPermissions": "No|Yes", "mitigation": "..." },
|
|
240
|
+
"blastRadius": { "affectedSubsystems": ["..."], "unintendedEffects": "..." },
|
|
241
|
+
"rollbackPlan": { "command": "...", "observableSymptoms": "..." },
|
|
242
|
+
"humanVerification": { "scenarios": "...", "notVerified": "..." }
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
- `gxpm self-review ship` 的 initializer 拒绝缺少任何必填字段的 payload。
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### 8. Worktree 自测端口分配:路径哈希 → 确定性端口
|
|
250
|
+
|
|
251
|
+
**代码位置**:`packages/core/src/utils/port-allocation.ts`
|
|
252
|
+
|
|
253
|
+
**Archon 怎么做**:
|
|
254
|
+
|
|
255
|
+
- worktree 中的开发服务器自动分配端口:
|
|
256
|
+
- `basePort = 3090`
|
|
257
|
+
- `offset = (md5(worktreePath).readUInt16BE(0) % 900) + 100` → 端口范围 3190-4089
|
|
258
|
+
- 同一 worktree 始终获得同一端口(确定性)
|
|
259
|
+
- `PORT=4000` 环境变量可显式覆盖。
|
|
260
|
+
- 如果 `PORT` 非法(非 1-65535),`process.exit(1)` 立即失败,而不是静默回退。
|
|
261
|
+
|
|
262
|
+
**为什么值得借鉴**:
|
|
263
|
+
|
|
264
|
+
gxpm 当前的 worktree 只隔离了文件系统,没有隔离开发服务器端口。多个 issue 的并行 worktree 同时运行 `bun dev` 时会发生端口冲突。
|
|
265
|
+
|
|
266
|
+
**gxpm 落地建议**:
|
|
267
|
+
|
|
268
|
+
- `gxpm workspace ensure <issue-id>` 为每个 workspace 计算确定性端口偏移(基于 issue-id 哈希)。
|
|
269
|
+
- 在 workspace metadata 中记录 `devPort`,skill 模板中的 `bun dev` 命令自动使用该端口。
|
|
270
|
+
- `gxpm workspace status` 显示每个 workspace 的占用端口。
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
### 9. Monorepo 分层与零 SDK 依赖契约层
|
|
275
|
+
|
|
276
|
+
**代码位置**:`packages/providers/src/types.ts`(文件头注释)、`packages/workflows/src/deps.ts`
|
|
277
|
+
|
|
278
|
+
**Archon 怎么做**:
|
|
279
|
+
|
|
280
|
+
- **`@archon/providers/types` 是零 SDK 依赖的契约子路径**。文件头硬规则:
|
|
281
|
+
```typescript
|
|
282
|
+
// CONTRACT LAYER — no SDK imports, no runtime deps.
|
|
283
|
+
// HARD RULE: This file must never import SDK packages or other @archon/* packages.
|
|
284
|
+
```
|
|
285
|
+
- `@archon/workflows` 只从 `@archon/providers/types` 导入,不直接依赖 Claude SDK 或 Codex SDK。
|
|
286
|
+
- `WorkflowDeps` 是注入式依赖包(store、getAgentProvider、loadConfig),workflow 引擎不直接实例化任何外部服务。
|
|
287
|
+
- Package 分层方向:`paths` → `git` → `isolation/workflows` → `core` → `adapters` → `server`。下层永不依赖上层。
|
|
288
|
+
|
|
289
|
+
**为什么值得借鉴**:
|
|
290
|
+
|
|
291
|
+
gxpm 当前的 `core/capabilities.ts` 是描述性 registry,但执行实现与 host SDK(Claude/Codex)耦合较紧。引入新的 host 时需要修改多处文件。
|
|
292
|
+
|
|
293
|
+
**gxpm 落地建议**:
|
|
294
|
+
|
|
295
|
+
- 在 `core/` 下建立 `contracts/` 目录,存放零依赖的 capability interface(如 `ICapabilityProvider`、`IAgentRunner`、`IBrowserRuntime`)。
|
|
296
|
+
- `hosts/claude.ts` 和 `hosts/codex.ts` 实现这些 interface,而 `core/` 的其他模块只依赖 `contracts/`。
|
|
297
|
+
- 新增 host(如 Gemini、Kilo)时,只需在 `hosts/` 下新增一个实现文件,不碰 `core/` 业务逻辑。
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
### 10. Bundled Defaults + 三层覆盖体系
|
|
302
|
+
|
|
303
|
+
**代码位置**:`packages/workflows/src/defaults/bundled-defaults.ts`、`packages/workflows/src/workflow-discovery.ts`
|
|
304
|
+
|
|
305
|
+
**Archon 怎么做**:
|
|
306
|
+
|
|
307
|
+
- 默认 workflow 和 command 在编译时嵌入二进制(`bun run generate:bundled` 生成 `bundled-defaults.generated.ts`)。
|
|
308
|
+
- 三层加载优先级:**bundled < global(`~/.archon/`)< project(`.archon/`)**。同名文件后者覆盖前者。
|
|
309
|
+
- 修改默认文件后必须运行 `bun run generate:bundled`,`bun run validate` 会运行 `check:bundled`,如果生成文件 stale 则 CI 失败。
|
|
310
|
+
- 用户可通过 `defaults.loadDefaultCommands: false` 或 `defaults.loadDefaultWorkflows: false` 完全 opt-out。
|
|
311
|
+
|
|
312
|
+
**为什么值得借鉴**:
|
|
313
|
+
|
|
314
|
+
gxpm 当前的 skill 生成依赖 `bun run gen:skill-docs`,但缺少“编译时嵌入 + 三层覆盖”的机制。每个项目都需要手动安装 skill,不能开箱即用。
|
|
315
|
+
|
|
316
|
+
**gxpm 落地建议**:
|
|
317
|
+
|
|
318
|
+
- `bun run gen:skill-docs` 生成 `skills/gxpm/bundled-skills.generated.ts`,将核心 skill 模板编译进 CLI 二进制。
|
|
319
|
+
- 加载优先级:`bundled skills` < `~/.gxpm/skills/`(用户全局) < `.gxpm/skills/`(项目级)。
|
|
320
|
+
- `gxpm check` 增加 `--bundled` 检查,确保 generated 文件与模板源码一致。
|
|
321
|
+
- 新增 host 或修改 phase gate 时,运行 `gen:skill-docs` 后 `git diff --exit-code` 验证无漂移。
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## 落地优先级矩阵
|
|
326
|
+
|
|
327
|
+
| 实践 | 实施难度 | 对 gxpm 价值 | 建议迭代 |
|
|
328
|
+
|------|----------|-------------|----------|
|
|
329
|
+
| DAG Executor | 高 | 极高 | V0.5(执行引擎升级) |
|
|
330
|
+
| Isolation Resolver | 中 | 极高 | V0.3(workspace runtime 完善) |
|
|
331
|
+
| 错误分类与韧性 | 低 | 高 | V0.2(capability contract 补充) |
|
|
332
|
+
| 变量替换与数据流 | 低 | 高 | V0.2(skill 模板增强) |
|
|
333
|
+
| Session 不可变链 | 低 | 中 | V0.2(checkpoint 改进) |
|
|
334
|
+
| 事件驱动可观测性 | 中 | 高 | V0.4(Web UI / SSE 准备) |
|
|
335
|
+
| PR 模板对抗性治理 | 低 | 高 | V0.2(ship-readiness schema 收紧) |
|
|
336
|
+
| Worktree 端口分配 | 低 | 中 | V0.3(workspace metadata 扩展) |
|
|
337
|
+
| 零 SDK 契约层 | 中 | 极高 | V0.3(host adapter 重构) |
|
|
338
|
+
| Bundled Defaults | 中 | 高 | V0.3(skill 分发体系) |
|
|
339
|
+
|
|
340
|
+
**首期建议(V0.2-V0.3 可落地)**:错误分类、变量替换、PR 模板治理、Session 不可变链。这四项改动范围小、不触及架构,但能立即提升执行韧性和产物质量。
|
|
341
|
+
|
|
342
|
+
**中期目标(V0.4-V0.5)**:DAG Executor、Isolation Resolver、事件总线、零 SDK 契约层。这四项是 gxpm 从“状态管理工具”进化为“执行引擎”的结构升级。
|
|
343
|
+
|
|
344
|
+
Archon 不应被整体 vendoring,而应被拆成以下 capability source:
|
|
345
|
+
|
|
346
|
+
- **workflow-engine**:DAG 执行、节点类型扩展、变量替换、event-emitter
|
|
347
|
+
- **isolation-runtime**:worktree 创建/清理/复用、端口分配、错误分类
|
|
348
|
+
- **artifact-evidence-store**:run-scoped 产物路径、证据分层、不可入 git 约束
|
|
349
|
+
- **platform-adapter**:Slack/Telegram/GitHub/Discord/Web 的统一 conversation 接口
|
|
350
|
+
- **provider-abstraction**:`IAgentProvider` 窄接口、model 验证委托给 SDK 的策略
|
|
351
|
+
- **rollback-first-governance**:PR template 的 Security/Blast Radius/Rollback Plan 字段
|