AGENTS.md
packages/pi-goal/AGENTS.mdAGENTS.md
Quality
85/100
Scores the file, not the repository.Length
542 words
5 headings · 1 code blocksRepository
67k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# pi-goal23Persistent per-thread goal tracking as a Pi extension, vendored from the standalone4`code-yeongyu/pi-goal` repository into this monorepo as `@oh-my-opencode/pi-goal`5(private workspace package, Adapter layer: Pi-harness-coupled).67Registers the Codex-style `create_goal` / `update_goal` / `get_goal` tools plus the8`/goal` command, persists one goal per thread to a JSON file under the active session9directory, renders a Codex-style TUI footer indicator, and re-engages the agent toward10an active goal via hidden continuation prompts (`pi-goal-continuation` custom messages).1112## Anatomy1314| Path | Purpose |15|------|---------|16| `src/index.ts` | Extension entry: tools + `/goal` command + session/agent lifecycle + usage accounting |17| `src/goal/store.ts` | File persistence: read/write/create/update/clear/accountGoalUsage + status transitions |18| `src/goal/types.ts` | `Goal`, `GoalStatus` (`active\|paused\|blocked\|budgetLimited\|complete`), store/file/tool types |19| `src/goal/prompt.ts` | Continuation + budget-limited hidden prompt builders |20| `src/goal/continuation.ts` | Continuation gating predicates |21| `src/goal/format.ts` | Tool/UI formatting + tool JSON response snapshots |22| `src/goal/ui.ts` | Codex-style TUI footer replacement component |23| `src/goal/command.ts` | `/goal` argument parsing (show/pause/resume/clear/setObjective) |24| `src/goal/validation.ts` | Objective + token budget validation |25| `src/goal/errors.ts` | Typed store errors |26| `test/` | Vendored characterization suite (bun:test; assertions identical to upstream) |27| `scripts/qa/drive.mjs` | Live QA driver: real pi CLI in RPC mode, isolated `PI_CODING_AGENT_DIR`, scripted mock provider, `--self-test` |28| `scripts/qa/mock-provider/` | Self-contained scripted provider extension (no network, no keys) |2930## Codex alignment3132The goal tool contract is aligned with codex `codex-rs/ext/goal`:3334- `update_goal` accepts `complete` and `blocked` (codex `spec.rs` enum); `blocked` is a real,35 model-settable, non-terminal status (resumable via `/goal resume`).36- `create_goal` replaces only a `complete` goal and otherwise fails with the codex37 "unfinished goal" message.38- Tool/parameter descriptions, the `update_goal` error text, and the completion budget report39 match codex verbatim; `budgetLimited` is preserved when `paused` or `blocked` is requested.40- The hidden continuation and budget-limit prompts use the codex `templates/goals/*.md`41 content (`<objective>` tag; the continuation prompt carries the Continuation behavior /42 Work from evidence / Progress visibility / Fidelity / Completion audit / Blocked audit43 sections). The budget-limit prompt is queued at most once per goal id.44- Continuation is not queued after a turn that did not end cleanly (last assistant45 `stopReason` is `error`, or the last tool result was aborted), mirroring codex's46 turn-error loop prevention (codex sets the goal `blocked`; pi's harness has no turn-error47 signal, so it gates the auto-continuation instead).48- Deliberate deviation: pi omits `usage_limited` (codex sets it from a system49 `UsageLimitExceeded` turn error, not the model; the Pi harness exposes no such signal).5051## Conventions5253- Vendored source: keep diffs against upstream intentional and reviewable. Tests were54 converted vitest -> bun:test with byte-identical assertions; the fake clock is anchored55 at a non-zero epoch because Bun's `setSystemTime(new Date(0))` acts as a reset.56- Peer deps (`@mariozechner/pi-*`, `typebox`) resolve from the host Pi runtime; pinned57 devDependencies exist only for typecheck + tests + live QA.58- This package is not wired into any OpenCode/Codex/omo-senpi component. It ships as a59 standalone Pi package surface (`pi.extensions` manifest field).6061## QA6263```sh64bun test packages/pi-goal # unit/characterization gate65tsgo --noEmit -p packages/pi-goal/tsconfig.json66node packages/pi-goal/scripts/qa/drive.mjs --self-test67node packages/pi-goal/scripts/qa/drive.mjs # live pi-harness proof (RPC mode, sandboxed)68```6970The live driver is the real-harness gate: unit tests alone never prove the extension71works under pi. Evidence goes to `.omo/evidence/<date>-<slug>/`.72
Also in code-yeongyu/oh-my-openagent
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-agent-loader/AGENTS.md · 67k | AGENTS.md | archdeploymentagent-behaviour | 62/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-mcp-loader/AGENTS.md · 67k | AGENTS.md | lint-formatarchsecuritydeployment+1 | 66/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 67k | AGENTS.md | arch | 70/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentscript/AGENTS.md · 67k | AGENTS.md | buildtestarchdeployment | 80/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-plugin-loader/AGENTS.md · 67k | AGENTS.md | archdeploymentagent-behaviour | 70/100 | 2 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 67k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 2 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 67k | AGENTS.md | stylearchdo-not | 71/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 67k | AGENTS.md | buildteststylearch | 88/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentbin/AGENTS.md · 67k | AGENTS.md | teststylearch | 64/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 67k | AGENTS.md | archdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 67k | AGENTS.md | archapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 67k | AGENTS.md | archagent-behaviour | 56/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 67k | AGENTS.md | archdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 67k | AGENTS.md | stylearchdependenciesapi | 60/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 67k | AGENTS.md | archtypesdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/lsp-core/AGENTS.md · 67k | AGENTS.md | archmonorepo | 43/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/lsp-daemon/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatarch+1 | 89/100 | today |
Diff against packages/omo-opencode/src/features/claude-code-agent-loader/AGENTS.md Diff against packages/omo-opencode/src/features/claude-code-mcp-loader/AGENTS.md Diff against packages/omo-opencode/src/tools/background-task/AGENTS.md Diff against script/AGENTS.md Diff against packages/omo-opencode/src/features/claude-code-plugin-loader/AGENTS.md Diff against .agents/AGENTS.md Diff against .opencode/AGENTS.md Diff against AGENTS.md Diff against assets/AGENTS.md Diff against bin/AGENTS.md Diff against packages/AGENTS.md Diff against packages/agents-md-core/AGENTS.md Diff against packages/boulder-state/AGENTS.md Diff against packages/claude-code-compat-core/AGENTS.md Diff against packages/comment-checker-core/AGENTS.md Diff against packages/delegate-core/AGENTS.md Diff against packages/git-bash-mcp/AGENTS.md Diff against packages/hashline-core/AGENTS.md Diff against packages/lsp-core/AGENTS.md Diff against packages/lsp-daemon/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
