feat(plan): bare-bones /plan MVP with gate, research, validate and record agents #249

Merged
Defame1297 merged 3 commits from feat/plan-mvp into main 2026-11-29 11:50:03 +00:00
11 changed files with 217 additions and 8 deletions

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@
{
"name": "plan",
"description": "Turning a ticket or idea into a validated, researched spec and agent-ready tickets, with the user in the loop; temporarily also ships /ship to execute a plan.",
"version": "0.3.0",
"version": "0.4.0",
"category": "Productivity",
"source": "./plugins/plan"
}
+1 -1
View File
@@ -27,7 +27,7 @@ The plugins:
- **ansible** — authoring, testing and dry-running Ansible playbooks, roles and collections
- **gitops** — authoring, auditing and diagnosing a Flux GitOps repository, including the secrets sealed into it
- **k8s** — read-only diagnosis of workloads on a Kubernetes cluster
- **plan** — turning a ticket or idea into a validated, researched spec and agent-ready tickets; ships the `/next` and `/ship` prompts, `research-docs`, and Matt Pocock's planning skills (grilling, research, domain modelling, codebase design, wayfinder, spec, tickets, triage) at a pinned release
- **plan** — turning a ticket or idea into a validated, researched spec and agent-ready tickets; ships the `/plan`, `/next` and `/ship` prompts, the `plan-*` agents, `plan-track`, `research-docs`, and Matt Pocock's planning skills (grilling, research, domain modelling, codebase design, wayfinder, spec, tickets, triage) at a pinned release
- **bin** — cross-cutting workflow skills not yet split into a focused plugin: documentation, diagnosis, compressed output (`caveman`), and re-orienting mid-task (`zoom-out`)
## Prerequisites
@@ -0,0 +1,26 @@
---
name: plan-gate
description: >
Use when the plan prompt needs the step-1 gate run on a ticket or idea: duplicate, already done, contradicts
an ADR, or out of scope. Read-only. Not deep feasibility validation -> `plan-validator`.
model: sonnet
disallowedTools: Edit, Write, NotebookEdit
---
You run the cheap gate before any grilling. You are read-only: never call a write tool.
## Input
A ticket number or the idea as free text.
## Checks
1. **Duplicate**: an open issue or PR covers the same thing (`gitea-issues`, `gitea-prs`).
2. **Already done**: the repo already does it.
3. **Contradicts an ADR**: a decision in `docs/adr/` rules it out.
4. **Out of scope**: it falls outside `docs/VISION.md`.
## Output
One line per check: `<check> | pass/hit | evidence (link or file:line)`, then `verdict: go` or
`verdict: stop: <reason>`.
@@ -0,0 +1,25 @@
---
name: plan-recorder
description: >
Use when the plan prompt has an agreed plan and needs step 7: the decisions recorded in a docs PR
(AGENTS.md, GLOSSARY.md, ADRs). Not writing the spec or tickets -> `to-spec`.
model: sonnet
---
You record agreed decisions in the repo's docs and open one docs PR. You change docs only, never
code.
## Input
The agreed plan and the list of decisions it made.
## Process
1. Create a branch `docs/plan-<slug>` from the default branch.
2. Record each decision where it belongs: an ADR or glossary term with `domain-modeling`, an
AGENTS.md change with `agentsmd-author`.
3. Commit with `git-commits`, push, and open the PR with `gitea-prs`.
## Output
The PR link and one line per decision naming the file it landed in.
@@ -0,0 +1,27 @@
---
name: plan-researcher
description: >
Use when the plan prompt needs step-3 research on an agreed intent and track, in the repo or online.
Read-only; returns cited findings. Not a findings file in the repo -> `research`.
model: sonnet
disallowedTools: Edit, NotebookEdit
---
You research one question for `/plan`. Never edit repo files; the only place you may write is the
session scratchpad.
## Input
The intent, the recommended track, and a scope: `repo` or `web`.
## Process
- **repo**: current practices, rules, patterns and conventions — AGENTS.md, `GLOSSARY.md`,
`docs/adr/`, `docs/spec/` and the code the intent touches.
- **web**: tools, documentation, best practices, examples and standards. Use Context7 for library
docs; prefer primary sources.
## Output
Findings as bullets, each with its source (file:line or URL) and marked `verified` or `inferred`.
End with open questions, if any.
@@ -0,0 +1,25 @@
---
name: plan-validator
description: >
Use when the plan prompt needs step-4 deep validation: is the researched intent feasible and does it fit
the repo as it is now. Read-only. Not the cheap pre-grilling gate -> `plan-gate`.
model: opus
disallowedTools: Edit, Write, NotebookEdit
---
You validate one intent against the repo as it is now. You are read-only: never call a write tool.
## Input
The intent, the track, and the research findings.
## Checks
- Feasible with the repo's current structure, tools and conventions.
- Consistent with ADRs, AGENTS.md and `GLOSSARY.md`.
- Nothing it relies on is missing.
## Output
Each finding tagged `contradiction`, `missing`, `infeasible` or `risk`, with evidence, then
`verdict: fits`, `verdict: regrill: <point>` or `verdict: stop: <reason>`.
+2 -2
View File
@@ -206,5 +206,5 @@ decisions instead.
issue, pushing tags, or setting up infrastructure).
7. Open decisions that need me. Do not decide these yourself.
End with: "Run `/ship` to build this." If I reply go, tell me to run `/ship`: it cannot be
invoked for me. Do not build inline.
End with: "Run `/ship` to build this, or `/plan` to spec it first." If I reply go, tell me
to run `/ship`: it cannot be invoked for me. Do not build inline.
+65
View File
@@ -0,0 +1,65 @@
---
description: Turn a ticket or idea into a validated plan, a spec and agent-ready tickets, with me in the loop
argument-hint: "[#N | idea as free text] (empty: the issue picked by /next in this conversation)"
disable-model-invocation: true
---
Input (raw, verbatim):
$ARGUMENTS
You are the orchestrator. Delegate the reading to subagents and keep only their conclusions. Speak
to me only to ask, to present, or to report.
## 0. Entry
- `#N`: read the issue and its comments with `gitea-issues`.
- Free text: that is the idea.
- Empty: use the issue picked by `/next` earlier in this conversation. None → ask me for one.
## 1. Gate
Dispatch `plan-gate`. `verdict: stop` → tell me why and stop.
## 2–6. Discovery loop
Repeat until I agree. Count loops per point; after two loops on the same point, ask me whether to
park the idea instead.
2. **Grill** with `grilling`, only if the intent is unclear. Then recommend a track with
`plan-track`.
3. **Research**: dispatch `plan-researcher` twice in parallel, scope `repo` and scope `web`.
4. **Validate**: dispatch `plan-validator` with the findings. `regrill` → back to 2. `stop` → tell
me why and stop.
5. **Offer a plan**: options, considerations, recommendation, impact, expected results, and the
track.
6. **Agreement**: ask me with AskUserQuestion to agree and confirm the track, or send it back to
grilling or research. Say in the question that agreeing also approves step 7's docs branch,
push and PR.
## 7. Record decisions
Dispatch `plan-recorder` with the agreed plan and its decisions. My agreement in step 6 authorizes
its branch, commit, push and docs PR. Keep the PR link.
## 8. Spec (spec and tickets track only)
`to-spec` is hand-invoked, so you cannot call it. Tell me to run:
`/to-spec` — and to link the docs PR <link> in the spec.
My running it is my approval of the spec. Wait for it.
## 9–10. Tickets
`to-tickets` is hand-invoked, so you cannot call it. Tell me to run `/to-tickets` on the spec (or on
this conversation, on the tickets-only track). It proposes the breakdown, and my approval inside it
covers the whole batch. It files the tickets and sets `Status/Ready for Agent`; a ticket without
acceptance criteria must not carry it. If the breakdown shows a gap in the spec, tell me to rerun
`/to-spec` first.
After it files them, read each filed ticket with `gitea-issues`. Remove `Status/Ready for Agent`
from any ticket with no acceptance criteria, and list those tickets for me.
## Report
Links to the docs PR, the spec and the tickets.
@@ -0,0 +1,30 @@
---
name: plan-track
description: >-
Use when planning must recommend or confirm a track for a ticket or idea: spec and tickets, or
ticket(s) only. Not writing the spec -> `to-spec`. Not breaking work into tickets -> `to-tickets`.
metadata:
version: "0.1.0"
category: planning
---
# Plan track
Recommend one track, with a one-sentence reason.
## Tracks
- **Spec and tickets**: a spec issue in the tracker, broken down into tickets.
- **Ticket(s) only**: one or more tickets with no spec.
## Pick spec and tickets when any holds
- The work needs more than one ticket that depends on another.
- It makes a decision that downstream tickets must share.
- It touches more than one plugin or subsystem.
Otherwise pick ticket(s) only.
## Output
`track: <spec-and-tickets|tickets-only> | reason: <one sentence>`
+1 -1
View File
@@ -1,5 +1,5 @@
name: plan
version: 0.3.0
version: 0.4.0
description: Turning a ticket or idea into a validated, researched spec and agent-ready tickets, with the user in the loop; temporarily also ships /ship to execute a plan.
author:
name: Mortis
+14 -3
View File
@@ -1,8 +1,7 @@
# plan plugin — outline
Status: outline only, refined in a first grilling round. This is the maintainer's intent for the
plugin. Nothing below is built yet except the `next` and `ship` prompts. Both are the existing
personal commands, moved into the plugin unchanged.
Status: outline, refined in a first grilling round, with a bare-bones MVP built (see "What ships
today"). This is the maintainer's intent for the plugin.
The plugin is set up on its own, separate from `delivery`, and is meant to grow on its own first.
How the two connect is deliberately left open (see "Open for later").
@@ -163,6 +162,18 @@ sequenceDiagram
temporary.** Implementation does not belong in this plugin long term. It ships here so `/next`
has a working handoff until implementation has a home.
- `.apm/prompts/plan.prompt.md`: the `/plan` command, the MVP orchestrator for steps 0–10. It
dispatches the agents below, grills with `grilling`, and picks the track with `plan-track`.
Steps 8–10 run upstream's hand-invoked `/to-spec` and `/to-tickets`: `/plan` tells the user to
type them, and the user running them is the approval.
- `.apm/agents/`: `plan-gate` (step 1), `plan-researcher` (step 3), `plan-validator` (step 4),
read-only (the researcher may write only to the scratchpad), and `plan-recorder` (step 7, the docs PR).
- `.apm/skills/plan-track/`: the track criteria.
All of these are minimal stubs, to be built out. The prompt and agents route to `gitea-issues`, `gitea-prs`,
`git-commits` and `agentsmd-author`, which `plan` does not declare as dependencies: it assumes the
`gitea`, `git` and `core` packages are installed.
## Open for later
- How plan hands off to `delivery`, and how the two plugins relate. Today `delivery` says only a