用途:自动化初始化 Trellis 的编码规范(spec)文件。AI 编码智能体在拥有项目专属规范时产出更好代码,但手工填写规范繁琐,该技能用多智能体流水线完成引导。
主要能力:Claude Code(CC)负责编排,Codex 负责并行执行。CC 先用 GitNexus 构建知识图谱(节点、依赖边、模块聚类、执行流),再用 ABCoder 做精确 AST 分析(函数签名、类型定义、跨文件依赖链),据此梳理包边界、模块聚类、关键模式、跨包数据流、错误处理与状态管理,然后创建 Trellis 任务 PRD;Codex 智能体并行执行任务,各自填充一个 spec 目录,且同样可访问 GitNexus 与 ABCoder 的 MCP 工具。
使用方式:前置需配置 Trellis、GitNexus、ABCoder、Codex CLI。可用 npx gitnexus status、abcoder list-repos、codex mcp list、python3 .trellis/scripts/get_context.py 检查。分析阶段执行 npx gitnexus analyze 建图,并用 gitnexus_query、gitnexus_context、gitnexus_cypher 等 MCP 工具;用 abcoder parse /path/to/package --lang typescript --name package-name --output ~/abcoder-asts 解析,再用 get_repo_structure、get_file_structure、get_ast_node。任务按(包、层)组合拆分,用 python3 .trellis/scripts/task.py create "Fill <package> <layer> spec" --slug <package>-<layer>-spec 创建,PRD 需含 Goal、Context、Tools Available、Files to Fill、Important Rules、Acceptance Criteria、Technical Notes。执行时每个任务开一个终端:codex -q "Read .trellis/tasks/<task-slug>/prd.md and execute the task. Use GitNexus and ABCoder MCP tools to analyze the codebase, then fill all spec files listed in the PRD." 之后用 find、grep 检查行数与残留占位符并复核。
适用场景:为 monorepo 或含多包多层的项目批量生成项目专属编码规范。
限制:需先完成上述工具安装与 MCP 配置;并行智能体只能修改各自分配的 spec 目录,不得改源码、其他 spec 目录或任务文件,也不得运行 git 命令;规范文件不固定,可删除、新建、重命名并更新 index.md。具体收费、价格与效果资料暂未提供。