diff --git a/allium-port-plan.md b/allium-port-plan.md index 7a865fc..7b3b43f 100644 --- a/allium-port-plan.md +++ b/allium-port-plan.md @@ -102,9 +102,9 @@ _Goal: use distill → propagate on real code, verify allium produces useful out ### Phase 4: Fold in allium rules content _Goal: pi agent knows allium syntax rules when editing .allium files._ -- [ ] Merge content from `allium-main/.claude/rules/allium.md` into `SKILL.md` or a reference file - - This contains syntax gotchas and anti-patterns that the model needs when writing .allium files - - In Claude Code this auto-triggers on `**/*.allium` globs — in pi we need it in the skill context +- [x] Symlink `allium-main/.claude/rules/allium.md` into `allium-main/references/allium-rules.md` (accessible via `.pi/skills/allium/references/`) +- [x] Add "Syntax rules" section to elicit, distill, and propagate skills + - Instructs model to read `../../allium/references/allium-rules.md` before writing .allium files - [ ] Test: create/edit a `.allium` file via pi, verify the model follows naming conventions and avoids anti-patterns ### Phase 5: Agent support (tend & weed) @@ -112,11 +112,13 @@ _Goal: find a way to support tend/weed agent functionality in pi._ Tend and weed are Claude Code agents with `model: opus` and specific tool permissions (Read, Glob, Grep, Edit, Write, Bash). Pi doesn't have native agent support. -Options to investigate: -- [ ] **Option A: Skills as agents** — port tend.md and weed.md as skills with `disable-model-invocation: true`. The model won't have enforced tool restrictions but the skill prompt still guides behavior. Simplest path. -- [ ] **Option B: Pi extension (TypeScript)** — write a TypeScript extension that registers `/tend` and `/weed` commands, controlling context injection. More control, more work. -- [ ] **Option C: npm agents package** — check if pi.dev has an agents extension or if one exists on npm (`npx skills` ecosystem). Check https://pi.dev/docs and https://github.com/nicepkg/agent-skills. -- [ ] Decide on approach and implement +- [x] **Option A: Skills as agents** — ported tend.md and weed.md as skills with `disable-model-invocation: true` + - Created `.pi/skills/tend/SKILL.md` and `.pi/skills/weed/SKILL.md` + - Symlinked references (language-reference.md + allium-rules.md) + - Added verification: run `allium check` after writing .allium files + - Trade-off: no enforced model (runs on default, not opus), no tool restrictions, no auto-trigger +- [ ] **Option B: Pi extension (TypeScript)** — deferred, would give more control but more work +- [ ] **Option C: npm agents package** — not investigated - [ ] Test: use tend to modify a `.allium` spec, verify it follows allium conventions - [ ] Test: use weed to check spec-code alignment on the turn-limit extension @@ -125,9 +127,10 @@ _Goal: .allium files get validated on write._ The Claude Code version runs `allium-check.mjs` as a PostToolUse hook on Edit/Write. -- [ ] Investigate pi.dev hook/extension support for post-write validation -- [ ] If supported: configure the hook pointing to `allium-main/.claude/hooks/allium-check.mjs` -- [ ] If not: add validation instructions to the skill prompt ("after writing .allium files, run `node allium-check.mjs `") +- [x] Added "Verification" section to elicit, distill, tend, and weed skills + - Instructs model to run `allium check ` after writing .allium files + - Uses the globally installed `allium` CLI (`/opt/homebrew/bin/allium`) +- [ ] Investigate pi.dev hook/extension support for automatic post-write validation (deferred) - [ ] Test: write a `.allium` file with deliberate errors, verify validation catches them ### Phase 7: Documentation and upstream