Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions plugins/aidd-dev/CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai

| Group | File | Description |
|-------|------|---|
| `actions` | [01-gather.md](skills/01-plan/actions/01-gather.md) | - |
| `actions` | [01-capture.md](skills/01-plan/actions/01-capture.md) | - |
| `actions` | [02-explore.md](skills/01-plan/actions/02-explore.md) | - |
| `actions` | [03-wireframe.md](skills/01-plan/actions/03-wireframe.md) | - |
| `actions` | [04-plan.md](skills/01-plan/actions/04-plan.md) | - |
| `actions` | [03-conclude.md](skills/01-plan/actions/03-conclude.md) | - |
| `assets` | [phase-template.md](skills/01-plan/assets/phase-template.md) | - |
| `assets` | [plan-template.md](skills/01-plan/assets/plan-template.md) | - |
| `references` | [plan-status.md](skills/01-plan/references/plan-status.md) | `Plan lifecycle status field - values, meaning, who writes each, and when.` |
| `references` | [findings.md](skills/01-plan/references/findings.md) | - |
| `references` | [plan-checks.md](skills/01-plan/references/plan-checks.md) | - |
| `references` | [wireframe-conventions.md](skills/01-plan/references/wireframe-conventions.md) | - |
| `-` | [SKILL.md](skills/01-plan/SKILL.md) | `Turn a request, ticket, or file into a phased implementation plan. Use to plan a feature before building, or to turn a ticket into phases. Do NOT use to write code or review a diff.` |
| `-` | [SKILL.md](skills/01-plan/SKILL.md) | `Turn a request, ticket, or file into a phased implementation plan. Use to plan a feature before building, or to turn a ticket into phases. Not for writing code or reviewing a diff.` |

#### `skills/02-implement`

Expand Down
50 changes: 26 additions & 24 deletions plugins/aidd-dev/skills/01-plan/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
name: 01-plan
description: Turn a request, ticket, or file into a phased implementation plan. Use to plan a feature before building, or to turn a ticket into phases. Do NOT use to write code or review a diff.
description: Turn a request, ticket, or file into a phased implementation plan. Use to plan a feature before building, or to turn a ticket into phases. Not for writing code or reviewing a diff.
argument-hint: request | ticket | file
---

# Skill: plan

Turn a gathered source into an implementation plan and its phase files. Never writes code.
# Plan

## Actions

| # | Action | Role | Input |
| --- | ----------- | ---------------------------------------------------- | -------------------------- |
| 01 | `gather` | Collect and restate the source | user request |
| 02 | `explore` | Read the codebase for projection, rules, feasibility | gathered source |
| 03 | `wireframe` | Sketch a screen at low fidelity, frontend only | source + explore context |
| 04 | `plan` | Break into phases, write the plan and phase files | explore output + wireframe |

Run them in order, `01 → 04`. The plan is the culmination. Skip `03` when there is no UI.
Before running an action, read its file in `actions/`, not only the table or assets.

## References

- `references/wireframe-conventions.md`: how to draw the ASCII wireframe a screen needs.
- `references/plan-status.md`: the plan lifecycle `status` values and who writes each.

## Assets

- `assets/plan-template.md`: the `plan.md` scaffold.
- `assets/phase-template.md`: the per-phase scaffold.
```mermaid
flowchart LR
capture --> explore
explore -->|"the code opens a question"| explore
explore -->|"a decision blocks"| user((user answers))
user --> explore
explore -->|"nothing blocks"| conclude
conclude -->|"correct: revise, ask again"| conclude
conclude -->|"explore more"| explore
conclude -->|"approve"| done((done))
```

Read an action's file, then do what it says.

| Action | File |
| ------ | ---- |
| capture | [actions/01-capture.md](actions/01-capture.md) |
| explore | [actions/02-explore.md](actions/02-explore.md) |
| conclude | [actions/03-conclude.md](actions/03-conclude.md) |

## Transversal rules

- Speak only to ask or to give the final reply; otherwise call tools.
- Plan only: the plan files are the only files you write.
17 changes: 17 additions & 0 deletions plugins/aidd-dev/skills/01-plan/actions/01-capture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 01 - Capture

Settle what the plan rests on.

## Input

The user's request.

## Process

1. With no source to plan from (file, ticket, or text), ask for one and stop.
2. Read it, noting what it asks and the constraints it states.
3. Read [explore](02-explore.md).

