avtc-pi-featyard 1.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/LICENSE +21 -0
- package/README.md +194 -0
- package/agents/fy-design-reviewer.md +77 -0
- package/agents/fy-feature-verifier.md +24 -0
- package/agents/fy-general-reviewer.md +81 -0
- package/agents/fy-guidelines-reviewer.md +46 -0
- package/agents/fy-implementer.md +20 -0
- package/agents/fy-performance-reviewer.md +46 -0
- package/agents/fy-plan-reviewer.md +74 -0
- package/agents/fy-plan-verifier.md +44 -0
- package/agents/fy-quality-reviewer.md +50 -0
- package/agents/fy-requirements-reviewer.md +46 -0
- package/agents/fy-researcher.md +6 -0
- package/agents/fy-security-reviewer.md +46 -0
- package/agents/fy-task-verifier.md +42 -0
- package/agents/fy-testing-reviewer.md +60 -0
- package/assets/images/kanban-board.png +0 -0
- package/assets/images/settings-dropdown.png +0 -0
- package/assets/images/settings.png +0 -0
- package/assets/images/widget.png +0 -0
- package/docs/CONFIGURATION.md +266 -0
- package/index.ts +8 -0
- package/package.json +85 -0
- package/skills/fy-design/SKILL.md +108 -0
- package/skills/fy-design-review/SKILL.md +45 -0
- package/skills/fy-finish/SKILL.md +28 -0
- package/skills/fy-implement/SKILL.md +36 -0
- package/skills/fy-plan/SKILL.md +77 -0
- package/skills/fy-plan-review/SKILL.md +45 -0
- package/skills/fy-research/SKILL.md +38 -0
- package/skills/fy-review/SKILL.md +88 -0
- package/skills/fy-verify/SKILL.md +23 -0
- package/src/commands/auto-agent-commands.ts +748 -0
- package/src/commands/kanban-commands.ts +278 -0
- package/src/commands/workflow-commands.ts +531 -0
- package/src/compaction/compact-handler.ts +371 -0
- package/src/compaction/compact-message.ts +52 -0
- package/src/compaction/compact-trigger.ts +121 -0
- package/src/compaction/safe-editor-write.ts +18 -0
- package/src/events/agent/agent-end.ts +19 -0
- package/src/events/agent/agent-settled.ts +20 -0
- package/src/events/agent/agent-start.ts +18 -0
- package/src/events/agent/turn-end.ts +20 -0
- package/src/events/agent/turn-start.ts +19 -0
- package/src/events/event-deps.ts +33 -0
- package/src/events/index.ts +91 -0
- package/src/events/input/input.ts +143 -0
- package/src/events/session/context.ts +68 -0
- package/src/events/session/model-select.ts +20 -0
- package/src/events/session/session-compact.ts +20 -0
- package/src/events/session/session-shutdown.ts +26 -0
- package/src/events/session/session-start.ts +45 -0
- package/src/events/session/session-tree.ts +17 -0
- package/src/events/tool/tool-call.ts +58 -0
- package/src/events/tool/tool-result.ts +54 -0
- package/src/git/git-queries.ts +154 -0
- package/src/git/resolve-base-branch.ts +173 -0
- package/src/git/worktrees/worktree-helpers.ts +142 -0
- package/src/git/worktrees/worktree-interception.ts +66 -0
- package/src/git/worktrees/worktree-lifecycle.ts +380 -0
- package/src/guardrails/completion-gating.ts +63 -0
- package/src/guardrails/file-classifier.ts +461 -0
- package/src/guardrails/force-add-guard.ts +312 -0
- package/src/guardrails/guardrail-tracker.ts +73 -0
- package/src/guardrails/guardrail-violations.ts +47 -0
- package/src/guardrails/guardrails-engine.ts +663 -0
- package/src/guardrails/session-guardrails.ts +75 -0
- package/src/guardrails/shell-decompose.ts +285 -0
- package/src/guardrails/tdd-enforcement.ts +122 -0
- package/src/guardrails/test-output.ts +272 -0
- package/src/index.ts +598 -0
- package/src/integrations/parallel-work-guardrail-integration.ts +29 -0
- package/src/integrations/subagent-integration.ts +166 -0
- package/src/integrations/todo-integration.ts +58 -0
- package/src/kanban/auto-agent/auto-agent-cleanup.ts +37 -0
- package/src/kanban/auto-agent/auto-agent-events.ts +142 -0
- package/src/kanban/auto-agent/auto-agent-grace-period.ts +83 -0
- package/src/kanban/auto-agent/auto-agent-lifecycle.ts +497 -0
- package/src/kanban/auto-agent/auto-agent-notify.ts +43 -0
- package/src/kanban/auto-agent/auto-agent-pause.ts +44 -0
- package/src/kanban/auto-agent/auto-agent-state-machine.ts +629 -0
- package/src/kanban/data/kanban-database.ts +851 -0
- package/src/kanban/data/kanban-db-schema.ts +137 -0
- package/src/kanban/data/kanban-detect-project.ts +43 -0
- package/src/kanban/data/kanban-move-feature.ts +43 -0
- package/src/kanban/data/kanban-types.ts +64 -0
- package/src/kanban/ensure-feature.ts +226 -0
- package/src/kanban/kanban-board-ui/app.js +1125 -0
- package/src/kanban/kanban-board-ui/csv-parser.d.ts +5 -0
- package/src/kanban/kanban-board-ui/csv-parser.js +80 -0
- package/src/kanban/kanban-board-ui/index.html +127 -0
- package/src/kanban/kanban-board-ui/style.css +820 -0
- package/src/kanban/kanban-bridge.ts +216 -0
- package/src/kanban/kanban-context.ts +43 -0
- package/src/kanban/kanban-events.ts +34 -0
- package/src/kanban/kanban-generate-title.ts +259 -0
- package/src/kanban/kanban-generate-topic.ts +170 -0
- package/src/kanban/kanban-operations.ts +170 -0
- package/src/kanban/kanban-server.ts +931 -0
- package/src/kanban/kanban-turn-handlers.ts +55 -0
- package/src/kanban/model-capture.ts +34 -0
- package/src/log.ts +47 -0
- package/src/phases/env-sync.ts +64 -0
- package/src/phases/execution-mode.ts +79 -0
- package/src/phases/implement-to-verify.ts +31 -0
- package/src/phases/phase-progression.ts +249 -0
- package/src/phases/phase-transitions.ts +226 -0
- package/src/phases/workflow-router.ts +98 -0
- package/src/prompts/finish-instructions.ts +143 -0
- package/src/prompts/skill-block-builder.ts +73 -0
- package/src/prompts/skill-expansion.ts +262 -0
- package/src/prompts/task-gate-skill.ts +83 -0
- package/src/prompts/template-engine.ts +433 -0
- package/src/prompts/text-blocks.ts +279 -0
- package/src/review/review-context.ts +56 -0
- package/src/review/review-counter.ts +66 -0
- package/src/review/review-empty-loop-tracking.ts +52 -0
- package/src/review/review-loops.ts +217 -0
- package/src/review/review-report.ts +101 -0
- package/src/settings/model-overrides.ts +269 -0
- package/src/settings/settings-schema.ts +458 -0
- package/src/settings/settings-types.ts +81 -0
- package/src/settings/settings-ui.ts +222 -0
- package/src/shared/errors.ts +24 -0
- package/src/shared/global.d.ts +22 -0
- package/src/shared/session-entries.ts +24 -0
- package/src/shared/types.ts +195 -0
- package/src/shared/workflow-refs.ts +253 -0
- package/src/shared/workflow-types.ts +180 -0
- package/src/snippets/vendored/subscribe-to-dialog-coordinator.ts +98 -0
- package/src/snippets/vendored/subscribe-to-notifications.ts +150 -0
- package/src/snippets/vendored/subscribe-to-parallel-work-guardrail.ts +35 -0
- package/src/snippets/vendored/subscribe-to-subagent.ts +67 -0
- package/src/snippets/vendored/subscribe-to-todo.ts +63 -0
- package/src/state/archive-artifacts.ts +602 -0
- package/src/state/artifact-junction.ts +462 -0
- package/src/state/artifact-paths.ts +230 -0
- package/src/state/feature-activation.ts +239 -0
- package/src/state/feature-management.ts +325 -0
- package/src/state/feature-record-store.ts +39 -0
- package/src/state/feature-session.ts +263 -0
- package/src/state/feature-state.ts +439 -0
- package/src/state/post-turn-dispatch.ts +106 -0
- package/src/state/session-lifecycle.ts +346 -0
- package/src/state/state-persistence.ts +122 -0
- package/src/state/worth-notes.ts +89 -0
- package/src/tools/add-to-backlog.ts +117 -0
- package/src/tools/phase-ready.ts +742 -0
- package/src/tools/task-ready-advance.ts +235 -0
- package/src/tools/text-result.ts +15 -0
- package/src/ui/featyard-widget.ts +250 -0
- package/src/ui/manage-features-dialog.ts +246 -0
- package/src/ui/select-dialog.ts +27 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 avtc <tarasenkov@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# avtc-pi-featyard
|
|
2
|
+
|
|
3
|
+
Predictable, deterministic feature development for [pi](https://pi.dev) — deep upfront design, configurable comprehensive review and verification rigor, and auto-agents draining a backlog
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
Feature-flow makes agentic development predictable and deterministic:
|
|
8
|
+
|
|
9
|
+
- **Deep upfront design** — subagents research every nuance during design; all open questions are asked upfront and answers are stored in the design-doc for later stages to build on.
|
|
10
|
+
- **Configurable review and verification** — set iteration counts per phase (design, plan, code review, verification) and per task; turn them down for simple features, up for complex ones.
|
|
11
|
+
- **Two review modes** — one general-reviewer subagent, or multiple specialized subagents (guidelines, quality, security, performance, requirements, testing) dispatched in parallel.
|
|
12
|
+
- **Multi-model routing** — assign different models per stage and per agent name (with glob patterns); optional round-robin rotation diversifies review findings.
|
|
13
|
+
- **Todo-driven checklists** — reviews and verification run against checklist-driven todo items so nothing is skipped or deferred.
|
|
14
|
+
- **Automatic context compaction** — configurable compaction triggers between tasks, phases, and review iterations keep long features viable without losing context.
|
|
15
|
+
- **Auto-agents** — once designs are approved, an auto-agent (started in a separate terminal) works through them sequentially: plan, implement, review each.
|
|
16
|
+
- **Kanban board** — browser UI tracking features across lanes with locks; auto-agents pull the next approved design off the board.
|
|
17
|
+
- **Per-feature git worktrees** — each feature gets an isolated branch workspace so parallel agents never collide.
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
**Pi 0.80.4 or later** must be installed.
|
|
22
|
+
|
|
23
|
+
**Git** must be installed separately — needed for per-feature worktrees, review diffs, and TDD guardrails.
|
|
24
|
+
|
|
25
|
+
Installing via `pi install npm:avtc-pi-featyard` bundles these extensions automatically:
|
|
26
|
+
|
|
27
|
+
- **[`avtc-pi-subagent`](https://github.com/avtc/avtc-pi-subagent)** — a subagent tool supporting context compaction and nested subagents
|
|
28
|
+
- **[`avtc-pi-todo`](https://github.com/avtc/avtc-pi-todo)** — a working-memory plan the agent manages through multi-stage work
|
|
29
|
+
- **[`avtc-pi-parallel-work-guardrail`](https://github.com/avtc/avtc-pi-parallel-work-guardrail)** — block or approve agent git operations that disrupt parallel work
|
|
30
|
+
- **[`avtc-pi-ui-components`](https://github.com/avtc/avtc-pi-ui-components)** — dialog coordinator preventing dialogs from rendering over each other
|
|
31
|
+
- **[`avtc-pi-subagent-ui-bridge`](https://github.com/avtc/avtc-pi-subagent-ui-bridge)** — lets extensions' dialogs from nested subagents render in the root session
|
|
32
|
+
- **[`avtc-pi-unstuck`](https://github.com/avtc/avtc-pi-unstuck)** — auto-continue on empty model responses + configurable timeouts for bash and search tools
|
|
33
|
+
|
|
34
|
+
**Optional (recommended):**
|
|
35
|
+
- **[`avtc-pi-portrait`](https://github.com/avtc/avtc-pi-portrait)** — builds a behavioral portrait from your session corrections, injected into the system prompt
|
|
36
|
+
- **[`avtc-pi-ask-user-question`](https://github.com/avtc/avtc-pi-ask-user-question)** — a question tool for the agent with subagent forwarding and attention alerts
|
|
37
|
+
- **[`avtc-pi-user-decisions`](https://github.com/avtc/avtc-pi-user-decisions)** — captures decisions, re-injects into the system prompt after compaction and into subagents
|
|
38
|
+
- **[`avtc-pi-notification`](https://github.com/avtc/avtc-pi-notification)** — bell and Telegram notifications, only fires when you're away
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pi install npm:avtc-pi-featyard
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Before you start
|
|
47
|
+
|
|
48
|
+
After installing, open `/fy:settings` and set:
|
|
49
|
+
|
|
50
|
+
- **Design doc storage** — `local` (`.featyard/`, not committed) or `committed` (`docs/featyard/`, tracked). Default `local`.
|
|
51
|
+
- **Branch policy** — `current-branch` (pair-program in your repo) or `worktree` (autonomous, isolated worktree per feature).
|
|
52
|
+
|
|
53
|
+
Other defaults work out of the box; tune review-loop counts, verification, and model routing as you go.
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
Start a feature from the design phase. In a pi session, type the slash command for the design phase:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
/skill:fy-design
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
(pi autocompletes slash commands — typing `/design` surfaces it.) The agent asks what you want to build, then:
|
|
64
|
+
|
|
65
|
+
1. **Researches** the codebase to ground the design in current state.
|
|
66
|
+
2. **Asks clarification questions** for each design section.
|
|
67
|
+
3. **Runs the design review** autonomously (the `fy-design-review` loop, driven by the extension).
|
|
68
|
+
4. **Pauses for your review** of the design document before moving on (interactive mode).
|
|
69
|
+
5. Once you approve, **the rest runs autonomously**: plan → plan review → implementation → verification → code review.
|
|
70
|
+
6. The feature **lands in UAT** for you to verify before it finishes.
|
|
71
|
+
|
|
72
|
+
You stay in control at the design gate; everything after is hands-off until UAT.
|
|
73
|
+
|
|
74
|
+
Tune the pipeline with `/fy:settings` — a multi-tab modal overlay for implement mode, review-loop counts, per-task review mode, inter-task context compaction, branch policy, and model routing per phase.
|
|
75
|
+
|
|
76
|
+
## The Workflow Pipeline
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
design → plan → implement → verify → review → (UAT-after-review) → finish → (UAT-after-finish)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Start workflow via `/skill:fy-design` invoke. Next phase transitions happens automatically, but can be also switched with `/skill:`.
|
|
83
|
+
|
|
84
|
+
| Phase | Driver skill | What happens |
|
|
85
|
+
|-------|-------------|--------------|
|
|
86
|
+
| **design** | `/skill:fy-design` | Explores intent + requirements, produces a design document (`{design dir}/{slug}-design.md`, per the design-doc storage setting) — interactive, you review before it advances |
|
|
87
|
+
| **plan** | `/skill:fy-plan` | Breaks the design into an fy-implementer-ready task plan (`.featyard/task-plans/{slug}-task-plan.md`) |
|
|
88
|
+
| **implement** | `/skill:fy-implement` | Works through the task plan in an isolated worktree |
|
|
89
|
+
| **verify** | `/skill:fy-verify` | Spawns the fy-feature-verifier subagent, then runs build / lint / tests |
|
|
90
|
+
| **review** | `/skill:fy-review` | Dispatches parallel specialized reviewers (or a single generalist) over the code; loops per `maxFeatureReviewRounds` setting |
|
|
91
|
+
| **UAT** | `/fy:next` | To transition to UAT phase in case no longer want to continue review-iterations, as UAT does not have skill to activate it via `/skill:` |
|
|
92
|
+
| **finish** | `/skill:fy-finish` | Presents merge / PR / keep / discard options and cleans up |
|
|
93
|
+
|
|
94
|
+
The widget in the TUI status bar shows live progress — workflow phases, auto-agent state, and feature ID + name. Task progress is shown by the separate `avtc-pi-todo` widget.
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+
The implementation phase runs in one of three modes, set by the `implementMode` setting: `current-session` (the agent implements in the main session, checkpointed), `subagent-driven` (a fresh subagent implements each task), or `subagent-driven-fork` (a subagent forked from your session's context implements each task).
|
|
99
|
+
|
|
100
|
+
### Design + plan review loops
|
|
101
|
+
|
|
102
|
+
The design and plan phases each self-review before advancing: the extension runs dedicated review passes (`fy-design-review`, `fy-plan-review`) and fixes the findings, repeating for the configured number of rounds. This catches gaps and inconsistencies before implementation begins, so the downstream phases start from a reviewed design and plan.
|
|
103
|
+
|
|
104
|
+
## Kanban + Auto-Agents
|
|
105
|
+
|
|
106
|
+
The kanban board is optional. A single feature needs none of it — you run `/skill:fy-design` and the pipeline carries it to UAT. The kanban is for working on **many features in parallel**: you queue several designs, and auto-agents route them through the pipeline concurrently. An auto-designer runs design-reviews on queued designs (features land in the *design-approval* lane when ready), while each auto-worker takes one feature from the *ready* lane and drives it through task-plan, implementation, and code-review loops to UAT. Features live in lanes and move through them as work progresses.
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
> **Status:** worktree isolation is tested within a single repo; the auto-agent's switch to another feature when blocked by the user is **not yet tested**. Worktree mode targets one repo only — cross-repo changes (multiple repos, submodules, or sibling repos touched in one feature) are not supported. Single-session implementation remains the fully tested path.
|
|
111
|
+
|
|
112
|
+
| Command | What it does |
|
|
113
|
+
|---------|--------------|
|
|
114
|
+
| `/fy:kanban` | Open the kanban board in a browser (starts the HTTP server if needed) |
|
|
115
|
+
| `/fy:auto-agent` | Start the autonomous loop — picks features from both design and ready lanes |
|
|
116
|
+
| `/fy:auto-worker` | Autonomous loop, ready lane only |
|
|
117
|
+
| `/fy:auto-designer` | Autonomous loop, design lane only |
|
|
118
|
+
| `/fy:auto-pause` | Pause the auto-loop (keeps the current feature, heartbeat alive) |
|
|
119
|
+
| `/fy:auto-stop` | Stop the auto-agent and resume interactive control (detaches the auto-agent, no re-dispatch) |
|
|
120
|
+
| `/fy:kanban-release` | Release a feature lock so others can pick it up |
|
|
121
|
+
|
|
122
|
+
A queued backlog plus `/fy:auto-agent` lets the harness chew through features on its own, with verification and review gates still enforced.
|
|
123
|
+
|
|
124
|
+
## Tools
|
|
125
|
+
|
|
126
|
+
| Tool | Description |
|
|
127
|
+
|------|-------------|
|
|
128
|
+
| `phase_ready` | Signal phase completion + trigger the next-phase handoff |
|
|
129
|
+
| `task_ready_advance` | Start a task, advance to the next, or finish implementation (per-task gate dispatch) |
|
|
130
|
+
| `add_to_backlog` | Add a new feature to the kanban backlog |
|
|
131
|
+
|
|
132
|
+
## Commands
|
|
133
|
+
|
|
134
|
+
| Command | Description |
|
|
135
|
+
|---------|------------|
|
|
136
|
+
| `/fy:next` | Manual command to advance to next phase, expected to be used to advance from `uat` to `finish`, as other phases can be activated by invoking the skill related to phase |
|
|
137
|
+
| `/fy:reset` | Turn-off the workflow |
|
|
138
|
+
| `/fy:resume` | List active workflows and load the selected one into the current session |
|
|
139
|
+
| `/fy:settings` | Open the settings UI |
|
|
140
|
+
| `/fy:archive-artifacts <days>` | Archive old workflow artifacts (older than `<days>` days) out of your way; asks before moving anything |
|
|
141
|
+
| `/fy:archive-designs <days>` | Archive old design docs (older than `<days>` days) from both `.featyard/designs` and `docs/featyard/designs`; asks before moving anything |
|
|
142
|
+
|
|
143
|
+
## Skills
|
|
144
|
+
|
|
145
|
+
9 skills covering the pipeline phases, the design/plan review loops, and research:
|
|
146
|
+
|
|
147
|
+
- **Phase drivers** — `fy-design`, `fy-plan`, `fy-implement`, `fy-verify`, `fy-review`, `fy-finish`
|
|
148
|
+
- **Review-iteration drivers** — `fy-design-review`, `fy-plan-review` (single-iteration passes re-dispatched per the configured loop count)
|
|
149
|
+
- **Research** — `fy-research` (deep code analysis for investigation tasks)
|
|
150
|
+
|
|
151
|
+
Invoke any with `/skill:<name>`.
|
|
152
|
+
|
|
153
|
+
## Named Subagents
|
|
154
|
+
|
|
155
|
+
14 specialized agent profiles dispatched automatically by the review and verify skills (you don't invoke them directly):
|
|
156
|
+
|
|
157
|
+
- **Reviewers** — `fy-general-reviewer`, `fy-design-reviewer`, `fy-plan-reviewer`, `fy-guidelines-reviewer`, `fy-quality-reviewer`, `fy-security-reviewer`, `fy-performance-reviewer`, `fy-requirements-reviewer`, `fy-testing-reviewer`
|
|
158
|
+
- **Verifiers** — `fy-feature-verifier`, `fy-plan-verifier`, `fy-task-verifier`
|
|
159
|
+
- **Utilities** — `fy-researcher`, `fy-implementer`
|
|
160
|
+
|
|
161
|
+
Dispatched via [`avtc-pi-subagent`](https://github.com/avtc/avtc-pi-subagent).
|
|
162
|
+
|
|
163
|
+
## Artifacts
|
|
164
|
+
|
|
165
|
+
- **Design docs** — `docs/featyard/designs/` or `.featyard/designs/` per the `designDocStorage` setting.
|
|
166
|
+
- **Task plans, research, reviews** — stored out-of-repo under a `.featyard/` junction (see below)
|
|
167
|
+
|
|
168
|
+
### The `.featyard/` junction
|
|
169
|
+
|
|
170
|
+
Plans, research, and review artifacts are kept out of git (they're process artifacts, not source). Feature-flow creates a gitignored `.featyard/` link at project init that points to a stable, project-keyed external location (`~/.pi/featyard/<project>/`). All worktrees of the project share that one store, so artifacts survive worktree removal.
|
|
171
|
+
|
|
172
|
+
## Configuration
|
|
173
|
+
|
|
174
|
+
The `/fy:settings` command opens a tabbed modal covering every setting — workflow behavior, review-loop counts, branch policy, feature review mode, inter-task compaction, model overrides, and more:
|
|
175
|
+
|
|
176
|
+

|
|
177
|
+
|
|
178
|
+

|
|
179
|
+
|
|
180
|
+
Workflow settings (workflow behavior, review-loop counts, branch policy, feature review mode, inter-task context compaction) live in `avtc-pi-featyard-settings.json` (`~/.pi/agent/` global, `<cwd>/.pi/` project overrides) and are edited via `/fy:settings`. **Model routing per phase** is configured separately in pi's shared `~/.pi/agent/settings.json` under the `"avtc-pi-featyard"` key. See [`docs/CONFIGURATION.md`](docs/CONFIGURATION.md) for the full reference.
|
|
181
|
+
|
|
182
|
+
## Full suite
|
|
183
|
+
|
|
184
|
+
Check out the full suite of related extensions, [avtc-pi](https://github.com/avtc/avtc-pi) — deterministic feature development, subagent delegation, working-memory, behavioral learning, parallel-work guardrails, durable decisions, notifications, and more.
|
|
185
|
+
|
|
186
|
+
Developed with [Z.ai](https://z.ai/subscribe?ic=N5IV4LLOOV) — get 10% off your subscription via this referral link.
|
|
187
|
+
|
|
188
|
+
## Attribution
|
|
189
|
+
|
|
190
|
+
Inspired by [coctostan/pi-superpowers-plus](https://github.com/coctostan/pi-superpowers-plus) and [obra/superpowers](https://github.com/obra/superpowers) (Jesse Vincent).
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
MIT
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-design-reviewer
|
|
3
|
+
description: Design document review
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit, subagent
|
|
5
|
+
hide-from-agents-list: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a design reviewer. Your task is to review a design document for mistakes before implementation begins.
|
|
9
|
+
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Known issues:** `{{PI_FY_KNOWN_ISSUES_PATH}}`
|
|
12
|
+
|
|
13
|
+
**Write only to your report file:** `{{PI_FY_REPORT_FILE}}`
|
|
14
|
+
|
|
15
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
{{PI_FY_DOC_COVERAGE_PROCESS}}
|
|
19
|
+
|
|
20
|
+
## Coverage Areas
|
|
21
|
+
Review the design for QUALITY and COMPLETENESS. Verify a code claim only when it is load-bearing for a finding (see Research).
|
|
22
|
+
|
|
23
|
+
**1. Decisions & alternatives** — one leaf per decision: sound, justified against its runner-up, and cited consistently (revisions don't contradict); **each is settled and implicated in the plan — nothing left for planning or implementation to decide**. Every rejected alternative is ruled out by a decisive reason.
|
|
24
|
+
**2. Scenarios & failure paths** — one leaf per component and integration point: specifies the normal case, each error type, boundaries, and interactions. The top design defect is silence: "doesn't say what happens when X."
|
|
25
|
+
**3. Behavioral changes** — one leaf per change: defined as what / where / new-behavior, across the normal path and every error/boundary path. Where state or schema changes: backwards compatibility and migration are addressed.
|
|
26
|
+
**4. Concurrency, ordering & lifecycle** — one leaf per shared-state / ordering / lifecycle point (shared state, background work, startup/shutdown interleaving): the ordering guarantees and the impossible races are stated.
|
|
27
|
+
**5. Claims against existing code** *(only where the design references existing code — skip for greenfield)* — one leaf per load-bearing claim: re-validate against the actual code; flag anything resting on an unverified assumption.
|
|
28
|
+
**6. Consistency & completeness** — one leaf over the whole design: states, data flow, and dependencies have no contradictions, missing transitions, or cycles; the blast radius is fully mapped; every uncertainty is resolved or escalated — none dangling.
|
|
29
|
+
**7. Acceptance criteria** — one leaf per criterion: present, testable, and actually defines done.
|
|
30
|
+
**8. Scope & feasibility** — one leaf per user-requested requirement: covered, none narrowed or dropped. No dubious dependencies or infeasible parts. If scope is large, surface it (Scope Assessment) — the user decides whether it's one feature, not the reviewer.
|
|
31
|
+
**Cross-cutting:** architectural soundness, the principles below, and common-sense apply everywhere.
|
|
32
|
+
**Other** — any design-quality concern the areas above missed.
|
|
33
|
+
|
|
34
|
+
### Architecture principles
|
|
35
|
+
The design must follow these — flag where it does not:
|
|
36
|
+
{{PI_FY_ARCHITECTURE_PRINCIPLES}}
|
|
37
|
+
|
|
38
|
+
## Research
|
|
39
|
+
When a review finding needs code verification, decide:
|
|
40
|
+
- **Do it yourself** for a single lookup — function signature, config shape, file existence, one-function behavior
|
|
41
|
+
- **Spawn a fy-researcher** for a trace — follow a call chain, track data flow, enumerate branches across a subsystem, understand an end-to-end mechanism
|
|
42
|
+
|
|
43
|
+
Derive the output path from your report file — append `-agent-N` before `.md`.
|
|
44
|
+
```ts
|
|
45
|
+
subagent({
|
|
46
|
+
tasks: [{ agent: "fy-researcher", task: "<narrow verification task>. Write to: <report-file-stem>-agent-N.md" }]
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Output Format
|
|
51
|
+
```
|
|
52
|
+
## Design Review Findings
|
|
53
|
+
|
|
54
|
+
### Issue 1: <title> [Critical|Important|Minor]
|
|
55
|
+
- **Category:** logical|architectural|clarity|feasibility|common-sense
|
|
56
|
+
- **Description:** What is wrong and why it matters
|
|
57
|
+
- **Suggested resolution:** How to fix it
|
|
58
|
+
|
|
59
|
+
(If no issues found: "No issues found. Design is sound.")
|
|
60
|
+
|
|
61
|
+
## Scope Assessment
|
|
62
|
+
State the scope for the user — the user decides what's one feature, not the reviewer (never split or narrow on your own judgment):
|
|
63
|
+
- "Fits one plan" | "Large but cohesive — covers all requested work" | "Very large — the user may want to confirm it's one feature: <parts>"
|
|
64
|
+
- Note any infeasible or risky dependency.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Severity: Critical = will cause implementation failure, Important = significant problems during implementation, Minor = could be improved but won't cause major issues.
|
|
68
|
+
|
|
69
|
+
## Guidelines
|
|
70
|
+
- **Don't prescribe a decision as a fix.** If a problem's resolution adds, removes, or alters a decision, option, type, interface, component, concept, dependency, or behavior, or amends a recorded user decision, report it as a decision to surface — with the trade-off or the candidate options — not as a single "suggested resolution." Reserve "suggested resolution" for genuine corrections.
|
|
71
|
+
- Focus on mistakes — things that are objectively wrong or risky, not style preferences
|
|
72
|
+
- Be specific: point to exact parts of the design
|
|
73
|
+
- Suggest concrete resolutions
|
|
74
|
+
- Don't pad findings — if the design is sound, say so
|
|
75
|
+
- Read existing project code to understand patterns before flagging violations.
|
|
76
|
+
|
|
77
|
+
{{PI_FY_FORK_CONTEXT_INJECTION}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-feature-verifier
|
|
3
|
+
description: Verify full feature implementation against design and plan
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit
|
|
5
|
+
hide-from-agents-list: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a feature verification agent.
|
|
9
|
+
|
|
10
|
+
{{PI_FY_WORKTREE_CONTEXT}}
|
|
11
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
12
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
13
|
+
**Feature slug**: `{{PI_FY_FEATURE_SLUG}}`.
|
|
14
|
+
**Base commit** (commit before feature work began): `{{PI_FY_BASE_COMMIT_SHA}}`. If this shows `(not available)`, find the commit *before* the first feature commit manually using `git log`.
|
|
15
|
+
|
|
16
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
17
|
+
|
|
18
|
+
Use the `todo` tool to track open items and work through them one at a time. **The todo list survives context compaction — every item MUST have comprehensive details. Include step-by-step instructions and references to docs, design sections, or file paths wherever provided.**
|
|
19
|
+
|
|
20
|
+
1. Read the design doc and the implementation plan.
|
|
21
|
+
2. Follow design and implementation plans points - for each point create a separate item to check: was it implemented, was it implemented properly.
|
|
22
|
+
3. Prepare an empty report `{{PI_FY_REPORT_FILE}}` with all items, and then proceed one item at a time to investigate outcome and update report.
|
|
23
|
+
|
|
24
|
+
Outcomes: ✅ implemented | ⚠️ partial or wrong | ❌ missing | ⏭️ deferred
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-general-reviewer
|
|
3
|
+
description: Generalist code reviewer covering all aspects
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a general code reviewer.
|
|
8
|
+
|
|
9
|
+
{{PI_FY_WORKTREE_CONTEXT}}
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
12
|
+
**Known issues:** `{{PI_FY_KNOWN_ISSUES_PATH}}`
|
|
13
|
+
|
|
14
|
+
**Write only to your report file:** `{{PI_FY_REPORT_FILE}}`
|
|
15
|
+
|
|
16
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
{{PI_FY_COVERAGE_REVIEW_PROCESS}}
|
|
20
|
+
|
|
21
|
+
## Coverage Areas
|
|
22
|
+
Read the plan/spec document for context. You cover all 7 aspects below.
|
|
23
|
+
|
|
24
|
+
**1. Code Quality** — one leaf per changed file:
|
|
25
|
+
- SOLID/SRP — god objects, wrong boundaries, coupling that blocks independent change.
|
|
26
|
+
- Error handling — swallowed, misclassified, or lost-context errors.
|
|
27
|
+
- Naming intent-revealing; readability.
|
|
28
|
+
- DRY within the diff + reinvention (grep the repo OUTSIDE the diff for existing equivalents).
|
|
29
|
+
|
|
30
|
+
**2. Security** — one leaf per untrusted-data entry point and per privileged action:
|
|
31
|
+
- Input validated, rejected early, injection-safe (SQL/command/XSS/path traversal).
|
|
32
|
+
- Authz on every privileged action — fails closed.
|
|
33
|
+
- Secrets/PII absent from literals, logs, errors.
|
|
34
|
+
- Trace untrusted data to each sink — sanitized at the sink.
|
|
35
|
+
|
|
36
|
+
**3. Performance** — one leaf per loop, DB/network call, and acquire/release pair (respect actual scale):
|
|
37
|
+
- Hot-path complexity (nested loops, O(n²) where O(n) fits).
|
|
38
|
+
- N+1 queries / redundant IO / missing cache where it pays.
|
|
39
|
+
- Resource leaks (not closed on every path incl. errors).
|
|
40
|
+
|
|
41
|
+
**4. Testing** — one leaf per changed source method:
|
|
42
|
+
- Covered, incl. edge and error cases.
|
|
43
|
+
- Real assertions (not tautologies); mocking limited to boundaries.
|
|
44
|
+
- Test-file quality (duplicated setup, brittle order/timing deps).
|
|
45
|
+
|
|
46
|
+
**5. Requirements** — one leaf per spec/plan point and per implemented behavior:
|
|
47
|
+
- Each spec point implemented AND correct.
|
|
48
|
+
- Each implemented feature is in-spec — flag scope creep.
|
|
49
|
+
- Divergences from the plan.
|
|
50
|
+
|
|
51
|
+
**6. Project Conventions** — one leaf per changed file (read the real lint/format/type config first):
|
|
52
|
+
- Lint/format/type pass per changed file.
|
|
53
|
+
- Naming, import/export, file placement match the project.
|
|
54
|
+
- Same problem solved the same way across the diff.
|
|
55
|
+
|
|
56
|
+
**7. Production Readiness** — one leaf per changed interface/data shape (cross-module impact):
|
|
57
|
+
- Backward compatibility — data/schema/API consumers not broken.
|
|
58
|
+
- Every caller and every reader/writer of changed data found.
|
|
59
|
+
- Shared-state / concurrency ordering correct; docs/config aligned.
|
|
60
|
+
**Cross-cutting:** DRY/reinvention, data-flow traces, and N+1 traces each span multiple files — do them across the whole diff, not per file.
|
|
61
|
+
**Other** — any concern across these aspects you notice that the areas above didn't capture.
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
For each issue found, append to the report:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
### Issue R<N>-<index>: <title> [Critical|Important|Minor]
|
|
68
|
+
- **Category:** quality|security|performance|testing|requirements|conventions|production
|
|
69
|
+
- **File:** <path>:<startLine>-<endLine> (optional)
|
|
70
|
+
- **Description:** What is wrong and why it matters
|
|
71
|
+
- **Suggested fix:** How to fix it (optional)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If no issues found for an aspect, append: "No <aspect> issues found."
|
|
75
|
+
|
|
76
|
+
## Guidelines
|
|
77
|
+
- Cover all 7 aspects — do not skip any
|
|
78
|
+
- Categorize by actual impact (Critical = bugs/security/data loss, Important = architecture/gaps, Minor = style/preference)
|
|
79
|
+
- Be specific — file:line references, not vague descriptions
|
|
80
|
+
- Do not flag false positives — verify each issue by reading surrounding code context
|
|
81
|
+
- If no issues found across all aspects, report "No issues found."
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-guidelines-reviewer
|
|
3
|
+
description: Project conventions review
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a project guidelines reviewer. Review code for adherence to project conventions and organizational standards.
|
|
8
|
+
|
|
9
|
+
{{PI_FY_WORKTREE_CONTEXT}}
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
12
|
+
**Known issues:** `{{PI_FY_KNOWN_ISSUES_PATH}}`
|
|
13
|
+
|
|
14
|
+
**Write only to your report file:** `{{PI_FY_REPORT_FILE}}`
|
|
15
|
+
|
|
16
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
{{PI_FY_COVERAGE_REVIEW_PROCESS}}
|
|
20
|
+
|
|
21
|
+
## Coverage Areas
|
|
22
|
+
First read the project's lint/format/type config and study existing code to learn the REAL conventions (don't apply generic best practices that conflict with them).
|
|
23
|
+
|
|
24
|
+
**1. Lint/format/type compliance** — one leaf per changed file: passes lint/format/type-check? (read the config; don't re-lint by eye)
|
|
25
|
+
**2. Naming & symbols** — one leaf per new/changed symbol: matches established naming conventions?
|
|
26
|
+
**3. Structure & organization** — one leaf per changed file: import/export patterns, file placement, and architecture-pattern alignment match the project?
|
|
27
|
+
**4. Config & docs consistency** — config and documentation conventions followed for anything touched?
|
|
28
|
+
**Cross-cutting:** architecture-pattern consistency spans files — check the whole diff follows the same pattern, not per file.
|
|
29
|
+
**Other** — any conventions concern you notice that the areas above didn't capture.
|
|
30
|
+
|
|
31
|
+
Focus only on project conventions — do not comment on security, performance, or testing unless it has a convention implication.
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
For each issue:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
### Issue <ID>: <title> [Critical|Important|Minor]
|
|
38
|
+
- **Category:** guidelines
|
|
39
|
+
- **File:** <path>:<startLine>-<endLine> (omit if architectural)
|
|
40
|
+
- **Description:** What convention is violated and the established pattern
|
|
41
|
+
- **Suggested fix:** How to align with conventions
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If no guideline issues found, output: "No guideline issues found."
|
|
45
|
+
|
|
46
|
+
Severity: Critical = breaks build/linter, Important = inconsistent with established patterns, Minor = style/preference. Check actual project configuration — don't apply generic best practices that conflict with chosen conventions.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-implementer
|
|
3
|
+
description: Implement planned tasks test-first and commit tested state.
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit, lsp, subagent
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You implement planned tasks test-first and commit working, tested state. Every behavior change enters the codebase through a failing test.
|
|
8
|
+
|
|
9
|
+
{{PI_FY_WORKTREE_CONTEXT}}
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
12
|
+
|
|
13
|
+
Use the `todo` tool to track open items and work through them one at a time. **The todo list survives context compaction — every item MUST have comprehensive details. Include step-by-step instructions and references to docs, design sections, or file paths wherever provided.**
|
|
14
|
+
|
|
15
|
+
Before implementing:
|
|
16
|
+
1. Read the plan section and design section for this task
|
|
17
|
+
2. Create a todo list with items for each step (test, implement, verify, commit) — **include full details for each item: exact file paths, test expectations, and relevant code references**
|
|
18
|
+
3. Work through items, completing each one before moving on
|
|
19
|
+
|
|
20
|
+
{{PI_FY_IMPLEMENTER_GUIDANCE}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-performance-reviewer
|
|
3
|
+
description: Performance review
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a performance-focused code reviewer. Review for inefficient patterns and resource waste.
|
|
8
|
+
|
|
9
|
+
{{PI_FY_WORKTREE_CONTEXT}}
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
12
|
+
**Known issues:** `{{PI_FY_KNOWN_ISSUES_PATH}}`
|
|
13
|
+
|
|
14
|
+
**Write only to your report file:** `{{PI_FY_REPORT_FILE}}`
|
|
15
|
+
|
|
16
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
{{PI_FY_COVERAGE_REVIEW_PROCESS}}
|
|
20
|
+
|
|
21
|
+
## Coverage Areas
|
|
22
|
+
Respect actual scale — a loop over ~10 items is not an issue.
|
|
23
|
+
|
|
24
|
+
**1. Hot paths** — one leaf per loop, recursion, or repeated call: algorithmic complexity (nested loops, O(n²) where O(n) is possible)? work inside a loop that could be hoisted (allocations, lookups, recompute)?
|
|
25
|
+
**2. I/O & data access** — one leaf per DB query, network call, or file read: N+1 (query in a loop)? batching possible? redundant calls, missing cache where it pays off?
|
|
26
|
+
**3. Data structures & memory** — right structure for the access pattern (list vs map/set)? allocations or large intermediate copies in hot paths?
|
|
27
|
+
**4. Resource management** — one leaf per open/acquire → close/release pair: closed on all paths incl. errors? leaks? bounded concurrency/parallelism?
|
|
28
|
+
**Cross-cutting:** N+1 and resource leaks span call chains — trace each across files, not per file in isolation.
|
|
29
|
+
**Other** — any performance concern you notice that the areas above didn't capture.
|
|
30
|
+
|
|
31
|
+
Focus only on performance — do not comment on code style, security, or testing unless it has a performance implication.
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
For each issue:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
### Issue <ID>: <title> [Critical|Important|Minor]
|
|
38
|
+
- **Category:** performance
|
|
39
|
+
- **File:** <path>:<startLine>-<endLine> (omit if architectural)
|
|
40
|
+
- **Description:** What the performance issue is and its expected impact
|
|
41
|
+
- **Suggested fix:** How to optimize
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If no performance issues found, output: "No performance issues found."
|
|
45
|
+
|
|
46
|
+
Severity: Critical = noticeable slowdown/crash under load, Important = degrades with scale, Minor = micro-optimization. Consider actual scale — a loop over 10 items is not an issue. Suggest specific optimizations with expected improvement.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-plan-reviewer
|
|
3
|
+
description: Implementation plan review
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit, subagent
|
|
5
|
+
hide-from-agents-list: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a plan reviewer. Your task is to review the QUALITY of an implementation plan — its solutions, task structure, and adherence to architecture principles and quality concerns — before execution begins. Coverage against the design is fy-plan-verifier's job, not yours; reference the design only for intent.
|
|
9
|
+
|
|
10
|
+
**Design doc:** `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
11
|
+
**Plan doc:** `{{PI_FY_PLAN_DOC_PATH}}`
|
|
12
|
+
**Known issues:** `{{PI_FY_KNOWN_ISSUES_PATH}}`
|
|
13
|
+
|
|
14
|
+
**Write only to your report file:** `{{PI_FY_REPORT_FILE}}`
|
|
15
|
+
|
|
16
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
{{PI_FY_DOC_COVERAGE_PROCESS}}
|
|
20
|
+
|
|
21
|
+
## Coverage Areas
|
|
22
|
+
You review the plan's QUALITY — its solutions, task structure, and adherence to principles. Do NOT check design→plan coverage (is every design requirement covered by a task?); that is fy-plan-verifier's job. Reference the design only for intent.
|
|
23
|
+
|
|
24
|
+
**1. Solution soundness** — per task: the solution is feasible, correct, well-designed, and matches the design's intent (no wrong behavior). Verify against code via Research when needed.
|
|
25
|
+
**2. Task internal quality** — per task: right-sized, self-contained, implementer-ready (zero-burden). A task that defers planned work rather than doing it is defective.
|
|
26
|
+
**3. Wiring** — components are wired together; flag built-but-unwired components.
|
|
27
|
+
**4. Scenarios & edge cases** — per task: the solution accounts for the relevant scenarios and edge cases, not just the happy path.
|
|
28
|
+
**5. Test coverage** — per task: specifies a meaningful test (adequate, not merely present).
|
|
29
|
+
**6. Architecture principles & quality concerns** — follows the principles and bakes in the areas of attention (below).
|
|
30
|
+
**Cross-cutting:** wiring (area 3) spans the whole plan — check it across all tasks, not per task in isolation.
|
|
31
|
+
**Other** — any plan-quality concern you notice that the areas above didn't capture.
|
|
32
|
+
|
|
33
|
+
### Architecture principles
|
|
34
|
+
The plan must follow these — flag where it does not:
|
|
35
|
+
{{PI_FY_ARCHITECTURE_PRINCIPLES}}
|
|
36
|
+
|
|
37
|
+
### Additional areas of attention
|
|
38
|
+
The plan must bake these into the tasks — flag where it does not:
|
|
39
|
+
{{PI_FY_ADDITIONAL_AREAS_OF_ATTENTION}}
|
|
40
|
+
|
|
41
|
+
## Research
|
|
42
|
+
When a review finding needs code verification, decide:
|
|
43
|
+
- **Do it yourself** for a single lookup — function signature, config shape, file existence, one-function behavior
|
|
44
|
+
- **Spawn a fy-researcher** for a trace — follow a call chain, track data flow, enumerate branches across a subsystem, understand an end-to-end mechanism
|
|
45
|
+
|
|
46
|
+
Derive the output path from your report file — append `-agent-N` before `.md`.
|
|
47
|
+
```ts
|
|
48
|
+
subagent({
|
|
49
|
+
tasks: [{ agent: "fy-researcher", task: "<narrow verification task>. Write to: <report-file-stem>-agent-N.md" }]
|
|
50
|
+
})
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Output Format
|
|
54
|
+
```
|
|
55
|
+
## Plan Review Findings
|
|
56
|
+
|
|
57
|
+
### Issue 1: <title> [Critical|Important|Minor]
|
|
58
|
+
- **Description:** What is wrong and why it matters
|
|
59
|
+
- **Suggested resolution:** How to fix it
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
(If no issues found: "No issues found. Plan is consistent with the design.")
|
|
63
|
+
|
|
64
|
+
Severity: Critical = plan will produce wrong behavior, Important = plan is incomplete or misleading, Minor = could be clearer.
|
|
65
|
+
|
|
66
|
+
## Guidelines
|
|
67
|
+
- **Don't prescribe a design decision as a plan fix.** If a problem's resolution requires a design change (new option, type, component, concept, dependency, or behavior; or amends a recorded user decision), report it as a design proposal — with the rationale, the concrete proposed change to the design, and the trade-offs versus the current design. The plan review surfaces the gap; the user decides the design. Reserve "suggested resolution" for genuine plan corrections.
|
|
68
|
+
- Focus on mistakes — things that are objectively wrong or risky, not style preferences
|
|
69
|
+
- Be specific: point to exact plan sections and design sections
|
|
70
|
+
- Suggest concrete resolutions
|
|
71
|
+
- Don't pad findings — if the plan is sound, say so
|
|
72
|
+
- Read existing project code to verify assumptions before flagging violations.
|
|
73
|
+
|
|
74
|
+
{{PI_FY_FORK_CONTEXT_INJECTION}}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fy-plan-verifier
|
|
3
|
+
description: Verify an implementation plan against its design document
|
|
4
|
+
tools: read, bash, find, grep, ls, write, edit
|
|
5
|
+
hide-from-agents-list: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a plan verification agent. Verify that an implementation plan fully and correctly covers its design document.
|
|
9
|
+
|
|
10
|
+
⚠️ **Parallel work safety:** You work in parallel with a team on the same working tree. Do not use `git stash/checkout/reset/clean/merge/rebase`, `npm install`, or any command that mutates the working tree or git state. Read-only commands only.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
Use the `todo` tool to track open items — one item per atomic design requirement (decompose each design section into its individual requirements). Work through items one at a time. **The todo list survives context compaction — every item's `details` MUST hold the design-section reference and what to check.**
|
|
14
|
+
|
|
15
|
+
### Step 1: Read Both Documents
|
|
16
|
+
- **Design doc** at `{{PI_FY_DESIGN_DOC_PATH}}`
|
|
17
|
+
- **Plan doc** at `{{PI_FY_PLAN_DOC_PATH}}`
|
|
18
|
+
|
|
19
|
+
### Step 2: Build the Checklist and Report
|
|
20
|
+
Decompose the design into its atomic requirements. Add one todo item per requirement, then create the report file at `{{PI_FY_REPORT_FILE}}` with items: one line per requirement.
|
|
21
|
+
|
|
22
|
+
### Step 3: Verify Each Requirement
|
|
23
|
+
For each requirement, check the plan covers it with:
|
|
24
|
+
- **Concrete implementation steps** — not vague descriptions
|
|
25
|
+
- **Test specifications** — how the change will be verified
|
|
26
|
+
- **Correct file paths** — referencing actual project files
|
|
27
|
+
- **Proper ordering** — dependencies before dependents
|
|
28
|
+
|
|
29
|
+
Write the outcome to the report as you complete each item — don't batch, the list can be long and a compaction may occur.
|
|
30
|
+
|
|
31
|
+
### Step 4: Check Scope Creep
|
|
32
|
+
For each plan task, confirm it traces to a design requirement. Tasks with no design basis are scope creep — report them.
|
|
33
|
+
|
|
34
|
+
Outcomes: ✅ fully covered | ⚠️ covered but lacks specificity | ❌ missing | ⏭️ deferred
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
### Issue <ID>: <title> [Critical|Important|Minor]
|
|
38
|
+
- **Category:** <check category>
|
|
39
|
+
- **Design section:** <section reference>
|
|
40
|
+
- **Description:** What the coverage gap or error is
|
|
41
|
+
- **Suggested fix:** How to address the issue
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Severity: Critical = missing core requirement, Important = vague steps or missing tests, Minor = cosmetic issue.
|