feat(omp): add Oh My Pi platform support#307
Conversation
|
+1 希望能增加omp支持,省token |
…l name (mindfold-ai#307) Two reviewer cleanups on top of the Oh My Pi platform work to ready the PR for merge review: 1. Remove personal Trellis dogfooding artifacts that crept into the diff while the platform was being developed. None of these belong in a reviewable PR — they leak the author's local workspace state into every reader's checkout: - `.trellis/workspace/VinciWu557/index.md` + `journal-1.md` - `.trellis/tasks/archive/2026-05/05-22-add-omp-platform-support-to-trellis/*` - `.trellis/tasks/archive/2026-05/05-26-omp-trellis-context-injection/*` - `.trellis/tasks/archive/2026-06/06-03-omp-configurator-missing-command-frontmatter/*` 2. Rename the dogfooded `.omp/skills/trellis-spec-bootstarp/` → `trellis-spec-bootstrap/` and fix the inner `name:` frontmatter field. This anticipates the bundled-skills source rename in mindfold-ai#296 so that once mindfold-ai#296 merges, the dogfooded `.omp/` tree matches what `trellis update --omp` regenerates. Until mindfold-ai#296 lands, `trellis init --omp` on the PR HEAD still produces the typoed name because the source template hasn't been renamed yet — that is intentional and self-corrects on the next dogfood pass after mindfold-ai#296. A `git merge origin/main` is still required before merge because main has moved on since this branch was opened (PR mindfold-ai#324 + the historical-manifest restoration in mindfold-ai#296). I left that conflict resolution to the maintainer at merge time rather than rebasing the contributor's commit history. Build / verification on the PR worktree: - `pnpm typecheck` clean - `pnpm test` 1049/1049 passing - `trellis init --omp --skip-existing -y` smoke test produces a valid `.omp/` tree
|
@VinciWu557 Thanks for the Oh My Pi work — this is a solid platform integration. I pushed one reviewer cleanup commit directly to the branch (47a28f7) to ready it for merge review. What the cleanup commit does1. Removed personal dogfooding files (14 files, ~700 lines). These crept in while you were developing the platform using Trellis itself, but they leak local workspace state into every reviewer's checkout:
The dogfooded 2. Renamed the dogfooded Still needed before merge
I didn't rebase for you because rebasing rewrites your 14 commits' history and you may want to keep the per-step trail for review (or squash them yourself in one pass). Your call. Verification on the cleanup commit
Looking forward to seeing this land. Ping me when rebased and I'll do a final pass. |
- Add .omp/ dogfood directory with commands, skills, agents, and extension - Register OMP in AI_TOOLS registry (ai-tools.ts) with extension-backed pattern - Add --omp CLI flag and InitOptions field - Create configurator (omp.ts) with configureOmp + collectOmpTemplates - Add template module (templates/omp/) with agents and extension source - Register in PLATFORM_FUNCTIONS with collectTemplates for update tracking - Update cli_adapter.py: Platform type, detect_platform, config_dir_name, etc. - Update task_store.py: add .omp to _SUBAGENT_CONFIG_DIRS - Add 'Oh My Pi' to workflow.md platform blocks - Update README.md and README_CN.md platform lists - Add omp.test.ts (template tests) and regression.test.ts entries Extension implements session_start, before_agent_start, and input handlers with TurnContextCache (1.5s TTL) for workflow-state + task context injection. No tool_call/subagent handlers needed — OMP native task tool covers both.
…My Pi in skill lists
…ontext - session_start: invoke get_context.py (default mode) for full project map (git/spec/task/developer/journal), matching Claude hook behavior - session_start (sub-agent): inject only agent-relevant jsonl files via PI_BLOCKED_AGENT detection (implement→implement.jsonl, check→check.jsonl, research→prd+info only) - before_agent_start: simplified to workflow-state-only (lightweight per-turn) - Remove dead buildSessionOverview() that called non-existent script mode - Update omp.test.ts with new feature marker assertions
…re injection - Add context event handler as safety net for post-compaction continuations - Add session_before_compact listener to track compaction boundaries - Use reverse-scan with fast-path skip when no compaction occurred - Simplify input handler to only pre-warm cache (no message injection) - before_agent_start remains the persistent injection point
OMP commands require `description` (and optional `argument-hint`) in YAML frontmatter for the `/` command picker. The configurator was writing raw template body without wrapping. Add `wrapWithOmpFrontmatter()` to shared.ts, wire it into both `collectOmpTemplates()` and `configureOmp()`, and add unit + integration tests.
…l name (mindfold-ai#307) Two reviewer cleanups on top of the Oh My Pi platform work to ready the PR for merge review: 1. Remove personal Trellis dogfooding artifacts that crept into the diff while the platform was being developed. None of these belong in a reviewable PR — they leak the author's local workspace state into every reader's checkout: - `.trellis/workspace/VinciWu557/index.md` + `journal-1.md` - `.trellis/tasks/archive/2026-05/05-22-add-omp-platform-support-to-trellis/*` - `.trellis/tasks/archive/2026-05/05-26-omp-trellis-context-injection/*` - `.trellis/tasks/archive/2026-06/06-03-omp-configurator-missing-command-frontmatter/*` 2. Rename the dogfooded `.omp/skills/trellis-spec-bootstarp/` → `trellis-spec-bootstrap/` and fix the inner `name:` frontmatter field. This anticipates the bundled-skills source rename in mindfold-ai#296 so that once mindfold-ai#296 merges, the dogfooded `.omp/` tree matches what `trellis update --omp` regenerates. Until mindfold-ai#296 lands, `trellis init --omp` on the PR HEAD still produces the typoed name because the source template hasn't been renamed yet — that is intentional and self-corrects on the next dogfood pass after mindfold-ai#296. A `git merge origin/main` is still required before merge because main has moved on since this branch was opened (PR mindfold-ai#324 + the historical-manifest restoration in mindfold-ai#296). I left that conflict resolution to the maintainer at merge time rather than rebasing the contributor's commit history. Build / verification on the PR worktree: - `pnpm typecheck` clean - `pnpm test` 1049/1049 passing - `trellis init --omp --skip-existing -y` smoke test produces a valid `.omp/` tree
47a28f7 to
a2a5abd
Compare
…l name (mindfold-ai#307) Two reviewer cleanups on top of the Oh My Pi platform work to ready the PR for merge review: 1. Remove personal Trellis dogfooding artifacts that crept into the diff while the platform was being developed. None of these belong in a reviewable PR — they leak the author's local workspace state into every reader's checkout: - `.trellis/workspace/VinciWu557/index.md` + `journal-1.md` - `.trellis/tasks/archive/2026-05/05-22-add-omp-platform-support-to-trellis/*` - `.trellis/tasks/archive/2026-05/05-26-omp-trellis-context-injection/*` - `.trellis/tasks/archive/2026-06/06-03-omp-configurator-missing-command-frontmatter/*` 2. Rename the dogfooded `.omp/skills/trellis-spec-bootstarp/` → `trellis-spec-bootstrap/` and fix the inner `name:` frontmatter field. This anticipates the bundled-skills source rename in mindfold-ai#296 so that once mindfold-ai#296 merges, the dogfooded `.omp/` tree matches what `trellis update --omp` regenerates. Until mindfold-ai#296 lands, `trellis init --omp` on the PR HEAD still produces the typoed name because the source template hasn't been renamed yet — that is intentional and self-corrects on the next dogfood pass after mindfold-ai#296. A `git merge origin/main` is still required before merge because main has moved on since this branch was opened (PR mindfold-ai#324 + the historical-manifest restoration in mindfold-ai#296). I left that conflict resolution to the maintainer at merge time rather than rebasing the contributor's commit history. Build / verification on the PR worktree: - `pnpm typecheck` clean - `pnpm test` 1049/1049 passing - `trellis init --omp --skip-existing -y` smoke test produces a valid `.omp/` tree
a2a5abd to
0b32ee1
Compare
|
@taosu0216 已更新,感谢 review |
概述
为 Trellis 新增 Oh My Pi (omp) 平台支持。Oh My Pi 是一个 AI 编码助手,本次改动使其能够通过
trellis init安装 Trellis 工作流文件。改动内容
新增 Oh My Pi 平台目录
.omp/agents/— trellis-check、trellis-implement、trellis-research 子代理commands/— trellis-continue、trellis-finish-work 命令skills/— trellis-before-dev、trellis-brainstorm、trellis-check、trellis-meta、trellis-update-spec 等技能extensions/trellis/index.ts— 平台扩展入口新增配置器
packages/cli/src/configurators/omp.tscollectOmpTemplates()和configureOmp(),处理 agents、commands、skills、extension 的生成新增模板
packages/cli/src/templates/omp/agents/— 三个子代理模板extensions/trellis/index.ts.txt— 扩展模板index.ts— 模板导出源码改动
packages/cli/src/types/ai-tools.ts— 新增omp平台定义packages/cli/src/cli/index.ts— 注册 omp 配置器packages/cli/src/commands/init.ts— 同上packages/cli/src/configurators/index.ts— 导出 omp 配置器现有模板更新(添加 Oh My Pi 到支持平台列表)
packages/cli/src/templates/trellis/workflow.mdpackages/cli/src/templates/trellis/scripts/common/cli_adapter.pypackages/cli/src/templates/trellis/scripts/common/task_store.py测试
packages/cli/test/templates/omp.test.tspackages/cli/test/regression.test.ts验证
pnpm lint通过(0 errors)pnpm typecheck通过(0 errors)trellis init --omp可正常生成.omp/目录