## Output

What was understood, kept for explore, with the source's reference (path, ticket id, or text).
21 changes: 0 additions & 21 deletions plugins/aidd-dev/skills/01-plan/actions/01-gather.md

This file was deleted.

25 changes: 13 additions & 12 deletions plugins/aidd-dev/skills/01-plan/actions/02-explore.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# 02 - Explore

Read the codebase to ground the plan: what it touches, which rules apply, what is feasible. Read only.
Ground the plan in the codebase.

## Input

The gathered source from `01-gather`.
The source from capture.

## Output
## Process

The architecture projection (files to modify, create, delete, each with a one-line reason), the project rules that apply (each justified in one line, or none), the feasibility checks (each source consulted, a doc URL or an in-repo file, and what it settled), and the risks.
1. Read the code the source touches and gather the [findings](../references/findings.md).
2. Take stock: what each finding establishes with its evidence, and what is missing.
3. Decide what comes next:
- If something is missing, go back to step 1 with it.
- If only the user can settle it and it blocks the plan, ask and wait, then go back to step 1.
- Otherwise read [conclude](03-conclude.md).

## Process
## Output

1. **Read.** Explore the code the source touches. Build the projection and list the infrastructure assumptions.
2. **Check.** Verify against the official docs or the in-repo code. Keep each source and what it settled. Flag blockers and risks.
3. **Select.** Keep the project rules that apply to the projection.
The findings: files to modify, create, and delete, the impact, the rules, and the docs checked.

## Test
## Rules

- The projection lists files to modify, create, and delete, each with a one-line reason.
- Every feasibility check records its source and what it settled.
- The applicable rules are identified and justified, or none apply.
- Name a file to modify or delete only after reading it.
27 changes: 27 additions & 0 deletions plugins/aidd-dev/skills/01-plan/actions/03-conclude.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 03 - Conclude

Produce the approved plan.

## Input

The explored source.

## Process

1. Split the work into phases, each shipping and verifying on its own, the first one a safety net when the findings say so.
2. Give each file to modify, create, or delete, and each impact, to the phase that owns it, losing none.
- A phase that builds a screen layout (page, view, panel) draws its Wireframe per [wireframe conventions](../references/wireframe-conventions.md); other phases omit the section.
3. Write the feature folder in the project's `aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>_<feature-slug>/`, or in the source's own folder:
- `plan.md` from the [plan template](../assets/plan-template.md).
- One `phase-<n>.md` per phase from the [phase template](../assets/phase-template.md).
4. From the project root, run the skill's `scripts/validate-plan.cjs` with node on the feature folder, and fix what it reports until it prints `VALID`.
5. Have a read-only subagent, independent of its author, check the plan against [plan-checks](../references/plan-checks.md), once.
6. Reply with only the folder path, the ✗ lines, and "Approve, correct, or explore more?".

## Output

The feature folder with `plan.md` and its phase files, then the ✗ lines.

## Rules

- Delete every comment.
20 changes: 0 additions & 20 deletions plugins/aidd-dev/skills/01-plan/actions/03-wireframe.md

This file was deleted.

28 changes: 0 additions & 28 deletions plugins/aidd-dev/skills/01-plan/actions/04-plan.md

This file was deleted.

54 changes: 16 additions & 38 deletions plugins/aidd-dev/skills/01-plan/assets/phase-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
status: pending
---

<!-- Fill or omit these sections; never add, rename, or reorder one. -->
<!-- Replace every `{{...}}` with its content, or omit the section, and delete every comment; never add, rename, or reorder one. -->

# Instruction: {title}
# Instruction: {{title}}

## Architecture projection

