diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1a6128fb..90b4adb5 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -31,7 +31,7 @@ { "name": "aidd-pm", "source": "./plugins/aidd-pm", - "description": "Product management: ticket-info, user-stories-create, prd, spec", + "description": "Product management: ticket-info, user-stories, prd, spec", "strict": true, "recommended": true }, diff --git a/README.md b/README.md index 44c32135..f0a9cbbf 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

🇫🇷 The first French open-source framework for AI-driven development.

- 7 plugins · 41 skills · 2 agents · MIT + 7 plugins · 40 skills · 2 agents · MIT

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) @@ -189,7 +189,7 @@ Commits, pull / merge requests, release tags, issue creation. ### 📋 [aidd-pm](plugins/aidd-pm/README.md) -`5 skills` · stable +`4 skills` · stable Ticket info, user stories, PRD, spec drafting. diff --git a/UPGRADE.md b/UPGRADE.md index 509ece6e..941f0bf6 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -95,7 +95,7 @@ Invocation in v4 is `plugin:NN-action`. Where a column says "sub-flow", the old |---|---| | `/brainstorm` | `aidd-refine:01-brainstorm` | | `/challenge` | `aidd-refine:02-challenge` | -| `/create_user_stories` | `aidd-pm:02-user-stories-create` | +| `/create_user_stories` | `aidd-pm:02-user-stories` | | `/ticket_info` | `aidd-pm:01-ticket-info` | ### plan diff --git a/aidd_docs/README.md b/aidd_docs/README.md index 166a8e4d..d4de7c2a 100644 --- a/aidd_docs/README.md +++ b/aidd_docs/README.md @@ -38,7 +38,7 @@ Skills are grouped into plugins by domain. Install only the plugins you need. | ----------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------- | | aidd-context | Bootstrap, project init, generation of context artifacts (skills, agents, rules, commands, hooks, plugins, marketplaces), mermaid diagrams, learn, discovery | `02-project-memory`, `03-context-generate`, `09-mermaid` | | aidd-refine | Meta-cognition: brainstorm, challenge prior work, condensed communication mode | `01-brainstorm`, `02-challenge`, `03-condense` | -| aidd-pm | Product management: ticket info, user stories, PRD, spec | `01-ticket-info`, `02-user-stories-create`, `03-prd`, `04-spec` | +| aidd-pm | Product management: ticket info, user stories, PRD, spec | `01-ticket-info`, `02-user-stories`, `03-prd`, `04-spec` | | aidd-dev | Code transformation: Dev SDLC orchestrator, plan, implement, assert, audit, review, test, refactor, debug, for-sure | `00-sdlc`, `01-plan`, `02-implement`, `05-review`, `06-test` | | aidd-vcs | VCS workflows: commit, pull/merge request, release tag, issue creation | `01-commit`, `02-pull-request`, `04-issue-create` | | aidd-orchestrator | Async orchestration of the SDLC on labeled issues (optional, extra) | `00-async-dev` (router with setup / run / review sub-flows) | @@ -102,7 +102,7 @@ AIDD is delivered as a plugin marketplace. Pick what you need; do not install ev | aidd-refine | 01-brainstorm, 02-challenge, 03-condense, 04-shadow-areas, 05-fact-check | | aidd-dev | 00-sdlc, 01-plan, 02-implement, 03-assert, 04-audit, 05-review, 06-test, 07-refactor, 08-debug, 09-for-sure | | aidd-vcs | 01-commit, 02-pull-request, 03-release-tag, 04-issue-create | -| aidd-pm | 01-ticket-info, 02-user-stories-create, 03-prd, 04-spec | +| aidd-pm | 01-ticket-info, 02-user-stories, 03-prd, 04-spec | Each plugin is independently installable; install incrementally. Smaller surface, fewer triggers competing. @@ -112,7 +112,7 @@ A typical change cycles through skills from several plugins. The order below is 1. **Bootstrap** (only for a brand-new project): `aidd-context:01-bootstrap` imagines the stack and architecture, comparing candidate stacks and writing an `INSTALL.md`. Skip this step on an existing project. 2. **Project init** (once per project, re-runnable to refresh): `aidd-context:02-project-memory` scaffolds `aidd_docs/`, the memory bank, and the AI context files for the tools you use. Re-running later refreshes the scaffold without overwriting your customizations. -3. **Frame the request**: `aidd-refine:01-brainstorm` to clarify, `aidd-pm:01-ticket-info` to pull tracker data, `aidd-pm:02-user-stories-create` and `aidd-pm:03-prd` or `aidd-pm:04-spec` to formalize scope. +3. **Frame the request**: `aidd-refine:01-brainstorm` to clarify, `aidd-pm:01-ticket-info` to pull tracker data, `aidd-pm:02-user-stories` and `aidd-pm:03-prd` or `aidd-pm:04-spec` to formalize scope. 4. **Plan**: `aidd-dev:01-plan` produces the technical plan, component behavior model, or design-image extraction. 5. **Implement and assert**: `aidd-dev:02-implement` writes code against the plan; `aidd-dev:03-assert` verifies the result. 6. **Review**: `aidd-dev:05-review` for code and functional review; `aidd-refine:02-challenge` to stress-test the result. diff --git a/aidd_docs/tasks/2026_06/2026_06_29-memory-duplication-diagnosis.md b/aidd_docs/tasks/2026_06/2026_06_29-memory-duplication-diagnosis.md new file mode 100644 index 00000000..fb56ee00 --- /dev/null +++ b/aidd_docs/tasks/2026_06/2026_06_29-memory-duplication-diagnosis.md @@ -0,0 +1,145 @@ +# Diagnostic — duplications mémoire (skill 02-project-memory) + +> Statut : diagnostic read-only. Aucun fichier de skill modifié. Ce doc = base de validation avant fix. + +## Contexte + +Retour Alex : la génération de mémoire produit des duplications, et Codex 5.5 +n'arrive pas à l'initialiser. Deux symptômes investigués séparément. + +## Symptôme A — Codex ne peut pas init (le `@`) + +**Vérifié, puis rétracté en partie.** + +- Le `@` n'est PAS le standard Agent Skills. Standard = chemin relatif depuis + la racine du skill (`reference/guide.md`, lien md `[x](x)`). Le `@` = import + CLAUDE.md. Source : docs Anthropic + agentskills.io. +- **`aidd framework build --target codex` CONVERTIT** `@../x` → un lien `x` vers `../x` + (lien md, `@` retiré). → Codex reçoit des chemins résolvables. OK. +- **`aidd plugin install ` + `aidd ai install`** copie le `@` + **verbatim** → non résolvable sur Codex. +- Donc : bug réel **seulement** si un user installe la source brute sur Codex. + Inconnu : quel chemin un vrai user Codex emprunte (marketplace/build vs brut). +- Note : mes premiers `diff`/`grep` passés par rtk ont renvoyé de faux + "identique"/"0 match". rtk non fiable pour diff/grep ici. + +**Ouvert** : tracer le chemin de distribution Codex réel. + +## Symptôme B — duplications (cause trouvée) + +Duplication = **structurelle**, indépendante de Codex et du `@`. Trois facteurs +cumulés : + +1. **Sections de templates qui se chevauchent** : le même fait (framework, + zones du code, commandes de test…) est demandé par 2+ templates. +2. **Fill parallèle aveugle** (action `03-generate-memory`, étape 6 : "For each + selected template, in parallel") : chaque template rempli indépendamment, + sans voir les autres → le chevauchement devient duplication littérale, + garantie. C'est le multiplicateur. +3. **Aucune règle "un fait, un propriétaire"** : les Transversal rules couvrent + code→mémoire, jamais mémoire↔mémoire. Review 04 = "consistency", sans + dominance et sautable. + +## Méthode — comment trouver le niveau fin + +Le grain n'est ni le fichier ni la section : c'est le **fait demandé** (chaque +``). + +1. Inventaire des faits : extraire chaque `<...>` de chaque template. +2. Clé canonique : étiqueter par le fait réel (framework, entry point, + commande de test…), pas par le mot de la section. +3. Site de duplication = un fait canonique demandé par ≥2 templates. +4. Pondérer par proba de co-déclenchement (core fire toujours → core↔core + garanti). +5. Assigner un propriétaire unique (dominance). + +## Tension de design à respecter + +Le design existant a une philosophie assumée : chaque fichier mémoire = un +concern **auto-suffisant**, lisible seul. Un pointer mémoire↔mémoire est un +principe neuf qui se bat contre ça. On ne l'applique que quand le gain dépasse +la perte de lisibilité standalone. Re-nommer un framework (un mot) dans 2-3 +fichiers coûte moins qu'un pointer : on garde la mini-dup. + +## Audit single-responsibility + +| Concern | Responsabilité | Verdict | +| --- | --- | --- | +| `integration` | internal + external | **double** → reframe (voir plan #3) | +| `architecture` vs `codebase-map` | shape vs layout, mais Structure≡Areas | overlap → drop Structure | +| `deployment` vs `infra` | ship/run vs provisioning, "environments" dans les 2 | overlap → scope | +| `deployment` | pipeline+env+release+monitoring | large mais cohérent (ship/run) | +| `mobile`/`desktop` | incluent build&release ≡ `deployment` | overlap mineur, abandonné | +| autres (vcs, data, testing, auth, cli…) | single net | OK | + +Note écosystème (hors scope) : `integration.md` est gaté par la capability +`api`. Mais consommer des services externes n'exige pas d'exposer une API. Gate +douteux → à revoir dans `capability-signals`, séparément. + +## Table de dominance — réduite haute-valeur + +### À appliquer (gain net) + +| # | Fait | Action | Type | +| --- | --- | --- | --- | +| 2 | Zones top-level + responsabilité | `codebase-map.Areas` possède → drop `architecture.## Structure` | drop | +| 3 | Intégrations | reframe `integration` en intégrations externes (voir plan) | reframe | +| 4 | Libs de domaine | `architecture.Stack` = macro only, ne re-liste pas une lib déjà possédée par une capability | scope (inversé) | +| 8 | "Où routes définies" | `api.Style` = serveur/RPC ; `navigation.Routing` = client | scope | +| 12 | CI/CD vs provisioning | `deployment.Pipeline` = CI/CD ; `infra.Tooling` = provisioning | scope | + +### Abandonnés (pointer < dup, casse l'auto-suffisance) + +`#1` framework (un mot), `#5` commandes (gate vs itération, buts distincts), +`#9` authz, `#10` auth socket, `#11` environnements, `#13` release/packaging, +`#14` SDK externe. + +## Le vrai multiplicateur : le fill parallèle aveugle + +Même templates parfaits, le fill parallèle (`03.6`) re-écrit un même fait dans +chaque template dont le placeholder matche. **C'est ici que se gagne le gros de +la dédup.** + +## Plan d'exécution + +### Templates + +1. `core/architecture.md` — **drop `## Structure`** (modules + entry point). + Possédé par `codebase-map`. +2. `core/architecture.md` — **Stack, bullet 2** → "libs transversales only ; + une lib couverte par une capability (ORM, runner, form lib) vit là-bas". +3. `api/integration.md` — **reframer en intégrations externes** (responsabilité + unique). Le fichier mélange Internal (flux entre modules → appartient à + `architecture.How it fits together`) + External (services tiers). Fix : + - intro : "internal communication and external services" → "how this system + integrates with external/third-party services" ; + - drop `## Internal` ; + - garder `## External services` + diagramme (carte des intégrations externes). + Ne pas juste couper Internal (sinon fichier mal nommé à une section) — c'est + un reframe de responsabilité. +4. `api/api.md` — **Style, bullet 1** → préfixer "Server/RPC surface" + "server + routes". +5. `ui/navigation.md` — **Routing, bullet 1** → préfixer "Client routing" + + "client routes". + +### Actions / règles + +6. `actions/03-generate-memory.md` — **étape 6** : retirer "in parallel" ; + "For each selected template (en tenant compte des faits déjà capturés par les + templates précédents, pour ne pas redire un fait)". +7. `SKILL.md` transversal + `actions/04-review-memory.md` étape 2 : + - SKILL.md : "Each fact lives in exactly one memory file ; another file + references it, never restates it." (uniquement pour les faits de la table + réduite) + - 04 : check "no fact duplicated across files ; si dupliqué, garder dans le + fichier propriétaire, drop la copie." + +### Validation post-édit + +- `aidd framework build --target codex` passe sans erreur. +- Relire les templates touchés : chacun reste lisible seul. + +### Hors scope (suivi séparé) + +- Symptôme A (distribution Codex `@` brut vs build) : tracer le chemin réel. +- Gate de `integration` sous capability `api` : à revoir dans capability-signals. diff --git a/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/empirical-results.md b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/empirical-results.md new file mode 100644 index 00000000..7d3d4b19 --- /dev/null +++ b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/empirical-results.md @@ -0,0 +1,51 @@ +# Preuve empirique — duplication mémoire (avant décision) + +Fixture minimal (`scratchpad/fixture`) : API Node/Express + Knex/sqlite + Jest. +Déclenche core + api + database. Fill rejoué à la main de deux façons : + +- **run actuel** : fill aveugle (chaque template rempli indépendamment, comme + l'action `03.6` le dit aujourd'hui). +- **run fixé** : templates haut niveau inchangés + logique de propriétaire + (architecture sans Structure & sans libs de domaine ; codebase-map possède + zones+entry ; integration reframé externe ; "un fait = un fichier"). + +## Résultat (comptage déterministe, substring) + +| Métrique | run actuel | run fixé | +| --- | --- | --- | +| Faits dupliqués (≥2 fichiers) | 7 | 6 | +| Sites de restatement | 23 | 15 (−35 %) | +| Entry point | 3 fichiers (quasi-verbatim) | 1 | +| Routes `src/routes` | 4 fichiers | 2 (accepté) | + +## Lecture + +- **Bug confirmé** : fill aveugle → 7 faits dupliqués, jusqu'à 4 fichiers + chacun. Pires : entry point + routes quasi-verbatim ; `architecture.Stack` + aimant (Express, Knex, Jest re-listés). +- **Fix efficace sur le haut-sévérité** : entry point 3→1, paires + quasi-verbatim architecture↔codebase-map supprimées, Internal+diagramme + d'integration supprimés. Résiduel = mini-dups consciemment acceptés + (framework, npm test, users). +- **Templates restés haut niveau** : dédup faite par action/règle, zéro + métadonnée dans les templates. Conforme à la consigne. + +## Trouvailles + +1. **Le comptage substring sur-compte** (ex: "Jest" comme label de zone ≠ vraie + dup). → un script de dédup naïf ne suffit pas ; le check doit être + **sémantique** (review agent), pas un grep. +2. **`integration` sur projet sans service externe → quasi vide** ("None"). + Confirme un gate douteux : integration ne devrait pas se déclencher sans + service externe. → fix séparé dans `capability-signals`. +3. La dédup résiduelle dépend du comportement du fill agent suivant + l'action+règle. Pas garantissable statiquement → la règle doit être + **explicite et forte**, et la review 04 doit lister des points de dédup + concrets (fact → propriétaire). + +## Conséquence sur le plan + +- Check 04 = review sémantique forte (pas un script), avec checklist + fact→propriétaire ; option : déléguer à un checker subagent indépendant + (contexte frais), formulé plugin-agnostique. +- Ajouter au suivi séparé : gate `integration` dans `capability-signals`. diff --git a/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-1.md b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-1.md new file mode 100644 index 00000000..249dd403 --- /dev/null +++ b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-1.md @@ -0,0 +1,61 @@ +--- +status: pending +--- + +# Instruction: Templates à responsabilité unique + +Part of [`plan.md`](./plan.md). + +## Architecture projection + + + +```txt +assets/templates/memory/ +├── core/ +│ └── architecture.md 🔁 drop ## Structure ; Stack = libs transversales only +├── api/ +│ ├── api.md 🔁 Style = surface serveur/RPC +│ └── integration.md 🔁 reframe en intégrations externes (drop ## Internal) +└── ui/ + └── navigation.md 🔁 Routing = client +``` + +## Tasks to do + +### `1)` architecture.md — drop Structure + Stack macro-only + +> `codebase-map` possède zones + entry point ; `architecture` ne les redit plus. + +1. Supprimer la section `## Structure` (les 2 bullets : modules/layers + entry point). +2. Stack, bullet 2 : remplacer `` par une formulation "libs transversales uniquement ; une lib couverte par une capability (ORM, test runner, form lib) vit dans son concern, pas ici". + +### `2)` integration.md — reframe en intégrations externes + +> Responsabilité unique : comment ce système s'intègre à des services tiers. Le flux interne appartient à `architecture.How it fits together`. + +1. Intro : remplacer "How this system talks to others: internal communication and external services." par "How this system integrates with external/third-party services." +2. Supprimer la section `## Internal`. +3. Conserver `## External services` + le diagramme mermaid (carte des intégrations externes). + +### `3)` api.md — Style = serveur/RPC + +> Lever l'ambiguïté "où sont définies les routes" avec navigation. + +1. Style, bullet 1 : préfixer la responsabilité serveur — "Server/RPC surface: REST, GraphQL, or RPC, the framework, where server routes are defined". + +### `4)` navigation.md — Routing = client + +> Pendant client de api.md. + +1. Routing, bullet 1 : préfixer "Client routing: the router and where client routes are defined". + +## Test acceptance criteria + +| Task | Acceptance criteria | +| ---- | ----------------------------------------------------------------------------------------------------- | +| 1 | `architecture.md` n'a plus de `## Structure` ; Stack bullet 2 ne demande plus les libs de domaine. | +| 2 | `integration.md` n'a plus de `## Internal` ; intro parle d'intégrations externes ; External + diag présents. | +| 3 | `api.md` Style mentionne "server" / serveur. | +| 4 | `navigation.md` Routing mentionne "client". | +| 1-4 | `aidd framework build --target codex` passe sans erreur ; chaque template reste lisible seul. | diff --git a/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-2.md b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-2.md new file mode 100644 index 00000000..c7430e20 --- /dev/null +++ b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/phase-2.md @@ -0,0 +1,65 @@ +--- +status: pending +--- + +# Instruction: Fill non aveugle + règle dédup + +Part of [`plan.md`](./plan.md). + +## Architecture projection + + + +```txt +. +├── SKILL.md 🔁 transversal rule "un fait = un fichier" +└── actions/ + ├── 03-generate-memory.md 🔁 étape 6 : fill non aveugle + └── 04-review-memory.md 🔁 check dédup cross-fichiers +``` + +## User Journey + +```mermaid +flowchart TD + A[03 Fill] -->|tient compte des faits déjà écrits| B[un fait écrit une fois] + B --> C[04 Review] + C -->|check: aucun fait dupliqué| D{dup trouvée ?} + D -->|oui| E[garder dans le propriétaire, drop la copie] + D -->|non| F[clean] +``` + +## Tasks to do + +### `1)` 03-generate-memory.md — casser le fill aveugle + +> Le multiplicateur de duplication. Le fill ne doit plus être aveugle aux autres templates. + +1. Étape 6 (`**Fill.**`) : retirer "in parallel". +2. Reformuler l'amorce pour que chaque template soit rempli en tenant compte des faits déjà capturés par les templates précédents, afin de ne pas redire un fait (le référencer plutôt que le recopier). + +### `2)` SKILL.md — transversal rule (forte + points explicites) + +> Étend le principe "pointer vers le code" au cross-mémoire, sans tuer l'auto-suffisance. Règle forte, avec les propriétaires nommés. + +1. Ajouter aux Transversal rules, formulé fort : "**Un fait vit dans un seul fichier mémoire.** Un autre fichier le référence, jamais ne le recopie." Suivi des points de propriété (fact → owner) : + - point d'entrée + zones top-level → `codebase-map` + - stack/framework macro → `architecture` ; une lib de domaine → son concern (ORM→database, runner→testing, form lib→forms) + - flux interne entre modules → `architecture` ; services externes → `integration` + - commandes de gate (typecheck/test/build) → `coding-assertions` + +### `3)` 04-review-memory.md — review dédup sémantique (non sautable) + +> Le check est sémantique, pas un grep (cf. preuve empirique : substring sur-compte). Forte, indépendante, avec checklist concrète. + +1. Étape 2 (`**Review.**`) : ajouter un check fort et explicite — "Lire tous les fichiers ensemble. Pour **chaque fait de la liste de propriété** (cf. transversal), vérifier qu'il vit dans un seul fichier ; toute copie ailleurs = à supprimer, en gardant le propriétaire. Juger sémantiquement, pas par correspondance de chaîne." +2. Option (formulée plugin-agnostique, sans dépendance dure à `aidd-dev`) : "Cette review peut être confiée à un checker subagent indépendant en contexte frais ; sa checklist DRY couvre déjà la dédup." (Note : `aidd-dev:checker` convient s'il est installé.) + +## Test acceptance criteria + +| Task | Acceptance criteria | +| ---- | -------------------------------------------------------------------------------------------- | +| 1 | L'étape 6 de `03` ne contient plus "in parallel" et mentionne la prise en compte des faits déjà écrits. | +| 2 | `SKILL.md` Transversal rules contient la règle forte "un fait = un fichier" + les 4 points fact→owner. | +| 3 | L'étape Review de `04` contient le check dédup sémantique (par fait de la liste de propriété) + l'option checker subagent. | +| 1-3 | `aidd framework build --target codex` passe sans erreur. | diff --git a/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/plan.md b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/plan.md new file mode 100644 index 00000000..99bbd668 --- /dev/null +++ b/aidd_docs/tasks/2026_06/2026_06_29_memory-dedup/plan.md @@ -0,0 +1,41 @@ +--- +objective: "Le memory bank généré ne duplique plus un fait entre fichiers, et le fill ne re-écrit plus un fait déjà capturé." +status: pending +--- + +# Plan: dédup des templates mémoire (02-project-memory) + +## Overview + +| Field | Value | +| ---------- | --------------------------------------------------------------------- | +| **Goal** | Supprimer la duplication cross-fichiers du memory bank : templates à responsabilité unique + fill non aveugle. | +| **Source** | `aidd_docs/tasks/2026_06/2026_06_29-memory-duplication-diagnosis.md` | + +## Phases + +| # | Phase | File | +| --- | ------------------------------ | ---------------------------- | +| 1 | Templates à responsabilité unique | [`phase-1.md`](./phase-1.md) | +| 2 | Fill non aveugle + règle dédup | [`phase-2.md`](./phase-2.md) | + +## Resources + +| Source | Verified | +| ------------------------------------------------------------ | ----------------------------------------------------------------- | +| docs Anthropic skills + agentskills.io | `@` = import CLAUDE.md, pas le standard skill (chemins relatifs) | +| `aidd framework build --target codex` (test scratchpad) | le build convertit `@../x` → un lien `x` vers `../x` ; la dup est structurelle | +| Les 22 templates `assets/templates/memory/` | matrice des faits dupliqués, table de dominance réduite | + +## Decisions + +| Decision | Why | +| ----------------------------------------------------------------- | ------------------------------------------------------------------- | +| Pas de pointer mémoire↔mémoire généralisé | casse l'auto-suffisance d'un fichier lisible seul ; gain < coût | +| `integration` reframé en intégrations externes, pas juste coupé | le fichier mélangeait 2 responsabilités (interne ≡ architecture) | +| On garde les dups mineures (framework, environnements, release) | un mot re-nommé coûte moins qu'un renvoi | +| Le vrai levier = casser le fill parallèle aveugle (03.6) | même templates parfaits, le fill aveugle re-écrit le même fait | +| Check dédup = review sémantique, pas un script grep | preuve empirique : le substring sur-compte (label de zone ≠ dup) | +| Règle dédup explicitée fort + points fact→owner | la dédup dépend du fill agent ; la règle doit être sans ambiguïté | +| Symptôme A (Codex `@` brut) hors scope | dépend du chemin de distribution réel, à tracer séparément | +| Gate `integration` (sans service externe → fichier vide) hors scope | trouvaille empirique ; fix dans `capability-signals` séparément | diff --git a/docs/CATALOG.md b/docs/CATALOG.md index 74b3212d..1e7b210e 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -56,7 +56,7 @@ Product management: ticket retrieval, user stories, PRD, spec. | Skill | Role | Actions | | ------------------------- | ---------------------------------------------------------- | -------------------------------- | | `01-ticket-info` | Retrieve and display ticket information | `01-ticket-info` | -| `02-user-stories-create` | Generate INVEST-compliant user stories | `01-create-user-stories` | +| `02-user-stories` | Prioritized, estimated INVEST user-story backlog | `01-clarify-scope`, `02-split-epic`, `03-draft-stories`, `04-estimate-impact`, `05-prioritize`, `06-sync-tracker` | | `03-prd` | Generate a structured Product Requirements Document | `01-prd` | | `04-spec` | Generate or refine a normalized project spec | `01-build`, `02-refine` | @@ -76,12 +76,13 @@ Meta-cognition: brainstorm, challenge, condense, blind-spot scan, fact-check. Version-control workflows: commit, pull/merge request, release tag, issue. -| Skill | Role | Actions | -| ------------------ | --------------------------------------------------- | ------------------- | -| `01-commit` | Create an atomic conventional commit | `01-commit` | -| `02-pull-request` | Create a draft pull or merge request | `01-pull-request` | -| `03-release-tag` | Cut a semver release with annotated tag and notes | `01-release-tag` | -| `04-issue-create` | Create an issue in the configured ticketing tool | `01-issue-create` | +| Skill | Role | Actions | +| ---------------------- | --------------------------------------------------- | ----------------------- | +| `01-commit` | Create an atomic conventional commit | `01-commit` | +| `02-pull-request` | Create a draft pull or merge request | `01-pull-request` | +| `03-release-tag` | Cut a semver release with annotated tag and notes | `01-release-tag` | +| `04-issue-create` | Create an issue in the configured ticketing tool | `01-issue-create` | +| `05-pull-request-list` | List the open pull or merge requests | `01-pull-request-list` | ## aidd-orchestrator diff --git a/plugins/aidd-context/CATALOG.md b/plugins/aidd-context/CATALOG.md index 3ce4b47f..7f5e99a8 100644 --- a/plugins/aidd-context/CATALOG.md +++ b/plugins/aidd-context/CATALOG.md @@ -49,7 +49,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [03-act.md](skills/00-onboard/actions/03-act.md) | - | | `-` | [README.md](skills/00-onboard/README.md) | - | | `references` | [journey.md](skills/00-onboard/references/journey.md) | - | -| `-` | [SKILL.md](skills/00-onboard/SKILL.md) | `Guide the user through the AIDD framework on the current project. Explain the flow in plain language and suggest the next logical step, adapted to what is already set up and which AIDD plugins are installed. Use when the user asks where to start, what to do next, how AIDD works, or to be onboarded. Not for listing every installed surface (the explore skill does that) or running a skill the user already knows they need (invoke it directly).` | +| `-` | [SKILL.md](skills/00-onboard/SKILL.md) | `Guide the user through AIDD on the current project: explain the flow and the next step for what is set up. Use when the user asks where to start, what to do next, or how AIDD works. Not for listing installed surfaces or running a known skill.` | #### `skills/01-bootstrap` @@ -64,7 +64,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [install-template.md](skills/01-bootstrap/assets/install-template.md) | - | | `-` | [README.md](skills/01-bootstrap/README.md) | - | | `references` | [stack-heuristics.md](skills/01-bootstrap/references/stack-heuristics.md) | - | -| `-` | [SKILL.md](skills/01-bootstrap/SKILL.md) | `Imagine and validate the technical architecture of a new SaaS through interactive Q&A, candidate-stack comparison, multi-agent audit, and an INSTALL.md output. Use when starting a new SaaS project, choosing a stack, designing the architecture pattern (monolith vs microservices vs serverless), or producing a project's INSTALL.md. Do NOT use for editing an existing project's stack, database schema design, or scaffolding actual files (this skill produces docs only, no code).` | +| `-` | [SKILL.md](skills/01-bootstrap/SKILL.md) | `Design and validate a new SaaS's architecture into an INSTALL.md via Q&A and stack comparison. Use when the user starts a project, chooses a stack, or picks an architecture pattern. Not for editing an existing stack or scaffolding code.` | #### `skills/02-project-memory` @@ -82,14 +82,14 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `-` | [README.md](skills/02-project-memory/README.md) | - | | `references` | [capability-signals.md](skills/02-project-memory/references/capability-signals.md) | - | | `references` | [mapping-ai-context-file.md](skills/02-project-memory/references/mapping-ai-context-file.md) | - | -| `-` | [SKILL.md](skills/02-project-memory/SKILL.md) | `Initialize or refresh the project memory bank. Not for updating one memory file after it exists (use the learn skill) or editing a single rule (edit it directly).` | +| `-` | [SKILL.md](skills/02-project-memory/SKILL.md) | `Initialize or refresh the project memory bank. Use when the user wants to set up or regenerate the project's memory files. Not for updating one memory file after it exists or editing a single rule directly.` | #### `skills/03-context-generate` | File | Description | |------|---| | [README.md](skills/03-context-generate/README.md) | - | -| [SKILL.md](skills/03-context-generate/SKILL.md) | `Route a request to generate a context artifact (skill, rule, agent, command, or hook) to its dedicated generator when the user has not named which kind. For a named kind, that generator triggers directly. Not for listing existing artifacts (use explore).` | +| [SKILL.md](skills/03-context-generate/SKILL.md) | `Route a request to generate a context artifact (skill, rule, agent, command, or hook) to its generator when the kind is unnamed. A named kind triggers its generator directly. Not for listing existing artifacts.` | #### `skills/04-skill-generate` @@ -101,7 +101,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [04-write-actions.md](skills/04-skill-generate/actions/04-write-actions.md) | - | | `actions` | [05-validate.md](skills/04-skill-generate/actions/05-validate.md) | - | | `assets` | [action-template.md](skills/04-skill-generate/assets/action-template.md) | - | -| `assets` | [skill-template.md](skills/04-skill-generate/assets/skill-template.md) | `. Use when . , use " only when a sibling skill could mis-trigger.> (<= 1024 chars, third person, no XML tags; all "when" lives here, not in the body.)` | +| `assets` | [skill-template.md](skills/04-skill-generate/assets/skill-template.md) | `. Use when the user wants to . " in plain words when a sibling could mis-trigger.> (Two lines max, ~240 chars, straight to the point. Third person, no XML. Never name another skill, never write a /command token. All "when" lives here, not in the body.)` | | `-` | [README.md](skills/04-skill-generate/README.md) | - | | `references` | [skill-authoring.md](skills/04-skill-generate/references/skill-authoring.md) | - | | `references` | [tool-paths.md](skills/04-skill-generate/references/tool-paths.md) | - | @@ -118,7 +118,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `-` | [README.md](skills/05-rule-generate/README.md) | - | | `references` | [rule-authoring.md](skills/05-rule-generate/references/rule-authoring.md) | - | | `references` | [tool-paths.md](skills/05-rule-generate/references/tool-paths.md) | - | -| `-` | [SKILL.md](skills/05-rule-generate/SKILL.md) | `Generate a coding rule that governs editor and agent behavior, across the host AI tools a project uses. Use when the user wants to write, add, or refactor a rule, a convention, or a coding standard, or to scan a codebase and propose rules. Not for other artifacts like skills, agents, commands, hooks.` | +| `-` | [SKILL.md](skills/05-rule-generate/SKILL.md) | `Generate a coding rule that governs editor and agent behavior across the host AI tools. Use when the user wants to write, add, or refactor a rule, convention, or coding standard. Not for other artifacts like skills, agents, or hooks.` | #### `skills/06-agent-generate` @@ -157,7 +157,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [hook-template.json](skills/08-hook-generate/assets/hook-template.json) | - | | `references` | [hook-authoring.md](skills/08-hook-generate/references/hook-authoring.md) | - | | `references` | [tool-paths.md](skills/08-hook-generate/references/tool-paths.md) | - | -| `-` | [SKILL.md](skills/08-hook-generate/SKILL.md) | `Generate a hook (a handler that runs automatically at a lifecycle event) across the host AI tools a project uses. Use when the user wants to create, scaffold, or refactor a hook, or automate an action at a lifecycle point. Not for other artifacts like skills, rules, agents, commands.` | +| `-` | [SKILL.md](skills/08-hook-generate/SKILL.md) | `Generate a hook, a handler that runs at a lifecycle event, across the host AI tools. Use when the user wants to create, scaffold, or refactor a hook, or automate an action at a lifecycle point. Not for other artifacts like skills or rules.` | #### `skills/09-mermaid` @@ -166,7 +166,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [01-mermaid.md](skills/09-mermaid/actions/01-mermaid.md) | - | | `-` | [README.md](skills/09-mermaid/README.md) | - | | `references` | [mermaid-conventions.md](skills/09-mermaid/references/mermaid-conventions.md) | - | -| `-` | [SKILL.md](skills/09-mermaid/SKILL.md) | `Generate a valid, high-quality Mermaid diagram from a written source through a plan, confirm, generate, review loop. Use when the user wants to turn an architecture, lifecycle, or flow description into a Mermaid diagram, or when another skill needs one. Not for other diagram formats like PlantUML or Graphviz, or for rendering a diagram to an image.` | +| `-` | [SKILL.md](skills/09-mermaid/SKILL.md) | `Generate a valid Mermaid diagram from a written source through a plan, generate, review loop. Use when the user wants to turn an architecture, lifecycle, or flow into a Mermaid diagram. Not for other diagram formats or image rendering.` | #### `skills/10-learn` @@ -178,7 +178,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [04-sync.md](skills/10-learn/actions/04-sync.md) | - | | `assets` | [decision-template.md](skills/10-learn/assets/decision-template.md) | - | | `-` | [README.md](skills/10-learn/README.md) | - | -| `-` | [SKILL.md](skills/10-learn/SKILL.md) | `Capture durable project learnings from the conversation or the project's git history and route them to memory, a decision record, a rule, or a new skill. Use when the user asks to capture, record, or remember a decision, a convention, or a lesson, or to distill what recent work taught. Scores each candidate and confirms before writing. Not for personal or AI preferences, routine edits, or anything already captured.` | +| `-` | [SKILL.md](skills/10-learn/SKILL.md) | `Capture durable project learnings from the conversation or git history into memory, a record, a rule, or a skill. Use when the user asks to capture, record, or remember a decision or lesson. Not for AI preferences or already-captured items.` | #### `skills/11-explore` @@ -188,7 +188,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [02-drill.md](skills/11-explore/actions/02-drill.md) | - | | `-` | [README.md](skills/11-explore/README.md) | - | | `references` | [ai-mapping.md](skills/11-explore/references/ai-mapping.md) | - | -| `-` | [SKILL.md](skills/11-explore/SKILL.md) | `Explore the current project across its tooling, context, and codebase. Use to survey what is installed and set up, see what is available, or find which installed skill, agent, or rule fits a goal. Not for the next step to take (onboard does that) or running an item (this skill only points).` | +| `-` | [SKILL.md](skills/11-explore/SKILL.md) | `Explore the current project across its tooling, context, and codebase. Use to survey what is installed, see what is available, or find which skill, agent, or rule fits a goal. Not for choosing the next step or running an item; it only points.` | #### `skills/12-cook` diff --git a/plugins/aidd-context/skills/00-onboard/SKILL.md b/plugins/aidd-context/skills/00-onboard/SKILL.md index 38f9202c..2d2cf161 100644 --- a/plugins/aidd-context/skills/00-onboard/SKILL.md +++ b/plugins/aidd-context/skills/00-onboard/SKILL.md @@ -1,6 +1,6 @@ --- name: 00-onboard -description: Guide the user through the AIDD framework on the current project. Explain the flow in plain language and suggest the next logical step, adapted to what is already set up and which AIDD plugins are installed. Use when the user asks where to start, what to do next, how AIDD works, or to be onboarded. Not for listing every installed surface (the explore skill does that) or running a skill the user already knows they need (invoke it directly). +description: Guide the user through AIDD on the current project: explain the flow and the next step for what is set up. Use when the user asks where to start, what to do next, or how AIDD works. Not for listing installed surfaces or running a known skill. argument-hint: read-project | orient | act --- diff --git a/plugins/aidd-context/skills/00-onboard/actions/01-read-project.md b/plugins/aidd-context/skills/00-onboard/actions/01-read-project.md index 414236a2..6e83e741 100644 --- a/plugins/aidd-context/skills/00-onboard/actions/01-read-project.md +++ b/plugins/aidd-context/skills/00-onboard/actions/01-read-project.md @@ -23,10 +23,10 @@ The notes answer a handful of plain questions: ## Process -1. **Check the setup.** `test -d aidd_docs/memory`, list its `*.md`, and judge whether any file is filled rather than an untouched template. When a file is filled, read the project brief and the architecture so the briefing speaks from the project's own context, not a guess. `grep -l '' CLAUDE.md AGENTS.md .github/copilot-instructions.md` for the context block. +1. **Check the setup.** Check whether the memory bank exists and holds real content rather than a bare template. When it is filled, read the project brief and the architecture so the briefing speaks from the project's own context. Check whether the AI context file carries the `` block. 2. **Check the work.** Look for source files outside `aidd_docs/`, a stack manifest, a spec or plan under `aidd_docs/`, and an open pull request on the branch. If nothing is built at all, note the repo as empty. 3. **List what is installed.** Use the AI tool's native plugin and skill discovery to gather the enabled AIDD plugins and the skills they expose, each with its description. This is how onboard adapts to what the user actually has. -4. **Hold, do not print.** Keep the notes in context. Hand directly to `02-orient`. +4. **Hold, do not print.** Keep the notes in context and hand directly to `02-orient`. Emit nothing, even in a single turn; the user's first words come from `02-orient`. ## Test diff --git a/plugins/aidd-context/skills/00-onboard/actions/02-orient.md b/plugins/aidd-context/skills/00-onboard/actions/02-orient.md index 14602ac3..0923d748 100644 --- a/plugins/aidd-context/skills/00-onboard/actions/02-orient.md +++ b/plugins/aidd-context/skills/00-onboard/actions/02-orient.md @@ -12,7 +12,7 @@ A short, plain briefing the user can act on. No internal variable names, no raw 1. **One line on the project**: its purpose and stack drawn from the memory bank when it is filled, otherwise from the files, or that it is a fresh repo. The memory is the project's own context and leads here. 2. **Where it sits**: one or two sentences placing the project in the AIDD flow, explaining any term the first time it appears. -3. **The next step plus choices**: the suggested step in plain language with a one-line why, then a short numbered list of what the user can do, and a prompt to reply with a number. The list stays small and stable: run the suggested step, explain that step first, explain this project from its memory (only when the memory is filled), see the whole AIDD flow and the installed skills, go to a different step, stop. +3. **The next step plus choices**: the suggested step in plain language with a one-line why, then a short numbered list of what the user can do, and a prompt to reply with a number. The list stays small and stable: run the suggested step, run it in a fresh session instead, explain that step first, explain this project from its memory (only when the memory is filled), see the whole AIDD flow and the installed skills, go to a different step, stop. ## Process @@ -20,11 +20,10 @@ A short, plain briefing the user can act on. No internal variable names, no raw 2. **Place the project.** Using `@../references/journey.md`, find the earliest unmet stage for these facts. That is the suggestion. Treat it as a hint, never a verdict. 3. **Resolve the suggestion** to an installed skill (`@../references/journey.md`, Resolving). If no installed skill fits, the step is a gap: name the missing capability by function, never a skill or plugin id. 4. **Write the briefing** in plain language: the one-line project, where it sits, and the suggested step with a short why. Explain any AIDD term the first time it appears. -5. **Offer choices.** A short, stable numbered list with plain labels: run the suggested step, explain that step first, explain this project from its memory (only when the memory is filled), see the whole AIDD flow and the installed skills, go to a different step, stop. -6. **On explain the project**, summarize the project from its memory bank in a few plain lines: what it is, the stack, the shape, the key decisions. Read-only, then re-offer the choices. -7. **On a different step**, show the flow steps from `@../references/journey.md` in plain language and let the user pick one, then resolve that to a skill or a gap. -8. **Hand the choice to `03-act`**, with the resolved skill (or gap) and what the user picked. -9. **Wait for a reply.** Free text re-renders the same choices with a one-line reminder to reply with a number. Never auto-advance. +5. **Offer choices.** A short, stable numbered list with plain labels: run the suggested step, run it in a fresh session instead, explain that step first, explain this project from its memory (only when the memory is filled), see the whole AIDD flow and the installed skills, go to a different step, stop. +6. **Wait for a reply.** Free text re-renders the same choices with a one-line reminder to reply with a number. Never auto-advance. +7. **On a different step**, show the flow steps from `@../references/journey.md` in plain language, let the user pick one, and resolve it to a skill or a gap. +8. **Hand the choice to `03-act`**, with the resolved skill (or gap) and what the user picked. Acting on the choice belongs to `03-act`, not here. ## Test diff --git a/plugins/aidd-context/skills/00-onboard/actions/03-act.md b/plugins/aidd-context/skills/00-onboard/actions/03-act.md index ce4eab50..ec4ec720 100644 --- a/plugins/aidd-context/skills/00-onboard/actions/03-act.md +++ b/plugins/aidd-context/skills/00-onboard/actions/03-act.md @@ -24,7 +24,7 @@ One outcome, always ending with a clear next prompt or a clean stop. ## Process -1. **Run it.** Invoke the resolved skill the way a slash command would. When it returns, ask the user how it went and wait. Then read the project again (`01`), since it has changed. +1. **Run it.** Invoke the resolved skill directly. When it returns, ask the user how it went and wait. Then read the project again (`01`), since it has changed. 2. **Explain the step.** Pull the resolved skill's purpose from its description and say, in two or three plain lines, what the step does and what it produces. Do not invoke. Re-offer the choices. 3. **Explain the project.** Summarize the project from its memory bank: what it is, the stack, the shape, the key decisions, in a few plain lines. Read-only, never invoke. Re-offer the choices. Available only when the memory is filled. 4. **Show flow and skills.** Walk the AIDD flow from `@../references/journey.md` in plain language, then list the installed skills grouped by the step each fits (and the ones that fit no step), discovered from `01`, never hardcoded. Then re-offer the choices. This is the teaching path. diff --git a/plugins/aidd-context/skills/01-bootstrap/SKILL.md b/plugins/aidd-context/skills/01-bootstrap/SKILL.md index a2ce5d0c..e08d2142 100644 --- a/plugins/aidd-context/skills/01-bootstrap/SKILL.md +++ b/plugins/aidd-context/skills/01-bootstrap/SKILL.md @@ -1,14 +1,14 @@ --- name: 01-bootstrap -description: Imagine and validate the technical architecture of a new SaaS through interactive Q&A, candidate-stack comparison, multi-agent audit, and an INSTALL.md output. Use when starting a new SaaS project, choosing a stack, designing the architecture pattern (monolith vs microservices vs serverless), or producing a project's INSTALL.md. Do NOT use for editing an existing project's stack, database schema design, or scaffolding actual files (this skill produces docs only, no code). +description: Design and validate a new SaaS's architecture into an INSTALL.md via Q&A and stack comparison. Use when the user starts a project, chooses a stack, or picks an architecture pattern. Not for editing an existing stack or scaffolding code. argument-hint: gather-needs | propose-candidates | audit-candidates | pick-and-design | write-install-md --- # Bootstrap -Plays the role of technical architect for a new SaaS project. Walks the user through a 24-item checklist (18 user-input + 6 derived), proposes 2-3 candidate stacks, audits each via parallel agents, then produces `aidd_docs/INSTALL.md` capturing the technical vision, decisions, stack, architecture pattern, folder tree, and install steps. Documentation only - no code, no scaffolding. +Plays the role of technical architect for a new SaaS project. Walks the user through a 24-item checklist (18 user-input + 6 derived), proposes 2-3 candidate stacks, audits each via parallel agents, then produces `aidd_docs/INSTALL.md` capturing the technical vision, decisions, stack, architecture pattern, folder tree, and install steps. Documentation only: no code, no scaffolding. -## Available actions +## Actions | # | Action | Role | Input | | --- | --------------------- | -------------------------------------------------------------- | ------------------ | @@ -18,9 +18,7 @@ Plays the role of technical architect for a new SaaS project. Walks the user thr | 04 | `pick-and-design` | User picks winner; generate folder tree + Mermaid diagram | audit report | | 05 | `write-install-md` | Produce `aidd_docs/INSTALL.md` | design + decisions | -## Default flow - -`01 → 02 → 03 → 04 → 05`. Sequential. The audit (03) is a gate: if every candidate returns `❌`, loop back to 02 to revise candidates or 01 to revisit needs. +Run `01 → 02 → 03 → 04 → 05`. The audit (03) gates: if every candidate fails, loop back to 02 or 01. ## Transversal rules @@ -28,17 +26,13 @@ Plays the role of technical architect for a new SaaS project. Walks the user thr - **Anti-sycophancy.** When the user expresses a stack preference that conflicts with their needs (e.g. wants Mongo for heavily relational data), challenge it before accepting: surface audit concerns and ask whether the user has a mitigation plan. - **Recommend opinionated, not encyclopedic.** Each action proposes 2-3 options max, never a long catalog. The user should leave with a concrete decision, not a research paper. - **Stop on full checklist.** Action 01 keeps asking until the 18 user-input items (blocks 1-3) are filled; the 6 derived items (block 4) are filled across actions 02 and 04. -- **Apply heuristics from `@references/stack-heuristics.md`** when proposing candidates. +- **Apply heuristics from `references/stack-heuristics.md`** when proposing candidates. ## References -- `@references/stack-heuristics.md` - input → recommended-stack-family heuristics +- `references/stack-heuristics.md` - input → recommended-stack-family heuristics ## Assets -- `@assets/checklist.md` - the 24-item checklist (4 blocks) -- `@assets/install-template.md` - the `INSTALL.md` skeleton - -## External data - -- `aidd-context/skills/09-mermaid/SKILL.md` - invoked from action 04 to render the architecture diagram +- `assets/checklist.md` - the 24-item checklist (4 blocks) +- `assets/install-template.md` - the `INSTALL.md` skeleton diff --git a/plugins/aidd-context/skills/01-bootstrap/actions/01-gather-needs.md b/plugins/aidd-context/skills/01-bootstrap/actions/01-gather-needs.md index 355d329c..e8028999 100644 --- a/plugins/aidd-context/skills/01-bootstrap/actions/01-gather-needs.md +++ b/plugins/aidd-context/skills/01-bootstrap/actions/01-gather-needs.md @@ -1,32 +1,26 @@ # 01 - Gather needs -Walk the user through the 24-item checklist via interactive Q&A until all 18 user-input items (blocks 1-3) are filled. The 6 derived items (block 4) stay empty here - they are filled by actions 02 and 04. +Walk the user through the 24-item checklist via interactive Q&A until all 18 user-input items (blocks 1 to 3) are filled. The 6 derived items (block 4) stay empty here; actions 02 and 04 fill them. -## Inputs +## Input -- Free-form user request to bootstrap a new SaaS project. +A free-form user request to bootstrap a new SaaS project. -## Outputs +## Output -A filled copy of `@../assets/checklist.md` held in conversation context (not yet written to disk). Each user-input item has a concrete value replacing its `<...>` placeholder. - -```markdown -- [x] **Project name** - Acme Invoicing -- [x] **One-liner** - Smart invoice tracker for freelancers, syncs with Airtable -- [x] **Type** - B2B SaaS -- [x] **Target users** - solo freelancers and 2-5 person agencies, ~500 active at 6 months -... (all 18 input items filled) -``` +A filled copy of `@../assets/checklist.md` held in conversation context, not yet written to disk, with every user-input item's `<...>` placeholder replaced by a concrete value. ## Process -1. Read `@../assets/checklist.md`. Print the four blocks as a single markdown checklist for the user to see the full scope upfront. -2. Ask block by block, one block per message. Within a block, ask all questions at once (the user answers in batch). Do not ask block 4 - it's derived. -3. For each user answer, fill the corresponding item. If an answer is vague ("scalable", "fast"), ask one follow-up to make it concrete (numbers, examples). -4. After block 1, sanity-check coherence: does the type match the user volume? Are the integrations realistic for the platform target? -5. After block 3, surface conflicts (e.g. budget < 50€/mo + AWS preference + heavy backend → impossible). Force a re-answer on the conflicting item. -6. Print the filled checklist (blocks 1-3 only) and ask the user to confirm "go" before passing to action 02. +1. **Show.** Read `@../assets/checklist.md` and print the four blocks as one markdown checklist so the user sees the full scope upfront. +2. **Ask.** Ask block by block, one block per message, all questions in a block at once. Do not ask block 4; it is derived. +3. **Fill.** Fill each item from the answer. When an answer is vague ("scalable", "fast"), ask one follow-up to make it concrete (numbers, examples). +4. **Check.** After block 1, sanity-check coherence: does the type match the user volume, are the integrations realistic for the platform target. +5. **Resolve.** After block 3, surface conflicts (for example budget under 50€/mo with an AWS preference and a heavy backend) and force a re-answer on the conflicting item. +6. **Confirm.** Print the filled checklist (blocks 1 to 3) and wait for the user to confirm "go" before action 02. ## Test -The 18 user-input items in the in-memory checklist have no remaining `<...>` placeholders, the 6 block-4 items are still placeholders, and the user has explicitly confirmed the filled checklist with "go" or equivalent before action 02 starts. +- The 18 user-input items have no remaining `<...>` placeholders. +- The 6 block-4 items are still placeholders. +- The user explicitly confirmed the filled checklist before action 02 starts. diff --git a/plugins/aidd-context/skills/01-bootstrap/actions/02-propose-candidates.md b/plugins/aidd-context/skills/01-bootstrap/actions/02-propose-candidates.md index dd7a539c..8af3df85 100644 --- a/plugins/aidd-context/skills/01-bootstrap/actions/02-propose-candidates.md +++ b/plugins/aidd-context/skills/01-bootstrap/actions/02-propose-candidates.md @@ -1,37 +1,26 @@ # 02 - Propose candidates -Derive 2-3 candidate stacks from the filled checklist using the heuristics in `@../references/stack-heuristics.md`, then render a markdown comparison table for the user. +Derive 2 to 3 candidate stacks from the filled checklist using the heuristics in `@../references/stack-heuristics.md`, then render a markdown comparison table. -## Inputs +## Input -- Filled checklist (blocks 1-3) from action 01. +The filled checklist (blocks 1 to 3) from action 01. -## Outputs +## Output -A markdown comparison table with 2-3 rows. - -```markdown -| Candidate | Front | Back | DB | Hosting | Auth | Archi | Cost/mo | Risks | -|-----------|-------|------|------|---------|------|-------|---------|-------| -| **A. Vercel-native** | Next.js SSR | Next.js API routes | Supabase Postgres | Vercel + Supabase | NextAuth | Modular monolith | ~30€ | Vercel lock-in, cold starts on serverless functions | -| **B. Self-hosted** | Vite + React SPA | NestJS | Postgres on VPS | Coolify on Hetzner VPS | Clerk | Modular monolith | ~15€ | Manual ops, single point of failure | -| **C. Serverless AWS** | Next.js SSR | AWS Lambda + API Gateway | DynamoDB | AWS + CloudFront | Cognito | Serverless | ~50€ at low volume, scales linearly | Vendor lock-in, learning curve | -``` - -## Depends on - -- `01-gather-needs` +A markdown comparison table with 2 to 3 rows, each a candidate with its front, back, DB, hosting, auth, architecture pattern, monthly cost, and risks. ## Process -1. Read the filled checklist from action 01. -2. Apply each rule from `@../references/stack-heuristics.md` to derive the recommended family for: archi pattern, front, back, DB, auth, hosting. -3. Build 2-3 candidates that span the trade-off space - they must differ on at least one of: hosting model (PaaS vs self-host vs serverless), back-end language, or archi pattern. Never propose 3 near-identical candidates. -4. For each candidate, estimate monthly cost at the user's volume target (Block 2 item: "Volume at 6 months"). Use rough public-pricing numbers; flag uncertainty. -5. List 1-3 risks per candidate (lock-in, ops burden, learning curve, scaling limit). Be honest - risks are non-negotiable, no candidate has zero. -6. Render the comparison table. Bold the candidate's name (`**A.**`). -7. Print the table to the user. Do not pick a winner - that's action 04, after audit. +1. **Read.** Read the filled checklist from action 01. +2. **Derive.** Apply each rule from `@../references/stack-heuristics.md` to derive the recommended family for architecture pattern, front, back, DB, auth, and hosting. +3. **Spread.** Build 2 to 3 candidates spanning the trade-off space, differing on at least one of hosting model (PaaS, self-host, serverless), back-end language, or architecture pattern. Never propose near-identical candidates. +4. **Cost.** Estimate each candidate's monthly cost at the user's six-month volume target with rough public pricing, flagging uncertainty. +5. **Risk.** List 1 to 3 honest risks per candidate (lock-in, ops burden, learning curve, scaling limit). No candidate has zero. +6. **Render.** Render the comparison table, bolding each candidate's name. Do not pick a winner; that is action 04, after the audit. ## Test -The output is a markdown table with at least 2 rows; the columns include `Front`, `Back`, `DB`, `Hosting`, `Auth`, `Archi`, `Cost`, `Risks`; each row has a non-empty value in every column; at least two rows differ on hosting model, back-end language, or archi pattern. +- The output is a markdown table with at least two rows. +- The columns include front, back, DB, hosting, auth, architecture, cost, and risks, each cell non-empty. +- At least two rows differ on hosting model, back-end language, or architecture pattern. diff --git a/plugins/aidd-context/skills/01-bootstrap/actions/03-audit-candidates.md b/plugins/aidd-context/skills/01-bootstrap/actions/03-audit-candidates.md index 6394bf0e..d96bc8b8 100644 --- a/plugins/aidd-context/skills/01-bootstrap/actions/03-audit-candidates.md +++ b/plugins/aidd-context/skills/01-bootstrap/actions/03-audit-candidates.md @@ -1,63 +1,38 @@ # 03 - Audit candidates -Spawn one parallel agent per candidate to validate the proposed stack: tech compatibility, ecosystem maturity, known gotchas. Returns a verdict (`✅ / ⚠️ / ❌`) plus a 3-bullet rationale per candidate. +Audit each candidate in parallel to validate the proposed stack: tech compatibility, ecosystem maturity, known gotchas. Returns a verdict (✅ / ⚠️ / ❌) and a three-bullet rationale per candidate. -## Inputs +## Input -- Comparison table from action 02. -- Filled checklist from action 01 (for context). +The comparison table from action 02, and the filled checklist from action 01 for context. -## Outputs +## Output -The same table from action 02, augmented with a `Verdict` column and a per-candidate rationale block below. - -```markdown -| Candidate | Verdict | Notes | -|-----------|---------|-------| -| **A. Vercel-native** | ✅ | All components mature, well-documented integration, no gotchas at this scale | -| **B. Self-hosted** | ⚠️ | Coolify is recent (< 2 years); ops burden underestimated for solo dev | -| **C. Serverless AWS** | ❌ | DynamoDB is the wrong fit for relational invoice data; Cognito has known UX friction | -``` - -Per-candidate rationale (3 bullets): - -```markdown -### A. Vercel-native - ✅ -- Next.js + Supabase is the most documented stack in 2026; copy-paste examples exist for every checklist requirement -- Vercel's Hobby tier plus Supabase free tier covers the 6-month volume target; cost forecast holds -- Cold start is the only concrete risk - irrelevant for a B2B SaaS with predictable load patterns - -### B. Self-hosted - ⚠️ -- ... -``` - -## Depends on - -- `02-propose-candidates` +The action 02 table augmented with a verdict column, plus a three-bullet rationale block per candidate. ## Process -1. For each candidate row in the table, spawn a parallel `general-purpose` Agent with this brief: +1. **Audit.** For each candidate row, spawn a parallel `general-purpose` agent with this brief: - ``` + ```text Audit the following candidate stack for a SaaS project. Validate three dimensions: - 1. Tech compatibility - do the components integrate cleanly? Any deprecated combos? - 2. Ecosystem maturity - are the components stable (≥ 2 years prod-tested) and well-documented? - 3. Known gotchas - search recent (last 12 months) issues, blog posts, HN discussions for blockers. + 1. Tech compatibility: do the components integrate cleanly? Any deprecated combos? + 2. Ecosystem maturity: are the components stable (≥ 2 years prod-tested) and well-documented? + 3. Known gotchas: search recent (last 12 months) issues, blog posts, and discussions for blockers. - Project context: + Project context: Candidate: Return: - Verdict: ✅ (no blocker) / ⚠️ (minor concerns) / ❌ (deal-breaker) - - Three bullet points justifying the verdict - concrete, citing specific tech facts - - Cost estimate confirmation: agree / disagree with the proposed monthly cost + - Three bullets justifying the verdict, concrete, citing specific tech facts, one of them stating whether the proposed monthly cost is realistic ``` -2. Wait for all agents to return. Aggregate verdicts into the table. -3. If **every** candidate returns `❌`: print the verdicts, surface the common blocker, and loop back to action 02 with explicit guidance on what to change. Do not proceed to action 04. -4. If **at least one** candidate is `✅` or `⚠️`: print the augmented table + per-candidate rationale to the user. Pass control to action 04. +2. **Aggregate.** Wait for every agent to return, then aggregate the verdicts into the table. +3. **Gate.** When every candidate returns ❌, print the verdicts, surface the common blocker, and loop back to action 02, or to 01 when the needs themselves are the blocker, with explicit guidance. Do not proceed to action 04. +4. **Pass.** When at least one candidate is ✅ or ⚠️, print the augmented table and per-candidate rationale, then pass control to action 04. ## Test -Each candidate row from action 02 has a corresponding verdict in `{✅, ⚠️, ❌}` and a rationale block with exactly 3 bullets; if all verdicts are ❌, the flow does not advance to action 04 and a guidance message back to 02 is printed. +- Each candidate row has a verdict in `{✅, ⚠️, ❌}` and a rationale block of exactly three bullets. +- When every verdict is ❌, the flow does not advance to action 04 and prints guidance back to action 02. diff --git a/plugins/aidd-context/skills/01-bootstrap/actions/04-pick-and-design.md b/plugins/aidd-context/skills/01-bootstrap/actions/04-pick-and-design.md index a6c8d3d8..4859ccfc 100644 --- a/plugins/aidd-context/skills/01-bootstrap/actions/04-pick-and-design.md +++ b/plugins/aidd-context/skills/01-bootstrap/actions/04-pick-and-design.md @@ -1,67 +1,26 @@ # 04 - Pick and design -User picks the winning candidate (informed by audit). Generate the folder structure tree and a Mermaid module diagram. Fill block 4 of the checklist with the concrete choices. +The user picks the winning candidate, informed by the audit. Generate the folder-structure tree and a Mermaid module diagram, and fill block 4 of the checklist with the concrete choices. -## Inputs +## Input -- Augmented comparison table from action 03 (with verdicts and rationale). -- Filled checklist blocks 1-3. +The augmented comparison table from action 03 (verdicts and rationale), and the filled checklist blocks 1 to 3. -## Outputs +## Output -Three artifacts held in conversation context (not yet written to disk): - -1. The checklist with **block 4 filled** (architecture pattern, front, back, DB, auth, final hosting). -2. A folder-structure code block showing the project root tree. -3. A Mermaid diagram showing modules and their relations. - -```markdown -## Folder structure - -`​`​` -acme-invoicing/ -├── apps/ -│ ├── web/ # Next.js app -│ └── workers/ # Background jobs (BullMQ) -├── packages/ -│ ├── db/ # Drizzle schema + migrations -│ ├── api/ # tRPC routers shared between web and workers -│ └── ui/ # shared React components -├── infra/ -│ └── supabase/ # Supabase project config + RLS policies -├── aidd_docs/ -│ └── INSTALL.md -└── package.json -`​`​` - -## Architecture diagram - -`​`​`mermaid -graph TD - User --> Web[Next.js Web] - Web --> API[tRPC API] - API --> DB[(Supabase Postgres)] - API --> Airtable[Airtable SDK] - Web --> Auth[NextAuth] - Workers[BullMQ Workers] --> DB - Workers --> Slack[Slack API] -`​`​` -``` - -## Depends on - -- `03-audit-candidates` +Three artifacts held in conversation context: the checklist with block 4 filled (architecture pattern, front, back, DB, auth, final hosting), a folder-structure code block of the project root tree, and a Mermaid diagram of the modules and their relations. ## Process -1. Print the action 03 augmented table. Ask the user to pick a candidate by letter (A / B / C). -2. If the picked candidate has verdict `⚠️`, surface the audit concerns directly: list the specific risks found in action 03, ask whether the user has a mitigation plan, and loop until satisfied or candidate is switched. -3. If the picked candidate has verdict `❌`, refuse the pick and loop back to letting the user choose differently. (Do not proceed with a known-broken stack.) -4. Fill block 4 of the checklist with the picked candidate's concrete choices. Show the user the full filled checklist and ask them to confirm "go". -5. Generate the folder-structure tree following conventions from the picked stack: monorepo (`apps/`, `packages/`) for modular monolith; flat `src/` for monolith; `services/` per service for microservices; `functions/` for serverless. Reflect every component listed in block 4. -6. Generate the Mermaid module diagram by invoking `aidd-context:09-mermaid`. Pass it the list of modules and their relations derived from the folder tree. Verify the rendered diagram passes Mermaid syntax (no parser errors). -7. Print the tree + diagram together. Wait for user confirmation before action 05. +1. **Pick.** Print the action 03 augmented table and ask the user to pick a candidate by name. +2. **Vet.** On a ⚠️ pick, surface the audit concerns, ask for a mitigation plan, and loop until satisfied or the pick changes. On a ❌ pick, refuse and loop back; never proceed with a known-broken stack. +3. **Fill.** Fill block 4 with the picked candidate's concrete choices, show the full checklist, and wait for the user to confirm "go". +4. **Tree.** Generate the folder-structure tree following the picked stack's conventions: a monorepo (`apps/`, `packages/`) for a modular monolith, a flat `src/` for a monolith, `services/` per service for microservices, `functions/` for serverless. Reflect every block-4 component. +5. **Diagram.** Generate the Mermaid module diagram via a Mermaid-rendering capability, passing the modules and relations from the tree, and confirm it parses without error. +6. **Show.** Print the tree and diagram together, then wait for confirmation before action 05. ## Test -The checklist's block 4 has all 6 items filled with no remaining `<...>` placeholders; a folder-structure code block is rendered; a Mermaid code block tagged ` ```mermaid ` is present and parses without error; the user has confirmed in writing. +- Block 4 has all six items filled with no remaining `<...>` placeholders. +- A folder-structure code block is rendered, and a fenced `mermaid` block is present and parses without error. +- The user confirmed in writing. diff --git a/plugins/aidd-context/skills/01-bootstrap/actions/05-write-install-md.md b/plugins/aidd-context/skills/01-bootstrap/actions/05-write-install-md.md index 73347fd1..210facfb 100644 --- a/plugins/aidd-context/skills/01-bootstrap/actions/05-write-install-md.md +++ b/plugins/aidd-context/skills/01-bootstrap/actions/05-write-install-md.md @@ -1,57 +1,31 @@ # 05 - Write INSTALL.md -Produce `aidd_docs/INSTALL.md` from the filled checklist, folder tree, diagram, and audit summary. This is the only file this skill writes to disk. +Produce `aidd_docs/INSTALL.md` from the filled checklist, folder tree, diagram, and audit summary. The only file this skill writes to disk. -## Inputs +## Input -- Filled checklist (from action 04). -- Folder structure code block (from action 04). -- Mermaid diagram (from action 04). -- Augmented audit table (from action 03). +The filled checklist, folder-structure code block, and Mermaid diagram from action 04, and the augmented audit table from action 03. -## Outputs +## Output -A new file at `aidd_docs/INSTALL.md` filled from `@../assets/install-template.md`. - -```markdown -# INSTALL.md - acme-invoicing - -Technical vision and installation guide. - -## Vision -... -## Decisions -... -## Stack summary -... -## Architecture -... -## Folder structure -... -## Install steps -... -## Audit summary -... -``` - -## Depends on - -- `04-pick-and-design` +A new `aidd_docs/INSTALL.md` filled from `@../assets/install-template.md`, with its Vision, Decisions, Stack summary, Architecture, Folder structure, Install steps, and Audit summary sections. ## Process -1. Read `@../assets/install-template.md`. This is the skeleton. -2. Fill each placeholder from upstream artifacts: - - **Vision**: project name + one-liner from block 1 - - **Decisions table**: each row from block 4 paired with a one-line `Why` derived from block 2-3 constraints - - **Stack summary**: concrete versions / SaaS plans where known - - **Architecture**: paste the Mermaid diagram from action 04 + 2-3 sentences explaining module boundaries - - **Folder structure**: paste the tree from action 04 verbatim - - **Install steps**: 3-7 imperative steps the user runs to bring up the empty project (init repo, install runtimes, create cloud accounts, set env vars). No code generation - this is a checklist, not a script. - - **Audit summary**: paste the augmented table from action 03, keep verdicts + one-line notes -3. Write the filled content to `aidd_docs/INSTALL.md` in the user's project root. If the file already exists, ask before overwriting. -4. Print the relative path of the written file and a short summary (which sections were filled, total length). +1. **Load.** Read `@../assets/install-template.md` as the skeleton. +2. **Fill.** Fill each placeholder from the upstream artifacts: + - **Vision**: project name and one-liner from block 1. + - **Decisions**: each block-4 row paired with a one-line why from the block 2 and 3 constraints. + - **Stack summary**: concrete versions or SaaS plans where known. + - **Architecture**: the action 04 Mermaid diagram plus two or three sentences on module boundaries. + - **Folder structure**: the action 04 tree verbatim. + - **Install steps**: 3 to 7 imperative steps to bring up the empty project (init repo, install runtimes, create cloud accounts, set env vars). A checklist, not a script, with no code generation. + - **Audit summary**: the action 03 augmented table, keeping verdicts and one-line notes. +3. **Write.** Write the filled content to `aidd_docs/INSTALL.md` in the project root. When the file already exists, ask before overwriting. +4. **Report.** Print the written file's relative path and a short summary of the sections filled and total length. ## Test -`aidd_docs/INSTALL.md` exists and parses as markdown; it contains exactly these `## ` H2 headings in order: `Vision`, `Decisions`, `Stack summary`, `Architecture`, `Folder structure`, `Install steps`, `Audit summary`; the `Architecture` section contains a fenced ` ```mermaid ` block; the `Folder structure` section contains a fenced code block with at least 5 lines. +- `aidd_docs/INSTALL.md` exists and parses as markdown. +- It contains these H2 headings in order: Vision, Decisions, Stack summary, Architecture, Folder structure, Install steps, Audit summary. +- The Architecture section contains a fenced `mermaid` block, and the Folder structure section a fenced code block of at least five lines. diff --git a/plugins/aidd-context/skills/02-project-memory/SKILL.md b/plugins/aidd-context/skills/02-project-memory/SKILL.md index de12e39c..05b9ae55 100644 --- a/plugins/aidd-context/skills/02-project-memory/SKILL.md +++ b/plugins/aidd-context/skills/02-project-memory/SKILL.md @@ -1,6 +1,6 @@ --- name: 02-project-memory -description: Initialize or refresh the project memory bank. Not for updating one memory file after it exists (use the learn skill) or editing a single rule (edit it directly). +description: Initialize or refresh the project memory bank. Use when the user wants to set up or regenerate the project's memory files. Not for updating one memory file after it exists or editing a single rule directly. argument-hint: init-context-file | scaffold-docs | generate-memory | review-memory | sync-memory --- @@ -13,7 +13,7 @@ Bootstraps the project's context layer: the AI context files with a memory block | # | Action | Role | Input | | --- | ------------------- | --------------------------------------------------- | ----------------- | | 01 | `init-context-file` | Resolve the tools, then upsert the memory block | project root | -| 02 | `scaffold-docs` | Create the `aidd_docs/` structure | project root | +| 02 | `scaffold-docs` | Create the `aidd_docs/` folder structure | project root | | 03 | `generate-memory` | Detect the capabilities, generate the memory files | the memory dir | | 04 | `review-memory` | Review the memory files for consistency | the memory dir | | 05 | `sync-memory` | Fill the memory block in every context file | the context files | diff --git a/plugins/aidd-context/skills/03-context-generate/SKILL.md b/plugins/aidd-context/skills/03-context-generate/SKILL.md index 788c0ec2..563e52a9 100644 --- a/plugins/aidd-context/skills/03-context-generate/SKILL.md +++ b/plugins/aidd-context/skills/03-context-generate/SKILL.md @@ -1,6 +1,6 @@ --- name: 03-context-generate -description: Route a request to generate a context artifact (skill, rule, agent, command, or hook) to its dedicated generator when the user has not named which kind. For a named kind, that generator triggers directly. Not for listing existing artifacts (use explore). +description: Route a request to generate a context artifact (skill, rule, agent, command, or hook) to its generator when the kind is unnamed. A named kind triggers its generator directly. Not for listing existing artifacts. --- # Context Generate diff --git a/plugins/aidd-context/skills/04-skill-generate/SKILL.md b/plugins/aidd-context/skills/04-skill-generate/SKILL.md index fbe94307..ac52a9f8 100644 --- a/plugins/aidd-context/skills/04-skill-generate/SKILL.md +++ b/plugins/aidd-context/skills/04-skill-generate/SKILL.md @@ -22,7 +22,7 @@ Run the actions in order, `01 → 05`, and run each action's `## Test` before th ## References -- `references/skill-authoring.md`: the contract (R1-R11, action anatomy, naming). +- `references/skill-authoring.md`: the contract (R1-R13, action anatomy, naming). - `references/tool-paths.md`: per-tool skills path, frontmatter, resolution + write-safety gate. ## Assets diff --git a/plugins/aidd-context/skills/04-skill-generate/actions/03-draft-skill.md b/plugins/aidd-context/skills/04-skill-generate/actions/03-draft-skill.md index db3d136a..951559e5 100644 --- a/plugins/aidd-context/skills/04-skill-generate/actions/03-draft-skill.md +++ b/plugins/aidd-context/skills/04-skill-generate/actions/03-draft-skill.md @@ -8,7 +8,7 @@ From 01: the name, domain, what it produces, the invocation mode, the confirmed ## Output -One SKILL.md per confirmed tool, and the list of files written. +One SKILL.md per target (each confirmed host tool, or the plugin source tree), and the list of files written. ## Process diff --git a/plugins/aidd-context/skills/04-skill-generate/assets/skill-template.md b/plugins/aidd-context/skills/04-skill-generate/assets/skill-template.md index 92d0091b..7dcb8d97 100644 --- a/plugins/aidd-context/skills/04-skill-generate/assets/skill-template.md +++ b/plugins/aidd-context/skills/04-skill-generate/assets/skill-template.md @@ -1,6 +1,6 @@ --- name: -description: . Use when . , use " only when a sibling skill could mis-trigger.> (<= 1024 chars, third person, no XML tags; all "when" lives here, not in the body.) +description: . Use when the user wants to . " in plain words when a sibling could mis-trigger.> (Two lines max, ~240 chars, straight to the point. Third person, no XML. Never name another skill, never write a /command token. All "when" lives here, not in the body.) argument-hint: # omit when the skill has only one action --- diff --git a/plugins/aidd-context/skills/04-skill-generate/references/skill-authoring.md b/plugins/aidd-context/skills/04-skill-generate/references/skill-authoring.md index b8d668f8..2731b626 100644 --- a/plugins/aidd-context/skills/04-skill-generate/references/skill-authoring.md +++ b/plugins/aidd-context/skills/04-skill-generate/references/skill-authoring.md @@ -8,11 +8,13 @@ The contract every generated skill must satisfy. These rules govern the CLIENT s - **R2.** One skill = one domain. A tool domain uses a singular noun (`slack`). An activity domain uses an action verb (`review`). See `## Naming`. - **R3.** References one level deep. A reference never `@`-chains another reference. - **R4.** SKILL.md <= 500 lines. If exceeded, split into references. -- **R5.** `description` states what + when. Third person, <= 1024 chars, no XML. Conventions: - - All "when" lives here, not in the body. - - Triggers explicit and slightly pushy. The model under-triggers, so over-list. - - Lead with the plain artifact name. Parentheses for an inline definition, not dashes. - - Optionally a short `Not for ` clause, only when a sibling skill could mis-trigger. +- **R5.** `description` states what + when. Third person, no XML. Conventions: + - **Two lines max, straight to the point.** Target ~240 characters; never more than a short paragraph. Length serves recall, not completeness. The hard ceiling is 1024 chars, not a goal. + - Lead with a verb naming what the skill produces (`Generate a rule...`, `Audit a codebase...`), not a noun phrase. + - All "when" lives here, not in the body. State it as `Use when the user wants to `. List distinct triggers (the model under-triggers, so cover the real ones), but never pad with near-duplicate phrasings. + - Optionally one short `Not for ` clause to fend off a sibling that could mis-trigger, describing the overlap in plain words. + - Never name another skill, and never include a `/command` token: slash commands are tool-native, the host generates them. + - Parentheses for an inline definition, not dashes. - **R6.** Zero duplication. One fact, one home. Actions cite a shared file via `@` instead of restating it. - **R7.** `references/` = documents to READ and apply in place. `assets/` = files to COPY, INJECT, or fill in per run. A template, checklist, or form is an asset, not a reference, because each run instantiates it. - **R8.** Every action follows the action anatomy (below) and carries a `## Test`. diff --git a/plugins/aidd-context/skills/05-rule-generate/SKILL.md b/plugins/aidd-context/skills/05-rule-generate/SKILL.md index 67e51723..dd269bcf 100644 --- a/plugins/aidd-context/skills/05-rule-generate/SKILL.md +++ b/plugins/aidd-context/skills/05-rule-generate/SKILL.md @@ -1,6 +1,6 @@ --- name: 05-rule-generate -description: Generate a coding rule that governs editor and agent behavior, across the host AI tools a project uses. Use when the user wants to write, add, or refactor a rule, a convention, or a coding standard, or to scan a codebase and propose rules. Not for other artifacts like skills, agents, commands, hooks. +description: Generate a coding rule that governs editor and agent behavior across the host AI tools. Use when the user wants to write, add, or refactor a rule, convention, or coding standard. Not for other artifacts like skills, agents, or hooks. argument-hint: capture-rule | write-rule | validate --- diff --git a/plugins/aidd-context/skills/05-rule-generate/references/tool-paths.md b/plugins/aidd-context/skills/05-rule-generate/references/tool-paths.md index 0aba68d9..30ad5810 100644 --- a/plugins/aidd-context/skills/05-rule-generate/references/tool-paths.md +++ b/plugins/aidd-context/skills/05-rule-generate/references/tool-paths.md @@ -12,7 +12,7 @@ The per-tool rules path and write targets. Rule slice only, nothing about skills | OpenCode | - | no | | Codex CLI | - | no | -`` is the file name `#-slug` from `@references/rule-authoring.md` (e.g. `2-python-fstrings`). `` is that slug with its leading category digit dropped (`python-fstrings`). `` is the folder `-`, the zero-padded category index plus the category name from the taxonomy, e.g. `01-standards`. `` is that same two-digit index. +`` is the file name `#-slug` from `@rule-authoring.md` (e.g. `2-python-fstrings`). `` is that slug with its leading category digit dropped (`python-fstrings`). `` is the folder `-`, the zero-padded category index plus the category name from the taxonomy, e.g. `01-standards`. `` is that same two-digit index. Copilot is flat: no category folder. Its file is `-`, e.g. `2-python-fstrings` becomes `02-python-fstrings` (one category prefix, no folder). diff --git a/plugins/aidd-context/skills/06-agent-generate/README.md b/plugins/aidd-context/skills/06-agent-generate/README.md index a26fad72..8748dd26 100644 --- a/plugins/aidd-context/skills/06-agent-generate/README.md +++ b/plugins/aidd-context/skills/06-agent-generate/README.md @@ -1,6 +1,6 @@ ← [aidd-framework](../../../../README.md) / [aidd-context](../../README.md) -# 09 - agent-generate +# 06 - agent-generate Write one canonical subagent from intent and render it once per host AI tool, converting to each tool's shape (markdown, or Codex TOML). A sibling of `04-skill-generate` for the agent artifact. diff --git a/plugins/aidd-context/skills/06-agent-generate/actions/01-capture-agent.md b/plugins/aidd-context/skills/06-agent-generate/actions/01-capture-agent.md index 1db4e78c..bf34342b 100644 --- a/plugins/aidd-context/skills/06-agent-generate/actions/01-capture-agent.md +++ b/plugins/aidd-context/skills/06-agent-generate/actions/01-capture-agent.md @@ -8,14 +8,14 @@ A free-form description of the agent's purpose, tools, and instructions. ## Output -In-context: the role and its system prompt, three proposed names, the model, a quality score, and the write mode (host with confirmed tools, or plugin source). +In-context: the role and its system prompt, the chosen name, the model, a quality score, and the write mode (host with confirmed tools, or plugin source). ## Process 1. **Gate.** Run the asset-access precheck (`@../references/tool-paths.md`). -2. **Clarify.** Ask about the purpose, tools, inputs, and instructions. If anything stays vague, ask again before moving on. +2. **Clarify.** Ask about the purpose, tools, inputs, instructions, and preferred model. If anything stays vague, ask again before moving on. 3. **Draft.** Write the canonical role (`@../references/agent-authoring.md`): a frontmatter intent + a system-prompt body. Include only the optional and orchestration sections it needs. -4. **Name.** Propose three short, catchy names that fit the purpose. +4. **Name.** Propose three short, catchy names that fit the purpose, and have the user pick one. 5. **Score.** Rate the agent 1-10 on clarity and completeness. If it scores under 8, revise and score again. 6. **Mode.** Ask where the agent goes: - **Host project**: detect the installed tools (`@../references/tool-paths.md`), propose them, and confirm which to target. @@ -23,5 +23,5 @@ In-context: the role and its system prompt, three proposed names, the model, a q ## Test -- The role, names, model, and score are stated and confirmed in writing. +- The role, name, model, and score are stated and confirmed in writing. - The score is at least 8 before writing. diff --git a/plugins/aidd-context/skills/06-agent-generate/references/tool-paths.md b/plugins/aidd-context/skills/06-agent-generate/references/tool-paths.md index bdab55e7..5ca7a125 100644 --- a/plugins/aidd-context/skills/06-agent-generate/references/tool-paths.md +++ b/plugins/aidd-context/skills/06-agent-generate/references/tool-paths.md @@ -30,7 +30,7 @@ The canonical agent carries `name`, `description`, `model`. Emit those a row acc Codex agents are TOML, not markdown. Convert: -- Each frontmatter field becomes a top-level TOML key. Quote every string value with `'single quotes'` so a quote or apostrophe in the description stays valid TOML. +- Each frontmatter field becomes a top-level TOML key. Quote every string value with `"double quotes"` (a TOML basic string) and escape any embedded `"` or backslash, so a quote or apostrophe in the description stays valid TOML. - The body becomes `developer_instructions`, wrapped in `'''` literal delimiters (no escaping of the markdown). - Drop `model`. diff --git a/plugins/aidd-context/skills/07-command-generate/README.md b/plugins/aidd-context/skills/07-command-generate/README.md index 8fe6196d..efd2bddf 100644 --- a/plugins/aidd-context/skills/07-command-generate/README.md +++ b/plugins/aidd-context/skills/07-command-generate/README.md @@ -1,6 +1,6 @@ ← [aidd-framework](../../../../README.md) / [aidd-context](../../README.md) -# 10 - command-generate +# 07 - command-generate Write one canonical slash command from intent and render it once per host AI tool that supports commands. A sibling of `04-skill-generate` for the command artifact. diff --git a/plugins/aidd-context/skills/07-command-generate/references/tool-paths.md b/plugins/aidd-context/skills/07-command-generate/references/tool-paths.md index c8fe5c41..663455b0 100644 --- a/plugins/aidd-context/skills/07-command-generate/references/tool-paths.md +++ b/plugins/aidd-context/skills/07-command-generate/references/tool-paths.md @@ -6,8 +6,6 @@ The per-tool command path and write targets. Command slice only, nothing about s | Tool | Path | Supported | | -------------- | ------------------------------------------- | ------------------------------------ | -| Tool | Path | Supported | -| -------------- | ----------------------------------------- | ------------------------------------ | | Claude Code | `.claude/commands//.md` | yes | | Cursor | `.cursor/commands//.md` | yes (plain markdown, no frontmatter) | | OpenCode | `.opencode/commands//.md` | yes | diff --git a/plugins/aidd-context/skills/08-hook-generate/SKILL.md b/plugins/aidd-context/skills/08-hook-generate/SKILL.md index ac77e824..d1648418 100644 --- a/plugins/aidd-context/skills/08-hook-generate/SKILL.md +++ b/plugins/aidd-context/skills/08-hook-generate/SKILL.md @@ -1,6 +1,6 @@ --- name: 08-hook-generate -description: Generate a hook (a handler that runs automatically at a lifecycle event) across the host AI tools a project uses. Use when the user wants to create, scaffold, or refactor a hook, or automate an action at a lifecycle point. Not for other artifacts like skills, rules, agents, commands. +description: Generate a hook, a handler that runs at a lifecycle event, across the host AI tools. Use when the user wants to create, scaffold, or refactor a hook, or automate an action at a lifecycle point. Not for other artifacts like skills or rules. argument-hint: capture-hook | write-hook | validate --- diff --git a/plugins/aidd-context/skills/08-hook-generate/references/hook-authoring.md b/plugins/aidd-context/skills/08-hook-generate/references/hook-authoring.md index 4ccbd4a1..8a8d4eca 100644 --- a/plugins/aidd-context/skills/08-hook-generate/references/hook-authoring.md +++ b/plugins/aidd-context/skills/08-hook-generate/references/hook-authoring.md @@ -14,7 +14,7 @@ The contract every generated hook must satisfy. A hook is a handler wired to a l ## Lifecycle moments -The agnostic moments a hook can target. Each tool names these differently and supports a different subset. The mapping and the gaps live in `references/tool-paths.md`. +The agnostic moments a hook can target. Each tool names these differently and supports a different subset. `references/tool-paths.md` maps the commonly supported moments to each tool's event name; a moment absent from that table has no dedicated cross-tool event, so fold it into the nearest supported moment. | Moment | Fires when | | ------------------- | --------------------------------------------------- | diff --git a/plugins/aidd-context/skills/09-mermaid/SKILL.md b/plugins/aidd-context/skills/09-mermaid/SKILL.md index 34a35d57..b615b3c1 100644 --- a/plugins/aidd-context/skills/09-mermaid/SKILL.md +++ b/plugins/aidd-context/skills/09-mermaid/SKILL.md @@ -1,6 +1,6 @@ --- name: 09-mermaid -description: Generate a valid, high-quality Mermaid diagram from a written source through a plan, confirm, generate, review loop. Use when the user wants to turn an architecture, lifecycle, or flow description into a Mermaid diagram, or when another skill needs one. Not for other diagram formats like PlantUML or Graphviz, or for rendering a diagram to an image. +description: Generate a valid Mermaid diagram from a written source through a plan, generate, review loop. Use when the user wants to turn an architecture, lifecycle, or flow into a Mermaid diagram. Not for other diagram formats or image rendering. --- # Mermaid diff --git a/plugins/aidd-context/skills/09-mermaid/actions/01-mermaid.md b/plugins/aidd-context/skills/09-mermaid/actions/01-mermaid.md index bcb94d8f..9ea04c44 100644 --- a/plugins/aidd-context/skills/09-mermaid/actions/01-mermaid.md +++ b/plugins/aidd-context/skills/09-mermaid/actions/01-mermaid.md @@ -17,7 +17,7 @@ A Mermaid diagram in a fenced block, plus an optional review note. On the first 3. **Confirm.** Ask the user to confirm the plan. Block on the answer. 4. **Generate.** Produce a valid Mermaid diagram from the confirmed plan, following the conventions and defaults in `@../references/mermaid-conventions.md`. 5. **Offer a review.** Ask whether the user wants a review, and wait. -6. **Review on confirm.** Check the syntax, look for an empty or misplaced node, and suggest improvements. Never add an element that was not in the confirmed plan. +6. **Review on confirm.** Check the syntax, look for an empty or misplaced node, and suggest improvements. ## Test diff --git a/plugins/aidd-context/skills/10-learn/SKILL.md b/plugins/aidd-context/skills/10-learn/SKILL.md index 8ee8014b..a9e04f4f 100644 --- a/plugins/aidd-context/skills/10-learn/SKILL.md +++ b/plugins/aidd-context/skills/10-learn/SKILL.md @@ -1,6 +1,6 @@ --- name: 10-learn -description: Capture durable project learnings from the conversation or the project's git history and route them to memory, a decision record, a rule, or a new skill. Use when the user asks to capture, record, or remember a decision, a convention, or a lesson, or to distill what recent work taught. Scores each candidate and confirms before writing. Not for personal or AI preferences, routine edits, or anything already captured. +description: Capture durable project learnings from the conversation or git history into memory, a record, a rule, or a skill. Use when the user asks to capture, record, or remember a decision or lesson. Not for AI preferences or already-captured items. argument-hint: gather | assess | write | sync --- diff --git a/plugins/aidd-context/skills/10-learn/actions/02-assess.md b/plugins/aidd-context/skills/10-learn/actions/02-assess.md index 9def3fc0..a63fd816 100644 --- a/plugins/aidd-context/skills/10-learn/actions/02-assess.md +++ b/plugins/aidd-context/skills/10-learn/actions/02-assess.md @@ -14,7 +14,8 @@ A plan the user has approved: the lessons to keep, each with its destination. 1. **Score.** Give each candidate a relevance score from 0 to 10 with a one-line reason. Weigh how durable it is, how far it generalizes beyond this task, and whether it extends or contradicts existing context. 2. **Propose and reconcile.** For each candidate, name the destination it fits (Memory, Decision, Rule, or Skill, see the skill's Destinations). Then read that destination's current content and classify the candidate against it: new, already covered, or a change to what is there. A reworded repeat of something already captured is already covered, not a new lesson, even when the existing wording differs. A candidate that reverses an existing entry supersedes it. -3. **Ask.** Show the candidates sorted by score, each with its score, reason, destination, and how it reconciles (new, already covered, or supersedes). Recommend the bar at 6 of 10 and recommend skipping the already-covered ones. For every candidate, let the user keep it, move it to another destination, or skip it. Write nothing anywhere until the user has decided. Block on the answer. +3. **Show.** Show the candidates sorted by score, each with its reason, destination, and reconciliation (new, already covered, or supersedes). Recommend the bar at 6 of 10 and skipping the already-covered. +4. **Decide.** Let the user keep, redirect, or skip each. Write nothing until they decide; block on the answer. ## Test diff --git a/plugins/aidd-context/skills/10-learn/actions/03-write.md b/plugins/aidd-context/skills/10-learn/actions/03-write.md index b9558365..eca8e2c1 100644 --- a/plugins/aidd-context/skills/10-learn/actions/03-write.md +++ b/plugins/aidd-context/skills/10-learn/actions/03-write.md @@ -13,7 +13,7 @@ The created or updated files, and a summary table. ## Process 1. **Write by destination:** - - **Memory.** Update the matching memory file at the root of the bank. Touch only the relevant section, and replace an entry the lesson supersedes rather than adding a contradicting one. Preserve the user's edits. + - **Memory.** Update the matching memory file at the root of the bank. Touch only the relevant section, and replace an entry the lesson supersedes rather than adding a contradicting one. - **Decision.** Write a record in `aidd_docs/memory/internal/decisions/` from `@../assets/decision-template.md`, named by a short slug. Create the folder if absent. - **Rule.** Hand the convention to the rule generator. Never write a rule file here. - **Skill.** Hand the intent to the skill generator. Never write a skill file here. diff --git a/plugins/aidd-context/skills/10-learn/actions/04-sync.md b/plugins/aidd-context/skills/10-learn/actions/04-sync.md index 44f74ade..131e158a 100644 --- a/plugins/aidd-context/skills/10-learn/actions/04-sync.md +++ b/plugins/aidd-context/skills/10-learn/actions/04-sync.md @@ -14,7 +14,7 @@ Each memory block lists the current memory files, and the memory index is refres 1. **Run.** Execute the memory-sync script (`update_memory.js` in the plugin's `hooks/`) to inject the references and refresh the memory index. 2. **Guard.** On a non-zero exit, print the error and stop. Tell the user to confirm the memory bank holds a file and that `node` is available. -3. **Report.** Print how many context files were updated and how many references went into each block. +3. **Report.** Print which context files were updated and the references that went into each block. ## Test diff --git a/plugins/aidd-context/skills/11-explore/SKILL.md b/plugins/aidd-context/skills/11-explore/SKILL.md index 34b9338b..5ad5ffd7 100644 --- a/plugins/aidd-context/skills/11-explore/SKILL.md +++ b/plugins/aidd-context/skills/11-explore/SKILL.md @@ -1,6 +1,6 @@ --- name: 11-explore -description: Explore the current project across its tooling, context, and codebase. Use to survey what is installed and set up, see what is available, or find which installed skill, agent, or rule fits a goal. Not for the next step to take (onboard does that) or running an item (this skill only points). +description: Explore the current project across its tooling, context, and codebase. Use to survey what is installed, see what is available, or find which skill, agent, or rule fits a goal. Not for choosing the next step or running an item; it only points. argument-hint: survey | drill --- diff --git a/plugins/aidd-context/skills/11-explore/actions/01-survey.md b/plugins/aidd-context/skills/11-explore/actions/01-survey.md index 502c1009..8b868871 100644 --- a/plugins/aidd-context/skills/11-explore/actions/01-survey.md +++ b/plugins/aidd-context/skills/11-explore/actions/01-survey.md @@ -12,12 +12,12 @@ A map grouped by axis, Tooling, Context, and Codebase. Each axis lists what is t ## Process -1. **Detect the tools.** Find which AI tools the project uses from the signals in `@../references/ai-mapping.md`. Propose the set when it is ambiguous, never assume one silently. -2. **Scan Tooling.** For each detected tool, gather the installed skills, agents, commands, rules, hooks, MCP servers, and plugins from the surfaces in `@../references/ai-mapping.md`. A surface a tool does not have is skipped, never an error. +1. **Detect the tools.** Find which AI tools the project uses by the presence signal in `@../references/ai-mapping.md`, keying on a tool's own mapped surfaces, never a shared parent directory. Propose the set when it is ambiguous, never assume one silently. +2. **Scan Tooling.** For each detected tool, gather the installed skills, agents, commands, rules, hooks, MCP servers, and plugins from the surfaces in `@../references/ai-mapping.md`. 3. **Scan Context.** The memory bank under `aidd_docs/memory/` and whether its files are filled, any specs or plans under `aidd_docs/`, and whether the AI context files carry the `` block. 4. **Scan Codebase.** The stack, from the manifest or from the memory bank, and the few top-level modules or layers. -5. **Present the map.** One section per axis, each a short list or count with one-line purposes. No next-step advice, that belongs to the onboard skill. -6. **Propose to dig in.** Offer the three axes or all, and hand the pick to `02-drill`. Never assume one. Wait for the answer. +5. **Present the map.** One section per axis, each a short list or count with one-line purposes. +6. **Propose to dig in.** Offer the three axes or all, and hand the pick to `02-drill`. Wait for the answer. ## Test diff --git a/plugins/aidd-context/skills/11-explore/references/ai-mapping.md b/plugins/aidd-context/skills/11-explore/references/ai-mapping.md index fb30d65f..388337fb 100644 --- a/plugins/aidd-context/skills/11-explore/references/ai-mapping.md +++ b/plugins/aidd-context/skills/11-explore/references/ai-mapping.md @@ -2,6 +2,10 @@ Where to look for each artifact type per AI tool. Scan-only: the paths and formats the survey and drill actions read. This is explore's own minimal map, the single source of per-tool surfaces. Actions never hardcode a tool. +## Presence signal + +A tool is present only when one of its own mapped surfaces below holds a file. A shared parent directory is never a signal by itself. + ## AI quick map - content artifacts | AI | Agents | Commands / Prompts | Rules | Skills | Context file | diff --git a/plugins/aidd-context/skills/12-cook/actions/02-upsert.md b/plugins/aidd-context/skills/12-cook/actions/02-upsert.md index 62e87015..c7e681e5 100644 --- a/plugins/aidd-context/skills/12-cook/actions/02-upsert.md +++ b/plugins/aidd-context/skills/12-cook/actions/02-upsert.md @@ -1,11 +1,15 @@ # 02 - Upsert recipe -Create or update one recipe at `recipes/.md`, scaffolded from `@assets/recipe-template.md`. +Create or update one recipe at `recipes/.md`, scaffolded from `@../assets/recipe-template.md`. ## Input The recipe topic. Ask for any missing field (level, time, prerequisites, steps, verify, related) before writing. +## Output + +The recipe file at `recipes/.md`, filled from the template, with its row added or refreshed in `recipes/README.md`. + ## Process 1. Derive a kebab-case `` from the topic → `recipes/.md`. @@ -15,3 +19,4 @@ The recipe topic. Ask for any missing field (level, time, prerequisites, steps, ## Test - `recipes/.md` exists and matches the template, every section present, no `<...>` placeholder left. +- `recipes/README.md` carries a row for ``: its title linked, plus the goal and level. diff --git a/plugins/aidd-context/skills/12-cook/assets/recipe-template.md b/plugins/aidd-context/skills/12-cook/assets/recipe-template.md index cdf37fd3..278237ca 100644 --- a/plugins/aidd-context/skills/12-cook/assets/recipe-template.md +++ b/plugins/aidd-context/skills/12-cook/assets/recipe-template.md @@ -16,9 +16,9 @@ ## Steps -1. 📋 **** — -2. 🔧 **** — -3. ✅ **** — +1. 📋 ****: +2. 🔧 ****: +3. ✅ ****: ## Verify diff --git a/plugins/aidd-dev/CATALOG.md b/plugins/aidd-dev/CATALOG.md index 38e7aa05..01f21386 100644 --- a/plugins/aidd-dev/CATALOG.md +++ b/plugins/aidd-dev/CATALOG.md @@ -61,7 +61,6 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [phase-template.md](skills/01-plan/assets/phase-template.md) | - | | `assets` | [plan-template.md](skills/01-plan/assets/plan-template.md) | - | | `-` | [README.md](skills/01-plan/README.md) | - | -| `references` | [mermaid-conventions.md](skills/01-plan/references/mermaid-conventions.md) | `Rules for generating valid, high-quality Mermaid diagrams. Apply when creating or reviewing any Mermaid diagram (flowchart, state, ER, sequence, gantt).` | | `references` | [plan-status.md](skills/01-plan/references/plan-status.md) | `Plan lifecycle status field - values, meaning, who writes each, and when.` | | `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.` | @@ -101,7 +100,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [07-ui.md](skills/04-audit/actions/07-ui.md) | - | | `assets` | [audit-template.md](skills/04-audit/assets/audit-template.md) | `Codebase audit report template` | | `-` | [README.md](skills/04-audit/README.md) | - | -| `-` | [SKILL.md](skills/04-audit/SKILL.md) | `Read-only codebase audit across quality pillars (code-quality, architecture, security, dependencies, performance, tests, ui). Diagnoses and reports findings; never edits code. Use when the user wants to assess, audit, or health-check a codebase or one dimension of it, then hands off to the act-skills (refactor, test, impeccable) to fix. Do NOT use for fixing the findings (hand off to refactor/test/impeccable), per-PR code review (use 05-review), or validating that a feature works (use 03-assert).` | +| `-` | [SKILL.md](skills/04-audit/SKILL.md) | `Audit a codebase read-only across seven quality pillars into one ranked report. Use when the user wants to assess, health-check, or audit a codebase or one pillar. Not for fixing findings, reviewing a change, or checking a feature works.` | #### `skills/05-review` @@ -113,7 +112,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [review-template.md](skills/05-review/assets/review-template.md) | - | | `-` | [README.md](skills/05-review/README.md) | - | | `references` | [review-rubric.md](skills/05-review/references/review-rubric.md) | - | -| `-` | [SKILL.md](skills/05-review/SKILL.md) | `Read-only review of a diff on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Do NOT use to fix findings or audit a codebase.` | +| `-` | [SKILL.md](skills/05-review/SKILL.md) | `Review a diff read-only on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Not for fixing findings or auditing a codebase.` | #### `skills/06-test` @@ -122,7 +121,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [01-test.md](skills/06-test/actions/01-test.md) | - | | `actions` | [02-test-journey.md](skills/06-test/actions/02-test-journey.md) | - | | `-` | [README.md](skills/06-test/README.md) | - | -| `-` | [SKILL.md](skills/06-test/SKILL.md) | `Write and iterate on tests until they pass, and validate user journeys end-to-end in the browser.` | +| `-` | [SKILL.md](skills/06-test/SKILL.md) | `Write and iterate tests until they pass, or validate a user journey end to end in the browser. Use when the user wants to add coverage, find what's untested, or walk a flow. Not for auditing test health or debugging a failure.` | #### `skills/07-refactor` @@ -133,7 +132,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [03-cleanup.md](skills/07-refactor/actions/03-cleanup.md) | - | | `actions` | [04-architecture.md](skills/07-refactor/actions/04-architecture.md) | - | | `-` | [README.md](skills/07-refactor/README.md) | - | -| `-` | [SKILL.md](skills/07-refactor/SKILL.md) | `Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, restructure, or delete/remove code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill).` | +| `-` | [SKILL.md](skills/07-refactor/SKILL.md) | `Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report. Use when the user wants to refactor, optimize, harden, or remove code. Not for read-only diagnosis or adding tests.` | #### `skills/08-debug` @@ -145,7 +144,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [task-template.md](skills/08-debug/assets/task-template.md) | `Task tracking system to ensure all tasks are categorized and addressed` | | `-` | [README.md](skills/08-debug/README.md) | - | | `references` | [mermaid-conventions.md](skills/08-debug/references/mermaid-conventions.md) | `Rules for generating valid, high-quality Mermaid diagrams. Apply when creating or reviewing any Mermaid diagram (flowchart, state, ER, sequence, gantt).` | -| `-` | [SKILL.md](skills/08-debug/SKILL.md) | `Reproduce and fix bugs systematically using test-driven workflow, root cause analysis, and hypothesis validation.` | +| `-` | [SKILL.md](skills/08-debug/SKILL.md) | `Reproduce and fix a known bug, or find an unknown root cause by hypothesis validation. Use when the user wants to fix a bug, find why something breaks, or reopen a stuck investigation. Not for building a feature or reviewing a diff.` | #### `skills/09-for-sure` @@ -154,9 +153,11 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [01-init-tracking.md](skills/09-for-sure/actions/01-init-tracking.md) | - | | `actions` | [02-auto-accept.md](skills/09-for-sure/actions/02-auto-accept.md) | - | | `actions` | [03-autonomous-loop.md](skills/09-for-sure/actions/03-autonomous-loop.md) | - | -| `assets` | [plan-template.md](skills/09-for-sure/assets/plan-template.md) | `For Sure autonomous-loop tracking file. Extends the 01-plan format with `success_condition` and `iteration` (For-Sure-only), which the loop runs and increments.` | +| `assets` | [autonomous-loop-worker-prompt.md](skills/09-for-sure/assets/autonomous-loop-worker-prompt.md) | - | +| `assets` | [plan-template.md](skills/09-for-sure/assets/plan-template.md) | - | | `-` | [README.md](skills/09-for-sure/README.md) | - | -| `-` | [SKILL.md](skills/09-for-sure/SKILL.md) | `Iterative agent loop that tracks attempts and retries until a success condition is met. Use when the user says "for sure", "make sure", "keep trying until", "loop until done", "don't stop until", or needs guaranteed completion of a task with explicit success criteria.` | +| `references` | [autonomous-loop-log-format.md](skills/09-for-sure/references/autonomous-loop-log-format.md) | - | +| `-` | [SKILL.md](skills/09-for-sure/SKILL.md) | `Run an iterative agent loop that retries until a runnable success condition passes. Use when the user says "for sure", "keep trying until", or wants guaranteed completion against a success command. Not for one-shot tasks or uncheckable goals.` | #### `skills/10-todo` @@ -164,5 +165,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai |-------|------|---| | `actions` | [01-todo.md](skills/10-todo/actions/01-todo.md) | - | | `-` | [README.md](skills/10-todo/README.md) | - | -| `-` | [SKILL.md](skills/10-todo/SKILL.md) | `Split the user prompt into independent todos, run one executor agent per todo in parallel (each refines its todo first), and report a minimal table. Use when the user says "todo", "/todo", or asks to fan out a multi-part request into parallel implementations.` | +| `-` | [SKILL.md](skills/10-todo/SKILL.md) | `Split the user prompt into independent todos and run one executor agent per todo in parallel, then report a minimal table. Use when the user says "todo" or asks to fan out a multi-part request into parallel implementations.` | diff --git a/plugins/aidd-dev/skills/00-sdlc/actions/01-spec.md b/plugins/aidd-dev/skills/00-sdlc/actions/01-spec.md index bb5483a2..0abcbcf4 100644 --- a/plugins/aidd-dev/skills/00-sdlc/actions/01-spec.md +++ b/plugins/aidd-dev/skills/00-sdlc/actions/01-spec.md @@ -6,7 +6,7 @@ Consolidate every available source into the normalized contract consumed downstr ## Input -The raw `$ARGUMENTS` (free-form text or a ticket URL), any available sources (ticket body, existing PRD, in-session conversation, prior checker findings), and the repo root. +The raw arguments (free-form text or a ticket URL), any available sources (ticket body, existing PRD, in-session conversation, prior checker findings), and the repo root. ## Output diff --git a/plugins/aidd-dev/skills/00-sdlc/actions/02-plan.md b/plugins/aidd-dev/skills/00-sdlc/actions/02-plan.md index b67b2b45..4e170e54 100644 --- a/plugins/aidd-dev/skills/00-sdlc/actions/02-plan.md +++ b/plugins/aidd-dev/skills/00-sdlc/actions/02-plan.md @@ -4,7 +4,7 @@ Turn the spec, or the raw request when spec was skipped, into a validated plan f ## Input -The spec path from `01` (null when skipped), the objective and acceptance criteria from `01`, the raw `$ARGUMENTS` (needed when there is no spec), and the repo root. +The spec path from `01` (null when skipped), the objective and acceptance criteria from `01`, the raw arguments (needed when there is no spec), and the repo root. ## Output diff --git a/plugins/aidd-dev/skills/00-sdlc/actions/03-implement.md b/plugins/aidd-dev/skills/00-sdlc/actions/03-implement.md index 41c686c8..bb37df2b 100644 --- a/plugins/aidd-dev/skills/00-sdlc/actions/03-implement.md +++ b/plugins/aidd-dev/skills/00-sdlc/actions/03-implement.md @@ -13,7 +13,7 @@ The plan reaches `status: implemented`, every phase `done`, validation green. Or ## Process 1. **Implement.** Spawn the `executor` agent and brief it to run the `aidd-dev:02-implement` recipe on `plan_path`. The agent branches, codes every phase, commits the code and the status transitions, and validates. -2. **Iterate.** When the step runs after an `iterate` verdict, spawn the `executor` again and hand it the findings as a fix list. It codes the fixes against the current diff, then asserts and validates them before returning, exactly as the recipe gates a phase: a fix is finished only when it passes. Do not edit the plan or its phases: the loop fixes what was implemented, not the plan. +2. **Iterate.** After an `iterate` verdict, spawn `executor` again with the findings as a fix list. It codes them against the current diff, then asserts and validates, gating like a phase: done only when it passes. Never edit the plan; the loop fixes the diff, not the plan. 3. **Resolve.** Read the plan's final `status`. - `implemented`: the step is done. - `blocked`: a human-only condition stopped the run. Do not continue. Escalate to a human. diff --git a/plugins/aidd-dev/skills/00-sdlc/actions/04-review.md b/plugins/aidd-dev/skills/00-sdlc/actions/04-review.md index 1e48469b..d85e1f71 100644 --- a/plugins/aidd-dev/skills/00-sdlc/actions/04-review.md +++ b/plugins/aidd-dev/skills/00-sdlc/actions/04-review.md @@ -12,7 +12,7 @@ A `ship` or `iterate` verdict with the reviewed items, the findings, the complet ## Process -1. **Capture.** Record `git rev-parse HEAD` as the reviewed SHA. This is the exact code the checker judges, and the anchor `05-ship` checks against. +1. **Capture.** Record the current `HEAD` sha as the reviewed SHA. This is the exact code the checker judges, and the anchor `05-ship` checks against. 2. **Spawn.** Spawn the `checker` agent with the inputs above. Brief it to run `aidd-dev:05-review`, code, functional, and relevancy, on that diff, and return its verdict. 3. **Map.** When every check passes, the verdict is `ship`. On any blocking finding, the verdict is `iterate`. 4. **Mark.** On `ship`, set the plan frontmatter `status: reviewed` and commit it. Carry the reviewed SHA in the verdict. On `iterate`, leave the plan `implemented`: the loop fixes the diff, not the plan. diff --git a/plugins/aidd-dev/skills/00-sdlc/actions/05-ship.md b/plugins/aidd-dev/skills/00-sdlc/actions/05-ship.md index 91c7d816..27727fc4 100644 --- a/plugins/aidd-dev/skills/00-sdlc/actions/05-ship.md +++ b/plugins/aidd-dev/skills/00-sdlc/actions/05-ship.md @@ -12,10 +12,11 @@ The commit SHA and the change-request URL on the project's VCS host. ## Process -1. **Gate.** Confirm `04` produced a `ship` verdict and that no code landed after the reviewed SHA it carries. Run `git diff --name-only HEAD`: it must list only plan-tracking files (the `chore(plan): reviewed` commit and the like). Any source-code change means the reviewed verdict is stale and the new code is unreviewed: stop, run `04` on the current diff, looping back to `03` on `iterate`. If no verdict exists or it is `iterate`, stop the same way. Code is never shipped unreviewed. -2. **Commit.** Invoke a commit capability, discovered at runtime, with the plan's objective. It picks the message format; never dictate one here. -3. **Open.** Invoke a change-request capability, discovered at runtime, to push the branch and open the request. Reference the plan path in the body. -4. **Return.** Surface the commit SHA and the change-request URL. +1. **Gate.** Confirm `04` returned a `ship` verdict and HEAD is on a non-default branch. Without a `ship` verdict, or on `iterate`, stop and re-run `04` (looping to `03` on `iterate`). On the default branch, stop with `contract_violation: on_default_branch` and commit nothing. +2. **Freshness.** Confirm no code landed after the reviewed SHA: `git diff --name-only HEAD` must list only plan-tracking files. Any source change means the review is stale, so stop and re-run `04`. Never ship unreviewed code. +3. **Commit.** Invoke a commit capability, discovered at runtime, with the plan's objective. It picks the message format; never dictate one here. +4. **Open.** Invoke a change-request capability, discovered at runtime, to push the branch and open the request. Reference the plan path in the body. +5. **Return.** Surface the commit SHA and the change-request URL. ## Test @@ -23,3 +24,4 @@ The commit SHA and the change-request URL on the project's VCS host. - The commit SHA exists in `git log` of the working branch. - The change-request URL is non-empty and points to the project's VCS host. - The change-request body references the plan path. +- On the default branch, the action stops with `contract_violation: on_default_branch` and makes no commit. diff --git a/plugins/aidd-dev/skills/01-plan/SKILL.md b/plugins/aidd-dev/skills/01-plan/SKILL.md index 1633df04..53b45f9c 100644 --- a/plugins/aidd-dev/skills/01-plan/SKILL.md +++ b/plugins/aidd-dev/skills/01-plan/SKILL.md @@ -21,7 +21,6 @@ Run them in order, `01 → 04`. The plan is the culmination. Skip `03` when ther ## References -- `references/mermaid-conventions.md`: conventions for the Mermaid diagrams a phase embeds. - `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. diff --git a/plugins/aidd-dev/skills/01-plan/actions/04-plan.md b/plugins/aidd-dev/skills/01-plan/actions/04-plan.md index d37c8c10..b3b7aa6f 100644 --- a/plugins/aidd-dev/skills/01-plan/actions/04-plan.md +++ b/plugins/aidd-dev/skills/01-plan/actions/04-plan.md @@ -13,8 +13,10 @@ A feature folder, always at `aidd_docs/tasks//_ + ```txt . diff --git a/plugins/aidd-dev/skills/01-plan/references/mermaid-conventions.md b/plugins/aidd-dev/skills/01-plan/references/mermaid-conventions.md deleted file mode 100644 index daa6a274..00000000 --- a/plugins/aidd-dev/skills/01-plan/references/mermaid-conventions.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -description: Rules for generating valid, high-quality Mermaid diagrams. Apply when creating or reviewing any Mermaid diagram (flowchart, state, ER, sequence, gantt). -globs: ["**/*.mmd", "**/*.md"] -alwaysApply: false ---- - -# Mermaid generation rules - -## Header - -- Always have title in schema using "---" to define it - -## Global - -- NEVER use "\n" - -## States and nodes - -- Define groups, parents, children -- Use fork and join states -- Use clear and concise names -- Use "choice" for conditions -- No standalone nodes -- No empty nodes - -## Naming - -- Declare elements only (no links) at top -- Consistent naming throughout -- Descriptive names (no "A", "B") -- Node IDs: unquoted alphanumeric (`MyNode`, not `"MyNode"`) -- Labels: in brackets with quotes (`MyNode["My Label"]`) -- Replace ":" with "$" in state names - -## Links - -- Links made at bottom of diagram -- Use direction when possible -- "A -- text --> B" for regular links -- "A -.-> B" for conditional links -- "A ==> B" for self-loops - -## Styles - -- Do style unless specified by user - -## Gantt - -- Use tags: `active`, `done`, `crit`, `milestone` -- Tags are combinable diff --git a/plugins/aidd-dev/skills/02-implement/README.md b/plugins/aidd-dev/skills/02-implement/README.md index 7184125d..ea254931 100644 --- a/plugins/aidd-dev/skills/02-implement/README.md +++ b/plugins/aidd-dev/skills/02-implement/README.md @@ -21,7 +21,7 @@ Executes an existing implementation plan phase by phase, iterating until every a Use skill aidd-dev:02-implement ``` -Pass the plan path or content as `$ARGUMENTS`. The skill runs three actions in order: +Pass the plan path or content as the arguments. The skill runs three actions in order: 1. **prepare**: fails fast when the plan is missing (never fabricates one); puts `HEAD` on a feature branch when it is on the default branch, otherwise keeps the current branch; sets the plan `status: in-progress`. 2. **execute**: loops the plan's phases: per phase it sets `status: in-progress` as a runtime marker, codes the phase, asserts it clean, then commits the phase and sets `status: done`; stops at `status: blocked` on a human-only condition. diff --git a/plugins/aidd-dev/skills/02-implement/actions/01-prepare.md b/plugins/aidd-dev/skills/02-implement/actions/01-prepare.md index 1879ce66..7e99042d 100644 --- a/plugins/aidd-dev/skills/02-implement/actions/01-prepare.md +++ b/plugins/aidd-dev/skills/02-implement/actions/01-prepare.md @@ -4,7 +4,7 @@ Resolve the plan, put the workspace on a feature branch, and mark the plan in-pr ## Input -A plan, passed via `$ARGUMENTS` as a path or inline content. +A plan, passed as arguments as a path or inline content. ## Output @@ -12,12 +12,12 @@ The resolved plan on a feature branch with its frontmatter `status: in-progress` ## Process -1. **Resolve.** Resolve the plan from `$ARGUMENTS`. A path must exist and be readable. With neither a readable file nor inline content, stop with `plan not found at `. Never fabricate a plan. -2. **Branch.** On the default branch, run `git checkout -b ` and announce it. On a non-default branch, keep it. +1. **Resolve.** Resolve the plan from the arguments. A path must exist and be readable. With neither a readable file nor inline content, stop with `plan not found at `. Never fabricate a plan. +2. **Branch.** On the default branch, create a feature branch and announce it. On a non-default branch, keep it. 3. **Mark.** Set the plan frontmatter `status: in-progress` as a runtime marker. No separate commit: it rides into the first phase commit, or into the `implemented` commit if there is no phase to code. ## Test - A missing or unreadable plan with no inline content stops with `plan not found at `, and no plan is fabricated. -- `git rev-parse --abbrev-ref HEAD` is not the default branch. +- The current branch is not the default branch. - The plan frontmatter reads `status: in-progress`. diff --git a/plugins/aidd-dev/skills/02-implement/actions/02-execute.md b/plugins/aidd-dev/skills/02-implement/actions/02-execute.md index dc020553..2464642f 100644 --- a/plugins/aidd-dev/skills/02-implement/actions/02-execute.md +++ b/plugins/aidd-dev/skills/02-implement/actions/02-execute.md @@ -14,9 +14,10 @@ Every phase coded, asserted, and its frontmatter marked `status: done`, with the 1. **Open.** Walk the phases in order. In a feature folder each is a `phase-.md` next to `plan.md`. Set its `status: in-progress` as a runtime marker; no commit yet. 2. **Code.** Build the phase scope against its acceptance criteria. -3. **Assert.** Assert the phase against its acceptance criteria. On failure, repair and repeat. The gate is the assertion passing, not a self-report. Only once it passes, set `status: done` and commit the phase as one unit, its code and its status together. -4. **Blocked.** On `BLOCKED` (see `@../references/blocked.md`), set the plan `status: blocked`, commit it, and stop the loop. -5. **Drift.** Follow the plan as written. Never rewrite it. On any mismatch, trivial or substantive, stop and report `replan needed: ` to the caller. Replanning is the caller's job, not this recipe's. +3. **Assert.** Assert the phase against its acceptance criteria. On failure, repair and repeat. The gate is the assertion passing, not a self-report. Once it passes, set `status: done` and commit the phase as one unit, its code and its status together. +4. **Guard.** Stop the loop on either condition: + - **Blocked** (see `@../references/blocked.md`): set the plan `status: blocked`, commit, stop. + - **Drift**: any mismatch with the plan, trivial or substantive, stop and report `replan needed: `. Never rewrite the plan; replanning is the caller's job. ## Test diff --git a/plugins/aidd-dev/skills/03-assert/actions/01-assert.md b/plugins/aidd-dev/skills/03-assert/actions/01-assert.md index b744f5f0..8904e510 100644 --- a/plugins/aidd-dev/skills/03-assert/actions/01-assert.md +++ b/plugins/aidd-dev/skills/03-assert/actions/01-assert.md @@ -4,7 +4,7 @@ Iterate the project's coding assertions until the work passes every one, fixing ## Input -The work to assert, named or described, from `$ARGUMENTS` or the context. +The work to assert, named or described, from the arguments or the context. ## Output diff --git a/plugins/aidd-dev/skills/03-assert/actions/02-assert-architecture.md b/plugins/aidd-dev/skills/03-assert/actions/02-assert-architecture.md index 1500fa60..cea6c981 100644 --- a/plugins/aidd-dev/skills/03-assert/actions/02-assert-architecture.md +++ b/plugins/aidd-dev/skills/03-assert/actions/02-assert-architecture.md @@ -4,7 +4,7 @@ Report where the codebase breaks the documented architecture: C4 diagrams, ADRs, ## Input -The scope to check, a module, service, or layer, from `$ARGUMENTS`; defaults to the whole project. +The scope to check, a module, service, or layer, from the arguments; defaults to the whole project. ## Output @@ -15,7 +15,7 @@ A conformance report listing each violation, grouped macro and micro, with sever 1. **Load.** Read the architecture sources: the architecture memory, the micro diagrams for an in-scope module, and the decision records. Extract the expected project tree. 2. **Macro.** Compare the code structure against the documented tree. Flag files outside their boundary and direct imports between independent services. 3. **Micro.** For each in-scope module, check import directions against the layer constraints. The domain layer imports nothing external. The application layer reaches the domain only through ports. No circular dependencies. Adapters implement their interfaces. -4. **Report.** One entry per violation, grouped macro and micro, each with severity (`critical` or `warning`), file, constraint, and a one-line fix. Never fix, only report. +4. **Report.** One entry per violation, grouped macro and micro, each with severity (`critical` or `warning`), file, constraint, and a one-line fix. 5. **Summarize.** The total violations, the critical count, and the recommended next actions. ## Test diff --git a/plugins/aidd-dev/skills/03-assert/actions/03-assert-frontend.md b/plugins/aidd-dev/skills/03-assert/actions/03-assert-frontend.md index c26d9bc4..3d6a9d87 100644 --- a/plugins/aidd-dev/skills/03-assert/actions/03-assert-frontend.md +++ b/plugins/aidd-dev/skills/03-assert/actions/03-assert-frontend.md @@ -4,11 +4,11 @@ Iterate until the frontend behaves as intended by inspecting the running UI, map ## Input -The expected behavior, from `$ARGUMENTS`. The frontend's URL when the caller knows it, otherwise resolved at runtime. +The expected behavior, from the arguments. The frontend's URL when the caller knows it, otherwise resolved at runtime. ## Output -A pass or fail verdict, with the per-iteration attempts (hypothesis, fix, result) recorded in the tracking file. +A pass or fail verdict, with the candidate causes and their fix attempts and results recorded in the tracking file. ## Process diff --git a/plugins/aidd-dev/skills/04-audit/README.md b/plugins/aidd-dev/skills/04-audit/README.md index f4cc8621..6e534c45 100644 --- a/plugins/aidd-dev/skills/04-audit/README.md +++ b/plugins/aidd-dev/skills/04-audit/README.md @@ -3,9 +3,8 @@ # 04 - audit Read-only codebase audit across seven quality pillars. Diagnoses and ranks -findings into a structured report; it never edits code. Each finding hands -off to the relevant act-skill (refactor, test, impeccable) when a fix is -wanted. +findings into a structured report; it never edits code. Each finding carries +a suggested fix for a later act-skill to apply. ## When to use @@ -17,9 +16,9 @@ wanted. ## When NOT to use - A specific bug is already known → use [08-debug](../08-debug/README.md). -- You want to fix the problems → run the audit first, then the act-skill it - hands off to ([07-refactor](../07-refactor/README.md), - [06-test](../06-test/README.md), or the `impeccable` skill for UI). +- You want to fix the problems → run the audit first, then an act-skill such + as [07-refactor](../07-refactor/README.md) or + [06-test](../06-test/README.md). - You want a per-PR code review → use [05-review](../05-review/README.md). - You want to validate a feature works → use [03-assert](../03-assert/README.md). diff --git a/plugins/aidd-dev/skills/04-audit/SKILL.md b/plugins/aidd-dev/skills/04-audit/SKILL.md index 714f7d2d..02448223 100644 --- a/plugins/aidd-dev/skills/04-audit/SKILL.md +++ b/plugins/aidd-dev/skills/04-audit/SKILL.md @@ -1,19 +1,19 @@ --- name: 04-audit -description: Read-only codebase audit across quality pillars (code-quality, architecture, security, dependencies, performance, tests, ui). Diagnoses and reports findings; never edits code. Use when the user wants to assess, audit, or health-check a codebase or one dimension of it, then hands off to the act-skills (refactor, test, impeccable) to fix. Do NOT use for fixing the findings (hand off to refactor/test/impeccable), per-PR code review (use 05-review), or validating that a feature works (use 03-assert). +description: Audit a codebase read-only across seven quality pillars into one ranked report. Use when the user wants to assess, health-check, or audit a codebase or one pillar. Not for fixing findings, reviewing a change, or checking a feature works. argument-hint: code-quality | architecture | security | dependencies | performance | tests | ui model: opus --- # Skill: audit -Diagnoses a codebase against quality pillars and emits a structured findings report. This skill is **read-only**: it identifies and ranks problems, it never changes code. Each finding hands off to the relevant act-skill when a fix is wanted. +Diagnose a codebase against quality pillars and emit one ranked findings report. Read-only: it identifies and ranks problems, never changes code. -## Available actions +## Actions | # | Action | Pillar | Lens | | --- | -------------- | ------------ | -------------------------------------------------------------------- | -| 01 | `code-quality` | code-quality | Clean code (naming, SOLID, DRY, readability, smells) + tech debt (dead code, complexity, file/function size, error handling) | +| 01 | `code-quality` | code-quality | Clean code (naming, SOLID, DRY, readability, smells) and tech debt (dead code, complexity, file/function size, error handling) | | 02 | `architecture` | architecture | Conformance to C4 / ADRs, coupling, boundaries, layering | | 03 | `security` | security | OWASP risks, authz, input validation, secrets in code | | 04 | `dependencies` | dependencies | CVEs, licenses, outdated and unused deps, supply chain | @@ -21,36 +21,16 @@ Diagnoses a codebase against quality pillars and emits a structured findings rep | 06 | `tests` | tests | Critical-path coverage, flakiness, test pyramid balance | | 07 | `ui` | ui | Loading/error/empty states, visual hierarchy, design-system drift, responsive, a11y | -## Routing (run first) - -This skill is run-one-OR-run-all: - -- The user named a pillar ("audit security", "audit the deps", "perf audit") -> run that ONE action. -- The user asked for a full or unscoped audit ("audit the codebase", "/audit", "health check") -> ask ONE question: "Full audit (all 7 pillars), or a specific pillar?" Then run all applicable pillars, or the chosen one. -- Never silently default to action 01. Never run a blind all without offering the choice first. - -When running all, skip a pillar whose method cannot run in this environment (e.g. no profiler for performance, no lockfile scanner for dependencies) and record it under the report's `Coverage > Skipped` with the reason. Never invent findings for an unscannable pillar. +Run the one pillar named, or offer all seven when the request is unscoped. -## Output contract +## Transversal rules -The report uses the shared template `@assets/audit-template.md`. There is ALWAYS exactly one report file and exactly one writer of it - never one file per pillar in a full run. +- Read-only: diagnose and rank, never edit code. +- Scope: run the one named pillar, or for an unscoped request ask once "all seven pillars, or one?" before running. Never silently default to one pillar, never blind-run all without offering the choice. +- One folder per run, `aidd_docs/tasks//_audit/`, like a feature folder. Every pillar that runs always writes its own `.md` there, alone or in a full run. A full run additionally writes a merged `report.md`: one Findings table (category = pillar, severity-first), one Top-actions list, and one Coverage section over all seven pillars. +- Unscannable pillar: skip it, record it under `Coverage > Skipped` with the reason, and never invent findings for it. +- Every finding row carries a severity, its pillar, a concrete `file:line`, the issue, a suggested fix, and an effort. -**Single-pillar run.** Run the one pillar action; it writes its own report at `aidd_docs/tasks/audits/__.md`. - -**Full run.** Run each applicable pillar action to COLLECT its findings (the pillars do not each write a file in this mode), then write ONE merged report at `aidd_docs/tasks/audits/__full.md`: -- one template header, -- the union of every pillar's finding rows in a single Findings table (`Category` = the pillar per row), sorted severity-first across all pillars, -- one ranked Top-actions list spanning all pillars, -- one Coverage section listing all 7 pillars as scanned or skipped (with reason). - -Every finding row: severity + pillar + concrete `file:line` + issue + suggested fix + effort. Read-only in both modes: emit the report and stop; never edit code. - -## Actions +## Assets -- `@actions/01-code-quality.md` -- `@actions/02-architecture.md` -- `@actions/03-security.md` -- `@actions/04-dependencies.md` -- `@actions/05-performance.md` -- `@actions/06-tests.md` -- `@actions/07-ui.md` +- `assets/audit-template.md`: the report structure both run modes fill. diff --git a/plugins/aidd-dev/skills/04-audit/actions/01-code-quality.md b/plugins/aidd-dev/skills/04-audit/actions/01-code-quality.md index cc2f4ae0..3dcc5e3e 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/01-code-quality.md +++ b/plugins/aidd-dev/skills/04-audit/actions/01-code-quality.md @@ -1,31 +1,28 @@ # 01 - Code-quality audit -Read-only audit of the `code-quality` pillar: clean-code craftsmanship and tech debt. Reports findings, never edits code. +Read-only audit of the `code-quality` pillar, clean-code craftsmanship and tech debt. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__code-quality.md # or __full.md in a full run -pillar: code-quality -findings_count: -``` +The `code-quality` findings, written to `code-quality.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the two lenses** below, using the project's conventions and coding rules already loaded in context. Stay in this pillar - architecture coupling belongs to `02-architecture`, runtime cost to `05-performance`, coverage to `06-tests`, CVEs to `04-dependencies`. - - **Clean code (craftsmanship)**: naming clarity, single-responsibility / SOLID, DRY (copy-pasted logic, re-implemented stdlib helpers), readability, abstraction level, magic numbers, dead or misleading comments, code smells. - - **Tech debt (structural)**: dead and unreachable code, unused exports/types/helpers, stale TODOs, vestigial flags, cyclomatic complexity and file/function/component length above project thresholds, nesting depth, error handling caught at the wrong boundary or silently swallowed. - - Use dedicated tools when available (e.g. an unused-export finder); never assert dead code without evidence. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `code-quality`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off fixes to `aidd-dev:07-refactor`), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Cover the two lenses below, using the project's conventions and coding rules already in context. Stay in this pillar: coupling belongs to `02-architecture`, runtime cost to `05-performance`, coverage to `06-tests`, CVEs to `04-dependencies`. + - **Clean code**: naming clarity, single-responsibility and SOLID, DRY (copy-pasted logic, re-implemented stdlib helpers), readability, abstraction level, magic numbers, dead or misleading comments, code smells. + - **Tech debt**: dead and unreachable code, unused exports, types, and helpers, stale TODOs, vestigial flags, cyclomatic complexity and file, function, or component length above project thresholds, nesting depth, error handling caught at the wrong boundary or silently swallowed. + - Use a dedicated tool when available, for example an unused-export finder. Never assert dead code without evidence. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `code-quality`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `code-quality`, a concrete `file:line`, and an effort; Coverage lists `code-quality` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `code-quality`, a concrete `file:line`, and an effort. +- Coverage lists `code-quality` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/02-architecture.md b/plugins/aidd-dev/skills/04-audit/actions/02-architecture.md index f5685ef9..69baec04 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/02-architecture.md +++ b/plugins/aidd-dev/skills/04-audit/actions/02-architecture.md @@ -1,32 +1,29 @@ # 02 - Architecture audit -Read-only audit of the `architecture` pillar: conformance to documented architecture, module coupling, and layer/boundary violations. Reports findings, never edits code. +Read-only audit of the `architecture` pillar, conformance to documented architecture, module coupling, and layer or boundary violations. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__architecture.md # or __full.md in a full run -pillar: architecture -findings_count: -``` +The `architecture` findings, written to `architecture.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the architecture lens** below, using architecture documents already loaded in context (`aidd_docs/memory`, ADRs, C4 diagrams). Stay in this pillar - intra-file craftsmanship belongs to `01-code-quality`; runtime cost to `05-performance`; CVEs to `04-dependencies`. - - **Conformance**: map the actual code structure against documented modules, layers, and C4 boundaries; flag any divergence from the stated architecture. - - **Coupling**: identify modules that import from layers they should not depend on (wrong dependency direction: outward imports into an inner layer, or circular references across bounded contexts). - - **God-modules**: detect modules with an abnormally large surface area (too many exports, too many responsibilities) that signal architectural erosion. - - When ADRs or C4 diagrams are absent, note "no architecture docs found - conformance check skipped" in Coverage > Skipped and limit the scan to observable coupling heuristics. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `architecture`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (conformance gaps feed re-planning; structural fixes hand off to `aidd-dev:07-refactor`), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Read the architecture documents already in context (`aidd_docs/memory`, ADRs, C4 diagrams). Stay in this pillar: intra-file craftsmanship belongs to `01-code-quality`, runtime cost to `05-performance`, CVEs to `04-dependencies`. + - **Conformance**: map the actual code structure against the documented modules, layers, and C4 boundaries. Flag any divergence from the stated architecture. + - **Coupling**: identify modules that import from layers they should not depend on, a wrong dependency direction or a circular reference across bounded contexts. + - **God-modules**: detect modules with an abnormally large surface area, too many exports or responsibilities, that signal architectural erosion. + - When ADRs or C4 diagrams are absent, note "no architecture docs found, conformance check skipped" in `Coverage > Skipped` and limit the scan to observable coupling heuristics. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `architecture`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `architecture`, a concrete `file:line`, and an effort; Coverage lists `architecture` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `architecture`, a concrete `file:line`, and an effort. +- Coverage lists `architecture` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/03-security.md b/plugins/aidd-dev/skills/04-audit/actions/03-security.md index e504f549..4935fa61 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/03-security.md +++ b/plugins/aidd-dev/skills/04-audit/actions/03-security.md @@ -1,35 +1,32 @@ # 03 - Security audit -Read-only audit of the `security` pillar: OWASP top risks and code-level security weaknesses. Reports findings, never edits code. +Read-only audit of the `security` pillar, OWASP top risks and code-level security weaknesses. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__security.md # or __full.md in a full run -pillar: security -findings_count: -``` +The `security` findings, written to `security.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the security lens** below using static code analysis. Stay in this pillar - known-CVE and vulnerable-dependency findings belong to `04-dependencies`; architecture coupling to `02-architecture`. - - **Input validation at trust boundaries**: check that all external inputs (HTTP requests, env vars, file paths, user-supplied data) are validated or sanitised before use. - - **Authn/authz gates**: verify that authentication and authorisation checks are enforced consistently at every protected route or operation. - - **Secrets committed in code**: flag hardcoded credentials, API keys, tokens, or passwords anywhere in the scanned files. - - **Injection risks**: SQL, command, XSS, LDAP, template injection - identify concatenated or unescaped values passed to interpreters. - - **Unsafe deserialization**: flag use of `eval`, unsafe YAML/pickle/JSON reviver patterns, or object deserialization from untrusted sources. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Use static code analysis. Stay in this pillar: known-CVE and vulnerable-dependency findings belong to `04-dependencies`, coupling to `02-architecture`. + - **Input validation at trust boundaries**: check that every external input (HTTP requests, env vars, file paths, user-supplied data) is validated or sanitised before use. + - **Authn/authz gates**: verify authentication and authorisation checks are enforced consistently at every protected route or operation. + - **Secrets in code**: flag hardcoded credentials, API keys, tokens, or passwords anywhere in the scanned files. + - **Injection risks**: SQL, command, XSS, LDAP, or template injection. Identify concatenated or unescaped values passed to interpreters. + - **Unsafe deserialization**: flag `eval`, unsafe YAML/pickle/JSON reviver patterns, or object deserialization from untrusted sources. - **Insecure defaults**: missing TLS enforcement, overly permissive CORS, disabled security headers, debug flags left on in non-dev code. - - Use static analysis tools when available; flag only findings supported by code evidence. Do not infer from naming alone. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `security`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off fixes to `aidd-dev:07-refactor` for security), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. + - Use a static-analysis tool when available. Flag only findings supported by code evidence, never inferred from naming alone. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `security`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `security`, a concrete `file:line`, and an effort; Coverage lists `security` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `security`, a concrete `file:line`, and an effort. +- Coverage lists `security` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/04-dependencies.md b/plugins/aidd-dev/skills/04-audit/actions/04-dependencies.md index c0ab991a..50f3128f 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/04-dependencies.md +++ b/plugins/aidd-dev/skills/04-audit/actions/04-dependencies.md @@ -1,33 +1,30 @@ # 04 - Dependencies audit -Read-only audit of the `dependencies` pillar: CVEs, license compliance, outdated packages, and supply-chain integrity. Reports findings, never edits code. +Read-only audit of the `dependencies` pillar, CVEs, license compliance, outdated packages, and supply-chain integrity. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__dependencies.md # or __full.md in a full run -pillar: dependencies -findings_count: -``` +The `dependencies` findings, written to `dependencies.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the dependencies lens** below using the appropriate dependency scanner. Stay in this pillar - application code security issues belong to `03-security`; runtime cost to `05-performance`. - - **Known CVEs**: run `npm audit`, `pip-audit`, `cargo audit`, or the equivalent scanner for the project's package manager. If no scanner is available or no lockfile is present, record "scanner absent" or "no lockfile found" in Coverage > Skipped and do not guess CVEs. - - **License compliance**: check declared licenses against the project's accepted-license list; flag GPL/AGPL or unknown licenses in a commercial codebase. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Use the appropriate dependency scanner. Stay in this pillar: application-code security belongs to `03-security`, runtime cost to `05-performance`. + - **Known CVEs**: run `npm audit`, `pip-audit`, `cargo audit`, or the equivalent for the project's package manager. When no scanner or lockfile is present, record "scanner absent" or "no lockfile found" in `Coverage > Skipped` and do not guess CVEs. + - **License compliance**: check declared licenses against the project's accepted-license list. Flag GPL/AGPL or unknown licenses in a commercial codebase. - **Outdated packages**: identify packages significantly behind their latest stable release, especially those with security-relevant changelogs. - - **Unused declared dependencies**: flag packages listed in the manifest but with no import found in the scanned source. - - **Lockfile integrity and supply-chain**: verify the lockfile is present and committed; flag direct git/URL dependencies and any package with no integrity hash. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` (manifest or lockfile line) for every finding. Category is always `dependencies`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off upgrades to `aidd-dev:07-refactor` or manual upgrade), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. + - **Unused declared dependencies**: flag packages listed in the manifest with no import found in the scanned source. + - **Lockfile integrity and supply chain**: verify the lockfile is present and committed. Flag direct git or URL dependencies and any package with no integrity hash. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line` in the manifest or lockfile. The category is always `dependencies`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `dependencies`, a concrete `file:line`, and an effort; Coverage lists `dependencies` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `dependencies`, a concrete `file:line`, and an effort. +- Coverage lists `dependencies` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/05-performance.md b/plugins/aidd-dev/skills/04-audit/actions/05-performance.md index 919e7e7f..e19e1aed 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/05-performance.md +++ b/plugins/aidd-dev/skills/04-audit/actions/05-performance.md @@ -1,35 +1,32 @@ # 05 - Performance audit -Read-only audit of the `performance` pillar: runtime cost, query patterns, and rendering efficiency. Reports findings, never edits code. +Read-only audit of the `performance` pillar, runtime cost, query patterns, and rendering efficiency. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__performance.md # or __full.md in a full run -pillar: performance -findings_count: -``` +The `performance` findings, written to `performance.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the performance lens** below, preferring runtime tools (profiler, bundle analyzer, query explain) when available. Stay in this pillar - cyclomatic complexity belongs to `01-code-quality`; architectural coupling to `02-architecture`. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Prefer runtime tools (profiler, bundle analyzer, query explain) when available. Stay in this pillar: cyclomatic complexity belongs to `01-code-quality`, coupling to `02-architecture`. - **N+1 queries**: detect loops that issue a database or network call on each iteration without batching. - **Unbatched heavy operations**: flag heavy computations or I/O repeated individually where a batch or bulk API exists. - - **Unpaginated large payloads**: identify endpoints or queries that fetch unbounded result sets without limit or pagination. - - **Bundle size**: use a bundle analyzer when available; flag large or duplicated dependencies that inflate the JS/CSS payload. - - **Render thrash and re-render storms**: detect layout-thrashing DOM patterns, missing memoization on computed values used in hot render paths, or component trees that re-render without guard on reference-stable props. + - **Unpaginated large payloads**: identify endpoints or queries that fetch unbounded result sets without a limit or pagination. + - **Bundle size**: use a bundle analyzer when available. Flag large or duplicated dependencies that inflate the JS or CSS payload. + - **Render thrash**: detect layout-thrashing DOM patterns, missing memoization on computed values used in hot render paths, or component trees that re-render without a guard on reference-stable props. - **Missing memoization on hot paths**: flag expensive pure computations inside render or tight loops that are not memoized. - - When no profiler or bundle analyzer is available, degrade to static heuristics and record "no profiler - static heuristics only" in Coverage > Skipped. Never assert a runtime bottleneck without evidence. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `performance`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off fixes to `aidd-dev:07-refactor` for performance), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. + - When no profiler or bundle analyzer is available, degrade to static heuristics and record "no profiler, static heuristics only" in `Coverage > Skipped`. Never assert a runtime bottleneck without evidence. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `performance`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `performance`, a concrete `file:line`, and an effort; Coverage lists `performance` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `performance`, a concrete `file:line`, and an effort. +- Coverage lists `performance` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/06-tests.md b/plugins/aidd-dev/skills/04-audit/actions/06-tests.md index 3a6e7d73..36b42e1d 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/06-tests.md +++ b/plugins/aidd-dev/skills/04-audit/actions/06-tests.md @@ -1,34 +1,31 @@ # 06 - Tests audit -Read-only audit of the `tests` pillar: coverage gaps, test quality, and test suite health. Reports findings, never edits code. +Read-only audit of the `tests` pillar, coverage gaps, test quality, and suite health. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -``` +An optional scope, a directory or file glob. Defaults to the entire codebase. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__tests.md # or __full.md in a full run -pillar: tests -findings_count: -``` +The `tests` findings, written to `tests.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. -2. **Scan the tests lens** below, preferring a coverage report when available. Stay in this pillar - whether a feature behaves correctly belongs to `aidd-dev:03-assert`; runtime cost to `05-performance`. - - **Critical-path coverage gaps**: identify code paths (auth flows, data mutations, error handling) that have no corresponding test; use a coverage report when available, degrade to static inspection of test-file presence when absent. - - **Tests asserting implementation instead of behavior**: flag tests that couple to internal method names, private state, or implementation details rather than observable outputs. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. +2. **Scan.** Prefer a coverage report when available. Stay in this pillar: whether a feature behaves correctly is a separate concern, runtime cost belongs to `05-performance`. + - **Critical-path coverage gaps**: identify code paths (auth flows, data mutations, error handling) with no test. Use a coverage report when available, degrade to static inspection of test-file presence when absent. + - **Tests asserting implementation, not behavior**: flag tests coupled to internal method names, private state, or implementation details rather than observable outputs. - **Flaky tests**: flag tests that use arbitrary `sleep` calls, rely on timing, or have known intermittent failures recorded in CI history or inline comments. - - **Skipped or xfail tests without a recorded reason**: flag `skip`, `xit`, `xfail`, `.todo`, or equivalent markers that lack an explanatory comment or issue reference. - - **Test pyramid imbalance**: flag suites with disproportionately many end-to-end or integration tests and few unit tests, raising maintenance cost and feedback speed. - - When no coverage tool is available, record "no coverage tool - static inspection only" in Coverage > Skipped and limit findings to structurally observable issues. Do not invent coverage numbers. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `tests`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off new or fixed tests to `aidd-dev:06-test`), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. + - **Skipped tests without a reason**: flag `skip`, `xit`, `xfail`, `.todo`, or equivalent markers that lack an explanatory comment or issue reference. + - **Test pyramid imbalance**: flag suites with disproportionately many end-to-end or integration tests and few unit tests, raising maintenance cost and slowing feedback. + - When no coverage tool is available, record "no coverage tool, static inspection only" in `Coverage > Skipped` and limit findings to structurally observable issues. Do not invent coverage numbers. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `tests`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `tests`, a concrete `file:line`, and an effort; Coverage lists `tests` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `tests`, a concrete `file:line`, and an effort. +- Coverage lists `tests` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/actions/07-ui.md b/plugins/aidd-dev/skills/04-audit/actions/07-ui.md index 3666ec46..3f11a649 100644 --- a/plugins/aidd-dev/skills/04-audit/actions/07-ui.md +++ b/plugins/aidd-dev/skills/04-audit/actions/07-ui.md @@ -1,35 +1,31 @@ # 07 - UI audit -Read-only audit of the `ui` pillar: missing states, design-system drift, responsive gaps, and accessibility. Reports findings, never edits code. +Read-only audit of the `ui` pillar, missing states, design-system drift, responsive gaps, and accessibility. Reports findings, never edits code. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -url: # optional; enables runtime axe a11y pass -``` +An optional scope, a directory or file glob, defaulting to the entire codebase. An optional running-frontend URL enables a runtime axe accessibility pass. -## Outputs +## Output -```yaml -audit_path: aidd_docs/tasks/audits/__ui.md # or __full.md in a full run -pillar: ui -findings_count: -``` +The `ui` findings, written to `ui.md` in the run's audit folder. ## Process -1. **Load scope.** Default to the full codebase when `scope` is absent; otherwise restrict scanning to the provided glob or directory. When `url` is provided, also run a browser-based accessibility pass against the live frontend. -2. **Scan the UI lens** below using static component/markup analysis, supplemented by a runtime axe-style accessibility pass when `url` is provided. Stay in this pillar - redesign or implementation fixes belong to the `impeccable` skill or the `iris` agent, not this audit. - - **Missing loading, error, and empty states**: flag UI surfaces (lists, forms, async data areas) that have no visible feedback for loading in-progress, failed fetches, or zero-result datasets. - - **Visual hierarchy issues**: flag layouts where primary actions are visually subordinate, or where typographic hierarchy (heading levels, contrast ratio between heading and body) is broken. - - **Design-system and design-token drift**: identify hardcoded colour, spacing, or typography values that deviate from the project's design tokens or component library conventions. - - **Responsive breakpoint gaps**: flag components or layouts that break or overflow at standard breakpoints (mobile, tablet, desktop) detectable from markup or media queries in the source. - - **Accessibility (WCAG)**: contrast ratio failures, missing keyboard navigation, incorrect or absent aria roles/labels, missing `alt` text on images; run axe or equivalent against `url` when provided; otherwise inspect markup statically. - - When `url` is absent, record "no url provided - runtime a11y pass skipped, static inspection only" in Coverage > Skipped. Do not invent runtime findings from static analysis. -3. **Rate each finding.** Severity (🔴 / 🟡 / 🟢) and effort (S/M/L) per `@../assets/audit-template.md` legend. Quote a concrete `file:line` for every finding. Category is always `ui`. -4. **Write the report** using `@../assets/audit-template.md`: fill the Findings table (one row per issue, severity-first), ranked Top actions (hand off fixes to `impeccable`), and the Coverage section. In a full audit run, contribute these finding rows to the single merged report per the skill output contract instead of writing a separate file. Read-only: emit the report and stop; do not edit code. +1. **Scope.** Default to the full codebase when no scope is given. Otherwise restrict scanning to the provided glob or directory. When a URL is given, also run a browser-based accessibility pass against the live frontend. +2. **Scan.** Use static component and markup analysis, plus a runtime axe-style accessibility pass when a URL is given. Stay in this pillar: redesign and implementation fixes are a separate concern. + - **Missing loading, error, and empty states**: flag UI surfaces (lists, forms, async data areas) with no visible feedback for in-progress loading, failed fetches, or zero-result datasets. + - **Visual hierarchy**: flag layouts where primary actions are visually subordinate, or where typographic hierarchy (heading levels, heading-to-body contrast) is broken. + - **Design-token drift**: identify hardcoded colour, spacing, or typography values that deviate from the project's design tokens or component library. + - **Responsive breakpoint gaps**: flag components or layouts that break or overflow at standard breakpoints (mobile, tablet, desktop), detectable from markup or media queries. + - **Accessibility (WCAG)**: contrast-ratio failures, missing keyboard navigation, incorrect or absent aria roles and labels, missing `alt` text. Run axe or equivalent against the URL when given, otherwise inspect markup statically. + - When no URL is given, record "no url provided, runtime a11y pass skipped, static inspection only" in `Coverage > Skipped`. Do not invent runtime findings from static analysis. +3. **Rate.** Give each finding a severity and an effort per the `@../assets/audit-template.md` legend, with a concrete `file:line`. The category is always `ui`. +4. **Write.** Fill `@../assets/audit-template.md` into the pillar file: the Findings table (one row per issue, severity-first), the ranked Top actions, and the Coverage section. In a full run, also add the rows to the merged `report.md` in the same folder. Emit the report and stop. ## Test -The output file exists at `audit_path`; it has the `## Findings`, `## Top actions`, `## Coverage` sections; every Findings row has a severity, category `ui`, a concrete `file:line`, and an effort; Coverage lists `ui` as scanned. No abstract "the codebase has..." sentences, no code changes made. +- The output file exists at the reported path. +- It has the `## Findings`, `## Top actions`, and `## Coverage` sections. +- Every Findings row carries a severity, category `ui`, a concrete `file:line`, and an effort. +- Coverage lists `ui` as scanned, and no code was changed. diff --git a/plugins/aidd-dev/skills/04-audit/assets/audit-template.md b/plugins/aidd-dev/skills/04-audit/assets/audit-template.md index 915cfaa6..6566f8cc 100644 --- a/plugins/aidd-dev/skills/04-audit/assets/audit-template.md +++ b/plugins/aidd-dev/skills/04-audit/assets/audit-template.md @@ -33,7 +33,7 @@ Category (the audit pillar, one of): `code-quality`, `architecture`, `security`, | 🟡 | code-quality | `src/views/login.tsx:45` | Toast logic copy-pasted across 3 views | Extract a `useToast` helper | M | | 🟢 | code-quality | `src/legacy/utils.ts:120` | Unused export `formatLegacyDate` | Delete the function and its imports | S | -## Top actions (ranked by impact) +## Top actions Highest impact first. Each action names the finding rows it resolves and, when a fix is wanted, the act-skill to hand off to (refactor, test, impeccable - the audit itself never edits code). diff --git a/plugins/aidd-dev/skills/05-review/SKILL.md b/plugins/aidd-dev/skills/05-review/SKILL.md index 6e0e4894..f2eb2820 100644 --- a/plugins/aidd-dev/skills/05-review/SKILL.md +++ b/plugins/aidd-dev/skills/05-review/SKILL.md @@ -1,6 +1,6 @@ --- name: 05-review -description: Read-only review of a diff on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Do NOT use to fix findings or audit a codebase. +description: Review a diff read-only on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Not for fixing findings or auditing a codebase. argument-hint: review-code | review-functional | review-relevancy model: opus --- @@ -24,9 +24,9 @@ Run all three by default, composing one report. Run a single axis only when the - Read-only: surface each finding with its fix described, never patch. - Output: always write `review.md` to disk; the file is the deliverable, never an inline-only verdict. - Folder: write into the reviewed work's feature folder (`aidd_docs/tasks//_/`, beside `plan.md`), or one resolved from the change when it has none. -- Sections: fill `review.md` from `@assets/review-template.md`, each axis its own section, an unrun axis marked "Not run". +- Sections: fill `review.md` from `assets/review-template.md`, each axis its own section, an unrun axis marked "Not run". - Re-run: overwrite `review.md` with the current review. It is a snapshot of the current diff, not a history; a later review of the same work replaces the earlier one. -- Verdict: one overall verdict, the strictest across the axes run, per `@references/review-rubric.md`. +- Verdict: one overall verdict, the strictest across the axes run, per `references/review-rubric.md`. ## References diff --git a/plugins/aidd-dev/skills/05-review/actions/01-review-code.md b/plugins/aidd-dev/skills/05-review/actions/01-review-code.md index 795e7582..b4154a51 100644 --- a/plugins/aidd-dev/skills/05-review/actions/01-review-code.md +++ b/plugins/aidd-dev/skills/05-review/actions/01-review-code.md @@ -4,7 +4,7 @@ Grade the diff against clean-code principles and record the findings in the revi ## Input -The diff to review, a git ref range or path, from `$ARGUMENTS`; defaults to `git diff main`. +The diff to review, a git ref range or path, from the arguments; defaults to the diff against the repository default branch. ## Output @@ -12,9 +12,9 @@ The `Code` section of the feature folder's `review.md`, filled with severity-rat ## Process -1. **Resolve.** Take the diff from `$ARGUMENTS`, otherwise `git diff main`. +1. **Resolve.** Take the diff from the arguments, otherwise the diff against the repository default branch. 2. **Review.** Read every changed line for clean-code: naming, structure, complexity, smells, error handling. No runtime checks. Declared-rule conformance belongs to the relevancy axis, not this one. -3. **Rate.** One finding per issue on the changed lines, rated and categorized per `@../references/review-rubric.md`, citing a `file:line`. Describe the fix, never patch. +3. **Rate.** One finding per issue on the changed lines, rated and categorized per `@../references/review-rubric.md`, citing a `file:line`. 4. **Record.** Write the findings into the `Code` section of `review.md`, each with its fix described. ## Test diff --git a/plugins/aidd-dev/skills/05-review/actions/02-review-functional.md b/plugins/aidd-dev/skills/05-review/actions/02-review-functional.md index 1495f071..253a9308 100644 --- a/plugins/aidd-dev/skills/05-review/actions/02-review-functional.md +++ b/plugins/aidd-dev/skills/05-review/actions/02-review-functional.md @@ -4,7 +4,7 @@ Verify the diff matches the plan's acceptance criteria, flows, and edge cases, a ## Input -The plan path holding the acceptance criteria, from `$ARGUMENTS` or the prompt, and the diff to trace (a git ref range; defaults to `git diff main`). +The plan path holding the acceptance criteria, from the arguments or the prompt, and the diff to trace (a git ref range; defaults to the diff against the repository default branch). ## Output @@ -12,7 +12,7 @@ The `Functional` section of the feature folder's `review.md`: one row per accept ## Process -1. **Read.** Take the plan from `$ARGUMENTS`; if absent, ask for the acceptance criteria, and mark this axis "Not run" when none are available. Static review only, no app execution or browser. +1. **Read.** Take the plan from the arguments; if absent, ask for the acceptance criteria, and mark this axis "Not run" when none are available. Static review only, no app execution or browser. 2. **Trace.** Fetch the diff, then trace each acceptance criterion to it, one matrix row per criterion: met, partial, or unmet, with evidence or the gap. 3. **Gaps.** List missing behaviors (criteria with no trace), unplanned behaviors (diff changes tracing to no criterion), and flow or edge-case gaps. An empty list reads "none", never omitted. 4. **Record.** Write the matrix and the gaps into the `Functional` section of `review.md`, each with the missing or broken behavior named. diff --git a/plugins/aidd-dev/skills/05-review/actions/03-review-relevancy.md b/plugins/aidd-dev/skills/05-review/actions/03-review-relevancy.md index f56f04cc..34b37b5f 100644 --- a/plugins/aidd-dev/skills/05-review/actions/03-review-relevancy.md +++ b/plugins/aidd-dev/skills/05-review/actions/03-review-relevancy.md @@ -4,7 +4,7 @@ Judge whether the diff belongs, coherent with the codebase, its conventions and ## Input -The diff to review (a git ref range or path; defaults to `git diff main`), the need it serves (the plan objective or the ticket), and the project's declared rules and conventions, discovered at runtime. +The diff to review (a git ref range or path; defaults to the diff against the repository default branch), the need it serves (the plan objective or the ticket), and the project's declared rules and conventions, discovered at runtime. ## Output @@ -12,11 +12,11 @@ The `Relevancy` section of the feature folder's `review.md`, filled with misfit ## Process -1. **Gather.** Resolve the diff from `$ARGUMENTS`, otherwise `git diff main`. Capture the need from the plan objective or the ticket. Discover the project's declared rules and conventions at runtime, never hardcoded. Fall back cleanly when a source is absent. +1. **Gather.** Resolve the diff from the arguments, otherwise the diff against the repository default branch. Capture the need from the plan objective or the ticket. Discover the project's declared rules and conventions at runtime, never hardcoded. Fall back cleanly when a source is absent. 2. **Fit.** Check the change against the need: does it serve the actual intent end to end, or only the literal criteria? Flag any drift between intent and result. 3. **Conform.** Check the change against the declared rules and the surrounding conventions. Flag each violation with the rule or pattern it breaks. 4. **Rot.** Scan for duplication (an existing helper reinvented), over-engineering (speculative generality, unused abstraction), and incoherence (naming, docs versus code). Cite the site. -5. **Record.** Write each finding into the `Relevancy` section of `review.md`, rated and placed under its lens per `@../references/review-rubric.md`. A bare opinion is not a finding: tie each to a declared rule, a duplication site, an over-engineering smell, or a named need-gap. Describe the fix, never patch. +5. **Record.** Write each finding into the `Relevancy` section of `review.md`, rated and placed under its lens per `@../references/review-rubric.md`. A bare opinion is not a finding: tie each to a declared rule, a duplication site, an over-engineering smell, or a named need-gap. ## Test diff --git a/plugins/aidd-dev/skills/06-test/SKILL.md b/plugins/aidd-dev/skills/06-test/SKILL.md index 9f67186d..a03b8470 100644 --- a/plugins/aidd-dev/skills/06-test/SKILL.md +++ b/plugins/aidd-dev/skills/06-test/SKILL.md @@ -1,31 +1,25 @@ --- name: 06-test -description: Write and iterate on tests until they pass, and validate user journeys end-to-end in the browser. +description: Write and iterate tests until they pass, or validate a user journey end to end in the browser. Use when the user wants to add coverage, find what's untested, or walk a flow. Not for auditing test health or debugging a failure. argument-hint: test | test-journey model: sonnet --- # Skill: test -Identifies untested behaviors, iterates on test creation until quality criteria are met, and validates complete user journeys through browser automation. +Find untested behavior and iterate tests until they pass, or drive a full user journey through the browser and check each step. -## Available actions - -| # | Action | When to use | -| --- | -------------- | ---------------------------------------------------------------------- | -| 01 | `test` | Find untested behaviors and write/iterate tests until they pass | -| 02 | `test-journey` | Validate a full user journey end-to-end in the browser | - -## Routing (run first) - -Pick the ONE action matching the user's intent; do NOT default to action 01. +## Actions -- "write tests", "add test coverage", "what's untested", "iterate on tests" -> `01-test` -- "test the user journey", "end-to-end", "walk through the flow in the browser" -> `02-test-journey` +| # | Action | When to use | +| --- | -------------- | -------------------------------------------------------------- | +| 01 | `test` | Find untested behaviors and write or iterate tests until they pass | +| 02 | `test-journey` | Validate a full user journey end-to-end in the browser | -If the intent is ambiguous, ask one clarifying question before picking. Then read and follow only the matching action file. +Pick the one action matching the intent; never default to `01`. Triggers like "write tests" or "what's untested" route to `01`, "test the user journey" or "end-to-end" to `02`. Ask one question when the intent is ambiguous. -## Actions +## Transversal rules -- `@actions/01-test.md` -- `@actions/02-test-journey.md` +- One action per run: follow only the matching action file. +- Functional behavior only: never couple a test to implementation details. +- Never compromise quality for speed. diff --git a/plugins/aidd-dev/skills/06-test/actions/01-test.md b/plugins/aidd-dev/skills/06-test/actions/01-test.md index 4c9fa572..a289c330 100644 --- a/plugins/aidd-dev/skills/06-test/actions/01-test.md +++ b/plugins/aidd-dev/skills/06-test/actions/01-test.md @@ -1,38 +1,24 @@ # 01 - Test -Identify untested behaviors in the feature, then create and iterate on tests until they pass with modern testing best practices. +Identify untested behaviors in the target, then write and iterate tests until they pass with modern testing practices. -## Inputs +## Input -```yaml -scope: # passed via $ARGUMENTS -``` +The scope to cover, a feature, module, or file glob, from the arguments. -## Outputs +## Output -```yaml -behaviors_listed: -tests_added: -tests_passing: -report: - - { behavior: , status: pass, file: } - - { behavior: , status: pending, reason: } -``` +The behaviors found and, per behavior, a passing test with its file path, or a `pending` entry with a one-line reason when deliberately skipped. ## Process -1. **List untested behaviors** in the target area: - - Think about behaviors based on existing ones. - - Score each from 0 (not needed) to 5 (critical core flow). - - Group by distinct sections. - - Prioritize by score and impact. - - Display as an organized minimal bullet list. -2. **Wait for user approval** before generating any test. -3. **Generate the initial test** for the highest-priority behavior, applying current testing best practices and project conventions. -4. **Run, observe, iterate.** If the test fails, analyze the failure, improve the test, repeat. If it passes, validate against the quality checklist; improve if quality is insufficient. -5. **Move to the next behavior** and repeat from step 3 until the list is exhausted. -6. **Boundaries.** Focus on ONE test at a time. Never compromise quality for speed. Functional aspects only; ignore implementation details. +1. **List.** Enumerate the untested behaviors in the target area. Reason from the existing ones, score each from 0 (not needed) to 5 (critical core flow), group by section, prioritize by score and impact, and show a minimal bullet list. +2. **Approve.** Wait for user approval before generating any test. A behavior the user declines becomes a `pending` entry with a one-line reason, not tested. +3. **Generate.** Write the initial test for the highest-priority behavior, applying current testing practices and project conventions. +4. **Iterate.** Run the test. On failure, analyze it, improve the test, and repeat. On pass, check it against the quality criteria and improve when it falls short. +5. **Next.** Move to the next behavior and repeat from Generate until the list is exhausted. ## Test -For every behavior in the approved list: a corresponding test exists in the project test suite, the test passes, and the report records the test file path. Behaviors that are deliberately skipped have a `pending` entry with a one-line reason. +- Every behavior in the approved list has a corresponding test in the project suite that passes, with its file path recorded. +- Each deliberately skipped behavior has a `pending` entry with a one-line reason. diff --git a/plugins/aidd-dev/skills/06-test/actions/02-test-journey.md b/plugins/aidd-dev/skills/06-test/actions/02-test-journey.md index 21e6caa6..ac818cf0 100644 --- a/plugins/aidd-dev/skills/06-test/actions/02-test-journey.md +++ b/plugins/aidd-dev/skills/06-test/actions/02-test-journey.md @@ -1,38 +1,24 @@ # 02 - Test Journey -Test a user journey end-to-end and validate that each step produces the expected behavior. +Drive a user journey end-to-end and check that each step produces the expected behavior. -## Inputs +## Input -```yaml -journey: -url: -``` +The journey, an ordered list of action plus expected outcome, and the entry URL, from the arguments. -## Outputs +## Output -```yaml -steps_total: -steps_passed: -steps_failed: -report: - - { step: , action: , expected: , actual: , status: pass|fail, screenshot: } -``` +A per-step report, each step recording its action, expected and actual result, a pass or fail, and a screenshot path, with a downstream-impact note on any failure. ## Process -Spawn a sub-agent task to: - -1. **Parse the journey** into ordered steps. Each step has an action and an expected result. -2. **Open the URL** with the project's configured browsing tool. Assume all servers are already running. -3. **For each step**: - - Execute the action (click, fill, navigate, drag, etc.). - - Take a screenshot immediately after. - - Validate actual vs expected. - - Record `{ step, action, expected, actual, pass | fail, screenshot path }`. -4. **On failure**: document the failure with the screenshot, warn the user, attempt to continue when downstream steps are still meaningful, and note any steps invalidated by the failure. -5. **Compile the journey report** at the end. Report actual behavior even when it differs from expected; do not silently fix or skip. +1. **Parse.** Break the journey into ordered steps, each an action and an expected result. +2. **Open.** Open the URL with the project's configured browsing tool. Assume every server is already running. +3. **Walk.** For each step: execute the action (click, fill, navigate, drag), screenshot immediately after, validate actual against expected, and record. + - On a failed step: document it with the screenshot, warn the user, continue when downstream steps stay meaningful, and note any steps it invalidates. +4. **Compile.** Assemble the journey report. Report actual behavior even when it differs from expected, never silently fix or skip. ## Test -The report contains one entry per parsed step, every step has a screenshot path, and at least one of `pass` or `fail` is recorded for every step. If any step failed, the report includes a downstream-impact note for the affected steps. +- The report has one entry per parsed step, each recording its action, expected and actual result, a screenshot path, and a pass or fail. +- A failed step carries a downstream-impact note for the steps it affects. diff --git a/plugins/aidd-dev/skills/07-refactor/README.md b/plugins/aidd-dev/skills/07-refactor/README.md index cedcd2da..acb06dd9 100644 --- a/plugins/aidd-dev/skills/07-refactor/README.md +++ b/plugins/aidd-dev/skills/07-refactor/README.md @@ -21,8 +21,7 @@ reports, refactor fixes. - The task is a functional bug fix → use [08-debug](../08-debug/README.md). - You want to add new behavior, not improve existing → use [02-implement](../02-implement/README.md). -- You want to add tests → [06-test](../06-test/README.md). UI redesign → - the impeccable skill. +- You want to add tests → [06-test](../06-test/README.md). ## How to invoke diff --git a/plugins/aidd-dev/skills/07-refactor/SKILL.md b/plugins/aidd-dev/skills/07-refactor/SKILL.md index 3a8e05d4..2ac6af7b 100644 --- a/plugins/aidd-dev/skills/07-refactor/SKILL.md +++ b/plugins/aidd-dev/skills/07-refactor/SKILL.md @@ -1,49 +1,28 @@ --- name: 07-refactor -description: Improve code without breaking behavior across four axes - cleanup (clean-code + tech debt), performance, security, architecture. Scans and fixes, or fixes the findings of an audit report pushed in by the caller. Use when the user wants to refactor, clean up, optimize, harden, restructure, or delete/remove code. Do NOT use for read-only diagnosis (use 04-audit), adding tests (use 06-test), or UI redesign (use the impeccable skill). +description: Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report. Use when the user wants to refactor, optimize, harden, or remove code. Not for read-only diagnosis or adding tests. argument-hint: performance | security | cleanup | architecture --- # Skill: refactor -The act-side of code improvement: it changes code to make it better. Behavior-preserving for cleanup, performance, and architecture; security may change behavior on purpose to close a hole. The read-only diagnosis counterpart is `aidd-dev:04-audit` - refactor fixes, audit reports. +The act-side of code improvement: it changes code to make it better. Behavior-preserving for cleanup, performance, and architecture; security may change behavior on purpose to close a hole. -## Available actions - -| # | Action | Axis | Maps to audit pillar | Lens | -| --- | ------------- | ------------ | -------------------- | -------------------------------------------------------------- | -| 01 | `performance` | performance | performance | N+1, hot paths, batching, memoization, unnecessary I/O | -| 02 | `security` | security | security | OWASP, input validation, authz, secrets - harden and fix | -| 03 | `cleanup` | code-quality | code-quality | clean-code: rename, extract, DRY, dead-code, complexity | -| 04 | `architecture`| architecture | architecture | extract layers, fix coupling, enforce boundaries | - -## Routing (run first) - -This skill is run-one-OR-run-all: - -- The user named an axis ("optimize this", "harden", "clean up", "restructure") -> run that ONE action. -- Unscoped ("refactor this", "improve the code") -> ask ONE question: "all applicable axes, or a specific one (cleanup / performance / security / architecture)?" Then run the chosen one, or all applicable. -- The user asked to delete or remove code ("delete X", "remove this", "drop this") -> run the `cleanup` action directly; do not ask which axis. -- Never silently default to action 01. - -## Audit handoff (push, never pull) - -This skill NEVER loads or invokes the audit skill - that would make refactor depend on audit and break standalone use. Each action has two modes: - -- **Standalone (default).** The action scans its axis with its own lens, then fixes. Self-contained; this is the existing behavior. -- **Audit-fed (optional).** If the caller PUSHES an `audit_report` (a path to a report under `aidd_docs/tasks/audits/`, or pasted findings), the action takes that report's findings for its axis as the fix list and skips its own scan. - -The bridge is the report artifact (data), not a cross-skill reference. For a broad read-only diagnosis before fixing, the user may run `aidd-dev:04-audit` first and push its report in - a suggestion, never a dependency. +## Actions -## Conventions +| # | Action | Axis | Lens | +| --- | -------------- | ------------ | ---------------------------------------------------------- | +| 01 | `performance` | performance | N+1, hot paths, batching, memoization, unnecessary I/O | +| 02 | `security` | security | OWASP, input validation, authz, secrets: harden and fix | +| 03 | `cleanup` | code-quality | clean code: rename, extract, DRY, dead code, complexity | +| 04 | `architecture` | architecture | extract layers, fix coupling, enforce boundaries | -- Severity on any finding uses the shared 3-level scale: 🔴 critical, 🟡 warning, 🟢 minor (aligned with audit, so a pushed audit report flows in without translation). -- Behavior-preserving for cleanup, performance, and architecture: public inputs and outputs stay identical; verify via tests, type checks, or a side-by-side run. Security may alter behavior to close a vulnerability - call that out explicitly. -- Stay inside the axis. Boundaries mirror audit: dependency upgrades (CVE bumps, version maintenance) are out of scope here; test creation belongs to `aidd-dev:06-test`; UI redesign to the impeccable skill. +Run the one axis named, or offer all applicable when the request is unscoped. -## Actions +## Transversal rules -- `@actions/01-performance.md` -- `@actions/02-security.md` -- `@actions/03-cleanup.md` -- `@actions/04-architecture.md` +- Scope: run the one named axis, or for an unscoped request ask once "all applicable axes, or one?" before running. A request to delete or remove code runs `cleanup` directly, with no axis question. Never silently default to one axis. +- Behavior-preserving for cleanup, performance, and architecture: public inputs and outputs stay identical, verified by tests, type checks, or a side-by-side run. Security may alter behavior to close a vulnerability, and must call that out explicitly. +- Audit-fed, optional: when the caller pushes an audit report (a path under `aidd_docs/tasks/audits/` or pasted findings), take its findings for this axis as the fix list and skip the scan. The bridge is the report artifact; this skill never loads or calls another skill. The audit `code-quality` pillar feeds the `cleanup` axis; the other axes map by name. +- Severity uses the shared 3-level scale: 🔴 critical, 🟡 warning, 🟢 minor. +- Stay inside the axis: dependency upgrades and UI redesign are out of scope. Add tests only as a regression for a security fix, never otherwise. diff --git a/plugins/aidd-dev/skills/07-refactor/actions/01-performance.md b/plugins/aidd-dev/skills/07-refactor/actions/01-performance.md index e849f4d8..8e725df0 100644 --- a/plugins/aidd-dev/skills/07-refactor/actions/01-performance.md +++ b/plugins/aidd-dev/skills/07-refactor/actions/01-performance.md @@ -2,40 +2,24 @@ Improve the performance of a selected code region without changing its observable behavior. -## Inputs - -```yaml -selection: -audit_report: -constraints: - - keep input and output identical - - keep code readable and maintainable -``` - -## Outputs - -```yaml -hotspots_found: -changes_applied: - - { file: , change: , severity: "🔴|🟡|🟢", gain: } -followups: - - - - - - -``` +## Input -## Process +The code region to optimize, a file path or inline snippet. Optionally a pushed audit report, a path under `aidd_docs/tasks/audits/` or pasted findings. + +## Output -1. **Source findings.** Two modes: - - If `audit_report` is provided: extract the performance-axis findings from that report and use them as the fix list. Skip the standalone scan below. - - Else (standalone): scan the selection for the main performance issues (allocations, redundant work, blocking calls, N+1 patterns, unnecessary I/O). Rate each hotspot with the 3-level severity scale: 🔴 critical, 🟡 warning, 🟢 minor. -2. **List necessary steps** to address each hotspot, ordered by expected gain. -3. **Apply changes.** Refactor the selected region. Preserve readability and maintainability; do not change logic; keep inputs and outputs identical. -4. **Verify equivalence.** Confirm behavior is unchanged via tests, type checks, or a side-by-side run. -5. **Propose three follow-up optimizations** not yet applied, sorted by importance. +The hotspots addressed and the changes applied (file, one-line summary, severity, gain), plus three follow-up optimizations not yet applied. + +## Process -Boundary note: test creation belongs to the test skill; dependency upgrades and UI redesign are out of scope for this action. +1. **Source.** When an audit report is pushed, take its performance-axis findings as the fix list and skip the scan. Otherwise scan the selection for the main performance issues (allocations, redundant work, blocking calls, N+1 patterns, unnecessary I/O) and rate each with the shared severity scale. +2. **Order.** List the steps to address each hotspot, ordered by expected gain. +3. **Apply.** Refactor the selected region. Preserve readability and logic, keep inputs and outputs identical. +4. **Verify.** Confirm behavior is unchanged via tests, type checks, or a side-by-side run. +5. **Followup.** Propose three follow-up optimizations not yet applied, sorted by importance. ## Test -Existing tests on the selection still pass; the public inputs and outputs of the refactored code are byte-identical to the pre-change version on representative inputs; the follow-up list contains exactly three actionable items. +- Existing tests on the selection still pass. +- The refactored code's public inputs and outputs are identical to the pre-change version on representative inputs. +- The follow-up list contains exactly three actionable items. diff --git a/plugins/aidd-dev/skills/07-refactor/actions/02-security.md b/plugins/aidd-dev/skills/07-refactor/actions/02-security.md index a4d1f2c8..bf281d80 100644 --- a/plugins/aidd-dev/skills/07-refactor/actions/02-security.md +++ b/plugins/aidd-dev/skills/07-refactor/actions/02-security.md @@ -1,42 +1,27 @@ # 02 - Security -Identify and fix security vulnerabilities, then strengthen the codebase by adding test coverage and documentation for the fixes. Security may change observable behavior to close a vulnerability - this is expected and must be called out explicitly. +Find and fix security vulnerabilities, then add test coverage and documentation for the fixes. A security fix may change observable behavior to close a hole, which must be called out explicitly. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -audit_report: -focus_areas: - - input_validation - - authentication_authorization - - injection - - secrets_handling -``` +An optional scope, a directory or file glob, defaulting to the entire codebase. Optionally a pushed audit report, a path under `aidd_docs/tasks/audits/` or pasted findings. -## Outputs +## Output -```yaml -findings: - - { id: , file: , severity: "🔴 critical | 🟡 warning | 🟢 minor", summary: } -fixes_applied: - - { id: , file: , change: , behavior_change: , test_added: true|false } -``` +The vulnerabilities found and the fixes applied (file, one-line summary, whether behavior changed, whether a test was added). ## Process -1. **Source findings.** Two modes: - - If `audit_report` is provided: extract the security-axis findings from that report and use them as the fix list. Skip steps 2-4 below. - - Else (standalone): scan the scope for vulnerabilities using static analysis where available and a manual pass against OWASP Top 10. Continue with steps 2-4. -2. **Check input validation** at every external boundary (HTTP handlers, CLI args, file parsers, IPC). -3. **Review authentication and authorization** paths; flag missing checks and broken role propagation. -4. **Identify injection risks** (SQL, command, template, XSS, SSRF). -5. **Apply fixes**, preferring secure functions, least privilege, and parameterized APIs over ad-hoc sanitization. If a fix changes observable behavior, set `behavior_change: true` and explain the change inline. -6. **Add security test coverage** for each fix (regression unit or integration tests). -7. **Document the security measures** added or changed (inline doc strings, ADRs, or `aidd_docs/memory/` entries) so they are not regressed by future refactors. - -Note: CVE dependency upgrades and version maintenance are out of scope for this action; they belong to dependency maintenance (a separate audit pillar). Route those findings there. +1. **Source.** When an audit report is pushed, take its security-axis findings as the fix list and skip to Apply. Otherwise scan the scope with static analysis where available and a manual pass against the OWASP Top 10. +2. **Inputs.** Check input validation at every external boundary (HTTP handlers, CLI args, file parsers, IPC). +3. **Access.** Review authentication and authorization paths, flagging missing checks and broken role propagation. +4. **Injection.** Identify injection risks (SQL, command, template, XSS, SSRF). +5. **Apply.** Fix with secure functions, least privilege, and parameterized APIs over ad-hoc sanitization. When a fix changes observable behavior, mark it and explain the change inline. +6. **Cover.** Add a regression test, unit or integration, for each fix. +7. **Document.** Record the security measures added or changed (doc strings, ADRs, or `aidd_docs/memory/` entries) so a later refactor does not regress them. ## Test -Every entry in `findings` has a matching entry in `fixes_applied` or a documented reason for deferral; every entry in `fixes_applied` with `test_added: true` has a regression test that fails on the pre-fix code; the project's security linter (when configured) exits zero on the changed scope. +- Every finding has a matching fix or a documented reason for deferral. +- Each fix with a test added has a regression test that fails on the pre-fix code. +- The project's security linter, when configured, exits zero on the changed scope. diff --git a/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md b/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md index 3a4c4bd6..bb11c189 100644 --- a/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md +++ b/plugins/aidd-dev/skills/07-refactor/actions/03-cleanup.md @@ -1,47 +1,35 @@ # 03 - Cleanup -Improve code quality and reduce technical debt by applying clean-code principles and removing structural rot - without changing observable behavior. +Improve code quality and reduce technical debt by applying clean-code principles and removing structural rot, without changing observable behavior. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -audit_report: -constraints: - - keep public inputs and outputs identical - - preserve existing test coverage -``` +An optional scope, a directory or file glob, defaulting to the entire codebase. Optionally a pushed audit report, a path under `aidd_docs/tasks/audits/` or pasted findings. -## Outputs +## Output -```yaml -changes_applied: - - { file: , change: , severity: "🔴|🟡|🟢", category: } -verification: -``` +The changes applied (file, one-line summary, severity, clean-code or tech-debt), with a verification summary confirming no behavioral regression. ## Process -1. **Source findings.** Two modes: - - If `audit_report` is provided: extract the code-quality-axis findings from that report and use them as the fix list. Skip the standalone scan below. - - Else (standalone): scan the scope with the cleanup lens below. Rate each issue with the 3-level severity scale: 🔴 critical, 🟡 warning, 🟢 minor. -2. **Apply clean-code fixes** from the finding list: +1. **Source.** When an audit report is pushed, take its code-quality-axis findings as the fix list and skip the scan. Otherwise scan the scope with the cleanup lens and rate each issue with the shared severity scale. +2. **Clean.** Apply the clean-code fixes from the list: - Rename symbols for clarity (misleading names, abbreviations, single-letter variables outside tight loops). - Extract functions or modules where a block does more than one thing. - - Deduplicate repeated logic (DRY). + - Deduplicate repeated logic. - Raise abstraction to replace low-level mechanics with intention-revealing calls. - Replace magic numbers and inline strings with named constants. - - Remove dead, misleading, or out-of-date comments; add a brief comment only where intent is genuinely non-obvious. -3. **Apply tech-debt fixes** from the finding list: - - Delete dead code and unused exports, and sweep for the orphaned references a deletion leaves behind. - - Reduce cyclomatic complexity by extracting early returns, guard clauses, and helper functions. + - Remove dead, misleading, or out-of-date comments, adding one only where intent is genuinely non-obvious. +3. **Debt.** Apply the tech-debt fixes from the list: + - Delete dead code and unused exports, sweeping for the orphaned references a deletion leaves behind. + - Reduce cyclomatic complexity with early returns, guard clauses, and helper functions. - Shorten oversized files and functions to a single responsibility. - Flatten excessive nesting. - - Fix error handling caught at the wrong boundary (swallowed errors, wrong abstraction level). -4. **Verify behavior is preserved.** Run tests and type checks; confirm public inputs and outputs are identical to pre-change. - -Boundary note: test creation belongs to the test skill; dependency upgrades and UI redesign are out of scope for this action. + - Fix error handling caught at the wrong boundary. +4. **Verify.** Run tests and type checks, confirming public inputs and outputs are identical to pre-change. ## Test -All existing tests pass after changes; type checks exit zero; no public API surface has changed; each entry in `changes_applied` maps to a concrete line-level edit in the diff. +- All existing tests pass and type checks exit zero. +- No public API surface has changed. +- Each change applied maps to a concrete line-level edit in the diff. diff --git a/plugins/aidd-dev/skills/07-refactor/actions/04-architecture.md b/plugins/aidd-dev/skills/07-refactor/actions/04-architecture.md index 44358ad0..2db707f1 100644 --- a/plugins/aidd-dev/skills/07-refactor/actions/04-architecture.md +++ b/plugins/aidd-dev/skills/07-refactor/actions/04-architecture.md @@ -1,44 +1,31 @@ # 04 - Architecture -Enforce documented boundaries, fix wrong-direction dependencies, and decouple structural problems - in small, verifiable steps that preserve observable behavior where possible. +Enforce documented boundaries, fix wrong-direction dependencies, and decouple structural problems, in small verifiable steps that preserve observable behavior where possible. -## Inputs +## Input -```yaml -scope: # optional; defaults to the entire codebase -audit_report: -constraints: - - keep public inputs and outputs identical where structurally possible - - proceed in small verified steps -``` +An optional scope, a directory or file glob, defaulting to the entire codebase. Optionally a pushed audit report, a path under `aidd_docs/tasks/audits/` or pasted findings. -## Outputs +## Output -```yaml -changes_applied: - - { file: , change: , severity: "🔴|🟡|🟢" } -verification: -deferred_to_plan: - - -``` +The changes applied (file, one-line summary, severity), a verification summary, and a deferred list of structural moves too large to execute atomically, each flagged as needing a plan first. ## Process -1. **Source findings.** Two modes: - - If `audit_report` is provided: extract the architecture-axis findings from that report and use them as the fix list. Skip the standalone scan below. - - Else (standalone): scan the scope against documented boundaries (C4 diagrams or ADRs in `aidd_docs/memory/`). Identify wrong-direction dependencies, god-modules, missing layer abstractions, and violated isolation contracts. Rate each issue with the 3-level severity scale: 🔴 critical, 🟡 warning, 🟢 minor. -2. **Triage findings.** Separate changes that are safe to apply atomically now from those that require broad coordinated moves. Place the latter in `deferred_to_plan`. -3. **Apply changes** in small, independently verifiable steps: +1. **Source.** When an audit report is pushed, take its architecture findings as the fix list and skip the scan. Otherwise scan against the documented boundaries (C4 diagrams, ADRs in `aidd_docs/memory/`) for wrong-direction dependencies, god-modules, missing layers, and broken isolation, rating each with the shared severity scale. +2. **Triage.** Separate changes safe to apply atomically now from those needing broad coordinated moves. Defer the latter, flagged as needing a plan first. +3. **Apply.** Make the safe changes in small, independently verifiable steps: - Extract or restore layers (separate domain, infrastructure, and presentation concerns). - - Fix wrong-direction dependency arrows (introduce an interface or inversion point; do not let infrastructure reach into domain). + - Fix wrong-direction dependencies by introducing an interface or inversion point, never letting infrastructure reach into the domain. - Decouple god-modules by splitting responsibilities along natural seams. - Enforce documented boundaries by moving code, adjusting exports, and updating internal references. -4. **Verify after each step.** Run tests and type checks; confirm the import graph still respects documented boundaries; confirm public inputs and outputs are unchanged. +4. **Verify.** After each step run tests and type checks, confirm the import graph still respects documented boundaries, and confirm public inputs and outputs are unchanged. -CAUTION: a large architectural change often needs a plan before code moves. If `deferred_to_plan` is non-empty, recommend running the planning skill before proceeding with those items. - -Boundary note: dependency upgrades, test creation, and UI redesign are out of scope for this action. +When the deferred list is non-empty, recommend planning those structural moves before any code moves. ## Test -All existing tests pass after each applied step; type checks exit zero; the import graph has no new boundary violations; each entry in `changes_applied` maps to a concrete edit in the diff; `deferred_to_plan` is populated for any structural move not safe to execute atomically. +- All existing tests pass after each applied step and type checks exit zero. +- The import graph has no new boundary violations. +- Each change applied maps to a concrete edit in the diff. +- Any structural move not safe to execute atomically is in the deferred list. diff --git a/plugins/aidd-dev/skills/08-debug/SKILL.md b/plugins/aidd-dev/skills/08-debug/SKILL.md index 1c5a1f1d..e74d6591 100644 --- a/plugins/aidd-dev/skills/08-debug/SKILL.md +++ b/plugins/aidd-dev/skills/08-debug/SKILL.md @@ -1,34 +1,34 @@ --- name: 08-debug -description: Reproduce and fix bugs systematically using test-driven workflow, root cause analysis, and hypothesis validation. +description: Reproduce and fix a known bug, or find an unknown root cause by hypothesis validation. Use when the user wants to fix a bug, find why something breaks, or reopen a stuck investigation. Not for building a feature or reviewing a diff. argument-hint: reproduce | debug | reflect-issue model: opus --- # Skill: debug -Diagnoses issues through structured hypothesis validation, root cause analysis, and test-driven bug fixing from issue creation to PR. +Diagnose and fix issues through structured hypothesis validation, root-cause analysis, and a test-driven fix. -## Available actions +## Actions | # | Action | When to use | | --- | --------------- | ----------------------------------------------------------------------------- | | 01 | `reproduce` | A known bug must be fixed end to end: reproduce, test-driven fix, branch, PR | | 02 | `debug` | Root cause unknown: enumerate hypotheses, validate each, confirm the cause | -| 03 | `reflect-issue` | Stuck or prior fixes failed: re-open the search space, instrument logs first | +| 03 | `reflect-issue` | Stuck or prior fixes failed: reopen the search space, instrument logs first | -## Routing (run first) +Pick the one action matching the intent; never default to `01`. Triggers like "reproduce and fix" route to `01`, "why does this happen" to `02`, "I'm stuck" or "previous fixes didn't work" to `03`. Ask one question when the intent is ambiguous. -This skill offers three distinct actions. Pick the ONE matching the user's intent; do NOT default to action 01. +## Transversal rules -- "fix this bug", "reproduce and fix", "from issue to PR" -> `01-reproduce` -- "why does this happen", "find the root cause", "debug this", "what's causing X" -> `02-debug` -- "I'm stuck", "previous fixes didn't work", "rethink the causes", "add logs to narrow it down" -> `03-reflect-issue` +- One action per run: follow only the matching action file. +- Scope each fix to its bug: never bundle drive-by refactors. +- Confirm the root cause before fixing; the diagnostic actions stop at a confirmed cause. -If the intent is ambiguous, ask one clarifying question before picking. Then read and follow only the matching action file. +## Assets -## Actions +- `assets/task-template.md`: the per-hypothesis tracking file the debug action fills. + +## References -- `@actions/01-reproduce.md` -- `@actions/02-debug.md` -- `@actions/03-reflect-issue.md` +- `references/mermaid-conventions.md`: the project's Mermaid conventions for the action-path flowchart. diff --git a/plugins/aidd-dev/skills/08-debug/actions/01-reproduce.md b/plugins/aidd-dev/skills/08-debug/actions/01-reproduce.md index 808204cc..e11f12d5 100644 --- a/plugins/aidd-dev/skills/08-debug/actions/01-reproduce.md +++ b/plugins/aidd-dev/skills/08-debug/actions/01-reproduce.md @@ -1,36 +1,30 @@ # 01 - Reproduce -Fix a bug systematically with a test-driven workflow that goes from issue creation to pull request, one bug per branch. +Fix a bug with a test-driven workflow that goes from issue creation to pull request, one bug per branch. -## Inputs +## Input -```yaml -bug: -``` +The bug, a free-form description or issue number, from the arguments. -## Outputs +## Output -```yaml -issue_id: -branch: -test_file: -pr_url: -status: opened -``` +The opened pull request (its URL), the fix branch, the failing test added before the fix, and the tracker issue id it links. ## Process -1. **Open the ticket.** Create a ticket in the configured ticketing tool with a short, descriptive title. -2. **Create the fix branch** dedicated to this bug. -3. **Reproduce the issue.** Confirm the symptom and capture the minimal trigger; pin down the root cause hypothesis. -4. **Write a failing test** that demonstrates the bug. -5. **Commit** the failing test, linking the issue id. -6. **Implement the minimal fix.** Keep changes scoped to the bug; do not bundle drive-by refactors. -7. **Verify.** Confirm the new test passes; run the full suite. -8. **Commit** the fix, linking the issue id. -9. **Review for scope creep.** If the diff drifted, split or revert; commit again as needed. -10. **Push the branch** and create a PR linking the issue with `Fixes #`. +1. **Ticket.** Create a ticket in the configured ticketing tool with a short, descriptive title. +2. **Branch.** Create a fix branch dedicated to this bug. +3. **Reproduce.** Confirm the symptom, capture the minimal trigger, and pin down the root-cause hypothesis. +4. **Test.** Write a test that demonstrates the bug. +5. **Commit.** Commit the failing test, linking the issue id. +6. **Fix.** Implement the minimal fix, scoped to the bug. +7. **Verify.** Confirm the new test passes, then run the full suite. +8. **Commit.** Commit the fix, linking the issue id. +9. **Scope.** Review for scope creep. When the diff drifted, split or revert and commit again. +10. **Open.** Push the branch and open a PR linking the issue with `Fixes #`. ## Test -A PR exists with the URL emitted in `pr_url`; its diff includes the failing test introduced in step 4 and the minimal fix from step 6; the PR description contains `Fixes #` referencing the ticket created in step 1; the full test suite passes on the head of the fix branch. +- A PR exists at the reported URL, its diff carrying the failing test and the minimal fix. +- The PR description references the ticket with `Fixes #`. +- The full test suite passes on the head of the fix branch. diff --git a/plugins/aidd-dev/skills/08-debug/actions/02-debug.md b/plugins/aidd-dev/skills/08-debug/actions/02-debug.md index 4abe432a..30b011ce 100644 --- a/plugins/aidd-dev/skills/08-debug/actions/02-debug.md +++ b/plugins/aidd-dev/skills/08-debug/actions/02-debug.md @@ -1,38 +1,32 @@ # 02 - Debug -Debug an issue in the codebase by enumerating hypotheses, validating each one, and arriving at a root cause that the user signs off on. +Find the root cause of an issue by enumerating hypotheses, validating each, and arriving at a cause the user signs off on. -## Inputs +## Input -```yaml -issue: -``` +The issue, a free-form description of the symptom or error. -## Outputs +## Output -```yaml -root_cause: -hypotheses: - - { id: 1, description: , confidence: 1-10, status: validated|invalidated, evidence: } -flowchart_path: -next_steps: - - -``` +A one-line root cause, the 3 to 5 hypotheses with their confidence and validated or invalidated status plus evidence, an action-path flowchart, and the next steps. ## Process -1. **Summarize the issue** in your own words. -2. **Map action paths** with a Mermaid flowchart (e.g. user clicks button -> calls function in file1 -> updates state in file2). Apply `@../references/mermaid-conventions.md`. -3. **Apply 5 Whys.** Start from the symptom and ask "why" iteratively (minimum 3, up to 5). Document each level in a numbered list. -4. **Identify inspection tools** (MCP, CLI commands, logs, traces). -5. **Locate relevant files** in the codebase based on the issue. -6. **List 3-5 potential causes** in a table with columns: Analysis, Evidence, Confidence (1-10). -7. **Track hypotheses** using the project task system and `@../assets/task-template.md`. One task per hypothesis. -8. **Validate one by one.** Tick each task when validated or invalidated. Add evidence inside the task. Stop when the root cause is found. -9. **State conclusions and next steps.** -10. **Wait for user validation** before moving on. -11. **Fallback.** If all hypotheses are invalidated, invoke the `reflect_issue` action of this skill for new sources. +1. **Summarize.** Restate the issue in your own words. +2. **Map.** Draw the action paths as a Mermaid flowchart (a click calls a function in one file that updates state in another), per `@../references/mermaid-conventions.md`. +3. **Whys.** Start from the symptom and ask "why" iteratively, three to five levels, each documented in a numbered list. +4. **Tools.** Identify the inspection tools available (MCP, CLI commands, logs, traces). +5. **Locate.** Find the relevant files in the codebase for the issue. +6. **Causes.** List 3 to 5 potential causes in a table: analysis, evidence, confidence (1 to 10). +7. **Track.** Record one task per hypothesis in the project task system, filling `@../assets/task-template.md`. +8. **Validate.** Work the hypotheses one by one, ticking each as validated or invalidated with evidence in the task. Stop when the root cause is found. +9. **Conclude.** State the conclusion and next steps. +10. **Confirm.** Wait for user validation before moving on. +11. **Fallback.** When every hypothesis is invalidated, hand off to the `reflect-issue` action for fresh sources. ## Test -The hypotheses list contains 3-5 entries; every entry has a `validated` or `invalidated` status; if any is `validated`, its evidence is non-empty and `root_cause` is a one-line statement consistent with that evidence; if every hypothesis is `invalidated`, `next_steps` cites the `reflect_issue` action. +- The hypotheses list has 3 to 5 entries, each with a validated or invalidated status. +- A validated hypothesis has non-empty evidence and a one-line root cause consistent with it. +- The output includes a Mermaid action-path flowchart and a confidence score per hypothesis. +- When every hypothesis is invalidated, the next steps cite the `reflect-issue` action. diff --git a/plugins/aidd-dev/skills/08-debug/actions/03-reflect-issue.md b/plugins/aidd-dev/skills/08-debug/actions/03-reflect-issue.md index bbcf3138..85564f0f 100644 --- a/plugins/aidd-dev/skills/08-debug/actions/03-reflect-issue.md +++ b/plugins/aidd-dev/skills/08-debug/actions/03-reflect-issue.md @@ -1,32 +1,24 @@ # 03 - Reflect Issue -Re-open the search space by reflecting on 5-7 fresh possible sources, distilling them down to the 1-2 most likely, and instrumenting the code with logs that will confirm or refute the picks before any fix. +Reopen the search space: reflect on 5 to 7 fresh sources, distill to the 1 or 2 most likely, and instrument logs to confirm or refute them before any fix. -## Inputs +## Input -```yaml -issue: -prior_hypotheses: -``` +The issue carried over from the debug action, and optionally the hypotheses already invalidated. -## Outputs +## Output -```yaml -new_sources: - - { id: , description: , rationale: } -most_likely: - - { id: , description: , confidence: 1-10 } -logs_added: - - { file: , location: , log_message: , purpose: } -``` +The 5 to 7 fresh sources with their rationale, the 1 or 2 most likely with a confidence score, and the validation logs added (file, location, message, what each confirms or refutes). ## Process -1. **List 5-7 fresh possible sources** of the problem, distinct from those already invalidated. -2. **Distill to 1-2 most likely** sources based on consistency with the symptom, recent code changes, and confidence in available evidence. -3. **Add validation logs.** Instrument the relevant code paths with logs that will confirm or refute each of the most-likely sources. Each log has a clear purpose; remove temporary logs after the root cause is found. +1. **Broaden.** List 5 to 7 fresh possible sources, distinct from those already invalidated. +2. **Distill.** Narrow to the 1 or 2 most likely, weighing consistency with the symptom, recent code changes, and available evidence. +3. **Instrument.** Add logs on the relevant code paths that confirm or refute each likely source, each with a clear purpose. Remove the temporary logs once the root cause is found. 4. **Boundary.** Do not implement the fix yet. The goal is to confirm the source first. ## Test -`new_sources` contains 5-7 entries; `most_likely` contains 1-2 entries selected from `new_sources` with a confidence score; `logs_added` is non-empty and every entry cites a real file path and a concrete `purpose` tied to one of the most-likely sources. +- The fresh sources list has 5 to 7 entries. +- The most-likely list has 1 or 2 entries drawn from them, each with a confidence score. +- The logs added are non-empty, each citing a real file path and a concrete purpose tied to a most-likely source. diff --git a/plugins/aidd-dev/skills/08-debug/assets/task-template.md b/plugins/aidd-dev/skills/08-debug/assets/task-template.md index cdc9e1db..5f71ea95 100644 --- a/plugins/aidd-dev/skills/08-debug/assets/task-template.md +++ b/plugins/aidd-dev/skills/08-debug/assets/task-template.md @@ -7,7 +7,7 @@ description: Task tracking system to ensure all tasks are categorized and addres {{Full description}} -## Main step 1} +## Main step 1 - [ ] {Task 1} - [ ] {Task 2} diff --git a/plugins/aidd-dev/skills/09-for-sure/SKILL.md b/plugins/aidd-dev/skills/09-for-sure/SKILL.md index 989821e3..ba542107 100644 --- a/plugins/aidd-dev/skills/09-for-sure/SKILL.md +++ b/plugins/aidd-dev/skills/09-for-sure/SKILL.md @@ -1,50 +1,36 @@ --- name: 09-for-sure -description: Iterative agent loop that tracks attempts and retries until a success condition is met. Use when the user says "for sure", "make sure", "keep trying until", "loop until done", "don't stop until", or needs guaranteed completion of a task with explicit success criteria. +description: Run an iterative agent loop that retries until a runnable success condition passes. Use when the user says "for sure", "keep trying until", or wants guaranteed completion against a success command. Not for one-shot tasks or uncheckable goals. argument-hint: init-tracking | auto-accept | autonomous-loop --- -# For Sure +# Skill: for-sure -Autonomous loop that runs until a success condition is verified. Two phases: interactive pre-flight (human present), then autonomous execution (human gone). The agent auto-accepts everything, acts as the user, and never stops until success. +Run an autonomous loop until a success condition is verified. An interactive pre-flight (human present) sets it up, then autonomous execution (human gone) retries until success, acting as the user and never stopping early. -## Context - -- **Goal**: Task's `success_condition` verified by running a command. All steps/acceptance criteria checked. `status` set to `implemented`. -- **Tools required**: Agent tool (spawning iterations), Read/Write/Edit (tracking file), task-specific tools. -- **Trigger**: Manual - `/for-sure`. -- **Tracking file format**: Uses the local `plan-template.md` (`@assets/plan-template.md`). Filename: `aidd_docs/tasks/.md` (state lives in the `status` frontmatter field). +## Actions -## Environment +| # | Action | Phase | Role | +| --- | ----------------- | ---------------------- | -------------------------------------------------------------------------- | +| 01 | `init-tracking` | interactive pre-flight | validate the goal, build the journey map, create the tracking file, spawn the loop | +| 02 | `auto-accept` | autonomous | decide and act as the user, stopping only on money or destructive actions | +| 03 | `autonomous-loop` | autonomous | spawn one worker per step, verify, retry, evaluate the success condition | -None - task secrets are validated during pre-flight and documented in the tracking file. +Run `01` interactively; it spawns `03`, which runs unattended under the `02` auto-accept rules until the success condition passes. ## Transversal rules -1. **Single source of truth**: IF information about the task exists THEN it lives in `aidd_docs/tasks/.md` and nowhere else. -2. **No repeated failures**: IF approach X failed THEN do not try X again without a meaningful change. -3. **Honesty over escape**: IF success condition is not genuinely met THEN do not set `status: implemented`. -4. **Auto-accept**: IF a decision, approval, or action is needed THEN act as the user. Create accounts, generate keys, approve prompts, install tools. Do not ask, do not hesitate, just do it. - -## Execution flow - -### Phase 1 - Interactive (human present) +- Single source of truth: all task state lives in `aidd_docs/tasks/.md` and nowhere else. +- No repeated failures: never retry a failed approach without a meaningful change. +- Honesty over escape: never set `status: implemented` until the success condition genuinely passes. +- Auto-accept: when a decision or approval is needed, act as the user (create accounts, generate keys, approve prompts, install tools), never asking. Stop only on a payment or a destructive action. +- The loop spawns one worker agent per step and never does the work itself. -1. `@actions/01-init-tracking.md` - Pre-flight, create tracking file, spawn first autonomous agent. - -### Phase 2 - Autonomous (human gone) - -2. `@actions/02-auto-accept.md` - Auto-accept mode activation (Phase 3). -3. `@actions/03-autonomous-loop.md` - Orchestrator: spawns one worker per step, verifies, checks/retries, evaluates success. - -## Actions +## Assets -```markdown -@actions/01-init-tracking.md -@actions/02-auto-accept.md -@actions/03-autonomous-loop.md -``` +- `assets/plan-template.md`: the tracking file format (frontmatter, phases, acceptance criteria, Log). +- `assets/autonomous-loop-worker-prompt.md`: the prompt the loop spawns each per-step worker with. ## References -- `@assets/plan-template.md` - tracking file format (frontmatter, phases, acceptance criteria, Log) +- `references/autonomous-loop-log-format.md`: the Log entry format the loop appends per attempt. diff --git a/plugins/aidd-dev/skills/09-for-sure/actions/01-init-tracking.md b/plugins/aidd-dev/skills/09-for-sure/actions/01-init-tracking.md index 91c26034..371ff9e8 100644 --- a/plugins/aidd-dev/skills/09-for-sure/actions/01-init-tracking.md +++ b/plugins/aidd-dev/skills/09-for-sure/actions/01-init-tracking.md @@ -1,53 +1,33 @@ # 01 - Init tracking -Pre-flight, validate prerequisites, build a journey map, create the tracking file, and hand off to the autonomous loop. This is the last interactive step before the loop runs unattended. +Validate prerequisites, build a journey map, create the tracking file, and hand off to the autonomous loop. The last interactive step before the loop runs unattended. -## Inputs +## Input -```yaml -task: # required -description: # optional -success_condition: # required; must exit 0 on success -rules: # optional -``` +The task name (required), an optional free-form description, a runnable success condition that exits 0 on success (required), and optional rules. -## Outputs +## Output -```yaml -tracking_file: aidd_docs/tasks/.md -state: resumed | created -preflight_blockers: [] # non-empty halts before spawn -``` +The tracking file at `aidd_docs/tasks/.md`, marked created or resumed, with any pre-flight blocker halting before the spawn. ## Process -### Resume flow (existing task) - -1. Check `aidd_docs/tasks/` for a file matching the task name, and read its frontmatter `status`: - - `status: pending` or `in-progress` -> report status (iteration, steps remaining), then skip to step 10 to resume. - - `status: implemented` -> report "Task already completed." Stop. - - No file -> continue to step 2. - -### New task flow - -2. **Collect from user**: task name, description, success condition, rules. -3. **Research approach.** Before planning steps, read the relevant documentation (README, official guides). Identify the recommended method; do not default to what you already know. -4. **Validate goal.** Ask "could I execute this with zero ambiguity?" If NO -> ask the user to reformulate. Examples: - - "Make the code better" -> reject. "What metric?" - - "All tests pass after `npm test`" -> accept. -5. **Validate success condition.** It must be a runnable command. Examples: - - `npm test exits 0` -> valid. - - "The code is clean" -> invalid -> push back to `eslint . exits 0`. -6. **Pre-flight checklist.** For each step, list tools, secrets, API access, data, permissions. Markers: - - `[✓]` already satisfied - - `[~]` SOFT - the agent will self-serve (sign up, generate key, install tool) - - `[!]` HARD - only the user can provide it (DB id, channel id, env var, owned API key) - - Collect every `[!]` now. If any `[!]` remains unresolved, STOP - do not proceed to step 7. -7. **Build the ASCII journey map.** Project the entire path with steps, dependencies, tools, blockers. Ask the user to confirm. Iterate until "does this map look correct? Anything missing?" returns confirmation. -8. **Load the plan template** from `@../assets/plan-template.md`. Create `aidd_docs/tasks/` when missing. -9. **Create `aidd_docs/tasks/.md`** using the plan template. Fill frontmatter (`objective`, `success_condition`, `iteration: 0`, `status: pending`), Phases with Tasks and Acceptance criteria (the steps), and include the journey map. -10. **Spawn the autonomous loop.** Read the Orchestrator prompt from `@./03-autonomous-loop.md` and pass it to the Agent tool with `` filled in. +1. **Resume.** Check `aidd_docs/tasks/` for a file matching the task name and read its frontmatter `status`. + - `pending` or `in-progress`: report the status (iteration, steps remaining), then skip to Spawn to resume. + - `implemented`: report "Task already completed" and stop. + - No file: continue to Collect. +2. **Collect.** Gather the task name, description, success condition, and rules from the user. +3. **Research.** Before planning steps, read the relevant documentation (README, official guides) and identify the recommended method. Do not default to what you already know. +4. **Goal.** Ask "could I execute this with zero ambiguity?" When no, ask the user to reformulate. "Make the code better" is rejected ("what metric?"); "all tests pass after `npm test`" is accepted. +5. **Condition.** It must be a runnable command. `npm test exits 0` is valid; "the code is clean" is invalid and is pushed back to `eslint . exits 0`. +6. **Pre-flight.** For each step, list tools, secrets, API access, data, and permissions. Mark `[✓]` already satisfied, `[~]` soft (the agent self-serves), `[!]` hard (only the user can provide it). Collect every `[!]` now; when any stays unresolved, stop before the next step. +7. **Map.** Project the whole path as an ASCII map of steps, dependencies, tools, and blockers. Ask the user to confirm and iterate until they do. +8. **Scaffold.** Load `@../assets/plan-template.md`, creating `aidd_docs/tasks/` when missing. +9. **Create.** Write `aidd_docs/tasks/.md` from the template. Fill the frontmatter (`objective`, `success_condition`, `iteration: 0`, `status: pending`), the phases with their tasks and acceptance criteria, and the journey map. +10. **Spawn.** Read the orchestrator recipe from `@./03-autonomous-loop.md` and hand it to the Agent tool with `` filled in. ## Test -After step 10: the file at `tracking_file` exists with frontmatter `status` (`pending` at creation), its `success_condition` field is a runnable command, the journey map is present, every `[!]` blocker has been resolved before spawn, and an autonomous agent has been launched. +- The tracking file exists with frontmatter `status: pending` at creation. +- Its `success_condition` is a runnable command and the journey map is present. +- Every `[!]` blocker was resolved before the spawn, and an autonomous agent was launched. diff --git a/plugins/aidd-dev/skills/09-for-sure/actions/02-auto-accept.md b/plugins/aidd-dev/skills/09-for-sure/actions/02-auto-accept.md index 72c800e1..ccdcb53d 100644 --- a/plugins/aidd-dev/skills/09-for-sure/actions/02-auto-accept.md +++ b/plugins/aidd-dev/skills/09-for-sure/actions/02-auto-accept.md @@ -1,33 +1,28 @@ # 02 - Auto-accept -Operate autonomously: do not ask for confirmation, decide and act, only stop on money or destructive actions. +Operate autonomously: do not ask for confirmation, decide and act, and stop only on money or destructive actions. -## Inputs +## Input -```yaml -task: -``` +The task to handle end-to-end, a free-form description. -## Outputs +## Output -```yaml -status: completed | stopped_payment | stopped_destructive | stopped_out_of_scope -actions_taken: - - -stopped_reason: -``` +An exit status, completed or one of stopped-payment, stopped-destructive, or stopped-out-of-scope, with the actions taken and a one-sentence reason when stopped. ## Process -Apply these rules in order to every prompt, dialog, checkbox, Y/n, license screen, cookie banner, or confirmation encountered while handling the task. +Apply these rules in order to every prompt, dialog, checkbox, Y/n, license screen, cookie banner, or confirmation met while handling the task. -1. **Accept everything by default.** Acknowledge and move on. -2. **Choose defaults.** When an installer offers options, pick the recommended or standard one. -3. **Fix problems yourself.** When something fails (missing dependency, wrong version, config error), fix it and retry. Do not ask. -4. **Stop only when it costs money.** When an action involves payment, subscription, or upgrade to a paid tier, stop and report. -5. **Stop on destructive actions.** When an action deletes data, drops a database, removes files recursively, force-pushes, resets git history, or overwrites uncommitted work, stop and report. -6. **Stay scoped.** When an instruction would lead outside the original task (unrelated tools, external signups, rabbit holes), skip it. Only do what the user asked for, nothing more. +1. **Accept.** Accept everything by default, acknowledge, and move on. +2. **Default.** When an installer offers options, pick the recommended or standard one. +3. **Self-fix.** When something fails (missing dependency, wrong version, config error), fix it and retry. Do not ask. +4. **Money.** Stop and report when an action involves payment, subscription, or an upgrade to a paid tier. +5. **Destructive.** Stop and report when an action deletes data, drops a database, removes files recursively, force-pushes, resets git history, or overwrites uncommitted work. +6. **Scope.** Skip anything leading outside the original task (unrelated tools, external signups, rabbit holes). Do only what the user asked. ## Test -`status` matches the actual exit path: `completed` only when the task was carried out end-to-end with no money or destructive action gate hit; `stopped_payment` / `stopped_destructive` / `stopped_out_of_scope` are accompanied by a non-empty `stopped_reason`. +- The status matches the actual exit path. +- `completed` appears only when the task ran end-to-end with no money or destructive gate hit. +- Each stopped status carries a non-empty reason. diff --git a/plugins/aidd-dev/skills/09-for-sure/actions/03-autonomous-loop.md b/plugins/aidd-dev/skills/09-for-sure/actions/03-autonomous-loop.md index dc296039..6778259c 100644 --- a/plugins/aidd-dev/skills/09-for-sure/actions/03-autonomous-loop.md +++ b/plugins/aidd-dev/skills/09-for-sure/actions/03-autonomous-loop.md @@ -1,71 +1,29 @@ # 03 - Autonomous loop -Orchestrates the loop. For each unchecked step: spawns a worker agent, verifies the result, checks the box or retries. One step = one agent = one log entry. The orchestrator never does the work itself. +Orchestrate the loop: for each unchecked step spawn a worker, verify the result, then check the box or retry. One step is one agent is one log entry, and the orchestrator never does the work itself. -## Inputs +## Input -```yaml -tracking_file: aidd_docs/tasks/.md # produced by 01-init-tracking -``` +The tracking file `aidd_docs/tasks/.md` produced by `01-init-tracking`. The loop runs with no human interaction, reading and writing through that file. -## Outputs +## Output -```yaml -iterations: -steps_completed: -log_entries: -``` +The success condition verified and the plan's `status` set to `implemented`, with every step checked and one Log entry per attempt. ## Process -The loop runs with no human interaction. Inputs and outputs are read from / written to the tracking file. - -1. **Read the entire file.** Frontmatter, journey map, steps, full Log. -2. **Increment `iteration`** in frontmatter, and set `status: in-progress` if still `pending`. -3. **Read the Log** to learn from prior attempts. -4. **Find the next unchecked step.** -5. **Spawn a worker agent** for that step with the Worker prompt template (below). Pass the step description and the relevant context (objective, rules, prior Log entries for this step). -6. **Read the worker's result.** -7. **Verify concretely.** Run a check command, read a file, test the output. Do not trust the worker's claim alone. -8. **On verified ✓**: tick the step `[x]` and append a Log entry. -9. **On not verified ✗**: append a Log entry with the failure reason; spawn another worker with the error context. -10. **Move to the next unchecked step.** Loop from step 1. - -### After every step is checked - -11. **Run the success_condition command** and verify the result yourself. -12. **On TRUE**: set `status: implemented` in the frontmatter and stop. -13. **On FALSE**: add new steps to address the root cause and continue the loop. - -## Worker prompt template - -```text -Execute this step. Auto-accept everything - act as the user, make every -decision yourself (approve prompts, generate keys, install tools, click -buttons). Do not ask for permission. Just do it. - -Signing in via existing accounts (Google Sign-in, GitHub OAuth, SSO) is NOT -account creation - it uses the user's active browser session. Do it. - -STEP: -CONTEXT: - -Report: -- What you did (specific: commands, files, URLs). -- The concrete result (paste output, screenshot, evidence). -``` - -## Log entry format - -One entry per step attempt: - -```text -### # - -> - -= <✓|✗> --> -``` +1. **Read.** Read the entire file: frontmatter, journey map, steps, and full Log. +2. **Mark.** Increment `iteration` in the frontmatter, setting `status: in-progress` when still `pending`. +3. **Learn.** Read the Log to learn from prior attempts. +4. **Next.** Find the next unchecked step. +5. **Spawn.** Spawn a worker for that step with `@../assets/autonomous-loop-worker-prompt.md`, passing the step description and the relevant context (objective, rules, prior Log entries for the step). +6. **Verify.** Read the worker's result, then verify concretely by running a check command, reading a file, or testing the output. Never trust the worker's claim alone. +7. **Record.** Read the worker's outcome. When it stopped at a money or destructive gate, surface the reason to the user and stop the loop; never retry, which would re-trigger the action. On verified success, tick the step `[x]`. On a plain failure, spawn another worker with the error context. Append a Log entry per `@../references/autonomous-loop-log-format.md`. +8. **Loop.** Move to the next unchecked step and repeat from Read. +9. **Evaluate.** Once every step is checked, run the `success_condition` command and verify the result yourself. On success, set `status: implemented` and stop. On failure, add new steps addressing the root cause and continue the loop. ## Test -Each step attempt has exactly one Log entry; every checked step (`[x]`) has a `= ✓` entry whose verification cites a concrete command or file; the loop only sets `status: implemented` after the `success_condition` command has been re-run and exits zero. +- Each step attempt has exactly one Log entry. +- Every checked step has a `= ✓` entry whose verification cites a concrete command or file. +- `status: implemented` is set only after the `success_condition` command has been re-run and exits zero. diff --git a/plugins/aidd-dev/skills/09-for-sure/assets/autonomous-loop-worker-prompt.md b/plugins/aidd-dev/skills/09-for-sure/assets/autonomous-loop-worker-prompt.md new file mode 100644 index 00000000..3e4a7e57 --- /dev/null +++ b/plugins/aidd-dev/skills/09-for-sure/assets/autonomous-loop-worker-prompt.md @@ -0,0 +1,21 @@ + + +Execute this step. Auto-accept everything, act as the user, and make every +decision yourself (approve prompts, generate keys, install tools, click +buttons). Do not ask for permission. Just do it. + +Signing in via an existing account (Google Sign-in, GitHub OAuth, SSO) is NOT +account creation; it uses the user's active browser session. Do it. + +Stop and report instead, without proceeding, when an action would cost money (a +payment, subscription, or paid upgrade) or is destructive (deletes data, drops a +database, force-pushes, resets git history, removes files recursively, or +overwrites uncommitted work). Stay inside the task; skip unrelated signups. + +STEP: +CONTEXT: + +Report: +- What you did, specifically: commands, files, URLs. +- The concrete result: paste output, a screenshot, or evidence. +- Whether you stopped at a money or destructive gate, and which. diff --git a/plugins/aidd-dev/skills/09-for-sure/assets/plan-template.md b/plugins/aidd-dev/skills/09-for-sure/assets/plan-template.md index 83c22497..e5f274b2 100644 --- a/plugins/aidd-dev/skills/09-for-sure/assets/plan-template.md +++ b/plugins/aidd-dev/skills/09-for-sure/assets/plan-template.md @@ -1,7 +1,4 @@ --- -name: for-sure-tracking -description: For Sure autonomous-loop tracking file. Extends the 01-plan format with `success_condition` and `iteration` (For-Sure-only), which the loop runs and increments. -argument-hint: N/A objective: "{What must be true when done. One sentence.}" success_condition: "{Runnable command that proves done. Example: 'npm test exits 0 AND coverage > 80%'}" iteration: 0 diff --git a/plugins/aidd-dev/skills/09-for-sure/references/autonomous-loop-log-format.md b/plugins/aidd-dev/skills/09-for-sure/references/autonomous-loop-log-format.md new file mode 100644 index 00000000..86e36a20 --- /dev/null +++ b/plugins/aidd-dev/skills/09-for-sure/references/autonomous-loop-log-format.md @@ -0,0 +1,15 @@ +# Autonomous loop: Log entry format + +The autonomous loop appends one entry to the tracking file's Log per step attempt, in this exact shape: + +```text +### # - +> - += <✓|✗> +-> +``` + +- `### #` numbers the attempt. +- `>` records the worker's attempt. +- `=` records the orchestrator's own verification (a command run or a file read), not the worker's claim. +- `->` records the decision: the next step, or `RETRY` with the reason. diff --git a/plugins/aidd-dev/skills/10-todo/SKILL.md b/plugins/aidd-dev/skills/10-todo/SKILL.md index 51137ace..cf9e1e9b 100644 --- a/plugins/aidd-dev/skills/10-todo/SKILL.md +++ b/plugins/aidd-dev/skills/10-todo/SKILL.md @@ -1,6 +1,6 @@ --- name: 10-todo -description: Split the user prompt into independent todos, run one executor agent per todo in parallel (each refines its todo first), and report a minimal table. Use when the user says "todo", "/todo", or asks to fan out a multi-part request into parallel implementations. +description: Split the user prompt into independent todos and run one executor agent per todo in parallel, then report a minimal table. Use when the user says "todo" or asks to fan out a multi-part request into parallel implementations. --- # Todo @@ -10,5 +10,5 @@ Turn one prompt into N independent todos, implement them in parallel, report a t ## Actions ```markdown -@actions/01-todo.md +actions/01-todo.md ``` diff --git a/plugins/aidd-dev/skills/10-todo/actions/01-todo.md b/plugins/aidd-dev/skills/10-todo/actions/01-todo.md index 504a1140..222401dc 100644 --- a/plugins/aidd-dev/skills/10-todo/actions/01-todo.md +++ b/plugins/aidd-dev/skills/10-todo/actions/01-todo.md @@ -2,12 +2,10 @@ Categorize the user prompt into independent todos, implement each in parallel, report. -## Inputs - +## Input User's requirement. -## Outputs - +## Output ```markdown | Category | Launched | Output | | -------- | -------- | ------ | @@ -15,15 +13,15 @@ User's requirement. ## Process -1. **Read.** Take `prompt` from `$ARGUMENTS`; if empty, ask the user. -2. **Categorize.** Split the prompt into distinct, independent todos (category + task). Inline, no agent, using template. +1. **Read.** Take `prompt` from the arguments; if empty, ask the user. +2. **Categorize.** Split the prompt into distinct, independent todos (category + task). Inline, no agent. 3. **Launch.** Spawn one `executor` agent per todo, all in parallel (one message, multiple Task calls). Each agent prompt mandates, in order: ```markdown - 1. Refine the todo first - discover at runtime a skill whose description covers refining or clarifying a request (never a hardcoded plugin name) and run it on the todo. + 1. Refine the todo first: run a non-interactive refine capability if one is available (discovered at runtime, never a hardcoded plugin name); otherwise restate the todo clearly and resolve obvious ambiguity inline. Never block on the user. 2. Implement the refined todo. 3. Return a one-line output summary. ``` -4. **Report.** Print exactly one table, nothing else: +4. **Report.** Print exactly one table, nothing else. ## Test diff --git a/plugins/aidd-orchestrator/CATALOG.md b/plugins/aidd-orchestrator/CATALOG.md index 16290f8f..404318d2 100644 --- a/plugins/aidd-orchestrator/CATALOG.md +++ b/plugins/aidd-orchestrator/CATALOG.md @@ -26,5 +26,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai |-------|------|---| | `-` | [README.md](skills/00-async-dev/README.md) | - | | `references` | [routing.md](skills/00-async-dev/references/routing.md) | - | -| `-` | [SKILL.md](skills/00-async-dev/SKILL.md) | `Single entry point for the async-dev pipeline (setup, run, review). Hybrid router decides which sub-flow to execute from $ARGUMENTS keyword (`setup` / `run` / `review`), trigger source (label `to-implement` / `to-review`, comment `@claude /implement` / `/review`), repo state (workflow + config presence, PR linked to issue), or natural-language intent. Use when the user says "set up async dev", "run async dev on issue #N", "address review on PR #N", "/async-dev", "claude on issues", or when triggered by a webhook with the matching labels or comments. Do NOT use for plain status checks on the async pipeline or for SDLC orchestration unrelated to issue/PR automation.` | +| `-` | [SKILL.md](skills/00-async-dev/SKILL.md) | `Drive the async-dev pipeline from one entry point: setup, run, or review. Use when the user wants to install async dev, run a ready issue, or address PR review comments, or on a webhook trigger. Not for plain status checks.` | diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/README.md b/plugins/aidd-orchestrator/skills/00-async-dev/README.md index 14352618..32097d12 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/README.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/README.md @@ -15,7 +15,7 @@ Single entry point for the async-dev pipeline. Hybrid router that picks one of t - For plain status checks on the async pipeline (read labels / comments directly). - For SDLC orchestration unrelated to issue / PR automation (use `aidd-dev:00-sdlc`). -- From inside a sub-flow action — actions never re-enter the router. +- From inside a sub-flow action, actions never re-enter the router. ## How to invoke @@ -41,8 +41,7 @@ The router reads `$ARGUMENTS`, then trigger env, then repo state, then natural i | Run | [`actions/run/01-poll-ready.md`](actions/run/01-poll-ready.md) | 6 actions, run once per ready issue | | Review | [`actions/review/01-collect-comments.md`](actions/review/01-collect-comments.md) | 4 actions, looped on the PR until stop | -## Outputs - +## Output Each sub-flow defines its own outputs: - **Setup**: workflow file, config file, scripts, labels, schedule routine id (if applicable). diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/SKILL.md b/plugins/aidd-orchestrator/skills/00-async-dev/SKILL.md index d045bc2a..581cf338 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/SKILL.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/SKILL.md @@ -1,6 +1,6 @@ --- name: 00-async-dev -description: Single entry point for the async-dev pipeline (setup, run, review). Hybrid router decides which sub-flow to execute from $ARGUMENTS keyword (`setup` / `run` / `review`), trigger source (label `to-implement` / `to-review`, comment `@claude /implement` / `/review`), repo state (workflow + config presence, PR linked to issue), or natural-language intent. Use when the user says "set up async dev", "run async dev on issue #N", "address review on PR #N", "/async-dev", "claude on issues", or when triggered by a webhook with the matching labels or comments. Do NOT use for plain status checks on the async pipeline or for SDLC orchestration unrelated to issue/PR automation. +description: Drive the async-dev pipeline from one entry point: setup, run, or review. Use when the user wants to install async dev, run a ready issue, or address PR review comments, or on a webhook trigger. Not for plain status checks. argument-hint: collect-comments | detect-stop | fix-iteration | finalize | poll-ready | resolve-deps | acquire-lock | check-sdlc | delegate-sdlc | write-audit | detect-context | ask-config | generate-workflow | generate-local-script | write-config | bootstrap-labels | install-user-scope-plugins | configure-remote-secrets | bootstrap-scheduling | commit-and-push | smoke-test --- @@ -18,11 +18,11 @@ Single skill that drives the async development pipeline end to end. Three sub-fl **You are the router until you commit to a sub-flow. Once committed, run that sub-flow's actions in order; do not jump back to routing mid-flow.** -## Routing — hybrid contract +## Routing: hybrid contract Walk in order. First match wins. -1. **`$ARGUMENTS` keyword override.** If `$ARGUMENTS` contains exactly `setup`, `run`, or `review` (case-insensitive, standalone token), route there immediately. This is the explicit override the CI workflow uses. +1. **Argument override.** If the arguments contain exactly `setup`, `run`, or `review` (case-insensitive, standalone token), route there immediately. This is the explicit override the CI workflow uses. 2. **Trigger env.** When invoked from CI (`GITHUB_EVENT_NAME` set): - Label payload `to-implement` → `run`. - Label payload `to-review` → `review`. @@ -43,7 +43,7 @@ Walk in order. First match wins. **If repo state contradicts intent** (e.g. user says "run" but `.claude/aidd-orchestrator.json` is absent), surface the conflict before delegating; never silently switch. -See `@references/routing.md` for the full decision tree, signal precedence, and edge cases. +See `references/routing.md` for the full decision tree, signal precedence, and edge cases. ## Sub-flows @@ -55,9 +55,9 @@ Sets up async-dev in a repo. Detects context, asks for runtime parameters, gener | --- | --------------------------------- | --------------------------------------------------------------------------------------------- | | 01 | `detect-context` | Identify repo, default branch, existing config, CI permissions | | 02 | `ask-config` | Collect runtime parameters (mode, auth, labels, schedule, agents) | -| 03 | `generate-workflow` | Emit `.github/workflows/aidd-async.yml` from `@assets/setup/workflow-template.yml` | -| 04 | `generate-local-script` | Emit poll/daemon scripts (local mode only) from `@assets/setup/local-*-template.sh` | -| 05 | `write-config` | Persist `.claude/aidd-orchestrator.json` from `@assets/setup/config-template.json` | +| 03 | `generate-workflow` | Emit `.github/workflows/aidd-async.yml` from `assets/setup/workflow-template.yml` | +| 04 | `generate-local-script` | Emit poll/daemon scripts (local mode only) from `assets/setup/local-*-template.sh` | +| 05 | `write-config` | Persist `.claude/aidd-orchestrator.json` from `assets/setup/config-template.json` | | 06 | `bootstrap-labels` | Create `to-implement` / `to-review` / `claude/*` labels via `gh` | | 07 | `install-user-scope-plugins` | Install `aidd-orchestrator` + `aidd-dev` at user scope (local mode) | | 08 | `configure-remote-secrets` | Sync `CLAUDE_CODE_OAUTH_TOKEN`, `AIDD_BOT_TOKEN`, etc. (remote mode) | @@ -65,7 +65,7 @@ Sets up async-dev in a repo. Detects context, asks for runtime parameters, gener | 10 | `commit-and-push` | Stage generated files, conventional-commit, push | | 11 | `smoke-test` | Label a throwaway issue with `to-implement`; verify the pipeline reacts | -Files: `@actions/setup/01-detect-context.md` ... `@actions/setup/11-smoke-test.md`. +Files: `actions/setup/01-detect-context.md` ... `actions/setup/11-smoke-test.md`. Default flow: `01 → 02 → 03 → 04 → 05 → 06 → 07 → 08 → 09 → 10 → 11`. Actions self-skip when their preconditions are not met (e.g. `07` skips in remote mode, `08` skips in local mode). @@ -82,7 +82,7 @@ Executes one orchestration cycle on a fresh issue. Reads ready issues, resolves | 05 | `delegate-sdlc` | Hand the issue to the SDLC capability; observe outcome | | 06 | `write-audit` | Emit `run-result.json` for the workflow's post-job | -Files: `@actions/run/01-poll-ready.md` ... `@actions/run/06-write-audit.md`. +Files: `actions/run/01-poll-ready.md` ... `actions/run/06-write-audit.md`. Default flow: `01 → 02 → 03 → 04 → 05 → 06`. One cycle per ready issue. @@ -93,13 +93,13 @@ Closes the loop after a PR is opened by the run flow. Detects when to keep auto- | # | Action | Role | | --- | -------------------- | ------------------------------------------------------------------------------------------ | | 01 | `collect-comments` | Read all PR + linked-issue comments newer than the last bot activity | -| 02 | `detect-stop` | Decide stop vs continue using `@references/review/stop-conditions.md` | +| 02 | `detect-stop` | Decide stop vs continue using `references/review/stop-conditions.md` | | 03 | `fix-iteration` | Delegate fixes to the SDLC capability; reply to each addressed comment | | 04 | `finalize` | Resolve threads, post the structured summary, set `claude/awaiting-review` or `blocked` | -Files: `@actions/review/01-collect-comments.md` ... `@actions/review/04-finalize.md`. +Files: `actions/review/01-collect-comments.md` ... `actions/review/04-finalize.md`. -Default flow: `01 → 02 → (03 → 01 loop if continue) → 04`. Stop conditions in `@references/review/stop-conditions.md`. +Default flow: `01 → 02 → (03 → 01 loop if continue) → 04`. Stop conditions in `references/review/stop-conditions.md`. ## Rules @@ -111,20 +111,20 @@ Default flow: `01 → 02 → (03 → 01 loop if continue) → 04`. Stop conditio ## References -- `@references/routing.md` - full decision tree, signal precedence, conflict resolution. -- `@references/setup/auth-modes.md` - local vs remote auth contracts. -- `@references/setup/claude-action-auth.md` - `claude-code-action` token setup. -- `@references/setup/local-mode-scheduling.md` - poll routine options. -- `@references/review/stop-conditions.md` - when the review loop hands off to a human. +- `references/routing.md` - full decision tree, signal precedence, conflict resolution. +- `references/setup/auth-modes.md` - local vs remote auth contracts. +- `references/setup/claude-action-auth.md` - `claude-code-action` token setup. +- `references/setup/local-mode-scheduling.md` - poll routine options. +- `references/review/stop-conditions.md` - when the review loop hands off to a human. ## Assets Setup-only templates copied into the target repo by the setup sub-flow: -- `@assets/setup/workflow-template.yml` - `.github/workflows/aidd-async.yml` skeleton. -- `@assets/setup/local-poll-template.sh` - local-mode poll script. -- `@assets/setup/local-daemon-template.sh` - local-mode daemon script. -- `@assets/setup/config-template.json` - `.claude/aidd-orchestrator.json` skeleton. +- `assets/setup/workflow-template.yml` - `.github/workflows/aidd-async.yml` skeleton. +- `assets/setup/local-poll-template.sh` - local-mode poll script. +- `assets/setup/local-daemon-template.sh` - local-mode daemon script. +- `assets/setup/config-template.json` - `.claude/aidd-orchestrator.json` skeleton. ## Test diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/01-collect-comments.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/01-collect-comments.md index 11922a9c..1a02d94a 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/01-collect-comments.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/01-collect-comments.md @@ -2,16 +2,14 @@ Pulls new review comments since the last iteration and acknowledges the loop has started. -## Inputs - +## Input - `pr_number` (required) -- integer, target PR - `trigger_comment_id` (optional) -- id of the comment that triggered the loop; receives an `eyes` reaction - `trigger_comment_url` (optional) -- full URL of the triggering comment; lets the loop reply in the thread that fired the trigger - `source_issue_number` (optional) -- issue number when the trigger was a comment on the linked issue (not the PR itself); enables fetching that thread alongside PR comments - `since` (optional) -- ISO 8601 timestamp; defaults to the timestamp of the last iteration recorded in the audit record -## Outputs - +## Output ```json { "pr_number": 117, @@ -23,7 +21,7 @@ Pulls new review comments since the last iteration and acknowledges the loop has } ``` -Each entry carries a `source` of `pr_review` (inline review thread), `pr_conversation` (top-level PR comment), or `issue` (comment on the linked issue). Issue comments have no `path`/`line` — Claude treats them as plain user direction. +Each entry carries a `source` of `pr_review` (inline review thread), `pr_conversation` (top-level PR comment), or `issue` (comment on the linked issue). Issue comments have no `path`/`line`, Claude treats them as plain user direction. ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/02-detect-stop.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/02-detect-stop.md index 4629db12..96c26be0 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/02-detect-stop.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/02-detect-stop.md @@ -2,14 +2,12 @@ Decides whether to keep iterating or hand control to a human. -## Inputs - +## Input - `collect_output` (required) -- output of `01-collect-comments` - `config` (required) -- parsed `.claude/aidd-orchestrator.json` - `issue_labels` (required) -- current labels on the linked issue -## Outputs - +## Output ```json { "decision": "stop", @@ -20,9 +18,6 @@ Decides whether to keep iterating or hand control to a human. `decision` is `"stop"` or `"continue"`. `reason` is one of `max_iterations`, `blocked_label`, `human_reviewer`, or `null`. -## Depends on - -- `01-collect-comments` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/03-fix-iteration.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/03-fix-iteration.md index fc10c1ac..4c49dc41 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/03-fix-iteration.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/03-fix-iteration.md @@ -2,15 +2,13 @@ Delegates one round of fixes to the SDLC capability discovered at runtime and pushes a new commit on the PR branch. -## Inputs - +## Input - `collect_output` (required) -- output of `01-collect-comments` - `pr_number` (required) -- integer - `discovered_skill` (required) -- skill name discovered by the same heuristic used in `02-run` - `trigger_comment_id` (optional) -- id of the comment that triggered the loop (e.g. `@claude /review`); used to add a reaction -## Outputs - +## Output ```json { "iteration": 2, @@ -21,9 +19,6 @@ Delegates one round of fixes to the SDLC capability discovered at runtime and pu } ``` -## Depends on - -- `02-detect-stop` (only when its `decision == "continue"`) ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/04-finalize.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/04-finalize.md index 10e17ccc..572e24e9 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/04-finalize.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/review/04-finalize.md @@ -2,16 +2,14 @@ Emit a `run-result.json` artifact summarising the review loop's stop decision and iteration log. The workflow's post-job (CI YAML) reads this file and performs the lifecycle effects: append to the audit log, finalize the Check Run, post the summary comment, transition issue labels, post the completion marker. -## Inputs - +## Input - `pr_number` - `stop_reason` -- one of `max_iterations`, `blocked_label`, `human_reviewer`, `no_comments` - `iteration_log` -- entries from `03-fix-iteration`; may be empty when `stop_reason = "no_comments"` - `trigger_comment_id` (optional) - `run_id` -## Outputs - +## Output A single file at `$RUNNER_TEMP/run-result.json` (workflow-readable): ```json @@ -30,9 +28,6 @@ A single file at `$RUNNER_TEMP/run-result.json` (workflow-readable): } ``` -## Depends on - -- `02-detect-stop` (when `decision = "stop"`) ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/01-poll-ready.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/01-poll-ready.md index 9945379f..2a76392e 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/01-poll-ready.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/01-poll-ready.md @@ -2,14 +2,12 @@ Lists candidate issues that the pipeline should process. -## Inputs - +## Input - `config` (required) -- parsed `.claude/aidd-orchestrator.json` - `trigger_event` (optional) -- one of `label`, `mention`, `cron`. Defaults to `cron` - `issue_hint` (optional) -- a specific issue number from the trigger event -## Outputs - +## Output ```json { "candidates": [ diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/02-resolve-deps.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/02-resolve-deps.md index d0ec3b86..7975d3ea 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/02-resolve-deps.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/02-resolve-deps.md @@ -2,13 +2,11 @@ Filters out blocked issues by checking three dependency sources in order. -## Inputs - +## Input - `candidates` (required) -- output of `01-poll-ready` - `config` (required) -- parsed `.claude/aidd-orchestrator.json` -## Outputs - +## Output ```json { "ready": [{ "number": 42, "title": "..." }], @@ -18,9 +16,6 @@ Filters out blocked issues by checking three dependency sources in order. } ``` -## Depends on - -- `01-poll-ready` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/03-acquire-lock.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/03-acquire-lock.md index e2ec40b1..e27a7415 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/03-acquire-lock.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/03-acquire-lock.md @@ -2,13 +2,11 @@ Marks an issue as in-progress so concurrent triggers do not double-run. -## Inputs - +## Input - `issue` (required) -- one entry from `ready` (output of `02-resolve-deps`) - `config` (required) -- parsed `.claude/aidd-orchestrator.json` -## Outputs - +## Output ```json { "issue_number": 42, @@ -17,9 +15,6 @@ Marks an issue as in-progress so concurrent triggers do not double-run. } ``` -## Depends on - -- `02-resolve-deps` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/04-check-sdlc.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/04-check-sdlc.md index ae105923..4de58a3e 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/04-check-sdlc.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/04-check-sdlc.md @@ -2,12 +2,10 @@ Discovers an active SDLC orchestration capability in the runtime before delegation. -## Inputs - +## Input - none (reads runtime skill catalog) -## Outputs - +## Output ```json { "sdlc_available": true, @@ -16,9 +14,6 @@ Discovers an active SDLC orchestration capability in the runtime before delegati } ``` -## Depends on - -- `03-acquire-lock` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/05-delegate-sdlc.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/05-delegate-sdlc.md index 0be3d50f..a43fef34 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/05-delegate-sdlc.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/05-delegate-sdlc.md @@ -1,9 +1,8 @@ # 05 -- Delegate SDLC -Invoke the SDLC capability with the issue request, then verify the outcome by observing the real state of git and the VCS host — never by parsing the SDLC's return shape. - -## Inputs +Invoke the SDLC capability with the issue request, then verify the outcome by observing the real state of git and the VCS host, never by parsing the SDLC's return shape. +## Input - `issue` -- the locked issue object - `run_id` -- identifier from `03-acquire-lock` - `discovered_skill` -- skill name from `04-check-sdlc` @@ -11,8 +10,7 @@ Invoke the SDLC capability with the issue request, then verify the outcome by ob - `trigger_kind` (optional) -- `label` or `comment` - `trigger_comment_url` (optional) -- when `trigger_kind = comment` -## Outputs - +## Output ```json { "default_before": "", @@ -30,9 +28,6 @@ Invoke the SDLC capability with the issue request, then verify the outcome by ob Every field is the result of an observation against git or the VCS host. None is parsed from the SDLC's return text. -## Depends on - -- `04-check-sdlc` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/06-write-audit.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/06-write-audit.md index 1891f58f..835cc80c 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/06-write-audit.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/run/06-write-audit.md @@ -1,15 +1,13 @@ # 06 -- Write Run Result -Emit a single `run-result.json` artifact summarising the observation from `05-delegate-sdlc`. The workflow's post-job (CI YAML) reads this file and performs the lifecycle effects: persist the audit log, finalize the Check Run, transition issue labels, post the completion marker. Splitting those side effects out of the agent keeps them deterministic — the agent only needs to write a file. - -## Inputs +Emit a single `run-result.json` artifact summarising the observation from `05-delegate-sdlc`. The workflow's post-job (CI YAML) reads this file and performs the lifecycle effects: persist the audit log, finalize the Check Run, transition issue labels, post the completion marker. Splitting those side effects out of the agent keeps them deterministic, the agent only needs to write a file. +## Input - `delegate_output` -- structured result from `05-delegate-sdlc` - `run_record` -- merged data from `03-acquire-lock` and `05-delegate-sdlc` - `config` -- parsed `.claude/aidd-orchestrator.json` -## Outputs - +## Output A single file at `$RUNNER_TEMP/run-result.json` (workflow-readable): ```json @@ -32,9 +30,6 @@ A single file at `$RUNNER_TEMP/run-result.json` (workflow-readable): } ``` -## Depends on - -- `05-delegate-sdlc` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/01-detect-context.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/01-detect-context.md index 5e5d3e89..e4af1133 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/01-detect-context.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/01-detect-context.md @@ -2,12 +2,10 @@ Inspects the current repo and the active runtime to confirm preconditions. -## Inputs - +## Input - `cwd` (required) -- string, absolute path of the target repo -## Outputs - +## Output ```json { "repo_root": "/abs/path", diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/02-ask-config.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/02-ask-config.md index aa1532b1..76c3eb70 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/02-ask-config.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/02-ask-config.md @@ -2,12 +2,10 @@ Interactively collects the small set of runtime parameters from the user. -## Inputs - +## Input - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output ```json { "mode": "both", @@ -45,9 +43,6 @@ Interactively collects the small set of runtime parameters from the user. } ``` -## Depends on - -- `01-detect-context` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/03-generate-workflow.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/03-generate-workflow.md index 930fd954..aa1ad101 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/03-generate-workflow.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/03-generate-workflow.md @@ -2,23 +2,18 @@ Renders the GitHub Actions workflow that triggers the async pipeline. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output A file at `.github/workflows/aidd-async.yml`. -## Depends on - -- `02-ask-config` ## Process 1. Skip this action when `answers.mode == "local"`. -2. Read `assets/workflow-template.yml`. +2. Read `assets/setup/workflow-template.yml`. 3. Substitute placeholders: - `__TO_IMPLEMENT_LABEL__` -> `answers.labels.to_implement` - `__TO_REVIEW_LABEL__` -> `answers.labels.to_review` diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/04-generate-local-script.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/04-generate-local-script.md index cf08f212..73b28e2b 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/04-generate-local-script.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/04-generate-local-script.md @@ -2,23 +2,18 @@ Renders the local poll script. The script wraps `claude -p` invocations of the run and review skills. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output A file at `scripts/aidd-async-poll.sh` with mode `0755`. -## Depends on - -- `02-ask-config` ## Process 1. Skip this action when `answers.mode == "remote"`. -2. Read `assets/local-poll-template.sh`. +2. Read `assets/setup/local-poll-template.sh`. 3. Substitute placeholders: - `__TO_IMPLEMENT_LABEL__` -> `answers.labels.to_implement` - `__TO_REVIEW_LABEL__` -> `answers.labels.to_review` diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/05-write-config.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/05-write-config.md index 10741a8c..d59ef2ba 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/05-write-config.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/05-write-config.md @@ -2,21 +2,16 @@ Persists the plugin configuration to the repo. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` -## Outputs - +## Output A file at `.claude/aidd-orchestrator.json`. -## Depends on - -- `02-ask-config` ## Process -1. Read `assets/config-template.json`. +1. Read `assets/setup/config-template.json`. 2. Merge `answers` into the template, preserving template defaults for fields the user did not override. 3. Add a top-level `version` (the plugin version) and an ISO 8601 `created_at` timestamp. 4. If `.claude/aidd-orchestrator.json` already exists, diff against the new config and ask the user to confirm overwrite. diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/06-bootstrap-labels.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/06-bootstrap-labels.md index 287ad817..fb81caf5 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/06-bootstrap-labels.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/06-bootstrap-labels.md @@ -2,12 +2,10 @@ Creates the 5 lifecycle labels declared in the config if they do not already exist on the repo. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` -## Outputs - +## Output ```json { "created": ["to-implement", "claude/working"], @@ -15,9 +13,6 @@ Creates the 5 lifecycle labels declared in the config if they do not already exi } ``` -## Depends on - -- `04-write-config` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/07-install-user-scope-plugins.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/07-install-user-scope-plugins.md index 2310320a..4a97e57a 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/07-install-user-scope-plugins.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/07-install-user-scope-plugins.md @@ -2,13 +2,11 @@ Installs the orchestrator plugin and an SDLC-providing plugin at user scope so the local poll script can invoke them via `claude -p` from any cwd. Skips entirely when the plugins are already loaded (project scope or user scope). -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output ```json { "skipped": true, @@ -22,9 +20,6 @@ Installs the orchestrator plugin and an SDLC-providing plugin at user scope so t When `skipped == false`, the response contains `marketplace_added` and `plugins_installed` instead of `found_at`. -## Depends on - -- `06-bootstrap-labels` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/08-configure-remote-secrets.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/08-configure-remote-secrets.md index c333f566..a382643d 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/08-configure-remote-secrets.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/08-configure-remote-secrets.md @@ -2,13 +2,11 @@ Walks the user through adding the GitHub Action secrets the workflow needs. For each required secret, prints inline a short "what / why / how" block with two or three concrete ways to generate the value, then reads the value from stdin and stores it via `gh secret set`. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output ```json { "secrets_set": ["CLAUDE_CODE_OAUTH_TOKEN"], @@ -16,9 +14,6 @@ Walks the user through adding the GitHub Action secrets the workflow needs. For } ``` -## Depends on - -- `06-bootstrap-labels` ## Process @@ -66,7 +61,7 @@ Paste the key when prompted. Used by the GitHub Action to clone the marketplace repository so plugins can install at runtime. Read-only is enough. Three ways to obtain: -- **A. Fine-grained PAT (recommended)**: `https://github.com/settings/personal-access-tokens/new`. Resource owner = the marketplace repo's owner. Repository access = "Only select repositories" -> the marketplace repo. Permissions = `Repository -> Contents: Read-only`. Expiration: 90 days minimum (set a calendar reminder to rotate). +- **A. Fine-grained PAT (recommended)**: `https://github.com/settings/personal-access-tokens/new`. Resource owner = the marketplace repo's owner. Repository access = "Only select repositories" → the marketplace repo. Permissions = `Repository -> Contents: Read-only`. Expiration: 90 days minimum (set a calendar reminder to rotate). - **B. Classic PAT (fallback)**: `https://github.com/settings/tokens/new`. Scope = `repo` (read). Less granular; rotate every 90 days. - **C. GitHub App installation token**: install a dedicated GitHub App on the org with "Contents: Read" on the marketplace repo. Mint short-lived tokens via the App's private key (rotates automatically). Heaviest setup, best for org compliance. @@ -80,7 +75,7 @@ How to obtain (recommended): - `https://github.com/settings/personal-access-tokens/new` - **Resource owner**: the target repo's owner. -- **Repository access**: "Only select repositories" -> the target repo. +- **Repository access**: "Only select repositories" → the target repo. - **Repository permissions** (all under "Repository permissions"): - `Contents`: Read and Write - `Pull requests`: Read and Write diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/09-bootstrap-scheduling.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/09-bootstrap-scheduling.md index 7f659f5e..d4f9b1f1 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/09-bootstrap-scheduling.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/09-bootstrap-scheduling.md @@ -2,13 +2,11 @@ Schedules `scripts/aidd-async-poll.sh` via the cheapest path that fits the user's needs. **Never recommends OS-level cron**, but for the local daemon path uses tmux/launchd/systemd so the user keeps Claude Code's Tasks quota for other things. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output ```json { "path": "local_daemon", @@ -20,9 +18,6 @@ Schedules `scripts/aidd-async-poll.sh` via the cheapest path that fits the user' `path` is one of: `manual`, `local_daemon`, `desktop_task_pending`, `schedule_routine`. -## Depends on - -- `04-generate-local-script` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/10-commit-and-push.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/10-commit-and-push.md index c43a9558..8dd50afe 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/10-commit-and-push.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/10-commit-and-push.md @@ -2,12 +2,10 @@ Stages every file generated by previous actions, asks the user for explicit confirmation, then commits and pushes the branch. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` -## Outputs - +## Output ```json { "committed": true, @@ -17,9 +15,6 @@ Stages every file generated by previous actions, asks the user for explicit conf } ``` -## Depends on - -- `09-bootstrap-scheduling` ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/11-smoke-test.md b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/11-smoke-test.md index b216f61b..46a22882 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/11-smoke-test.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/actions/setup/11-smoke-test.md @@ -2,13 +2,11 @@ Triggers the pipeline once on a self-contained throwaway issue (created by this action) so the user sees the full setup work end-to-end before walking away. Never touches the user's real backlog. -## Inputs - +## Input - `answers` (required) -- config object from `02-ask-config` - `detection` (required) -- detection report from `01-detect-context` -## Outputs - +## Output ```json { "smoke_issue_number": 999, @@ -20,10 +18,6 @@ Triggers the pipeline once on a self-contained throwaway issue (created by this `run_outcome` is `pr_opened`, `blocked`, or `skipped`. -## Depends on - -- `10-commit-and-push` (when `answers.mode != "local"`) -- `09-bootstrap-scheduling` (when `answers.mode != "remote"`) ## Process diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/references/review/stop-conditions.md b/plugins/aidd-orchestrator/skills/00-async-dev/references/review/stop-conditions.md index bd1013cb..c097d88c 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/references/review/stop-conditions.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/references/review/stop-conditions.md @@ -21,10 +21,10 @@ The human-reviewer stop **only fires from iteration 2 onwards**. On iteration 1, From iteration 2 onwards, if any new comment authored since the previous iteration started is from a non-bot user, the loop stops with `reason = human_reviewer`. The Check Run conclusion is `success` if the last iteration's tests passed, else `neutral`. Detection rules for "non-bot": -- `author.type == "Bot"` from the GitHub API -> bot -- author login ends with `[bot]` -> bot -- author login is in `config.bot_allowlist` (optional) -> bot -- otherwise -> human +- `author.type == "Bot"` from the GitHub API → bot +- author login ends with `[bot]` → bot +- author login is in `config.bot_allowlist` (optional) → bot +- otherwise → human Use case: a reviewer wrote feedback during the loop. Claude must not loop on top of human input. The next pass requires an explicit re-trigger. diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/references/routing.md b/plugins/aidd-orchestrator/skills/00-async-dev/references/routing.md index d6ec5573..2e4c86bd 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/references/routing.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/references/routing.md @@ -1,12 +1,12 @@ -# Routing — decision tree +# Routing: decision tree Full contract for picking a sub-flow inside `aidd-orchestrator:00-async-dev`. The router walks these signals in order; the first match wins. --- -## 1. Explicit override — `$ARGUMENTS` keyword +## 1. Explicit override: the arguments keyword -If `$ARGUMENTS` contains exactly `setup`, `run`, or `review` as a standalone case-insensitive token, route there immediately. No fallback consideration. +If the arguments contain exactly `setup`, `run`, or `review` as a standalone case-insensitive token, route there immediately. No fallback consideration. This is the contract the bundled CI workflow relies on: @@ -15,7 +15,7 @@ prompt: "Use skill aidd-orchestrator:00-async-dev with action=run on issue #..." prompt: "Use skill aidd-orchestrator:00-async-dev with action=review on PR #..." ``` -The router parses `action=` from the prompt body. Plain `setup` / `run` / `review` words elsewhere in the body do NOT match — only the explicit `action=` form, or `$ARGUMENTS` set to exactly one of the three keywords. +The router parses `action=` from the prompt body. Plain `setup` / `run` / `review` words elsewhere in the body do NOT match, only the explicit `action=` form, or the arguments set to exactly one of the three keywords. --- @@ -62,17 +62,17 @@ Last-resort heuristic for free-form user input. --- -## Tie-break — most-specific signal wins +## Tie-break: most-specific signal wins When multiple signals match across categories: ```text -$ARGUMENTS keyword (1) > trigger env (2) > repo state (3) > NL intent (4) +Arguments keyword (1) > trigger env (2) > repo state (3) > NL intent (4) ``` Within a category, the most specific concrete signal wins: -- A PR number in `$ARGUMENTS` beats a label payload. +- A PR number in the arguments beats a label payload. - A label beats a free-text keyword. - A specific config file presence beats a generic verb. @@ -87,21 +87,21 @@ Examples: - **User says "run" but config is absent.** Surface the conflict and stop: `Setup must complete before run. Run /aidd-orchestrator:00-async-dev with action=setup first.` - **Workflow webhook fires `to-implement` but the issue already has an open closing PR.** - Route to `review` (the PR is the active surface). Comment on the issue: `Issue #N has open PR #M — routed to review instead of run. Apply the `to-review` label to PR #M to trigger review explicitly.` + Route to `review` (the PR is the active surface). Comment on the issue: `Issue #N has open PR #M, routed to review instead of run. Apply the `to-review` label to PR #M to trigger review explicitly.` - **Label `to-implement` AND label `to-review` both present.** Route to `review` (more specific to the PR lifecycle). Comment to clarify. --- -## Unresolved — ask the human +## Unresolved: ask the human If none of the above produces a single match, surface the three sub-flows with their triggers and ask: ```text Async-dev: which sub-flow? - - setup — install / configure async-dev in this repo - - run — implement a ready issue (labeled to-implement) - - review — iterate on review comments for an open PR + - setup , install / configure async-dev in this repo + - run , implement a ready issue (labeled to-implement) + - review , iterate on review comments for an open PR Reply with `setup`, `run`, or `review`. ``` diff --git a/plugins/aidd-orchestrator/skills/00-async-dev/references/setup/local-mode-scheduling.md b/plugins/aidd-orchestrator/skills/00-async-dev/references/setup/local-mode-scheduling.md index 80b13652..707a0b1f 100644 --- a/plugins/aidd-orchestrator/skills/00-async-dev/references/setup/local-mode-scheduling.md +++ b/plugins/aidd-orchestrator/skills/00-async-dev/references/setup/local-mode-scheduling.md @@ -92,7 +92,7 @@ The daemon is fully decoupled from Claude Code's Tasks system; cancel it by kill Convenient when the backlog is small and you want everything inside Claude Code. **Counts against your Tasks quota; one tick = one task slot consumed**, so a 5-minute cadence may exhaust a daily/weekly limit faster than you expect. -1. Open Claude Code Desktop -> Scheduled tasks -> New task. +1. Open Claude Code Desktop → Scheduled tasks → New task. 2. Working directory: the absolute path of this repo. 3. Schedule: choose a cadence; remember the quota. 4. Prompt: `Run ./scripts/aidd-async-poll.sh and report what was processed.` diff --git a/plugins/aidd-pm/.claude-plugin/plugin.json b/plugins/aidd-pm/.claude-plugin/plugin.json index 85d082b9..3a7b6f51 100644 --- a/plugins/aidd-pm/.claude-plugin/plugin.json +++ b/plugins/aidd-pm/.claude-plugin/plugin.json @@ -2,14 +2,14 @@ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "aidd-pm", "version": "2.0.0", - "description": "Product management: ticket-info, user-stories-create, prd, spec", + "description": "Product management: ticket-info, user-stories, prd, spec", "author": { "name": "AI-Driven Dev", "url": "https://github.com/ai-driven-dev" }, "skills": [ "./skills/01-ticket-info", - "./skills/02-user-stories-create", + "./skills/02-user-stories", "./skills/03-prd", "./skills/04-spec" ], diff --git a/plugins/aidd-pm/CATALOG.md b/plugins/aidd-pm/CATALOG.md index d4a73cbd..a262047f 100644 --- a/plugins/aidd-pm/CATALOG.md +++ b/plugins/aidd-pm/CATALOG.md @@ -9,7 +9,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai - [`.claude-plugin`](#claude-plugin) - [`skills`](#skills) - [`skills/01-ticket-info`](#skills01-ticket-info) - - [`skills/02-user-stories-create`](#skills02-user-stories-create) + - [`skills/02-user-stories`](#skills02-user-stories) - [`skills/03-prd`](#skills03-prd) - [`skills/04-spec`](#skills04-spec) @@ -29,26 +29,32 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai |-------|------|---| | `actions` | [01-ticket-info.md](skills/01-ticket-info/actions/01-ticket-info.md) | - | | `-` | [README.md](skills/01-ticket-info/README.md) | - | -| `-` | [SKILL.md](skills/01-ticket-info/SKILL.md) | `Retrieve and display ticket information from the configured ticketing tool. Use when the user says "ticket info", "show ticket", "get ticket", "ticket details", "what's ", or invokes `/ticket-info`. Do NOT use for creating issues, commenting on tickets, changing status, or reassigning.` | +| `-` | [SKILL.md](skills/01-ticket-info/SKILL.md) | `Retrieve and display a ticket from the configured ticketing tool. Use when the user wants to see, show, or look up a ticket's details. Not for creating a ticket, or commenting on, transitioning, or reassigning one.` | -#### `skills/02-user-stories-create` +#### `skills/02-user-stories` | Group | File | Description | |-------|------|---| -| `actions` | [01-create-user-stories.md](skills/02-user-stories-create/actions/01-create-user-stories.md) | - | -| `assets` | [user-story-template.md](skills/02-user-stories-create/assets/user-story-template.md) | `Template for defining user stories with estimation and acceptance criteria` | -| `-` | [README.md](skills/02-user-stories-create/README.md) | - | -| `-` | [SKILL.md](skills/02-user-stories-create/SKILL.md) | `Generate INVEST-compliant user stories from a feature description. Use when the user says "user stories", "create user stories", "write user stories for X", "INVEST stories", "draft stories", or invokes `/user-stories-create`. Do NOT use for writing code, drafting a full PRD, refining a single existing story, or copying ready text into a tracker.` | +| `actions` | [01-clarify-scope.md](skills/02-user-stories/actions/01-clarify-scope.md) | - | +| `actions` | [02-split-epic.md](skills/02-user-stories/actions/02-split-epic.md) | - | +| `actions` | [03-draft-stories.md](skills/02-user-stories/actions/03-draft-stories.md) | - | +| `actions` | [04-estimate-impact.md](skills/02-user-stories/actions/04-estimate-impact.md) | - | +| `actions` | [05-prioritize.md](skills/02-user-stories/actions/05-prioritize.md) | - | +| `actions` | [06-sync-tracker.md](skills/02-user-stories/actions/06-sync-tracker.md) | - | +| `assets` | [user-story-template.md](skills/02-user-stories/assets/user-story-template.md) | - | +| `-` | [README.md](skills/02-user-stories/README.md) | - | +| `references` | [rating.md](skills/02-user-stories/references/rating.md) | - | +| `-` | [SKILL.md](skills/02-user-stories/SKILL.md) | `Turn a feature or epic into a prioritized, estimated, INVEST-compliant user-story backlog in the tracker. Use when the user wants to create, split, estimate, or prioritize user stories. Not for source code or a PRD.` | #### `skills/03-prd` | Group | File | Description | |-------|------|---| | `actions` | [01-prd.md](skills/03-prd/actions/01-prd.md) | - | -| `assets` | [prd-template.md](skills/03-prd/assets/prd-template.md) | `Product Requirements Document template (15 sections)` | +| `assets` | [prd-template.md](skills/03-prd/assets/prd-template.md) | - | | `assets` | [task-template.md](skills/03-prd/assets/task-template.md) | `Task tracking system to ensure all tasks are categorized and addressed` | | `-` | [README.md](skills/03-prd/README.md) | - | -| `-` | [SKILL.md](skills/03-prd/SKILL.md) | `Generate a structured Product Requirements Document from a feature description or user stories, validated with the user before save. Use when the user says "prd", "draft prd", "write prd", "product requirements for X", "generate a prd", or invokes `/prd`. Do NOT use for writing user stories, drafting a technical implementation plan, or writing source code.` | +| `-` | [SKILL.md](skills/03-prd/SKILL.md) | `Generate a structured Product Requirements Document from a need, idea, or brainstorm, confirmed before save. Use when the user wants to draft or generate a PRD or product requirements. Not for user stories or a technical plan.` | #### `skills/04-spec` diff --git a/plugins/aidd-pm/README.md b/plugins/aidd-pm/README.md index acd14027..1edfea84 100644 --- a/plugins/aidd-pm/README.md +++ b/plugins/aidd-pm/README.md @@ -15,6 +15,6 @@ Covers ticket information retrieval, user story creation, product requirement do | Bracket ID | Skill | Description | |---|---|---| | [4.1] | [ticket-info](skills/01-ticket-info/README.md) | Retrieve and display ticket information from the configured ticketing tool. | -| [4.2] | [user-stories-create](skills/02-user-stories-create/README.md) | Generate INVEST-compliant user stories from a feature description. | +| [4.2] | [user-stories](skills/02-user-stories/README.md) | Turn a feature or epic into a prioritized, estimated, INVEST-compliant user-story backlog. | | [4.3] | [prd](skills/03-prd/README.md) | Generate a structured Product Requirements Document. | | [4.4] | [spec](skills/04-spec/README.md) | Generate and refine a project spec from a free-form human request. The spec is the immutable target a planner consumes. | diff --git a/plugins/aidd-pm/skills/01-ticket-info/SKILL.md b/plugins/aidd-pm/skills/01-ticket-info/SKILL.md index 9ef4743c..a9e72bcb 100644 --- a/plugins/aidd-pm/skills/01-ticket-info/SKILL.md +++ b/plugins/aidd-pm/skills/01-ticket-info/SKILL.md @@ -1,37 +1,21 @@ --- name: 01-ticket-info -description: Retrieve and display ticket information from the configured ticketing tool. Use when the user says "ticket info", "show ticket", "get ticket", "ticket details", "what's ", or invokes `/ticket-info`. Do NOT use for creating issues, commenting on tickets, changing status, or reassigning. +description: Retrieve and display a ticket from the configured ticketing tool. Use when the user wants to see, show, or look up a ticket's details. Not for creating a ticket, or commenting on, transitioning, or reassigning one. --- # Ticket Info Reads ticket details from the configured ticketing tool. Read-only and tool-agnostic. -## Available actions +## Actions | # | Action | Role | Input | | --- | -------------- | ------------------------------------------------------------- | ---------------------------------- | | 01 | `ticket-info` | Resolve ticket id, query the configured tool, display fields | ticket_id (optional) | -## Default flow - -Single action skill. The router dispatches to `ticket-info` whenever a ticket-lookup phrase appears. - ## Transversal rules - Read the configured ticketing tool from project memory first; otherwise inspect repo configuration or environment. - Auto-detect the ticket identifier from the current branch name when none is provided. - Format the identifier per project convention before querying. - Read-only: never create, comment, transition, or reassign from this skill. - -## References - -- None. - -## Assets - -- None. - -## External data - -- None. diff --git a/plugins/aidd-pm/skills/01-ticket-info/actions/01-ticket-info.md b/plugins/aidd-pm/skills/01-ticket-info/actions/01-ticket-info.md index de7b228c..477b8aa7 100644 --- a/plugins/aidd-pm/skills/01-ticket-info/actions/01-ticket-info.md +++ b/plugins/aidd-pm/skills/01-ticket-info/actions/01-ticket-info.md @@ -2,38 +2,23 @@ Resolve the ticket identifier, query the configured ticketing tool, and display the relevant fields. -## Inputs +## Input -```yaml -ticket_id: # optional; auto-detect from current branch name when omitted -``` +An optional ticket id or URL. When omitted, auto-detect it from the current branch name. -## Outputs +## Output -```yaml -ticket_id: -title: -description: <body> -status: <status> -assignee: <assignee> -priority: <priority> -url: <url> -``` +The ticket's title, description, status, assignee, priority, and URL, displayed for the user. ## Process -1. **Tool resolution**. Pick first match: - - ticketing tool declared in project memory -> use it - - default -> inspect repo configuration or environment for the configured tool -2. **Ticket identifier**. Pick first match: - - `ticket_id` provided -> use it - - default -> extract from `git rev-parse --abbrev-ref HEAD` per project convention -3. **Format**. Apply the project ticketing convention to the identifier (prefix, separator, casing). -4. **Query**. Invoke the configured ticketing tool to fetch the ticket record. -5. **Display**. Render title, description, status, assignee, priority, and URL for the user. -6. **Return** the structured Outputs block. +1. **Tool.** Use the ticketing tool declared in project memory. Otherwise inspect the repo configuration or environment for the configured tool. +2. **Identifier.** Use the provided ticket id when given. Otherwise take it from the current branch name, per project convention. +3. **Format.** Apply the project ticketing convention to the identifier (prefix, separator, casing). +4. **Query.** Invoke the configured ticketing tool to fetch the ticket record. +5. **Display.** Render the title, description, status, assignee, priority, and URL. ## Test -- **Tool view**: querying the configured ticketing tool for the resolved id returns a record where `title`, `status`, `assignee`, and `url` match the displayed fields. -- **Reachable**: the ticket is reachable at `url` in the tracker. +- Querying the configured tool for the resolved id returns a record whose title, description, status, assignee, priority, and URL match the displayed fields. +- The ticket is reachable at its URL in the tracker. diff --git a/plugins/aidd-pm/skills/02-user-stories-create/README.md b/plugins/aidd-pm/skills/02-user-stories-create/README.md deleted file mode 100644 index c0038ec5..00000000 --- a/plugins/aidd-pm/skills/02-user-stories-create/README.md +++ /dev/null @@ -1,52 +0,0 @@ -← [aidd-framework](../../../../README.md) / [aidd-pm](../../README.md) - -# 02 - Create User Stories - -Drafts INVEST-compliant user stories from a feature description through a -short Product Owner clarification loop, then saves them to the configured -ticketing tool once you validate the draft. - -## When to use - -- "user stories", "create user stories", "write user stories for X". -- "INVEST stories", "draft stories". -- Invoking `/user-stories-create`. -- Right after a brainstorming session, when scope is clear enough to slice. - -## When NOT to use - -- To write source code - this skill produces stories, not implementation. -- To draft a full PRD → use `03-prd`. -- To refine a single existing story (edit the tracker directly). -- To copy already-ready story text into a tracker (just paste it). - -## How to invoke - -``` -Use skill aidd-pm:02-user-stories-create for <feature description> -``` - -The skill clarifies in at most 3 questions per round, drafts the stories, -shows them for explicit validation, then saves on confirmation. - -## Outputs - -- A set of INVEST-compliant user stories, each with acceptance criteria, - dependencies, and story points. -- Stories sorted by implementation priority. -- One ticket per story created in the configured ticketing tool after - explicit validation. - -## Prerequisites - -- Project memory declares the active ticketing tool with write access. -- A clear-enough feature description; if too vague, the skill asks you to - brainstorm first rather than fabricating stories. - -## Technical details - -See [`SKILL.md`](SKILL.md) for the action contract, -[`actions/01-create-user-stories.md`](actions/01-create-user-stories.md) for -the single atomic action, and -[`assets/user-story-template.md`](assets/user-story-template.md) for the -story body template. diff --git a/plugins/aidd-pm/skills/02-user-stories-create/SKILL.md b/plugins/aidd-pm/skills/02-user-stories-create/SKILL.md deleted file mode 100644 index 1286159a..00000000 --- a/plugins/aidd-pm/skills/02-user-stories-create/SKILL.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: 02-user-stories-create -description: Generate INVEST-compliant user stories from a feature description. Use when the user says "user stories", "create user stories", "write user stories for X", "INVEST stories", "draft stories", or invokes `/user-stories-create`. Do NOT use for writing code, drafting a full PRD, refining a single existing story, or copying ready text into a tracker. ---- - -# Create User Stories - -Drafts INVEST-compliant user stories from a feature description through Product Owner clarification. - -## Available actions - -| # | Action | Role | Input | -| --- | ----------------------- | ----------------------------------------------------------------- | -------------------------------------------------- | -| 01 | `create-user-stories` | Clarify scope, draft stories, validate, save to the tracker | feature_description, existing_stories (optional) | - -## Default flow - -Single action skill. The router dispatches to `create-user-stories` whenever a story-generation phrase appears. - -## Transversal rules - -- **INVEST**: each story is Independent, Negotiable, Valuable, Estimable, Small, Testable. -- **Definition of Ready**: acceptance criteria, dependencies, story points, and zero blocking questions before save. -- **Lean clarification**: at most 3 questions per iteration; focus on user needs, not technical aspects. -- Stories are sorted by implementation priority. -- Always wait for explicit user validation before saving to the tracker. -- The save target is the configured ticketing tool from project memory. - -## References - -- None. - -## Assets - -- `@assets/user-story-template.md`: User story body template. - -## External data - -- None. diff --git a/plugins/aidd-pm/skills/02-user-stories-create/actions/01-create-user-stories.md b/plugins/aidd-pm/skills/02-user-stories-create/actions/01-create-user-stories.md deleted file mode 100644 index d81d1506..00000000 --- a/plugins/aidd-pm/skills/02-user-stories-create/actions/01-create-user-stories.md +++ /dev/null @@ -1,41 +0,0 @@ -# 01 - Create User Stories - -Clarify scope through iterative Product Owner questioning, draft INVEST-compliant user stories, validate with the user, then save them to the configured ticketing tool. - -## Inputs - -```yaml -feature_description: <free text> # required; the feature or requirement to break into stories -existing_stories: [<id>] # optional; ids of related stories to consider -``` - -## Outputs - -```yaml -stories: - - id: <tracker id> - title: <user story title> - story: As a <persona>, I want <goal>, so that <reason>. - acceptance_criteria: - - <criterion> - story_points: <int> - priority: <int> - url: <tracker url> -``` - -## Process - -1. **Clarify**. Ask up to 3 questions per iteration to close gaps in problem, features, criteria, scope, and constraints. Skip technical detail. -2. **Iterate**. Pick first match: - - blocking question remains -> loop back to step 1 - - no blocking question -> proceed -3. **Draft**. Format each story with `assets/user-story-template.md`. Sort by implementation priority. -4. **Validate**. Show the full story list to the user. Wait for explicit approval. -5. **Save**. Invoke the configured ticketing tool to create each story; capture the returned id and url. -6. **Return** the structured Outputs block. - -## Test - -- **INVEST**: each story satisfies Independent, Negotiable, Valuable, Estimable, Small, Testable. -- **Ready**: every story has acceptance criteria, dependencies addressed, and story points set. -- **Persisted**: querying the configured ticketing tool returns each saved story id with matching title. diff --git a/plugins/aidd-pm/skills/02-user-stories-create/assets/user-story-template.md b/plugins/aidd-pm/skills/02-user-stories-create/assets/user-story-template.md deleted file mode 100644 index 91920632..00000000 --- a/plugins/aidd-pm/skills/02-user-stories-create/assets/user-story-template.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: user-story -description: Template for defining user stories with estimation and acceptance criteria -argument-hint: N/A ---- - -# [Epic Name] - -## US-[ID]: "[User Story Title]" - -**As a** [role] -**I want** [action] -**So that** [outcome] - -### Acceptance Criteria - -```gherkin -Scenario: [Error condition] - Given [error context] - When [error trigger] - Then [graceful error handling] - -Scenario: [Boundary condition] - Given [edge case context] - When [edge action] - Then [expected behavior] -``` diff --git a/plugins/aidd-pm/skills/02-user-stories/README.md b/plugins/aidd-pm/skills/02-user-stories/README.md new file mode 100644 index 00000000..95763b00 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/README.md @@ -0,0 +1,58 @@ +← [aidd-framework](../../../../README.md) / [aidd-pm](../../README.md) + +# 02 - User Stories + +Turns a feature or epic into a prioritized backlog of INVEST-compliant user +stories. Each story carries acceptance criteria, a pragmatic functional +Definition of Done, an effort estimate, and an impact rating, then is saved to +the project's configured tracker once you validate the draft. + +## When to use + +- "user stories", "create user stories", "write user stories for X". +- "INVEST stories", "draft stories". +- "split this epic", "break down this feature". +- "estimate stories", "prioritize the backlog". +- Invoking `/user-stories`. +- Right after a brainstorming session, when scope is clear enough to slice. + +## When NOT to use + +- To write source code - this skill produces stories, not implementation. +- To draft a full PRD → use `03-prd`. +- To refine a single existing story (edit the tracker directly). +- To copy already-ready story text into a tracker (just paste it). + +## How to invoke + +``` +Use skill aidd-pm:02-user-stories for <feature or epic description> +``` + +The skill clarifies in at most 3 questions per round, splits an epic into +candidate stories, drafts them, estimates effort and impact, ranks the +backlog, shows it for explicit validation, then saves on confirmation. + +## Outputs + +- A set of INVEST-compliant user stories, each with acceptance criteria, a + functional Definition of Done, dependencies, and story points. +- An impact rating (minor, major, critic) per story. +- The backlog ranked by value against effort and impact. +- One ticket per story created in the configured tracker after explicit + validation. + +## Prerequisites + +- Project memory declares the active ticketing tool with write access. +- A clear-enough feature description; if too vague, the skill asks you to + brainstorm first rather than fabricating stories. + +## Technical details + +See [`SKILL.md`](SKILL.md) for the action contract, the files under +[`actions/`](actions) for each step of the chain, +[`references/rating.md`](references/rating.md) for the INVEST, readiness, +Definition of Done, impact, and prioritization definitions, and +[`assets/user-story-template.md`](assets/user-story-template.md) for the story +body template. diff --git a/plugins/aidd-pm/skills/02-user-stories/SKILL.md b/plugins/aidd-pm/skills/02-user-stories/SKILL.md new file mode 100644 index 00000000..07bc41b6 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/SKILL.md @@ -0,0 +1,39 @@ +--- +name: 02-user-stories +description: Turn a feature or epic into a prioritized, estimated, INVEST-compliant user-story backlog in the tracker. Use when the user wants to create, split, estimate, or prioritize user stories. Not for source code or a PRD. +argument-hint: clarify-scope | split-epic | draft-stories | estimate-impact | prioritize | sync-tracker +--- + +# User Stories + +Produces a prioritized backlog of INVEST-compliant user stories, each estimated for effort and impact and carrying a pragmatic functional Definition of Done, then saved to the project's configured tracker. + +## Actions + +| # | Action | Role | Input | +| --- | ----------------- | -------------------------------------------------------------------- | -------------------------------------- | +| 01 | `clarify-scope` | Clarify the request through Product Owner questioning; decide epic vs single story | feature or epic description | +| 02 | `split-epic` | Decompose the confirmed scope into candidate vertical-slice stories | confirmed scope from 01 | +| 03 | `draft-stories` | Write each candidate as an INVEST story with acceptance criteria and a functional DoD | candidate stories from 02 | +| 04 | `estimate-impact` | Rate each story for effort (points) and impact on the existing system | drafted stories from 03 | +| 05 | `prioritize` | Rank the backlog by value against effort and impact | estimated stories from 04 | +| 06 | `sync-tracker` | Gate on Definition of Ready, get explicit approval, save to the tracker | ranked backlog from 05 | + +Run `01 → 02 → 03 → 04 → 05 → 06`, passing each `## Test` first. A single story skips the epic split. + +## Transversal rules + +- **INVEST**: each story is Independent, Negotiable, Valuable, Estimable, Small, Testable. +- **Definition of Ready**: acceptance criteria, dependencies, story points, and an impact rating are set, with zero blocking questions, before save. +- **Definition of Done**: each story carries a pragmatic, functional DoD, observable user-facing conditions that mean the goal is met. Functional only, never technical delivery steps. +- **Lean clarification**: at most 3 questions per iteration; focus on user needs, not technical aspects. +- Always wait for explicit user validation before saving to the tracker. +- The save target is the configured ticketing tool from project memory; never assume a specific tool. + +## References + +- `references/rating.md`: INVEST, the Definition of Ready and functional Definition of Done, the minor/major/critic impact scale, and the prioritization method. + +## Assets + +- `assets/user-story-template.md`: user story body template. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/01-clarify-scope.md b/plugins/aidd-pm/skills/02-user-stories/actions/01-clarify-scope.md new file mode 100644 index 00000000..10f23943 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/01-clarify-scope.md @@ -0,0 +1,25 @@ +# 01 - Clarify scope + +Close the gaps in the request through Product Owner questioning, then decide whether it is an epic or a single story. + +## Input + +A free-text feature or epic description. Optionally, ids of related existing stories to consider. + +## Output + +A confirmed scope statement: the problem, the in-scope outcomes, the named constraints, and a flag marking the request as an epic (multiple stories) or a single story. + +## Process + +1. **Read.** Restate the request in one sentence to surface the implicit need. +2. **Question.** Cover problem, outcomes, criteria, scope edges, and constraints. +3. **Iterate.** If a blocking question remains, loop back to step 2. Otherwise proceed. +4. **Classify.** Judge the breadth. Flag the request as an epic when it spans more than one independent outcome, otherwise as a single story. +5. **Confirm.** Show the scope statement and the epic-or-single flag. Wait for the user to confirm before handing to `02-split-epic`. + +## Test + +- The output names the problem, the in-scope outcomes, and the constraints. +- The output carries an explicit epic-or-single flag confirmed by the user. +- No blocking question is left open when the action proceeds. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/02-split-epic.md b/plugins/aidd-pm/skills/02-user-stories/actions/02-split-epic.md new file mode 100644 index 00000000..59817d81 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/02-split-epic.md @@ -0,0 +1,25 @@ +# 02 - Split epic + +Decompose the confirmed scope into candidate stories, each a vertical slice that delivers value on its own. + +## Input + +The confirmed scope statement and epic-or-single flag from `01-clarify-scope`. + +## Output + +An ordered list of candidate stories, each a title plus a one-line user goal. A single-story request yields exactly one candidate. + +## Process + +1. **Branch.** If the flag marks a single story, emit one candidate from the scope and stop. Otherwise continue. +2. **Slice.** Cut the epic along user outcomes, not technical layers. Each slice must deliver something a user can perceive. +3. **Check independence.** Reshape any slice that cannot ship without another, so each candidate stands alone (see `@../references/rating.md`). +4. **Name.** Give each candidate a short title and a one-line goal in user terms. +5. **Confirm.** Show the candidate list and wait for the user to confirm before handing to `03-draft-stories`. + +## Test + +- Each candidate is a vertical slice with a user-perceivable outcome. +- A single-story input produces exactly one candidate. +- No candidate depends on another candidate to deliver its value. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/03-draft-stories.md b/plugins/aidd-pm/skills/02-user-stories/actions/03-draft-stories.md new file mode 100644 index 00000000..06943b70 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/03-draft-stories.md @@ -0,0 +1,25 @@ +# 03 - Draft stories + +Write each candidate as a full INVEST story with acceptance criteria and a pragmatic functional Definition of Done. + +## Input + +The confirmed candidate list from `02-split-epic`. + +## Output + +One drafted story per candidate, each filling `@../assets/user-story-template.md`: the As-a/I-want/So-that statement, Gherkin acceptance criteria, and a functional DoD. + +## Process + +1. **Frame.** Write the As-a/I-want/So-that statement, naming the role, the action, and the outcome. +2. **Criteria.** Write Gherkin scenarios covering at least one nominal case and one error or boundary case. +3. **Done.** Write the functional DoD per `@../references/rating.md`: observable, user-facing conditions only, never technical delivery steps. +4. **Check INVEST.** Verify each story against the six criteria in `@../references/rating.md`. Reshape any story that fails. +5. **Fill.** Render each story into `@../assets/user-story-template.md`, leaving estimation fields for `04-estimate-impact`. + +## Test + +- Each story has an As-a/I-want/So-that statement and at least one Gherkin scenario. +- Each story has a functional DoD whose bullets are user-facing, with no technical delivery step. +- Each story satisfies all six INVEST criteria. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/04-estimate-impact.md b/plugins/aidd-pm/skills/02-user-stories/actions/04-estimate-impact.md new file mode 100644 index 00000000..cf37ce63 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/04-estimate-impact.md @@ -0,0 +1,23 @@ +# 04 - Estimate impact + +Rate each story for effort and for its impact on the existing system. + +## Input + +The drafted stories from `03-draft-stories`. + +## Output + +Each story annotated with story points, its dependencies (named or confirmed absent), an impact rating of minor, major, or critic, and a one-line rationale for the impact. + +## Process + +1. **Estimate effort.** Assign story points reflecting relative size. Flag any story too large to size and send it back to `02-split-epic`. +2. **Rate impact.** Assign minor, major, or critic per the impact scale in `@../references/rating.md`. +3. **Justify.** Write a one-line rationale for each impact rating. +4. **Record.** Fill the estimation block in `@../assets/user-story-template.md` for each story. + +## Test + +- Each story carries a numeric story-point value. +- Each story carries an impact rating in {minor, major, critic} with a one-line rationale. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/05-prioritize.md b/plugins/aidd-pm/skills/02-user-stories/actions/05-prioritize.md new file mode 100644 index 00000000..ec5b98f2 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/05-prioritize.md @@ -0,0 +1,23 @@ +# 05 - Prioritize + +Rank the backlog by value against effort, breaking ties with impact. + +## Input + +The estimated stories from `04-estimate-impact`. + +## Output + +The stories as a single ordered list, each with a priority rank, ordered by the method in `@../references/rating.md`. + +## Process + +1. **Score.** For each story, weigh delivered value against its story points. +2. **Order.** Sort by descending value-to-effort, then break ties with the lower impact first, per `@../references/rating.md`. +3. **Override.** Pull a story earlier only when a later story depends on it. State that reason on the affected story. +4. **Rank.** Write the priority rank into each story's estimation block. + +## Test + +- The output is a strictly ordered list with a unique rank per story. +- The ranking key is stated, and any dependency-driven override names its reason. diff --git a/plugins/aidd-pm/skills/02-user-stories/actions/06-sync-tracker.md b/plugins/aidd-pm/skills/02-user-stories/actions/06-sync-tracker.md new file mode 100644 index 00000000..eb355962 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/actions/06-sync-tracker.md @@ -0,0 +1,25 @@ +# 06 - Sync tracker + +Gate the backlog on the Definition of Ready, get explicit approval, then save each story to the configured tracker. + +## Input + +The ranked backlog from `05-prioritize`. + +## Output + +One ticket per story created in the configured tracker, each capturing the returned id and url. + +## Process + +1. **Resolve target.** Read the active ticketing tool from project memory. If none is declared, ask the user which tracker to use rather than assuming one. +2. **Gate.** Check every story against the Definition of Ready in `@../references/rating.md`. Send any failing story back to its action. Do not proceed while one fails. +3. **Present.** Show the full ranked backlog. Wait for explicit user approval before any write. +4. **Save.** On approval, create one ticket per story in the resolved tracker. Capture the returned id and url for each. +5. **Report.** Return the created stories with their ids and urls, in priority order. + +## Test + +- After approval, querying the configured tracker returns each saved story id with a matching title. +- The Definition of Ready holds for every saved story. +- No write happens before explicit user approval. diff --git a/plugins/aidd-pm/skills/02-user-stories/assets/user-story-template.md b/plugins/aidd-pm/skills/02-user-stories/assets/user-story-template.md new file mode 100644 index 00000000..f6583b2d --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/assets/user-story-template.md @@ -0,0 +1,33 @@ +# [Epic name] + +## US-[ID]: "[User story title]" + +**As a** [role] +**I want** [action] +**So that** [outcome] + +### Acceptance criteria + +```gherkin +Scenario: [Nominal case] + Given [context] + When [action] + Then [expected outcome] + +Scenario: [Error or boundary case] + Given [edge context] + When [edge trigger] + Then [graceful handling] +``` + +### Definition of Done (functional) + +- [User-facing condition the user can now confirm] +- [Another observable outcome] + +### Estimation + +- **Story points**: [int] +- **Impact**: [minor | major | critic] — [one-line rationale] +- **Dependencies**: [story ids, or none] +- **Priority**: [rank] diff --git a/plugins/aidd-pm/skills/02-user-stories/references/rating.md b/plugins/aidd-pm/skills/02-user-stories/references/rating.md new file mode 100644 index 00000000..2089d4a1 --- /dev/null +++ b/plugins/aidd-pm/skills/02-user-stories/references/rating.md @@ -0,0 +1,57 @@ +# Rating and readiness + +The definitions every action in this skill relies on. Read this before drafting, estimating, prioritizing, or saving. + +## INVEST + +Each story must satisfy all six: + +- **Independent**: it can ship without waiting on another story in the batch. +- **Negotiable**: it states the need, not a frozen solution. +- **Valuable**: it delivers an outcome a user or stakeholder can perceive. +- **Estimable**: the team can size it without unresolved unknowns. +- **Small**: it fits inside one iteration. +- **Testable**: its acceptance criteria can be checked objectively. + +## Definition of Ready + +A story is ready to save when all hold: + +- Acceptance criteria are written and testable. +- Dependencies are named or confirmed absent. +- Story points are set. +- An impact rating is assigned. +- No blocking question remains open. + +## Functional Definition of Done + +Each story carries a pragmatic, functional DoD. + +- It lists observable, user-facing conditions that mean the goal is achieved. +- It is phrased from the user's side: what the user can now do, see, or avoid. +- It stays functional. It never lists technical delivery steps such as code review, test coverage, or deployment. +- Keep it short: two to four bullets that a non-technical stakeholder can confirm. + +Example for a password-reset story: + +- The user requests a reset and receives the link within one minute. +- Following the link lets the user set a new password and sign in with it. +- An expired or reused link shows a clear message and offers a fresh request. + +## Impact scale + +Rate each story by its impact on the existing system. This is a risk signal, not the effort estimate. + +- **minor**: additive or isolated. It touches no existing behavior users already rely on. +- **major**: it changes existing behavior, a shared component, or a public contract. Existing flows need re-checking. +- **critic**: it touches a critical path (auth, payments, data integrity) or risks data loss or downtime. It needs explicit review before build. + +State a one-line rationale with every rating. + +## Prioritization + +Rank the backlog by value against effort, then break ties with impact. + +- Order by descending value-to-effort ratio. +- On a tie, the lower-impact story ranks first, since it ships with less risk. +- A `critic` story may be pulled earlier only when later stories depend on it; state that reason when it happens. diff --git a/plugins/aidd-pm/skills/03-prd/README.md b/plugins/aidd-pm/skills/03-prd/README.md index bb4576a3..9e1a59a3 100644 --- a/plugins/aidd-pm/skills/03-prd/README.md +++ b/plugins/aidd-pm/skills/03-prd/README.md @@ -16,7 +16,7 @@ Stays at the "what and why" level; never crosses into implementation detail. ## When NOT to use -- To write user stories → use `02-user-stories-create`. +- To write user stories → use `02-user-stories`. - To draft a technical implementation plan (libraries, file layout, algorithms) - those belong to the planning skill in your dev capability. - To write source code. diff --git a/plugins/aidd-pm/skills/03-prd/SKILL.md b/plugins/aidd-pm/skills/03-prd/SKILL.md index d2e4b193..a43e12d0 100644 --- a/plugins/aidd-pm/skills/03-prd/SKILL.md +++ b/plugins/aidd-pm/skills/03-prd/SKILL.md @@ -1,39 +1,27 @@ --- name: 03-prd -description: Generate a structured Product Requirements Document from a feature description or user stories, validated with the user before save. Use when the user says "prd", "draft prd", "write prd", "product requirements for X", "generate a prd", or invokes `/prd`. Do NOT use for writing user stories, drafting a technical implementation plan, or writing source code. +description: Generate a structured Product Requirements Document from a need, idea, or brainstorm, confirmed before save. Use when the user wants to draft or generate a PRD or product requirements. Not for user stories or a technical plan. --- # PRD Drafts a structured Product Requirements Document covering scope, goals, and acceptance criteria. -## Available actions +## Actions | # | Action | Role | Input | | --- | ------- | ---------------------------------------------------- | ----------------------------------------------- | | 01 | `prd` | Parse input, draft per template, validate, save | feature_description, user_stories (optional) | -## Default flow - -Single action skill. The router dispatches to `prd` whenever a PRD-generation phrase appears. - ## Transversal rules - Focus on what and why; never include technical implementation detail. - Sections stay concise and actionable. - Always wait for explicit user validation before saving. - Save path: `aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>-<feature_name>-prd.md`. -- Source of truth for structure: `@assets/prd-template.md`. - -## References - -- None. +- Source of truth for structure: `assets/prd-template.md`. ## Assets -- `@assets/prd-template.md`: PRD body template. -- `@assets/task-template.md`: Lightweight task template referenced from the PRD when needed. - -## External data - -- None. +- `assets/prd-template.md`: PRD body template. +- `assets/task-template.md`: Lightweight task template referenced from the PRD when needed. diff --git a/plugins/aidd-pm/skills/03-prd/actions/01-prd.md b/plugins/aidd-pm/skills/03-prd/actions/01-prd.md index 2fd0c8a2..2ad3ec9e 100644 --- a/plugins/aidd-pm/skills/03-prd/actions/01-prd.md +++ b/plugins/aidd-pm/skills/03-prd/actions/01-prd.md @@ -1,40 +1,24 @@ # 01 - PRD -Parse the feature input, draft a structured PRD per the template, validate with the user, then save the file under `aidd_docs/tasks/`. - -## Inputs - -```yaml -feature_description: <free text> # required -user_stories: [<id or text>] # optional; existing stories to anchor the PRD -``` - -## Outputs - -```yaml -prd_path: aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>-<feature_name>-prd.md -feature_name: <kebab-case slug> -sections_present: - - overview - - problem-statement - - goals - - non-goals - - user-stories - - acceptance-criteria - - dependencies - - open-questions -``` +Parse the feature input, draft a structured PRD from the template, validate with the user, then save the file under `aidd_docs/tasks/`. + +## Input + +A feature description (required), and optionally existing user stories (ids or text) to anchor the PRD. + +## Output + +The saved PRD at `aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>-<feature_name>-prd.md`, carrying all eight sections. ## Process -1. **Parse input**. Extract feature scope, goals, and constraints from `feature_description` (and `user_stories` when provided). -2. **Draft**. Fill `assets/prd-template.md` with all 8 sections: overview, problem statement, goals, non-goals, user stories, acceptance criteria, dependencies, open questions. -3. **Validate**. Show the full draft to the user. Wait for explicit approval. Apply revisions and re-show on each iteration. -4. **Save**. Write the approved PRD to `aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>-<feature_name>-prd.md`. Create the month directory when missing. -5. **Return** the structured Outputs block. +1. **Parse.** Extract the feature scope, goals, and constraints from the description and any user stories. +2. **Draft.** Fill `@../assets/prd-template.md` with its eight sections: overview, problem statement, goals, non-goals, user stories, acceptance criteria, dependencies, open questions. +3. **Validate.** Show the full draft, wait for explicit approval, and re-show after each revision. +4. **Save.** Write the approved PRD to its dated path, creating the month directory when missing. ## Test -- **File saved**: `prd_path` exists on disk after the action completes. -- **All sections**: the file contains the 8 required headings listed in `sections_present`. -- **No implementation**: the file has no `## Implementation` heading and no source code blocks describing how to build the feature. +- The PRD file exists on disk after the action completes. +- It contains the eight headings: Overview, Problem Statement, Goals, Non-Goals, User Stories, Acceptance Criteria, Dependencies, Open Questions. +- It has no solution detail: no tech-stack, data-model, or architecture section, no `## Implementation` heading, and no source code. diff --git a/plugins/aidd-pm/skills/03-prd/assets/prd-template.md b/plugins/aidd-pm/skills/03-prd/assets/prd-template.md index 2e5db7b2..65a93b9e 100644 --- a/plugins/aidd-pm/skills/03-prd/assets/prd-template.md +++ b/plugins/aidd-pm/skills/03-prd/assets/prd-template.md @@ -1,319 +1,37 @@ ---- -name: prd -description: Product Requirements Document template (15 sections) -argument-hint: N/A ---- +<!-- Product Requirements Document template (8 sections). Solution-agnostic: what and why, never how. Fill the placeholders; do not copy this comment. --> -# [Project name] - [version] +# [Project name] -[Full Summary of the app and features we are willing to code.] +[One or two sentences: the product or feature and the problem it solves.] -## 1. Executive Summary +## Overview -### Problem +[The context and the value. Who it is for and why it matters now. No solution detail.] -[What problem are we solving?] +## Problem Statement -### Solution +[The user or business problem, stated as a need. The pain today and its cost. No proposed implementation.] -[What are we building?] +## Goals -### Success Criteria +[The outcomes this must achieve, each observable and measurable. What success looks like, not how to build it.] -[How do we know we've succeeded?] +## Non-Goals -## 2. User Personas +[What is explicitly out of scope, so the boundary is unambiguous.] -### Primary Persona: [Name] +## User Stories -| Attribute | Description | -| ------------------------- | ----------------------------- | -| **Role** | [Job title or user type] | -| **Goals** | [What they want to achieve] | -| **Motivations** | [Why they use the product] | -| **Frustrations** | [Current pain points] | -| **Technical Environment** | [Devices, tools, constraints] | +[The needs as user stories: "As a [persona], I want [goal], so that [reason]." One per line, no technical detail.] -### Secondary Persona: [Name] +## Acceptance Criteria -| Attribute | Description | -| ---------------- | --------------------------- | -| **Role** | [Job title or user type] | -| **Goals** | [What they want to achieve] | -| **Motivations** | [Why they use the product] | -| **Frustrations** | [Current pain points] | +[The conditions that make the product correct, observable and user-facing. Behavior, not code.] -## 3. Goals & Objectives +## Dependencies -### Business Goals +[External constraints, data, approvals, or other work this depends on. Business and product dependencies, not a tech stack.] -- BG1: [Revenue/growth goal] -- BG2: [User acquisition/retention] +## Open Questions -### Technical Goals - -- TG1: [Performance/scalability] -- TG2: [Security/reliability] - -### User Goals - -- UG1: [User experience improvement] -- UG2: [Efficiency/productivity gain] - -## 4. Core Features - -Group of identified features to build: - -- **Feature 1**: [Short description] - -### [Feature/Module 1] - -- FR1.1: [Specific requirement] -- FR1.2: [Specific requirement] - -#### User Stories - -- As a [user type], I want to [action] so that [benefit] - -## 5. Acceptance Criteria - -> Define testable criteria for each core feature using the Gherkin format (Given-When-Then). - -### Feature 1: [Feature Name] - -**Happy Path:** - -```gherkin -Scenario: [Description] - Given [initial context] - When [action performed] - Then [expected result] - And [additional verification] -``` - -**Error Scenarios:** - -```gherkin -Scenario: [Error case description] - Given [error context] - When [action that causes error] - Then [error handling behavior] -``` - -**Edge Cases:** - -- [ ] [Edge case 1] -- [ ] [Edge case 2] - -## 6. Non-Goals - -> What we are intentionally NOT building in this version. This prevents scope creep. - -| Non-Goal | Rationale | -| ----------- | ------------------------------ | -| [Feature X] | [Why we're not building it] | -| [Feature Y] | [Why it's out of scope] | -| [Feature Z] | [Why it's explicitly excluded] | - -## 7. Non-Functional Requirements - -For every given features: - -### Performance - -- NFR1: [Response time targets] -- NFR2: [Throughput requirements] -- NFR3: [Scalability needs] - -### Security - -- NFR4: [Authentication/authorization] -- NFR5: [Data protection] -- NFR6: [Compliance requirements] - -### Usability - -- NFR7: [Accessibility standards (WCAG)] -- NFR8: [Browser/device support] - -## 8. Technical Architecture - -### Tech Stack - -- **Frontend**: [Framework, UI library] -- **Backend**: [Language, framework] -- **Database**: [Type, specific system] -- **Infrastructure**: [Cloud, containers] -- **External Services**: [APIs, SaaS] - -### Data Model - -``` -[Key entities and relationships] -[Data flow diagram if needed] -``` - -### Integration Points - -- **Internal APIs**: [List] -- **External APIs**: [List with rate limits] -- **Data Sources**: [Databases, files, streams] - -## 9. User Experience - -### Information Architecture - -[Site map or app structure] - -### Key User Flows - -1. [Primary flow description] -2. [Secondary flow description] - -### Design System - -- **Visual**: [Colors, typography, spacing] -- **Components**: [Reusable UI elements] -- **Patterns**: [Interaction patterns] -- **Responsive**: [Breakpoints, mobile-first?] - -## 10. Success Metrics - -### Business KPIs - -| Metric | Current | Target | Date | -| ---------- | ---------- | -------- | ------ | -| [Metric 1] | [Baseline] | [Target] | [Date] | -| [Metric 2] | [Baseline] | [Target] | [Date] | - -### Technical KPIs - -| Metric | Current | Target | -| --------------- | ---------- | -------- | -| [Response time] | [Baseline] | [Target] | -| [Uptime] | [Baseline] | [Target] | - -### User KPIs - -| Metric | How Measured | Target | -| ------------------- | ------------ | -------- | -| [User satisfaction] | [Method] | [Target] | -| [Task completion] | [Method] | [Target] | - -## 11. Dependencies - -> External dependencies that must be resolved or coordinated. - -### Technical Dependencies - -| Dependency | Owner | Status | Risk | -| -------------------- | ------------- | ------------------- | ----------------- | -| [API from Team X] | [Team/Person] | [Available/Pending] | [High/Medium/Low] | -| [Database migration] | [Team/Person] | [Status] | [Risk level] | - -### External Dependencies - -| Dependency | Provider | Status | Fallback | -| ------------------ | ---------- | ------------------- | --------------- | -| [Third-party API] | [Provider] | [Available/Pending] | [Alternative] | -| [SaaS integration] | [Provider] | [Status] | [Fallback plan] | - -## 12. Experiments / A/B Testing - -> Hypotheses to validate and experiments to run. - -| Hypothesis | Experiment | Metric | Success Criteria | -| --------------------------------- | ---------------------- | ----------------- | -------------------- | -| [If we do X, then Y will improve] | [A/B test description] | [Metric to track] | [Target improvement] | -| [Users prefer X over Y] | [Test approach] | [Metric] | [Success threshold] | - -### Experiment Plan - -- **Phase 1**: [% of users] - [Duration] -- **Phase 2**: [% of users] - [Duration] -- **Full rollout criteria**: [Conditions for 100% rollout] - -## 13. Timeline & Milestones - -| Milestone | Objective | Deliverable | Target Date | Go/No-Go Criteria | -| ---------- | ----------------- | ----------------- | ----------- | --------------------- | -| M1: [Name] | [What we achieve] | [What we deliver] | [Date] | [Criteria to proceed] | -| M2: [Name] | [What we achieve] | [What we deliver] | [Date] | [Criteria to proceed] | -| M3: [Name] | [What we achieve] | [What we deliver] | [Date] | [Criteria to proceed] | - -### Critical Path - -```mermaid -flowchart LR - M1["M1: Foundation"] --> M2["M2: Core Features"] - M2 --> M3["M3: Polish & Launch"] -``` - -## 14. Risks & Mitigations - -| Risk | Probability | Impact | Mitigation Plan | Owner | -| ---------------- | --------------- | --------------- | ----------------------- | -------- | -| [Technical risk] | High/Medium/Low | High/Medium/Low | [How to prevent/handle] | [Person] | -| [Business risk] | High/Medium/Low | High/Medium/Low | [How to prevent/handle] | [Person] | -| [Timeline risk] | High/Medium/Low | High/Medium/Low | [How to prevent/handle] | [Person] | - -### Contingency Plans - -- **If [Risk 1] occurs**: [Contingency action] -- **If [Risk 2] occurs**: [Contingency action] - -## 15. Scope Boundaries (3 Tiers) - -### Tier 1 - MVP (Must Have) - -> What is included in the first release. - -| Feature | Rationale | -| ----------- | -------------- | -| [Feature 1] | [Why it's MVP] | -| [Feature 2] | [Why it's MVP] | - -### Tier 2 - Next Release (Should/Could Have) - -> What is explicitly deferred to V2. Each feature has a promotion trigger. - -| Feature | Rationale | Promotion Trigger | -| ----------- | -------------- | ------------------------------------------ | -| [Feature X] | [Why deferred] | [Metric or condition to promote to Tier 1] | -| [Feature Y] | [Why deferred] | [Metric or condition] | - -### Tier 3 - Never (Won't Have) - -> What we will never build. - -| Feature | Rationale | -| ---------------- | ----------- | -| [Anti-pattern X] | [Why never] | -| [Anti-pattern Y] | [Why never] | - ---- - -## Appendix - -### Glossary - -- **Term**: Definition -- **Acronym**: Full meaning - -### References - -- [Related documents] -- [Design mockups] -- [Technical specs] - -### Open Questions - -- [ ] [Question needing answer] -- [ ] [Decision to be made] - ---- - -**Team**: [Size/roles] -**Timeline**: [Total duration] -**Priority**: [Critical/High/Medium/Low] -**Status**: [Draft/Approved/In Progress] +[Unresolved decisions and unknowns to settle before or during build.] diff --git a/plugins/aidd-pm/skills/03-prd/assets/task-template.md b/plugins/aidd-pm/skills/03-prd/assets/task-template.md index cdc9e1db..5f71ea95 100644 --- a/plugins/aidd-pm/skills/03-prd/assets/task-template.md +++ b/plugins/aidd-pm/skills/03-prd/assets/task-template.md @@ -7,7 +7,7 @@ description: Task tracking system to ensure all tasks are categorized and addres {{Full description}} -## Main step 1} +## Main step 1 - [ ] {Task 1} - [ ] {Task 2} diff --git a/plugins/aidd-pm/skills/04-spec/SKILL.md b/plugins/aidd-pm/skills/04-spec/SKILL.md index 1b099bc2..a7621f49 100644 --- a/plugins/aidd-pm/skills/04-spec/SKILL.md +++ b/plugins/aidd-pm/skills/04-spec/SKILL.md @@ -22,7 +22,7 @@ Dispatch by input: a spec path with findings runs `refine`; a request or PRD pat - Never invent. Mark every gap as `TBD: <precise question>` rather than guessing. When a request is too vague to draft anything useful, stop and ask for a clearer one. - The spec holds intent, never implementation. It is solution-agnostic: no file, component, hook, route, library, pattern, or token, and no "how". The done-when conditions are outcome-level, not steps. Keep the acceptance criteria few. All of that belongs to the plan. - Keep it readable: clear section headers, bulleted criteria, explicit non-goals. -- Output: one `spec.md` in the feature folder (`aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>_<slug>/`), from `@assets/spec-template.md`. Reuse the folder when it exists. +- Output: one `spec.md` in the feature folder (`aidd_docs/tasks/<yyyy_mm>/<yyyy_mm_dd>_<slug>/`), from `assets/spec-template.md`. Reuse the folder when it exists. - Immutable once validated: never rewrite a spec that has been locked. ## Assets diff --git a/plugins/aidd-pm/skills/04-spec/actions/01-build.md b/plugins/aidd-pm/skills/04-spec/actions/01-build.md index 0a177962..dd7a521f 100644 --- a/plugins/aidd-pm/skills/04-spec/actions/01-build.md +++ b/plugins/aidd-pm/skills/04-spec/actions/01-build.md @@ -12,7 +12,7 @@ The path to `spec.md` in the feature folder, drafted from the template, with the ## Process -1. **Source.** From a PRD path, lift its target, hard constraints, non-goals, and done-when into the template, dropping any implementation detail. From a request, map it onto the template sections directly. Do not explore the codebase or name any file, component, or API: the spec stays solution-agnostic, intent only. +1. **Source.** From a PRD path, lift its target, hard constraints, non-goals, and done-when into the template, dropping any implementation detail. From a request, map it onto the template sections directly. Do not explore the codebase. 2. **Gaps.** Replace any missing required field with `TBD: <precise question>`. Never guess. 3. **Check.** Confirm every section the validator requires is present. 4. **Write.** Resolve the feature folder, reusing it when it exists, and save the spec there as `spec.md`. @@ -21,5 +21,5 @@ The path to `spec.md` in the feature folder, drafted from the template, with the ## Test - `spec.md` exists in the feature folder. -- It contains every section listed in `@../assets/spec-validator.yml`. +- It contains every section the validator marks required in `@../assets/spec-validator.yml`. - It carries no library name, framework pattern, or source-file layout. diff --git a/plugins/aidd-pm/skills/04-spec/actions/02-refine.md b/plugins/aidd-pm/skills/04-spec/actions/02-refine.md index 6783f0a9..a44844dd 100644 --- a/plugins/aidd-pm/skills/04-spec/actions/02-refine.md +++ b/plugins/aidd-pm/skills/04-spec/actions/02-refine.md @@ -20,5 +20,5 @@ The refined spec at the same path, with the changes applied and any residual `TB ## Test -- The spec still exists at its path and holds every section listed in `@../assets/spec-validator.yml`. +- The spec still exists at its path and holds every required section in `@../assets/spec-validator.yml`. - Every finding is reflected by a change, or by an explicit `TBD: <question>` when it cannot be resolved. diff --git a/plugins/aidd-refine/CATALOG.md b/plugins/aidd-refine/CATALOG.md index 8f7cb4f7..bd5c4135 100644 --- a/plugins/aidd-refine/CATALOG.md +++ b/plugins/aidd-refine/CATALOG.md @@ -43,7 +43,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [question-angles.md](skills/01-brainstorm/assets/question-angles.md) | - | | `-` | [README.md](skills/01-brainstorm/README.md) | - | | `references` | [probing.md](skills/01-brainstorm/references/probing.md) | - | -| `-` | [SKILL.md](skills/01-brainstorm/SKILL.md) | `Clarify a vague idea through deep back-and-forth questioning until it is precise enough to act on. Works at any level, functional, technical, or mixed. Use when the user surfaces a half-formed idea, a fuzzy feature, a technical question, or an under-specified request, or asks to brainstorm, clarify, or refine before committing. Keeps probing and following each answer's threads until no real ambiguity remains or the user is satisfied. Not for analytically scanning a written artifact for gaps (use aidd-refine:04-shadow-areas), critiquing finished work (use aidd-refine:02-challenge), or any implementation, planning, or code.` | +| `-` | [SKILL.md](skills/01-brainstorm/SKILL.md) | `Clarify a vague idea through deep questioning until it is precise enough to act on. Use when the user surfaces a half-formed idea or under-specified request, or asks to brainstorm or refine. Not for scanning an artifact for gaps or writing code.` | #### `skills/02-challenge` @@ -53,7 +53,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [report-template.md](skills/02-challenge/assets/report-template.md) | - | | `-` | [README.md](skills/02-challenge/README.md) | - | | `references` | [confidence-rubric.md](skills/02-challenge/references/confidence-rubric.md) | - | -| `-` | [SKILL.md](skills/02-challenge/SKILL.md) | `Rethink just-completed work against an agreed plan, classify findings as deal-breakers, suggestions, or correct, with a confidence score. Use to challenge a decision, criticize, or critically review recent work; not for line-by-line style review or writing code.` | +| `-` | [SKILL.md](skills/02-challenge/SKILL.md) | `Rethink just-completed work against an agreed plan, classifying findings as deal-breaker, suggestion, or correct, with a confidence score. Use to challenge or critically review recent work. Not for line-by-line style review or writing code.` | #### `skills/03-condense` @@ -63,7 +63,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [02-stats.md](skills/03-condense/actions/02-stats.md) | - | | `-` | [README.md](skills/03-condense/README.md) | - | | `references` | [intensity-levels.md](skills/03-condense/references/intensity-levels.md) | - | -| `-` | [SKILL.md](skills/03-condense/SKILL.md) | `Toggle terse output mode (lite, full, ultra) that drops filler while code, errors, and warnings stay verbatim, and report token savings for the session. Use to condense output, shorten answers, switch intensity, or check savings; not for editing prose or compressing code.` | +| `-` | [SKILL.md](skills/03-condense/SKILL.md) | `Toggle terse output mode (lite, full, ultra) that drops filler while code and errors stay verbatim, and report token savings. Use to condense output, switch intensity, or check savings. Not for editing prose or compressing code.` | #### `skills/04-shadow-areas` @@ -78,7 +78,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `references` | [locked-sets.json](skills/04-shadow-areas/references/locked-sets.json) | - | | `references` | [probe-style.md](skills/04-shadow-areas/references/probe-style.md) | - | | `references` | [severity-rubric.md](skills/04-shadow-areas/references/severity-rubric.md) | - | -| `-` | [SKILL.md](skills/04-shadow-areas/SKILL.md) | `Scan a markdown artifact (idea, user stories, PRD, spec) for blind spots and emit a structured shadow report grouped by category and sorted by severity. Use to find gaps, missing parts, or what's missing in a written artifact; not for interactive Q&A (use aidd-refine:01-brainstorm) or code review.` | +| `-` | [SKILL.md](skills/04-shadow-areas/SKILL.md) | `Scan a markdown artifact (idea, stories, PRD, spec) for blind spots into a shadow report grouped by category and severity. Use to find gaps or what is missing in a written artifact. Not for interactive Q&A or code review.` | #### `skills/05-fact-check` @@ -92,5 +92,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `references` | [claim-categories.md](skills/05-fact-check/references/claim-categories.md) | - | | `references` | [report-output-discipline.md](skills/05-fact-check/references/report-output-discipline.md) | - | | `references` | [verification-cascade.md](skills/05-fact-check/references/verification-cascade.md) | - | -| `-` | [SKILL.md](skills/05-fact-check/SKILL.md) | `Verify factual claims in a text against authoritative sources and rewrite it with footnote citations, hedging anything unconfirmed. Use to fact-check, verify a claim, or cite sources on explicit request; not for judging code logic or clarifying vague requirements (use aidd-refine:01-brainstorm).` | +| `-` | [SKILL.md](skills/05-fact-check/SKILL.md) | `Verify factual claims in a text against authoritative sources and rewrite it with footnote citations, hedging the unconfirmed. Use to fact-check, verify a claim, or cite sources on request. Not for judging code or clarifying requirements.` | diff --git a/plugins/aidd-refine/skills/01-brainstorm/SKILL.md b/plugins/aidd-refine/skills/01-brainstorm/SKILL.md index 94b10962..9e095250 100644 --- a/plugins/aidd-refine/skills/01-brainstorm/SKILL.md +++ b/plugins/aidd-refine/skills/01-brainstorm/SKILL.md @@ -1,6 +1,6 @@ --- name: 01-brainstorm -description: Clarify a vague idea through deep back-and-forth questioning until it is precise enough to act on. Works at any level, functional, technical, or mixed. Use when the user surfaces a half-formed idea, a fuzzy feature, a technical question, or an under-specified request, or asks to brainstorm, clarify, or refine before committing. Keeps probing and following each answer's threads until no real ambiguity remains or the user is satisfied. Not for analytically scanning a written artifact for gaps (use aidd-refine:04-shadow-areas), critiquing finished work (use aidd-refine:02-challenge), or any implementation, planning, or code. +description: Clarify a vague idea through deep questioning until it is precise enough to act on. Use when the user surfaces a half-formed idea or under-specified request, or asks to brainstorm or refine. Not for scanning an artifact for gaps or writing code. argument-hint: capture | probe | integrate | finalize --- @@ -17,9 +17,7 @@ Turns a vague idea into a precise one through a deep, natural conversation. Each | 03 | `integrate` | Fold answers in, judge if real ambiguity remains | answers + the idea | | 04 | `finalize` | Consolidate, flag open assumptions, offer to persist | the clarified idea | -## Default flow - -`capture` once, then loop `probe → integrate` until no real ambiguity remains or the user is satisfied, then `finalize`. There is no fixed round count, the idea is done when it is clear, not on a timer. Run each action's `## Test` before the next. +Run `capture`, loop `probe → integrate` until the idea is clear, then `finalize`. ## Transversal rules diff --git a/plugins/aidd-refine/skills/02-challenge/SKILL.md b/plugins/aidd-refine/skills/02-challenge/SKILL.md index 053694b9..6487af3c 100644 --- a/plugins/aidd-refine/skills/02-challenge/SKILL.md +++ b/plugins/aidd-refine/skills/02-challenge/SKILL.md @@ -1,6 +1,6 @@ --- name: 02-challenge -description: Rethink just-completed work against an agreed plan, classify findings as deal-breakers, suggestions, or correct, with a confidence score. Use to challenge a decision, criticize, or critically review recent work; not for line-by-line style review or writing code. +description: Rethink just-completed work against an agreed plan, classifying findings as deal-breaker, suggestion, or correct, with a confidence score. Use to challenge or critically review recent work. Not for line-by-line style review or writing code. --- # Challenge @@ -13,10 +13,6 @@ Rethink prior work and surface what is wrong, missing, or duplicated. Output a s | --- | ----------- | ------------------------------------------------------------- | ------------------------------ | | 01 | `challenge` | Rethink prior work, classify findings, score confidence | the work + agreed reference | -## Default flow - -Single action skill. The router dispatches to `challenge` whenever the trigger phrases above appear. - ## Transversal rules - Reason from first principles, no logical gaps. diff --git a/plugins/aidd-refine/skills/02-challenge/assets/report-template.md b/plugins/aidd-refine/skills/02-challenge/assets/report-template.md index e7b0af23..a611f255 100644 --- a/plugins/aidd-refine/skills/02-challenge/assets/report-template.md +++ b/plugins/aidd-refine/skills/02-challenge/assets/report-template.md @@ -2,8 +2,6 @@ My confidence level of correctness now: XX% -# Previous work to review - # Correctness (100%) - diff --git a/plugins/aidd-refine/skills/02-challenge/references/confidence-rubric.md b/plugins/aidd-refine/skills/02-challenge/references/confidence-rubric.md index ec220b4a..0d474d1b 100644 --- a/plugins/aidd-refine/skills/02-challenge/references/confidence-rubric.md +++ b/plugins/aidd-refine/skills/02-challenge/references/confidence-rubric.md @@ -4,7 +4,7 @@ The challenge action emits a confidence percentage. Pick the tier whose conditio | Tier | Condition | | --------- | ----------------------------------------------- | -| `100%` | No deal breakers, no gaps, no missing parts. | +| `100%` | No deal breakers, no gaps, no missing parts, no suggestions. | | `75-95%` | Suggestions only, no blockers. | | `50-74%` | Minor deal breakers, all fixable in place. | | `<50%` | Major deal breakers, partial rework required. | diff --git a/plugins/aidd-refine/skills/03-condense/SKILL.md b/plugins/aidd-refine/skills/03-condense/SKILL.md index 93ea005f..0de0fbdb 100644 --- a/plugins/aidd-refine/skills/03-condense/SKILL.md +++ b/plugins/aidd-refine/skills/03-condense/SKILL.md @@ -1,6 +1,6 @@ --- name: 03-condense -description: Toggle terse output mode (lite, full, ultra) that drops filler while code, errors, and warnings stay verbatim, and report token savings for the session. Use to condense output, shorten answers, switch intensity, or check savings; not for editing prose or compressing code. +description: Toggle terse output mode (lite, full, ultra) that drops filler while code and errors stay verbatim, and report token savings. Use to condense output, switch intensity, or check savings. Not for editing prose or compressing code. argument-hint: condense | stats --- @@ -15,17 +15,12 @@ Toggles a terse output mode with three intensity levels (lite, full, ultra). Str | 01 | `condense` | Toggle terse mode and apply intensity rules | current state + requested level | | 02 | `stats` | Report real token usage and estimated savings for the current session | session messages + level timeline | -## Default flow - -Router dispatches by intent: - -- Toggle phrase or intensity command (`condense`, `/condense full`, `stop condense`, `normal mode`, ...) → `01-condense` -- Stats query (`/condense-stats`, `how much have we saved`, `token savings`, ...) → `02-stats` +Dispatch by intent: a toggle phrase → `condense`, a savings query → `stats`. ## Transversal rules - **Persistence**: once active, terse mode applies to EVERY response until explicitly turned off. Do not drift back to verbose prose after many turns, when uncertain, or when the task changes. The level remains active for the rest of the session unless changed or stopped. -- **Off switch**: terse mode stops only on explicit user signal: `stop condense`, `normal mode`, `/condense off`, or invoking the skill again to toggle. +- **Off switch**: terse mode stops only on explicit user signal: `stop condense`, `normal mode`, or invoking the skill again to toggle. - **Toggle**: invoking the skill while active toggles it off; invoking while off turns it on at the default level (`full`) unless an explicit intensity is given. - **Drop fluff**: drop articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), and hedging. Fragments are acceptable. - **Short synonyms**: prefer short words (big not extensive, fix not "implement a solution for"). Technical terms stay exact. Code blocks are unchanged. Errors are quoted verbatim. @@ -36,7 +31,3 @@ Router dispatches by intent: ## References - `references/intensity-levels.md`: detailed per-level rules and side-by-side examples. - -## External data - -- `../hooks/condense-stats.js`: UserPromptSubmit hook that intercepts stats triggers, reads the session transcript, and returns the formatted savings report without invoking the model. diff --git a/plugins/aidd-refine/skills/03-condense/actions/01-condense.md b/plugins/aidd-refine/skills/03-condense/actions/01-condense.md index dbdf45bb..92b3fa53 100644 --- a/plugins/aidd-refine/skills/03-condense/actions/01-condense.md +++ b/plugins/aidd-refine/skills/03-condense/actions/01-condense.md @@ -17,7 +17,7 @@ A single confirmation line: `Condense: ON (<level>).` when enabling, or `Condens 2. **Resolve.** Combine the current state with the request: - Explicit level (`lite | full | ultra`) sets that level (or switches level if already on). - `toggle` flips on/off; default level when turning on is `full`. - - Off phrases (`stop condense`, `normal mode`, `/condense off`) force off. + - Off phrases (`stop condense`, `normal mode`) force off. 3. **Emit.** The reply MUST begin with this exact line, filled in and unaltered: `Condense: ON (<level>).` when enabling, or `Condense: OFF.` when disabling. The stats action and the hook parse this line from the transcript, so never paraphrase, decorate, or omit it. 4. **Apply.** Apply the transversal rules to every subsequent prose turn until the next off signal, using per-level rules and auto-pause passages from `@../references/intensity-levels.md`. diff --git a/plugins/aidd-refine/skills/03-condense/actions/02-stats.md b/plugins/aidd-refine/skills/03-condense/actions/02-stats.md index 135f27ee..0501cf25 100644 --- a/plugins/aidd-refine/skills/03-condense/actions/02-stats.md +++ b/plugins/aidd-refine/skills/03-condense/actions/02-stats.md @@ -22,4 +22,5 @@ A stats block reporting, in order: mode, active turns and ratio, tokens out whil ## Test -Output follows the `## Output` field order, every numeric field is filled (no `-`), and the active-turns ratio matches the detected intensity transitions. +- The output follows the `## Output` field order, every numeric field filled (no `-`). +- The active-turns ratio matches the detected intensity transitions. diff --git a/plugins/aidd-refine/skills/04-shadow-areas/SKILL.md b/plugins/aidd-refine/skills/04-shadow-areas/SKILL.md index 1def8159..7aa637f9 100644 --- a/plugins/aidd-refine/skills/04-shadow-areas/SKILL.md +++ b/plugins/aidd-refine/skills/04-shadow-areas/SKILL.md @@ -1,6 +1,6 @@ --- name: 04-shadow-areas -description: Scan a markdown artifact (idea, user stories, PRD, spec) for blind spots and emit a structured shadow report grouped by category and sorted by severity. Use to find gaps, missing parts, or what's missing in a written artifact; not for interactive Q&A (use aidd-refine:01-brainstorm) or code review. +description: Scan a markdown artifact (idea, stories, PRD, spec) for blind spots into a shadow report grouped by category and severity. Use to find gaps or what is missing in a written artifact. Not for interactive Q&A or code review. argument-hint: detect | render-report | diff --- @@ -16,14 +16,7 @@ Analytically scans a written artifact for gaps the author has not addressed. Unl | 02 | `render-report` | Render markdown grouped by category and sorted by severity, write report | gap list from detect | | 03 | `diff` | Load prior report, classify gaps as closed / still-open / newly-introduced | gap list from detect + prior report path | -## Default flow - -Router dispatches by context: - -- No prior report present: `01-detect` then `02-render-report` -- Prior report present: `01-detect` then `03-diff` then `02-render-report` - -The `02-render-report` action always runs last and writes `<source>-shadow-report.md` next to the source. +Dispatch by context: with no prior report run `detect` then `render-report`; with one, run `detect` then `diff`. ## Transversal rules diff --git a/plugins/aidd-refine/skills/04-shadow-areas/actions/01-detect.md b/plugins/aidd-refine/skills/04-shadow-areas/actions/01-detect.md index 9460c674..3a7bdb83 100644 --- a/plugins/aidd-refine/skills/04-shadow-areas/actions/01-detect.md +++ b/plugins/aidd-refine/skills/04-shadow-areas/actions/01-detect.md @@ -14,7 +14,7 @@ A list of gaps, each with its category, severity, a probe question, and the quot 1. **Load.** Read the locked categories and their definitions from `@../references/locked-sets.json` and `@../references/categories.md`. 2. **Validate.** Check the source. Reject anything outside the working directory or already named `*-shadow-report.md`. -3. **Handle edges.** An empty source emits one blocker gap asking what content the artifact should hold, then stops. A non-markdown source adds a warning that attribution may be imprecise, then continues. +3. **Handle edges.** An empty source stops with a plain warning that there is nothing to scan, emitting no gap. A non-markdown source adds a warning that attribution may be imprecise, then continues. 4. **Scan.** Walk the seven categories in their locked order. Emit one gap per distinct issue, set its severity from `@../references/severity-rubric.md`, and write its question per `@../references/probe-style.md`. 5. **Dedupe.** Treat two gaps with the same category and snippet as one. A snippet-less gap falls back to its category plus severity. 6. **Return.** Hand the gaps and warnings to the next action: `03-diff` when a prior report exists, else `02-render-report`. Sorting happens there. @@ -22,7 +22,7 @@ A list of gaps, each with its category, severity, a probe question, and the quot ## Test - A path outside the working directory, or a file named `*-shadow-report.md`, is rejected with no gaps. -- An empty source yields exactly one blocker gap about missing content. +- An empty source stops with a warning and no gap. - A non-markdown source adds one warning and keeps scanning. - Every gap has a category and severity from the locked set and a question ending in `?`. - A repeated gap (same category and snippet) appears once. diff --git a/plugins/aidd-refine/skills/04-shadow-areas/assets/report-template.md b/plugins/aidd-refine/skills/04-shadow-areas/assets/report-template.md index 595e5aa8..f8eb893b 100644 --- a/plugins/aidd-refine/skills/04-shadow-areas/assets/report-template.md +++ b/plugins/aidd-refine/skills/04-shadow-areas/assets/report-template.md @@ -21,33 +21,12 @@ Total gaps: <total_count> | Blocker: <blocker_count> | Major: <major_count> | Mi ## Gaps by Category -### unstated assumption - -No gaps in this category. - -### ambiguous term - -No gaps in this category. - -### missing edge case - -No gaps in this category. - -### missing actor - -No gaps in this category. +<!-- Plain mode: one heading per category that has a gap, in locked order. A category with no gap is omitted. --> -### missing failure mode - -No gaps in this category. - -### missing acceptance criterion - -No gaps in this category. - -### missing dependency +### unstated assumption -No gaps in this category. +**[blocker]** What happens when the upstream service returns 429 with no Retry-After header? +> retry_limit = env.get("RETRY_LIMIT", 3) <!-- DIFF-MODE EXAMPLE (rendered only when 03-diff output is passed to 02-render-report) diff --git a/plugins/aidd-refine/skills/05-fact-check/SKILL.md b/plugins/aidd-refine/skills/05-fact-check/SKILL.md index 460737f8..89472839 100644 --- a/plugins/aidd-refine/skills/05-fact-check/SKILL.md +++ b/plugins/aidd-refine/skills/05-fact-check/SKILL.md @@ -1,6 +1,6 @@ --- name: 05-fact-check -description: Verify factual claims in a text against authoritative sources and rewrite it with footnote citations, hedging anything unconfirmed. Use to fact-check, verify a claim, or cite sources on explicit request; not for judging code logic or clarifying vague requirements (use aidd-refine:01-brainstorm). +description: Verify factual claims in a text against authoritative sources and rewrite it with footnote citations, hedging the unconfirmed. Use to fact-check, verify a claim, or cite sources on request. Not for judging code or clarifying requirements. argument-hint: identify-claims | verify | report --- @@ -16,9 +16,7 @@ Verifies the factual claims inside a target text and rewrites it grounded in evi | 02 | `verify` | Run the verification cascade per claim, produce a verdict and sources | claim list from 01 | | 03 | `report` | Rewrite the text with footnote citations, hedge unverified, surface conflicts | verdict list from 02 | -## Default flow - -Sequential skill: `01 → 02 → 03`. No skipping. The router materializes the three actions as a task list on entry and closes each task only when its `## Test` passes. +Run `01 → 02 → 03`; pass each `## Test` before the next. ## Transversal rules @@ -30,7 +28,7 @@ Sequential skill: `01 → 02 → 03`. No skipping. The router materializes the t - An unverified claim is never deleted and never asserted as fact: it is kept and marked `(unverified - no source found)`. - Caching a verified fact is opt-in: propose it with a recommendation, never cache silently. The skill persists nothing; the mechanics live in action 03. - The final report is reader-facing prose: the corrected text, `## Sources`, and `## Unverified claims`, nothing else. Internal mechanics never appear in the output: no cascade or tier trace (`Cascade:`, `tier 1/2/3`, `miss`, `resolved`), no category labels, no raw verdict words. State conclusions, not the process. Action 03 holds the exhaustive forbidden list. -- The report is rendered in plain prose and is never restyled by an active session output mode (terse, caveman, condensed). The skill's output format is fixed by action 03 alone. +- The report is rendered in plain prose and is never restyled by an active output mode. The skill's output format is fixed by action 03 alone. ## References diff --git a/plugins/aidd-refine/skills/05-fact-check/actions/03-report.md b/plugins/aidd-refine/skills/05-fact-check/actions/03-report.md index e1c41cff..42e4b205 100644 --- a/plugins/aidd-refine/skills/05-fact-check/actions/03-report.md +++ b/plugins/aidd-refine/skills/05-fact-check/actions/03-report.md @@ -20,7 +20,7 @@ The rewritten answer per `@../assets/report-template.md`, obeying `@../reference 5. **Cite.** Build the `## Sources` block: one numbered entry per source, with its title or file path, location, and the claim it backs. Each side of a conflict gets its own entry. 6. **List.** Add the `## Unverified claims` section only when at least one claim is unverified; otherwise omit it. 7. **Suggest.** When a verified fact is stable (project paths, pinned-version APIs), append one cache-suggestion line with a yes/no recommendation. The skill stores nothing itself: on approval, restate the fact and its source so the user's own memory tooling can keep it. When nothing qualifies, omit the line silently. -8. **Scrub.** Apply `@../references/report-output-discipline.md`, then deliver. +8. **Scrub.** Before delivering, re-read the draft line by line against `@../references/report-output-discipline.md`: delete any line that carries a forbidden item, and re-render in plain prose any line an active output mode restyled. Ship plain prose whatever the surrounding style. ## Test diff --git a/plugins/aidd-refine/skills/05-fact-check/references/report-output-discipline.md b/plugins/aidd-refine/skills/05-fact-check/references/report-output-discipline.md index 05cf3955..8a9fc0ed 100644 --- a/plugins/aidd-refine/skills/05-fact-check/references/report-output-discipline.md +++ b/plugins/aidd-refine/skills/05-fact-check/references/report-output-discipline.md @@ -20,6 +20,6 @@ These belong to the earlier actions and never appear in the output: - How a claim was checked: shell commands, `ls` / `find` / grep output, or phrases like "by inspection" or "codebase inspection". Cite the source and state the conclusion, not the method. - Any sentence explaining why a cache line was or was not added. -The report is plain prose. No active session output mode (terse, caveman, condensed) restyles it; render it normally however the surrounding conversation is styled. +The report is plain prose. No active output mode restyles it; render it normally however the surrounding conversation is styled. Before delivering, scan the draft: if a line carries any forbidden item, delete that line. diff --git a/plugins/aidd-ui/CATALOG.md b/plugins/aidd-ui/CATALOG.md index 5b18635c..633d25f1 100644 --- a/plugins/aidd-ui/CATALOG.md +++ b/plugins/aidd-ui/CATALOG.md @@ -26,5 +26,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai |-------|------|---| | `actions` | [01-greet.md](skills/01-hello/actions/01-greet.md) | - | | `-` | [README.md](skills/01-hello/README.md) | - | -| `-` | [SKILL.md](skills/01-hello/SKILL.md) | `Smoke-test skill that confirms the aidd-ui plugin loads. Use when the user wants to verify the alpha aidd-ui plugin is installed and reachable. Do NOT use for real UI or UX design work.` | +| `-` | [SKILL.md](skills/01-hello/SKILL.md) | `Smoke-test that confirms the aidd-ui plugin loads. Use when the user wants to verify the alpha aidd-ui plugin is installed and reachable. Not for real UI or UX design work.` | diff --git a/plugins/aidd-ui/skills/01-hello/SKILL.md b/plugins/aidd-ui/skills/01-hello/SKILL.md index ce72346a..2191c739 100644 --- a/plugins/aidd-ui/skills/01-hello/SKILL.md +++ b/plugins/aidd-ui/skills/01-hello/SKILL.md @@ -1,14 +1,16 @@ --- name: 01-hello -description: Smoke-test skill that confirms the aidd-ui plugin loads. Use when the user wants to verify the alpha aidd-ui plugin is installed and reachable. Do NOT use for real UI or UX design work. +description: Smoke-test that confirms the aidd-ui plugin loads. Use when the user wants to verify the alpha aidd-ui plugin is installed and reachable. Not for real UI or UX design work. --- -## Available actions +# Skill: hello -| ID | Name | Purpose | -| --- | ----- | --------------------------------------------- | -| 01 | greet | Greet the user and confirm the skill works. | +Confirm the aidd-ui plugin loads and is reachable. -## Default flow +## Actions -Run action `01-greet` and return its message. +| # | Action | Role | +| --- | ------- | ------------------------------------------- | +| 01 | `greet` | Greet the user and confirm the skill works | + +Single action skill: run `greet` and return its message. diff --git a/plugins/aidd-ui/skills/01-hello/actions/01-greet.md b/plugins/aidd-ui/skills/01-hello/actions/01-greet.md index 176cfcda..57b1aa82 100644 --- a/plugins/aidd-ui/skills/01-hello/actions/01-greet.md +++ b/plugins/aidd-ui/skills/01-hello/actions/01-greet.md @@ -1,15 +1,15 @@ # 01 - greet -Greets the caller. +Greet the caller to confirm the skill is reachable. -## Inputs +## Output -- none +A short greeting printed in the chat. -## Outputs +## Process -- a short greeting printed in the chat +1. **Print.** Print "Hello from aidd-ui (alpha)." -## Process +## Test -1. Print "Hello from aidd-ui (alpha)." +- The chat shows the line "Hello from aidd-ui (alpha)." diff --git a/plugins/aidd-vcs/CATALOG.md b/plugins/aidd-vcs/CATALOG.md index d8f484c3..8ceb0414 100644 --- a/plugins/aidd-vcs/CATALOG.md +++ b/plugins/aidd-vcs/CATALOG.md @@ -32,26 +32,30 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [02-publish.md](skills/00-repo-init/actions/02-publish.md) | - | | `assets` | [CONTRIBUTING.md](skills/00-repo-init/assets/CONTRIBUTING.md) | - | | `-` | [README.md](skills/00-repo-init/README.md) | - | -| `-` | [SKILL.md](skills/00-repo-init/SKILL.md) | `Initialize a project's repository - resolve the default branch and VCS provider, run git init with a bootstrap commit, write CONTRIBUTING.md, and on request create the remote repository and push. Use when the user says "init a repo", "git init", "initialize version control", "set up a new repo", "start a project", "create the remote and push", or "publish this repo". Do NOT use for committing changes (use 01-commit), opening pull requests (use 02-pull-request), tagging releases (use 03-release-tag), or cloning an existing remote.` | +| `-` | [SKILL.md](skills/00-repo-init/SKILL.md) | `Initialize a project repository: git init, default branch, bootstrap commit, CONTRIBUTING.md, optionally the remote. Use when the user wants to init or set up a new repo, or publish to a remote. Not for committing, opening a PR, or tagging.` | #### `skills/01-commit` | Group | File | Description | |-------|------|---| -| `actions` | [01-commit.md](skills/01-commit/actions/01-commit.md) | - | +| `actions` | [01-collect.md](skills/01-commit/actions/01-collect.md) | - | +| `actions` | [02-message.md](skills/01-commit/actions/02-message.md) | - | +| `actions` | [03-commit.md](skills/01-commit/actions/03-commit.md) | - | | `assets` | [commit-template.md](skills/01-commit/assets/commit-template.md) | `VCS commit message template` | | `-` | [README.md](skills/01-commit/README.md) | - | -| `-` | [SKILL.md](skills/01-commit/SKILL.md) | `Create an atomic git commit with a conventional message, optionally pushing. Use to commit changes ("commit", "/commit push"). Do NOT use to amend, rebase, open a PR, or tag a release.` | +| `-` | [SKILL.md](skills/01-commit/SKILL.md) | `Create an atomic git commit with a conventional message, optionally pushing. Use when the user wants to commit changes, optionally pushing the branch. Not for amending, rebasing, opening a pull request, or tagging a release.` | #### `skills/02-pull-request` | Group | File | Description | |-------|------|---| -| `actions` | [01-pull-request.md](skills/02-pull-request/actions/01-pull-request.md) | - | +| `actions` | [01-collect.md](skills/02-pull-request/actions/01-collect.md) | - | +| `actions` | [02-draft.md](skills/02-pull-request/actions/02-draft.md) | - | +| `actions` | [03-create.md](skills/02-pull-request/actions/03-create.md) | - | | `assets` | [branch.md](skills/02-pull-request/assets/branch.md) | `VCS branch naming convention template` | | `assets` | [pull_request.md](skills/02-pull-request/assets/pull_request.md) | `VCS pull/merge request template` | | `-` | [README.md](skills/02-pull-request/README.md) | - | -| `-` | [SKILL.md](skills/02-pull-request/SKILL.md) | `Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use to open a PR/MR ("open a pr", `/pull-request`). Do NOT use to commit, push, or merge a branch.` | +| `-` | [SKILL.md](skills/02-pull-request/SKILL.md) | `Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use when the user wants to open a pull or merge request. Not for committing, pushing, or merging a branch.` | #### `skills/03-release-tag` @@ -60,7 +64,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `actions` | [01-release-tag.md](skills/03-release-tag/actions/01-release-tag.md) | - | | `assets` | [release-template.md](skills/03-release-tag/assets/release-template.md) | `VCS release notes template` | | `-` | [README.md](skills/03-release-tag/README.md) | - | -| `-` | [SKILL.md](skills/03-release-tag/SKILL.md) | `Cut a semver release with annotated tag and release notes. Use when the user says "release", "tag", "tag this release", "bump version", "release v1.2.0", "cut a release", or invokes `/release-tag`. Do NOT use for plain commits without a tag, opening pull requests, pushing a branch only, or amending existing tags.` | +| `-` | [SKILL.md](skills/03-release-tag/SKILL.md) | `Cut a semver release with an annotated tag and release notes. Use when the user wants to release, tag a release, bump the version, or cut a version. Not for a plain commit, a pull request, or amending an existing tag.` | #### `skills/04-issue-create` @@ -70,5 +74,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [CONTRIBUTING.md](skills/04-issue-create/assets/CONTRIBUTING.md) | `Project contribution guidelines template` | | `assets` | [issue-template.md](skills/04-issue-create/assets/issue-template.md) | `VCS issue/ticket template` | | `-` | [README.md](skills/04-issue-create/README.md) | - | -| `-` | [SKILL.md](skills/04-issue-create/SKILL.md) | `Create an issue in the configured ticketing tool. Use when the user says "new issue", "create an issue", "file a bug", "file an issue", "report bug", "open an issue", or invokes `/issue-create`. Do NOT use for committing changes, opening pull requests, tagging releases, or commenting on existing issues.` | +| `-` | [SKILL.md](skills/04-issue-create/SKILL.md) | `Create an issue in the configured ticketing tool. Use when the user wants to file a bug, open an issue, or report a problem. Not for committing, opening a pull request, or commenting on an existing issue.` | diff --git a/plugins/aidd-vcs/skills/00-repo-init/SKILL.md b/plugins/aidd-vcs/skills/00-repo-init/SKILL.md index a205e6dc..1374e47c 100644 --- a/plugins/aidd-vcs/skills/00-repo-init/SKILL.md +++ b/plugins/aidd-vcs/skills/00-repo-init/SKILL.md @@ -1,6 +1,6 @@ --- name: 00-repo-init -description: Initialize a project's repository - resolve the default branch and VCS provider, run git init with a bootstrap commit, write CONTRIBUTING.md, and on request create the remote repository and push. Use when the user says "init a repo", "git init", "initialize version control", "set up a new repo", "start a project", "create the remote and push", or "publish this repo". Do NOT use for committing changes (use 01-commit), opening pull requests (use 02-pull-request), tagging releases (use 03-release-tag), or cloning an existing remote. +description: Initialize a project repository: git init, default branch, bootstrap commit, CONTRIBUTING.md, optionally the remote. Use when the user wants to init or set up a new repo, or publish to a remote. Not for committing, opening a PR, or tagging. argument-hint: init | publish --- @@ -8,16 +8,14 @@ argument-hint: init | publish Initializes a project's repository locally and, on request, on the remote host, then returns the remote URL. -## Available actions +## Actions | # | Action | Role | Input | | --- | --------- | ------------------------------------------------------------------------------------------------- | ------------------------------- | | 01 | `init` | Resolve VCS config, `git init`, set the default branch, write `CONTRIBUTING.md`, bootstrap commit | cwd, default_branch, remote_url | | 02 | `publish` | Create the remote repo on the resolved host and push, return its URL | cwd, non_interactive | -## Default flow - -Chain `01 → 02`, testing each before the next. The router runs `init` alone for a local-only request, and runs `publish` after an `init` when asked to create the remote. +Run `01 → 02`. `init` alone for local-only; `publish` after it to create the remote. ## Transversal rules @@ -29,7 +27,3 @@ Chain `01 → 02`, testing each before the next. The router runs `init` alone fo ## Assets - `assets/CONTRIBUTING.md`: the project-root `CONTRIBUTING.md` template. - -## External data - -- `aidd_docs/memory/vcs.md`: the project's VCS config (default branch, provider), read by both actions when present and pointed to, never copied. diff --git a/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md b/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md index 5ffc0b7c..ffe29da6 100644 --- a/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md +++ b/plugins/aidd-vcs/skills/00-repo-init/actions/01-init.md @@ -15,7 +15,7 @@ A report of the repo root, the resolved default branch and provider, and whether ## Process 1. **Guard.** If `cwd` is already a git work tree, skip and report `created: false`. -2. **Resolve.** Read the default branch and provider from the project's VCS memory. If absent, infer the provider from the environment (an installed VCS CLI, a configured MCP, or an existing remote URL). Fall back to `main` when nothing resolves. An explicit `default_branch` wins. +2. **Resolve.** Resolve the default branch and provider; an explicit `default_branch` wins. 3. **Init.** Run `git init -b <default_branch> <cwd>`. 4. **Contribute.** Write `CONTRIBUTING.md` at the repo root from the template, filling `{{PROJECT_NAME}}`. Leave no raw `{{...}}`. diff --git a/plugins/aidd-vcs/skills/00-repo-init/actions/02-publish.md b/plugins/aidd-vcs/skills/00-repo-init/actions/02-publish.md index fe6a4499..87d19466 100644 --- a/plugins/aidd-vcs/skills/00-repo-init/actions/02-publish.md +++ b/plugins/aidd-vcs/skills/00-repo-init/actions/02-publish.md @@ -13,7 +13,7 @@ A report of the created remote URL, the resolved provider, and the pushed defaul ## Process -1. **Resolve.** Read the host and how to reach it (CLI, MCP, or API) from the project's VCS memory. If absent, detect it from the VCS tooling available in the environment. Use no fixed provider list or fixed mechanism. +1. **Resolve.** Resolve the host and how to reach it. 2. **Confirm.** Unless `non_interactive`, confirm before creating the remote. The remote may be public, so create it private by default. 3. **Create.** Create the remote repository and push through the resolved host tooling. `01-init` already left a pushable `HEAD`. If no host tooling is available, stop and report. 4. **Return.** Report the remote URL to the user. diff --git a/plugins/aidd-vcs/skills/01-commit/README.md b/plugins/aidd-vcs/skills/01-commit/README.md index 0cba0c3f..5f4a992f 100644 --- a/plugins/aidd-vcs/skills/01-commit/README.md +++ b/plugins/aidd-vcs/skills/01-commit/README.md @@ -31,8 +31,9 @@ Or via the slash command: - `/commit` - stage, commit, stay local (`push: false`). - `/commit push` - stage, commit, then push the branch (`push: true`). -The skill runs a single action (`commit`) that stages, generates or accepts a -message, commits, and optionally pushes. +The skill chains three actions, collect then message then commit, that run +end to end: stage one concern, write the conventional message, commit, and +optionally push. ## Outputs diff --git a/plugins/aidd-vcs/skills/01-commit/SKILL.md b/plugins/aidd-vcs/skills/01-commit/SKILL.md index 2f5168e8..0e03d244 100644 --- a/plugins/aidd-vcs/skills/01-commit/SKILL.md +++ b/plugins/aidd-vcs/skills/01-commit/SKILL.md @@ -1,40 +1,33 @@ --- name: 01-commit -description: Create an atomic git commit with a conventional message, optionally pushing. Use to commit changes ("commit", "/commit push"). Do NOT use to amend, rebase, open a PR, or tag a release. +description: Create an atomic git commit with a conventional message, optionally pushing. Use when the user wants to commit changes, optionally pushing the branch. Not for amending, rebasing, opening a pull request, or tagging a release. +argument-hint: collect | message | commit --- # Commit -Runs interactive with split approval, or auto for agents. +Stage the right changes, write the message, commit. `01 → 02 → 03`. ## Actions -| # | Action | Role | Input | -| --- | -------- | ------------------------------------------------------------- | ------------------------------------------- | -| 01 | `commit` | Stage, generate or accept a message, commit, optionally push | mode, message, push, files | +| # | Action | Step | +| --- | --------- | ----------------------------------------------------- | +| 01 | `collect` | Review the change and stage what belongs in one commit | +| 02 | `message` | Write the conventional message | +| 03 | `commit` | Commit, and push when asked | -## Default flow - -Single action skill. The router dispatches to `commit` whenever a commit phrase or slash command appears. - -## Inline arguments - -When invoked as a slash command, the trailing argument controls the push behavior: - -- `/commit` → commits only, stays local (`push: false`) -- `/commit push` → commits then pushes the branch (`push: true`) +Several concerns means several commits: repeat the chain, one concern at a time. ## Transversal rules -- Project first: follow `aidd_docs/memory/vcs.md` when it exists (message convention, scopes, branch naming); the rules below and the template are the fallback. -- Commits stay atomic and focused on a single concern. -- Messages use imperative mood ("Add feature" not "Added feature"). -- Explain "why" not "what" in the body. -- Never `--force` push. `--force-with-lease` is acceptable when explicitly required. -- Follow the conventional commit format defined in `@assets/commit-template.md` when the project sets none. -- Reference issues in the commit body when applicable. -- `auto` mode never asks for confirmation. `interactive` mode requires user approval before staging and before committing splits. +- Follow the project's convention in `aidd_docs/memory/vcs.md` when set, else `assets/commit-template.md`. +- One concern per commit. Imperative mood. The body says why, not what. +- Reference the issue in the body when there is one. +- Never `--force` push; `--force-with-lease` only when explicitly asked. +- A hook that rejects the commit is not this skill's job: report which hook and why, then stop. Re-stage only files a hook auto-formatted. +- `auto` never prompts. `interactive` confirms before staging and before each split. +- Commits locally by default; pushes as well only when the push option is set. ## Assets -- `@assets/commit-template.md`: Conventional commit format reference. +- `assets/commit-template.md`: Conventional commit format reference. diff --git a/plugins/aidd-vcs/skills/01-commit/actions/01-collect.md b/plugins/aidd-vcs/skills/01-commit/actions/01-collect.md new file mode 100644 index 00000000..ed6c1d34 --- /dev/null +++ b/plugins/aidd-vcs/skills/01-commit/actions/01-collect.md @@ -0,0 +1,22 @@ +# 01 - Collect + +Review the working change and stage what belongs in one atomic commit. + +## Input + +Optional paths to restrict the commit, and the mode (`interactive` default, or `auto`). + +## Output + +The staged set for one commit, and the concern it covers. + +## Process + +1. **Read.** Look at the diff and group it by concern. +2. **Pick.** Stage the files for one concern. With explicit paths, stage exactly those; otherwise keep what is already staged, never adding unstaged files on your own. +3. **Split.** When several concerns are mixed, stage one at a time with `git add -p`. In `interactive`, propose each split (its scope and why) and wait for approval. + +## Test + +- The staged set covers one concern, nothing unrelated. +- Files the user did not name or stage are left untouched. diff --git a/plugins/aidd-vcs/skills/01-commit/actions/01-commit.md b/plugins/aidd-vcs/skills/01-commit/actions/01-commit.md deleted file mode 100644 index 33238b71..00000000 --- a/plugins/aidd-vcs/skills/01-commit/actions/01-commit.md +++ /dev/null @@ -1,28 +0,0 @@ -# 01 - Commit - -Stage the change, write or accept a conventional message, commit, optionally push, and return the sha. - -## Input - -The mode (`interactive` default, or `auto`), an optional imposed message, whether to push (default no, set by a trailing `push` in `$ARGUMENTS`), and optional paths to restrict staging. - -## Output - -The new commit sha, the branch, and whether it was pushed. - -## Process - -1. **Branch.** Use the checked-out branch. In `auto`, generate a conventional name from the change; in `interactive`, propose one and wait for approval. -2. **Stage.** With explicit paths, `git add` exactly those. Otherwise commit the already-staged changes, never staging unstaged paths implicitly. -3. **Message.** Use an imposed message verbatim. Else follow `aidd_docs/memory/vcs.md` when set, otherwise `@../assets/commit-template.md`. In `auto`, generate from the diff and log, no approval; in `interactive`, draft and confirm. -4. **Split.** In `interactive` with several concerns, propose each split (its scope, and a draft message that explains why, never lists files), wait for approval, and stage each with `git add -p`. -5. **Commit.** Run `git commit` with the chosen message. -6. **Recover.** On a pre-commit hook failure, fix the cause, re-stage, and make a new commit, never amend. Loop until it succeeds. -7. **Push.** When asked, `git push`. Use `--force-with-lease` only when explicitly required, never `--force`. -8. **Return.** Surface the sha, branch, and push state. - -## Test - -- `git rev-parse HEAD` equals the returned sha. -- `git log -1 --pretty=%s` matches the conventional-commit format. -- When pushed, `git ls-remote origin <branch>` lists the sha. diff --git a/plugins/aidd-vcs/skills/01-commit/actions/02-message.md b/plugins/aidd-vcs/skills/01-commit/actions/02-message.md new file mode 100644 index 00000000..f4254a50 --- /dev/null +++ b/plugins/aidd-vcs/skills/01-commit/actions/02-message.md @@ -0,0 +1,22 @@ +# 02 - Message + +Write the commit message for the staged change. + +## Input + +The staged set from `01-collect`, and an optional imposed message. + +## Output + +The commit message, conventional unless the project sets another convention. + +## Process + +1. **Source.** Use an imposed message as-is, else write a conventional message following the project's convention. +2. **Write.** Draft from the staged diff: imperative subject, a body that says why when it is not obvious. +3. **Confirm.** In `interactive`, show it and wait for approval. In `auto`, proceed. + +## Test + +- The subject matches the project's convention (conventional commit by default). +- The message describes the staged change, not unrelated files. diff --git a/plugins/aidd-vcs/skills/01-commit/actions/03-commit.md b/plugins/aidd-vcs/skills/01-commit/actions/03-commit.md new file mode 100644 index 00000000..49d2a7aa --- /dev/null +++ b/plugins/aidd-vcs/skills/01-commit/actions/03-commit.md @@ -0,0 +1,23 @@ +# 03 - Commit + +Record the commit, and push when asked. + +## Input + +The staged set from `01-collect`, the message from `02-message`, and whether to push (a trailing `push` argument). + +## Output + +The commit sha, the branch, and whether it was pushed. + +## Process + +1. **Commit.** Run `git commit` with the message. +2. **Hook.** If a pre-commit hook rejects it, report which hook and why, then stop; fixing it is the caller's job. Re-stage and retry once only when the hook merely auto-formatted files. +3. **Push.** When asked, push the branch. Use `--force-with-lease` only when explicitly required, never `--force`. + +## Test + +- `git rev-parse HEAD` returns the new sha and its message matches the project convention. +- A rejecting hook leaves no commit and a clear report, not a retry loop. +- When pushed, the remote branch shows the sha. diff --git a/plugins/aidd-vcs/skills/02-pull-request/README.md b/plugins/aidd-vcs/skills/02-pull-request/README.md index 82dbe60f..8482dc0d 100644 --- a/plugins/aidd-vcs/skills/02-pull-request/README.md +++ b/plugins/aidd-vcs/skills/02-pull-request/README.md @@ -29,9 +29,9 @@ Use skill aidd-vcs:02-pull-request Or via the slash command: `/pull-request`. -The skill runs a single action (`pull-request`) that detects the base -branch, fills the template, validates the title / body / base with the user, -then opens the request as a draft. +The skill chains three actions, collect then draft then create: collect +resolves the base and gathers the commits, draft writes and validates the +title and body, create opens the request as a draft. ## Outputs @@ -51,5 +51,5 @@ then opens the request as a draft. ## Technical details See [`SKILL.md`](SKILL.md) for the action contract. Templates ship in -[`assets/`](assets/): `pull_request.md` (request body), `branch.md` (naming -conventions), `CONTRIBUTING.md`, and `README.md`. +[`assets/`](assets/): `pull_request.md` (request body) and `branch.md` (naming +conventions). diff --git a/plugins/aidd-vcs/skills/02-pull-request/SKILL.md b/plugins/aidd-vcs/skills/02-pull-request/SKILL.md index af224d27..44955ff2 100644 --- a/plugins/aidd-vcs/skills/02-pull-request/SKILL.md +++ b/plugins/aidd-vcs/skills/02-pull-request/SKILL.md @@ -1,33 +1,31 @@ --- name: 02-pull-request -description: Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use to open a PR/MR ("open a pr", `/pull-request`). Do NOT use to commit, push, or merge a branch. +description: Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use when the user wants to open a pull or merge request. Not for committing, pushing, or merging a branch. +argument-hint: collect | draft | create --- # Pull Request -Drafts pull or merge requests from the current branch using the team's template, ready for the user to promote. +Collect the change, draft the request, create it as a draft. `01 → 02 → 03`. ## Actions -| # | Action | Role | Input | -| --- | --------------- | ------------------------------------------------------------------- | ---------------------------------------------- | -| 01 | `pull-request` | Detect base, fill template, validate with user, open the draft request | base_branch (optional), template_overrides | - -## Default flow - -Single action skill. The router dispatches to `pull-request` whenever a PR/MR phrase or slash command appears. +| # | Action | Step | +| --- | --------- | ----------------------------------------------------------- | +| 01 | `collect` | Resolve the base and gather the commits since it | +| 02 | `draft` | Write the title and body from the template | +| 03 | `create` | Open the draft request, label it, return the URL | ## Transversal rules -- Project first: follow `aidd_docs/memory/vcs.md` and the repo's own request-template file when they exist (body sections, base rules, labels); the rules below and the bundled templates are the fallback. -- Resolve the base branch from the head branch's prefix via the project's branch-naming convention (project memory); fall back to repo state when no prefix mapping exists. Never assume `main` or `master` (common alternatives: `next`, `develop`, `staging`). -- Always ask the user to validate the title, body, and base branch before creating the request. -- Open the request as a draft. The user promotes it manually when ready. -- After opening, apply the triage label the branch prefix maps to, when that label exists; labels triage only, they never change the resolved base. -- Never commit, never push the working branch, never create new branches inside this skill. -- Tool-agnostic: read the VCS tool from project memory; fall back to inspecting the remote URL. +- Follow the project's request practices in `aidd_docs/memory/vcs.md` and the repo's own request template when set, else the bundled `assets/pull_request.md`. +- Resolve the base from the branch's prefix per the project's convention (`vcs.md`), else the repo's default branch. Never assume `main`. +- The request is always a draft; the user promotes it. +- Apply only the triage label the branch prefix maps to, when it exists. Labels never change the base. +- Read the VCS tool from project memory, else infer it from the remote URL. +- Never commit, push, or branch here. ## Assets -- `@assets/pull_request.md`: Request body template. -- `@assets/branch.md`: Branch-naming convention, the fallback when project memory sets none. +- `assets/pull_request.md`: Request body template. +- `assets/branch.md`: Branch-naming convention, the fallback when project memory sets none. diff --git a/plugins/aidd-vcs/skills/02-pull-request/actions/01-collect.md b/plugins/aidd-vcs/skills/02-pull-request/actions/01-collect.md new file mode 100644 index 00000000..ef5042d9 --- /dev/null +++ b/plugins/aidd-vcs/skills/02-pull-request/actions/01-collect.md @@ -0,0 +1,22 @@ +# 01 - Collect + +Resolve the base branch and gather the change to describe. + +## Input + +An optional base branch, overriding the resolved one. + +## Output + +The VCS tool, the head and base branches, and the commits and changed files since the base. + +## Process + +1. **Tool.** Use the VCS tool from project memory, else infer it from the remote URL. +2. **Base.** Use a provided base, else resolve it per the project's branch convention, else the repo's default branch. Surface the base and why. +3. **Gather.** Summarize the commits and changed files since the base. + +## Test + +- The resolved base matches the branch prefix when one maps, not a blind `main`. +- The summary reflects the commits between base and head. diff --git a/plugins/aidd-vcs/skills/02-pull-request/actions/01-pull-request.md b/plugins/aidd-vcs/skills/02-pull-request/actions/01-pull-request.md deleted file mode 100644 index e09f008e..00000000 --- a/plugins/aidd-vcs/skills/02-pull-request/actions/01-pull-request.md +++ /dev/null @@ -1,30 +0,0 @@ -# 01 - Pull Request - -Detect the base branch, fill the request template from the recent commits, validate with the user, and open a draft request via the configured VCS tool. - -## Input - -An optional base branch (auto-detected when omitted), and optional title or body overrides. - -## Output - -The draft request's URL and number, with its head and resolved base branch. - -## Process - -1. **Tool.** Use the VCS tool declared in project memory, otherwise map `git remote get-url origin` to the matching configured tool. -2. **Head.** Read the current branch with `git rev-parse --abbrev-ref HEAD`. -3. **Base.** Resolve the base in order: a provided base; otherwise the target the head branch's prefix maps to in the project's branch-naming convention (for example `feat/` → `next`, `hotfix/` → `main`); otherwise `git symbolic-ref refs/remotes/origin/HEAD`, then `main`, `master`, `develop`, `staging`. Surface the chosen base and the reason. -4. **Collect.** Summarize the commits and impacted files with `git log <base>..HEAD` and `git diff <base>...HEAD --stat`. -5. **Fill.** Load the request template, preferring the project's own (`aidd_docs/memory/vcs.md` or the repo's request-template file) over the bundled one, plus any contributing rules; write a concise title and body from the change summary. -6. **Validate.** Show the title, body, and detected base. Apply any overrides, then wait for explicit approval. -7. **Open.** Create the request as a draft via the configured tool, passing the base, title, and body. Capture the URL and number. -8. **Label.** When the head prefix maps to a triage label that exists in the repo, apply it (for example `feat/` → `enhancement`). Skip silently otherwise. Labels triage only; they never change the base. -9. **Return.** Surface the URL, number, head, and base. - -## Test - -- The created request exists with `base` equal to the resolved base and the draft flag true. -- A head branch whose prefix is mapped resolves the base to that target, not the `origin/HEAD` default. -- When the head prefix maps to an existing triage label, the request carries it. -- The request is reachable at its URL with the head branch as its source. diff --git a/plugins/aidd-vcs/skills/02-pull-request/actions/02-draft.md b/plugins/aidd-vcs/skills/02-pull-request/actions/02-draft.md new file mode 100644 index 00000000..36b5c4e6 --- /dev/null +++ b/plugins/aidd-vcs/skills/02-pull-request/actions/02-draft.md @@ -0,0 +1,22 @@ +# 02 - Draft + +Write the request title and body from the change. + +## Input + +The collected base, commits, and changed files from `01-collect`, and optional title or body overrides. + +## Output + +The proposed title, body, and base, approved by the user. + +## Process + +1. **Template.** Load the request template, the project's own when set, else the bundled `@../assets/pull_request.md`. +2. **Write.** Draft a concise title and a body following the template from the change summary. +3. **Confirm.** Show the title, body, and base, apply any overrides, and wait for approval. + +## Test + +- The body follows the project's template sections when one exists. +- The user approved the title, body, and base before creation. diff --git a/plugins/aidd-vcs/skills/02-pull-request/actions/03-create.md b/plugins/aidd-vcs/skills/02-pull-request/actions/03-create.md new file mode 100644 index 00000000..54f86c08 --- /dev/null +++ b/plugins/aidd-vcs/skills/02-pull-request/actions/03-create.md @@ -0,0 +1,23 @@ +# 03 - Create + +Open the approved draft request and label it. + +## Input + +The approved title, body, and base from `02-draft`. + +## Output + +The draft request's URL and number, with its head and base. + +## Process + +1. **Open.** Create the request as a draft via the configured tool, passing the base, title, and body. +2. **Label.** When the head prefix maps to a triage label that exists, apply it; skip silently otherwise. +3. **Return.** Surface the URL, number, head, and base. + +## Test + +- The request exists as a draft with its base equal to the resolved base. +- A mapped, existing triage label is applied; an absent one is skipped without error. +- The request is reachable at its URL with the head branch as its source. diff --git a/plugins/aidd-vcs/skills/03-release-tag/SKILL.md b/plugins/aidd-vcs/skills/03-release-tag/SKILL.md index 884151f7..3fbe0ab5 100644 --- a/plugins/aidd-vcs/skills/03-release-tag/SKILL.md +++ b/plugins/aidd-vcs/skills/03-release-tag/SKILL.md @@ -1,39 +1,27 @@ --- name: 03-release-tag -description: Cut a semver release with annotated tag and release notes. Use when the user says "release", "tag", "tag this release", "bump version", "release v1.2.0", "cut a release", or invokes `/release-tag`. Do NOT use for plain commits without a tag, opening pull requests, pushing a branch only, or amending existing tags. +description: Cut a semver release with an annotated tag and release notes. Use when the user wants to release, tag a release, bump the version, or cut a version. Not for a plain commit, a pull request, or amending an existing tag. --- # Release Tag Cuts annotated semver releases with notes derived from recent commits. -## Available actions +## Actions | # | Action | Role | Input | | --- | -------------- | -------------------------------------------------------------------------- | ---------------------------------- | | 01 | `release-tag` | Compute version, draft notes, validate, bump, tag, push | version (optional), notes_overrides| -## Default flow - -Single action skill. The router dispatches to `release-tag` whenever a release or tag phrase appears. - ## Transversal rules - Versions follow semver `major.minor.patch` strictly. No suffixes unless explicitly requested. - Tags are annotated (`git tag -a`), never lightweight. -- Release notes are mandatory and follow `@assets/release-template.md`. +- Release notes are mandatory and follow `assets/release-template.md`. - Always ask the user to validate the version, notes, and impacted files before tagging. - Never `--force` push tags. Use `--force-with-lease` only when explicitly required. - The bump commit only includes version-manager files (e.g. `package.json`, `pyproject.toml`). -## References - -- None. - ## Assets -- `@assets/release-template.md`: Release notes template. - -## External data - -- None. +- `assets/release-template.md`: Release notes template. diff --git a/plugins/aidd-vcs/skills/03-release-tag/actions/01-release-tag.md b/plugins/aidd-vcs/skills/03-release-tag/actions/01-release-tag.md index 0e14067b..b8c0dcf8 100644 --- a/plugins/aidd-vcs/skills/03-release-tag/actions/01-release-tag.md +++ b/plugins/aidd-vcs/skills/03-release-tag/actions/01-release-tag.md @@ -2,51 +2,30 @@ Compute the next semver version from recent commits, draft release notes from the template, validate with the user, create a bump commit, then tag and push. -## Inputs +## Input -```yaml -version: <semver> # optional; auto-computed from commits since last tag when omitted -notes_overrides: # optional; impose specific notes content - title: <imposed title> - body: <imposed body> -``` +An optional explicit semver version (auto-computed from commits since the last tag when omitted), and optional note overrides imposing a specific title and body. -## Outputs +## Output -```yaml -tag: v<semver> -commit_sha: <bump commit sha> -pushed: true -release_url: <url> -``` +The created `v<semver>` tag, its bump commit sha, and the release URL, with the tag pushed to the remote. ## Process -1. **Read current version**. Pick first match: - - version manager file present (`package.json`, `pyproject.toml`, `Cargo.toml`, etc.) -> read its version field - - default -> `1.0.0` -2. **Read latest tag**. Pick first match: - - `git tag --sort=-version:refname | head -1` non-empty -> use it - - default -> treat as `v1.0.0` -3. **Collect commits**. Run `git log --oneline "<latest>..HEAD"`. -4. **Compute next version**. Pick first match: - - `version` input provided -> use it - - any commit body contains `BREAKING CHANGE` -> bump major - - any commit type is `feat` -> bump minor - - default -> bump patch -5. **Draft release notes**. Fill `assets/release-template.md` with the change list from step 3. Apply `notes_overrides` when provided. -6. **Validate**. Show full notes, computed version, and version-manager files about to change. Wait for explicit user approval. -7. **Bump commit**. Stage only version-manager files. Create a `chore: bump version to v<semver>` commit via heredoc. -8. **Create tag**. Run `git tag -a v<semver> -m <notes title>`. -9. **Push commit**. Run `git push`. -10. **Push tag**. Run `git push origin v<semver>`. -11. **Resolve release URL**. Pick first match: - - configured VCS tool exposes a release-view command -> capture the returned URL - - default -> compose URL from `git remote get-url origin` and the tag name +1. **Current.** Read the version from a version-manager file (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, else `1.0.0`. +2. **Latest.** Take the latest tag from `git tag --sort=-version:refname | head -1`. When there are no tags, note that there is no prior tag, never inventing one. +3. **Collect.** With a prior tag, list the commits in `<latest>..HEAD`. With no prior tag, list every commit on the branch. +4. **Compute.** Use the provided version when given. Otherwise bump major on a `BREAKING CHANGE`, minor on any `feat`, else patch. +5. **Draft.** Fill `@../assets/release-template.md` with the change list, applying any note overrides. +6. **Validate.** Show the full notes, the computed version, and the version-manager files about to change. Wait for explicit approval. +7. **Bump.** Stage the version-manager files and create a `chore: bump version to v<semver>` commit. +8. **Tag.** Run `git tag -a v<semver> -m <notes title>`. +9. **Push.** Push the commit, then push the tag with `git push origin v<semver>`. +10. **URL.** Capture the release URL from the configured VCS tool's release view when it has one, else compose it from the remote URL and the tag. ## Test -- **Local tag**: `git tag -l v<semver>` returns the new tag exactly once. -- **Semver shape**: the tag matches `^v[0-9]+\.[0-9]+\.[0-9]+$`. -- **Remote tag**: `git ls-remote --tags origin "refs/tags/v<semver>"` returns one row, confirming the tag is on the remote. -- **Commit link**: `git rev-parse "v<semver>^{commit}"` resolves to the bump commit sha returned in Outputs. +- `git tag -l v<semver>` returns the new tag exactly once. +- The tag matches `^v[0-9]+\.[0-9]+\.[0-9]+$`. +- `git ls-remote --tags origin "refs/tags/v<semver>"` returns one row. +- `git rev-parse "v<semver>^{commit}"` resolves to the returned bump commit sha. diff --git a/plugins/aidd-vcs/skills/04-issue-create/SKILL.md b/plugins/aidd-vcs/skills/04-issue-create/SKILL.md index 0f28c566..60c074f3 100644 --- a/plugins/aidd-vcs/skills/04-issue-create/SKILL.md +++ b/plugins/aidd-vcs/skills/04-issue-create/SKILL.md @@ -1,40 +1,28 @@ --- name: 04-issue-create -description: Create an issue in the configured ticketing tool. Use when the user says "new issue", "create an issue", "file a bug", "file an issue", "report bug", "open an issue", or invokes `/issue-create`. Do NOT use for committing changes, opening pull requests, tagging releases, or commenting on existing issues. +description: Create an issue in the configured ticketing tool. Use when the user wants to file a bug, open an issue, or report a problem. Not for committing, opening a pull request, or commenting on an existing issue. --- # Issue Create Files well-formed issues in the configured tracker after gathering enough context to be actionable. -## Available actions +## Actions | # | Action | Role | Input | | --- | --------------- | -------------------------------------------------------------------------- | -------------------------------------- | | 01 | `issue-create` | Detect tool, fill template, validate, open the issue | problem_description, labels, type | -## Default flow - -Single action skill. The router dispatches to `issue-create` whenever an issue or bug-report phrase appears. - ## Transversal rules -- Detect the ticketing tool from project memory first, then fall back to inspecting `git remote get-url origin`. +- Detect the ticketing tool from project memory first, then fall back to inferring it from the remote URL. - Tool-agnostic: invoke whichever ticketing tool is configured for the project. - Always wait for explicit user approval of title, body, labels, type, projects, and milestones before creating. -- Issue body follows `@assets/issue-template.md`. +- Issue body follows `assets/issue-template.md`. - Be thorough and concise. Short sentences. Focus on clarity, reproduction steps, and expected behavior. -- Read `@assets/CONTRIBUTING.md` for project-specific issue rules before drafting. - -## References - -- None. +- Read `assets/CONTRIBUTING.md` for project-specific issue rules before drafting. ## Assets -- `@assets/issue-template.md`: Issue / ticket body template. -- `@assets/CONTRIBUTING.md`: Contribution guidelines, including issue process. - -## External data - -- None. +- `assets/issue-template.md`: Issue / ticket body template. +- `assets/CONTRIBUTING.md`: Contribution guidelines, including issue process. diff --git a/plugins/aidd-vcs/skills/04-issue-create/actions/01-issue-create.md b/plugins/aidd-vcs/skills/04-issue-create/actions/01-issue-create.md index e81a921a..e0419bc5 100644 --- a/plugins/aidd-vcs/skills/04-issue-create/actions/01-issue-create.md +++ b/plugins/aidd-vcs/skills/04-issue-create/actions/01-issue-create.md @@ -2,42 +2,25 @@ Detect the ticketing tool, gather a thorough problem description, fill the issue template, validate with the user, then create the issue. -## Inputs - -```yaml -problem_description: <free text> # required -repo_url: <url> # optional; default: derived from `git remote get-url origin` -labels: [<label>] # optional -type: bug | feature | task | docs # optional; default: inferred from description -projects: [<project>] # optional -milestone: <milestone> # optional -``` - -## Outputs - -```yaml -tool: <configured ticketing tool> -issue_url: <url> -issue_number: <int> -title: <issue title> -labels: [<label>] -type: <type> -``` +## Input + +A problem description (required), plus optional labels, projects, a milestone, and a repo URL (inferred from the remote when omitted). + +## Output + +The created issue's URL and number, with its title and labels. ## Process -1. **Tool resolution**. Pick first match: - - ticketing tool declared in project memory -> use it - - default -> map `git remote get-url origin` to the matching configured tool -2. **Read context**. Load `assets/CONTRIBUTING.md` and `assets/issue-template.md`. Skim existing open issues via the configured tool to avoid duplicates. -3. **Gather details**. Combine `problem_description` with technical context (stack, repro steps, environment). Ask the user follow-up questions when required fields are missing. -4. **Web search**. Look up official documentation that backs the issue when applicable (e.g. linked errors, framework changelog). -5. **Fill template**. Generate a concise title and body that match the template structure. Pick a `type` (bug, feature, task, docs) when not provided. -6. **Validate**. Show title, body, labels, type, projects, and milestone. Wait for explicit user approval. -7. **Create**. Invoke the configured ticketing tool to open the issue, passing title, body, labels, projects, and milestone. -8. **Capture** the returned URL and number. Return the structured Outputs block. +1. **Tool.** Use the ticketing tool declared in project memory. Otherwise infer it from the remote URL. +2. **Context.** Load `@../assets/CONTRIBUTING.md` and `@../assets/issue-template.md`, and skim existing open issues via the tool to avoid duplicates. +3. **Gather.** Combine the problem description with technical context (stack, repro steps, environment). Ask follow-up questions when required fields are missing. +4. **Research.** Look up official documentation that backs the issue when applicable (linked errors, framework changelog). +5. **Fill.** Write a concise title and body matching the template. +6. **Validate.** Show the title, body, labels, projects, and milestone. Wait for explicit approval. +7. **Create.** Invoke the configured tool to open the issue, passing the title, body, labels, projects, and milestone, then capture the returned URL and number. ## Test -- **Tool view**: querying the configured ticketing tool for the created issue returns a record where `url` equals `issue_url`, `title` equals the validated title, and `labels` matches the validated labels. -- **Reachable**: the created issue is reachable at `issue_url` in the tracker UI. +- Querying the configured tool for the created issue returns a record whose URL, title, and labels match the validated values. +- The created issue is reachable at its URL in the tracker UI. diff --git a/plugins/aidd-vcs/skills/04-issue-create/assets/issue-template.md b/plugins/aidd-vcs/skills/04-issue-create/assets/issue-template.md index 57b2b8b8..0f7af87b 100644 --- a/plugins/aidd-vcs/skills/04-issue-create/assets/issue-template.md +++ b/plugins/aidd-vcs/skills/04-issue-create/assets/issue-template.md @@ -8,7 +8,7 @@ argument-hint: N/A AI instructions: -- be focused on creating clear, concise, and actionable GitHub issues. +- be focused on creating clear, concise, and actionable issues in the configured tracker. - no over-thinking nor over-complicating. -->