feat(marketplace): add plan skeleton package
Why: add a home for turning a ticket or idea into a validated, researched spec and agent-ready tickets, stopping before implementation (that is delivery's job). - New `plan` package at 0.1.0 (hybrid; claude, copilot, codex). - docs/outline.md records the maintainer's intended flow (validate, grill if needed, research repo + online, plan with options, agree, write epic/feature spec, propose ticket breakdown) as intent only; nothing is built yet beyond the prompt. - Ships the existing personal `/next` command as .apm/prompts/next.prompt.md with its body unchanged. `disable-model-invocation` is dropped because apm prompt files do not support it (verified by a throwaway apm install: clean, body identical). - Root apm.yml does not consume it yet: its dependencies resolve from remote main (ADR-0019), so wiring it in is a follow-up after merge, the same two-step as ansible/k8s. Impact: the catalog gains a package; marketplace version 0.8.1 -> 0.9.0 (minor). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
1 parent
8ffff54fbc
commit
b1b6deeac9
7 files changed
+302
-4
No files matched your search
@@ -0,0 +1,210 @@
|
||||
---
|
||||
description: Rank this repo's open issues by a metric, let me pick one, then validate it and present a plan with subagents
|
||||
argument-hint: "[easiest|security|important|unblocking|quick-win] [milestone:\"<name>\"] [label:\"<name>\"[,\"<name>\"...]]"
|
||||
---
|
||||
|
||||
Arguments (raw, verbatim):
|
||||
$ARGUMENTS
|
||||
|
||||
This command is read-only from start to finish. It makes no edits, branches, commits, assignments,
|
||||
labels, comments, or issue closures. Building happens only through `/ship`.
|
||||
|
||||
You are the orchestrator. Delegate the heavy reading to subagents and take back only their
|
||||
conclusions, in the return formats below. Every subagent brief starts with:
|
||||
|
||||
> READ-ONLY. Read the repo, its issues and PRs. Do not call any write tool. The only place you may
|
||||
> write is the session scratchpad.
|
||||
|
||||
## 1. Resolve the forge, the arguments, and me (you, not a subagent)
|
||||
|
||||
**Forge**
|
||||
- **Gitea**: the gitea MCP server answers for this owner/repo. Take owner/repo from
|
||||
`git remote get-url origin`.
|
||||
- **GitHub**: the host is github.com and `gh auth status` passes.
|
||||
- **Otherwise**: if there is no `origin`, or the tool you need is missing, stop and say which.
|
||||
|
||||
**Arguments**
|
||||
|
||||
Parse them with shell-style quoting.
|
||||
- `milestone:` and `label:` values may be quoted.
|
||||
- An unquoted `label:` value also takes the words after it, until the next flag or until the
|
||||
value matches one of the repo's labels. `label:Status/Needs Triage` is therefore one label, and
|
||||
`/` is part of the name.
|
||||
- Commas separate labels. An issue must carry all of them.
|
||||
- Every other word is the metric.
|
||||
- Aliases: "most important" and "importance" mean `important`; "quick win" means `quick-win`.
|
||||
- If two known metrics are given, rank by the first and break ties with the second.
|
||||
- Any other text is a free-text priority: state how you read it.
|
||||
- No metric means `important`.
|
||||
|
||||
**Resolve the filters against the repo**
|
||||
- **Milestone**: match the name against **open** milestones only, case-insensitive and partial.
|
||||
- No match: list the open milestones and stop.
|
||||
- Several matches: ask me with AskUserQuestion.
|
||||
- Filter by the matched milestone's ID. A partial name passed to the issue list is silently
|
||||
ignored there.
|
||||
- **Labels**: match each name case-insensitively against the repo's label list. If one doesn't
|
||||
exist, say so, list the close matches, and stop.
|
||||
|
||||
**Me**
|
||||
|
||||
Use gitea `get_me` or `gh api user`. If that fails, use `git config user.name` and say you did.
|
||||
|
||||
State the result in one line:
|
||||
`forge=… repo=… metric=… milestone=… labels=… me=… ignored=…`
|
||||
|
||||
## 2. Find the candidates (one subagent)
|
||||
|
||||
Brief the subagent with the resolved filters and the rules below.
|
||||
|
||||
**Listing**
|
||||
- Use issues only (Gitea `type=issues`, `state=open`), and page through all of them. On Gitea,
|
||||
issues and PRs share one number space.
|
||||
- Fetch the list of open PRs once.
|
||||
|
||||
**Exclude** (the reason goes in the exclusion list):
|
||||
- An issue assigned to anyone other than me. Name the assignee in the reason.
|
||||
- An issue carrying a label that means blocked, needing more info, abandoned, won't fix, duplicate,
|
||||
invalid, or ready for a human. Map these to the repo's own label scheme, and read
|
||||
`docs/agents/triage-labels.md` or the equivalent if it exists.
|
||||
- **Never** exclude an issue for a label I filtered on.
|
||||
- Map, epic, or index issues that only track other issues.
|
||||
- An issue with an **open** blocker. That is either an open entry in the forge's dependency list
|
||||
(closed blockers don't count), or an open issue named as "blocked by", "depends on", or "after
|
||||
#N" in its body or comments.
|
||||
- An issue an open PR already addresses: the PR's title or body says Closes, Fixes, or Refs #N, or
|
||||
its head branch contains the number.
|
||||
|
||||
Anything uncertain is **flagged**, not excluded. Examples: an issue whose body says only a human
|
||||
can do it, or one that is a pending decision.
|
||||
|
||||
**Cost**
|
||||
|
||||
Run the metadata filters on the list result first. Call get, comments, and dependencies only for
|
||||
issues that survive them.
|
||||
|
||||
**Return**, one line per issue:
|
||||
- candidates: `#N | title | labels | milestone | blocks: #… | blocked_by(open): #… | flags | summary`,
|
||||
with the summary at most 50 words and folding in amendments from comments;
|
||||
- excluded: `#N | excluded: reason`.
|
||||
|
||||
If there are no candidates, show the exclusion list and stop. If the filters removed everything
|
||||
because the repo has no such labels or milestones, say that.
|
||||
|
||||
## 3. Score the candidates (subagents in parallel)
|
||||
|
||||
**`unblocking`**
|
||||
|
||||
You compute it yourself from the blocks/blocked_by edges, transitively. No subagents are needed.
|
||||
Skip to step 4.
|
||||
|
||||
**Every other metric**
|
||||
|
||||
Batch the candidates, about 5 per subagent, with at most 6 subagents. Scoring is routine, so use a
|
||||
smaller model for these subagents.
|
||||
|
||||
If there are more than 30 candidates, pre-rank them on metadata and score only the top 30. Say how
|
||||
many you dropped. Pre-rank in this order:
|
||||
1. A priority label.
|
||||
2. A kind label that fits the metric (e.g. security, bug).
|
||||
3. The milestone.
|
||||
4. Age, oldest first.
|
||||
|
||||
**Brief each scorer with:**
|
||||
- the metric and its rubric below;
|
||||
- the paths to AGENTS.md / CLAUDE.md and `docs/adr/`. Don't send their contents. The scorer reads
|
||||
an ADR only when the issue touches its subject.
|
||||
|
||||
The scorer judges against the repository as it is now, not the issue text alone.
|
||||
|
||||
**Rubric** (1–10, higher is better for the metric):
|
||||
- `easiest`:
|
||||
- 9–10: at most 2 files, follows an existing pattern, acceptance criteria are explicit and
|
||||
testable locally.
|
||||
- 5: 3–6 files, or one open question.
|
||||
- 1–3: a new subsystem, an undecided design, or work outside the repo.
|
||||
- `security`:
|
||||
- 9–10: exploitable now, or secrets or credentials are exposed.
|
||||
- 5: a hardening or defence-in-depth gap.
|
||||
- 1–3: tangential to security.
|
||||
- `important`:
|
||||
- 9–10: high priority, or blocks several issues, or on the active milestone, or user-facing.
|
||||
- 5: useful, with no dependents.
|
||||
- 1–3: nice to have.
|
||||
- If the repo has no priority labels or milestones, say so and score on the other factors.
|
||||
- `quick-win`: the `important` score, adjusted up for effort S and down for effort L.
|
||||
- Free-text priority: state your own 1/5/10 anchors in the brief and use the same ones in every
|
||||
batch.
|
||||
|
||||
**Caps**
|
||||
- Score at most 4 for an issue that is only a decision, can only be done by a human, or whose
|
||||
acceptance needs an action outside the repo. Flag it as well.
|
||||
- Score at most 3 for an issue that is stale (no longer matches the code).
|
||||
|
||||
**Return**, one block per issue:
|
||||
`#N | score | evidence (≤3 bullets, file:line) | effort S/M/L | files | risks | status valid/stale/partial | flags`
|
||||
|
||||
Merge the results. Sort by score and break ties on effort. If one batch's scores look uniformly
|
||||
off-scale compared with the others, re-check two of its issues against the rubric before
|
||||
trusting it.
|
||||
|
||||
## 4. Present the shortlist and let me pick
|
||||
|
||||
**Table**: the top 5.
|
||||
|
||||
| Rank | Issue | Score | Effort | Why | Risks / flags |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
**Below the table**
|
||||
- Your top pick, with two sentences of rationale.
|
||||
- Any stale or partly done issues you found. Only list them; do not close or comment on them.
|
||||
|
||||
**Ask me** with AskUserQuestion. "Other" lets me name any number.
|
||||
- 4 or more candidates: offer the top 4, the recommended one first and marked "(Recommended)".
|
||||
- 2–3 candidates: offer them all.
|
||||
- 1 candidate: ask yes or no.
|
||||
|
||||
Stop until I answer.
|
||||
|
||||
**If I name something outside the shortlist**
|
||||
- A PR, a closed issue, or a number that doesn't exist: say so and ask again.
|
||||
- An issue that was excluded or not scored: say why first, then go on to step 5 with it.
|
||||
|
||||
## 5. Validate the pick and plan (subagents in parallel)
|
||||
|
||||
Brief these subagents with the issue number and the relevant paths, not your conclusions.
|
||||
|
||||
- **Validation**
|
||||
- Does the issue still match the repo?
|
||||
- Do its body and comments agree with each other and with the linked decisions or ADRs?
|
||||
- Is anything it relies on missing?
|
||||
- Can each acceptance criterion be tested locally?
|
||||
- Return each finding tagged `contradiction`, `stale`, `missing`, or `untestable`.
|
||||
- **Solution options**
|
||||
- Give 2–3 concrete approaches that follow the repo's conventions and existing patterns.
|
||||
- Return each as `approach | files | tradeoff | fit`.
|
||||
- **External facts** (only if the issue depends on a library, tool, or API)
|
||||
- Verify the behaviour from primary sources, using Context7 for library docs.
|
||||
- Experiments are allowed only inside the scratchpad, and must not install anything globally.
|
||||
- Mark each claim as verified or inferred.
|
||||
|
||||
**Stop instead of planning** if:
|
||||
- the issue contradicts a recorded decision, or
|
||||
- no viable approach exists without a design decision that was never made.
|
||||
|
||||
Say which applies. A choice *between* viable approaches is not a reason to stop: put it under open
|
||||
decisions instead.
|
||||
|
||||
**The plan** is written so `/ship` can run it as is:
|
||||
|
||||
1. `Issue: #N <title>`. The PR must close it.
|
||||
2. What the issue asks, and what validation found.
|
||||
3. The recommended approach and its main tradeoff. Give each alternative in one line.
|
||||
4. The steps: the files to change, in order.
|
||||
5. Verification: the tests and checks, and what can't be verified locally.
|
||||
6. Human steps: acceptance criteria that need an action outside the repo (e.g. filing an upstream
|
||||
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.
|
||||
@@ -0,0 +1,35 @@
|
||||
name: plan
|
||||
version: 0.1.0
|
||||
description: Turning a ticket or idea into a validated, researched spec and agent-ready tickets, with the user in the loop; stops before implementation.
|
||||
author:
|
||||
name: Mortis
|
||||
url: https://git.rkdr.net/Mortis/
|
||||
license: MIT
|
||||
homepage: https://git.rkdr.net/Mortis/Holocron/src/branch/main/plugins/plan
|
||||
repository: https://git.rkdr.net/Mortis/Holocron/src/branch/main/plugins/plan
|
||||
keywords:
|
||||
- planning
|
||||
- spec
|
||||
- tickets
|
||||
- research
|
||||
- grilling
|
||||
|
||||
# Constrains what .apm/ may contain: instructions, skill, hybrid, or prompts
|
||||
type: hybrid
|
||||
|
||||
# Which agent platforms to deploy to.
|
||||
# Resolution order: --target flag > this field > auto-detect from filesystem.
|
||||
# Accepted values: agent-skills, antigravity, claude, codex, copilot, cursor, gemini, grok-build, kiro, opencode, windsurf
|
||||
targets:
|
||||
- claude
|
||||
- copilot
|
||||
- codex
|
||||
|
||||
includes: auto
|
||||
|
||||
dependencies:
|
||||
apm: []
|
||||
mcp: []
|
||||
devDependencies:
|
||||
apm: []
|
||||
scripts: {}
|
||||
@@ -0,0 +1,40 @@
|
||||
# plan plugin — outline
|
||||
|
||||
Status: outline only. This is the maintainer's intent for the plugin, captured before any design or
|
||||
grilling. Nothing below is built yet except the `next` prompt, which is the existing personal
|
||||
`/next` command moved into the plugin unchanged.
|
||||
|
||||
## Purpose
|
||||
|
||||
Cover picking up a new ticket or idea and turning it into a spec and a ticket breakdown that
|
||||
agents further down the chain (planning or implementation) can act on with the least extra
|
||||
context gathering.
|
||||
|
||||
The goal is to optimise:
|
||||
|
||||
- the ticket creation process;
|
||||
- context management and agent instructions for downstream agents, including the context and
|
||||
instructions written into issues;
|
||||
- reuse of the context that already exists (repo, tracker, docs) and of online sources.
|
||||
|
||||
## Sources to consult
|
||||
|
||||
- **The repo and its context**: current practices, rules, functionality, patterns and
|
||||
conventions.
|
||||
- **The internet and other sources**: tools, documentation, best practices, examples and
|
||||
standards.
|
||||
|
||||
## Interaction flow
|
||||
|
||||
1. **Validate the ticket or idea.** Verify it before any grilling. If it does not hold up, stop.
|
||||
2. **Initial grilling**, only if required, to explore the ticket's or idea's intention.
|
||||
3. **Research** in the repo and online.
|
||||
4. **Offer a plan** with options, considerations, recommendations, impact and expected results.
|
||||
5. **Agreement.** The user either agrees or needs more grilling before agreeing.
|
||||
6. **Write the spec** as an epic or a feature.
|
||||
7. **Propose a breakdown** of the spec into tickets.
|
||||
|
||||
## What ships today
|
||||
|
||||
- `.apm/prompts/next.prompt.md` — the `/next` command: rank open issues by a metric, let the
|
||||
user pick one, validate it and present a plan. Read-only; building happens through `/ship`.
|
||||
Reference in new issue
Block a user