Expand All @@ -14,59 +14,37 @@ status: pending
.
```

## User Journey

```mermaid
flowchart TD
A[TODO]
```

## Test Scope

<!-- Required for every phase. Keep Setup, Happy path, any qualifying Edge cases, and any required Teardown in this one journey. -->
<!-- Required for every phase. One edge case row per known trigger; Teardown only when a scenario changes state. -->

```mermaid
---
title: Test scope
---
journey
%% Every task has exactly one actor: browser, api, cli, or system.
section Setup
%% Deterministic preconditions and fixtures. Its channel may differ.
{prepare fixture} => {ready state}: 5: {channel}
section Happy path
%% Required. Every task states action => observable outcome. All tasks use the same channel.
{action} => {observable expected outcome}: 5: {channel}
%% Add one named section per edge case only when its trigger and expected outcome are known.
section Edge case - {name}
%% Every task names trigger => action => observable outcome. All tasks use the same channel.
{trigger} => {action} => {observable expected outcome}: 1: {channel}
%% Include only when a scenario changes state. Its channel may differ.
section Teardown
{cleanup or reset action} => {baseline restored}: 5: {channel}
```
| Scenario | Action | Observable outcome | Actor |
| ------------ | ----------------------- | -------------------- | ------------------------------- |
| Setup | {{prepare fixture}} | {{ready state}} | {{browser, api, cli, or system}} |
| Happy path | {{action}} | {{observable outcome}} | {{browser, api, cli, or system}} |
| Edge case | {{trigger and action}} | {{observable outcome}} | {{browser, api, cli, or system}} |
| Teardown | {{cleanup}} | {{baseline restored}} | {{browser, api, cli, or system}} |

## Wireframe

<!-- UI phase only. No UI => omit the section, don't invent one. -->
<!-- UI phase only, drawn per [wireframe conventions](../references/wireframe-conventions.md); omit the section otherwise. -->

```txt
{the confirmed wireframe}
{{the confirmed wireframe}}
```

## Tasks to do

### `{number})` {name}
### `{{number}})` {{name}}

> {straight to point goal}
> {{straight to point goal}}

1. {ultra concise step}
...
1. {{ultra concise step}}

## Test acceptance criteria

<!-- Each criterion is an observable behavior, not a command. -->
<!-- Each row maps to a task of this phase; each criterion is an observable behavior. -->

| Task | Acceptance criteria |
| ---- | -------------------------------- |
| 1... | {observable behavior of the task} |
| 1... | {{observable behavior of the task}} |
51 changes: 32 additions & 19 deletions plugins/aidd-dev/skills/01-plan/assets/plan-template.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
---
objective: "{What must be true when done. One sentence.}"
objective: "{{What must be true when done. One sentence.}}"
status: pending
---

<!-- Fill or omit these sections; never add, rename, or reorder one. -->
<!-- Replace every `{{...}}` with its content, or omit the section, and delete every comment; never add, rename, or reorder one. -->

# Plan: {title}
# Plan: {{title}}

## Overview

| Field | Value |
| ---------- | ----------------------- |
| **Goal** | {one-line summary} |
| **Source** | {file, ticket, or text} |
Source: {{file, ticket, or text}}

## Phases

| # | Phase | File |
| --- | ------------ | ---------------------------- |
| 1 | {phase-name} | [`phase-1.md`](./phase-1.md) |
| 2 | {phase-name} | [`phase-2.md`](./phase-2.md) |
<!-- Depends on lists the earlier phase numbers whose output, written files, or shared validation resources this phase needs, or `none`. -->

| # | Phase | File | Depends on |
| --- | ------------ | ---------------------------- | ---------- |
| 1 | {{phase-name}} | [`phase-1.md`](./phase-1.md) | none |
| 2 | {{phase-name}} | [`phase-2.md`](./phase-2.md) | {{earlier phase numbers, or `none`}} |

## External sources

<!-- URLs of the docs consulted, or a single `none` row. -->

| URL | What it settled |
| ----- | ----------------- |
| {{url}} | {{what it settled}} |

## Impact

<!-- Documentation always; the other categories when the findings say they apply. -->

| Category | Verdict and evidence | Handled in |
| -------------------------------------------------- | -------------------- | ------------------ |
| {{runtime, regression, architecture, documentation}} | {{verdict and its evidence, or `none`}} | {{phase, or `none`}} |

## Resources
## Rules

<!-- External sources only (URLs, docs), not code files. Omit if none consulted. -->
<!-- The project's own rules (memory, conventions) that govern this feature. Omit if none. -->

| Source | Verified |
| ------ | ----------------- |
| {url} | {what it settled} |
| Rule | Why it applies |
| ------ | -------------- |
| {{rule}} | {{why}} |

## Decisions

<!-- Architecture-magnitude only, one you'd regret reversing. Omit if none qualify. -->

| Decision | Why |
| ---------- | ----- |
| {decision} | {why} |
| {{decision}} | {{why}} |
Loading
Loading