Skip to content

Commit 29ef579

Browse files
blafourcadeclaude
andcommitted
refactor(framework): canonical action shape, model-A rules, plugin audit sweep
Action shape (R8). Every skill-internal action across aidd-context, aidd-dev, aidd-pm, aidd-vcs, aidd-refine, aidd-orchestrator now follows the canonical Inputs / Outputs / Process / Test shape. 20 legacy command-style actions converted in aidd-dev (01-plan, 02-implement, 03-assert, 04-audit, 05-review, 06-test, 07-refactor, 08-debug, 09-for-sure), 1 in aidd-context (04-mermaid), 2 in aidd-context:03:context-generate (agents, rules). Frontmatter stripped from every skill-internal action; kept only on context-generate sub-domain entries that are routed standalone. Rules surface (Model A). Rules live in tool-native locations only - no aidd_docs/rules/ master, no bare rules/ scaffold. aidd-dev/scripts/list-rules.mjs rewritten to scan every installed AI tool (.claude/rules/, .cursor/rules/*.mdc, .github/instructions/*.instructions.md, .opencode/rules/) and emit a normalised tool-tagged JSON inventory; inline YAML array parser added for paths/globs/applyTo. Script moved from framework root to plugins/aidd-dev/scripts/ so installs reach it. aidd-context:02:project-init drops 05-init-rules-skeleton and shortens to five actions (memory-only scaffold); aidd-context:03:context-generate:rules:01-generate-rules creates rules root + category dirs on demand. aidd-context:03:context-generate references/rule-structure.md path-convention generalised: file location encodes category and slug, root and ext defer to ai-mapping.md. aidd-dev:01:plan rules-inventory step now consumes the tool-tagged JSON; plan-template Applicable Rules table gains a Tool column. Discovery (aidd-context:06). Skill expanded from one find-skill action to five: 01-find-skill, 02-find-agent, 03-find-command, 04-find-plugin, 05-find-mcp. SKILL.md routes by user phrasing; find-agent filters template artefacts. Evals cover all five surfaces + cross-skill negatives. Condense (aidd-refine:03). Adopted relevant pieces of the caveman plugin without cloning it. Description re-anchored on durable project rules / conventions / decisions with concrete trigger phrases; persistence section + explicit off-switch phrases ("stop condense", "normal mode", "/condense off"); per-level examples (React, DB pool, debounce) and an Auto-pause walkthrough in references/intensity-levels.md. New 02-stats action plus a UserPromptSubmit hook at hooks/condense-stats.js that reads the session transcript, detects intensity transitions, computes approximate token savings, and returns the formatted report so the model is not invoked. Cross-plugin sweep. aidd-orchestrator: redundant actions/skills/ subdir flattened across the three async-dev skills (21 actions moved), broken @-ref in 03-review-async-dev/SKILL.md fixed, "Generated by aidd-orchestrator:03:review-async-dev" leak dropped from PR comment template. aidd-pm: 05-spec renamed to 04-spec to close the gap left by the deleted 04-clarity (SKILL.md name + three external refs updated). aidd-dev/agents: 22 em-dashes purged from planner / reviewer / implementer; cross-plugin invocations (aidd-vcs:01:commit, aidd-refine, aidd-context:04:mermaid, aidd-context:05:learn) kept where functional (agent orchestration). aidd-context:01:bootstrap and aidd-orchestrator:03:review-async-dev drop "Generated by <skill-id>" footers from generated artefacts. Project-init memory description (`aidd-context:02:project-init` SKILL.md) trimmed: scaffold no longer claims to create a rules directory. CONTRIBUTING.md refs updated alongside the aidd-pm rename. learn (aidd-context:05) gate now respects explicit user invocation: the worth-learning check runs only on auto-trigger; explicit invocation bypasses it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7b5907a commit 29ef579

84 files changed

Lines changed: 1579 additions & 1230 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

aidd_docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ All templates live alongside the skill that owns them, under `plugins/<plugin>/s
2323
| `aidd-context:03:context-generate/assets/agents/` | Agent file template |
2424
| `aidd-context:03:context-generate/assets/rules/` | Rule file template |
2525
| `aidd-pm:03:prd/assets/` | PRD body template |
26-
| `aidd-pm:05:spec/assets/` | Spec template and validator |
26+
| `aidd-pm:04:spec/assets/` | Spec template and validator |
2727
| `aidd-dev:01:plan/assets/` | Plan and master-plan templates |
2828
| `aidd-vcs:01:commit/assets/` | Conventional commit message template |
2929
| `aidd-vcs:02:pull-request/assets/` | Pull/merge request body template, contributing example |

plugins/aidd-context/skills/02-project-init/SKILL.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
name: aidd-context:02:project-init
3-
description: Initialize or refresh the project memory bank, scaffold the rules directory, and ensure AI context files contain the project memory block. Use when running `aidd init` for the first time, bootstrapping a new project, or re-running the init flow on an existing project. Do NOT use for updating individual memory files after they exist - use `aidd-context:05:learn` instead; do NOT use for editing a single rule - edit the file directly.
3+
description: Initialize or refresh the project memory bank and ensure AI context files contain the project memory block. Use when running `aidd init` for the first time, bootstrapping a new project, or re-running the init flow on an existing project. Do NOT use for updating individual memory files after they exist - use `aidd-context:05:learn` instead; do NOT use for editing a single rule - edit the file directly.
44
model: opus
55
---
66

77
# Project Init
88

9-
Bootstraps the full AIDD context layer for a project: AI context files with memory block, `aidd_docs/` documentation structure, memory bank files, and rules directory skeleton.
9+
Bootstraps the AIDD context layer for a project: AI context files with memory block, `aidd_docs/` documentation structure, and the memory bank files. Rule directories are created lazily by `aidd-context:03:context-generate` when the first rule is written; project-init does not pre-scaffold them.
1010

1111
## Available actions
1212

@@ -16,12 +16,11 @@ Bootstraps the full AIDD context layer for a project: AI context files with memo
1616
| 02 | `scaffold-docs` | Create `aidd_docs/` structure with README and GUIDELINES | project root |
1717
| 03 | `generate-memory` | Detect project type and generate memory files in parallel | `aidd_docs/memory/` from 02 |
1818
| 04 | `review-memory` | Cross-file consistency review of all generated memory files | `aidd_docs/memory/` from 03 |
19-
| 05 | `init-rules-skeleton` | Create `rules/` skeleton with 10 numbered phase directories | project root |
20-
| 06 | `sync-memory` | Execute `update_memory.js` to fill `<aidd_project_memory>` blocks | context files from 01 |
19+
| 05 | `sync-memory` | Execute `update_memory.js` to fill `<aidd_project_memory>` blocks | context files from 01 |
2120

2221
## Default flow
2322

24-
`01 → 02 → 03 → 04 → 05 → 06`. Run each action's `## Test` before moving to the next.
23+
`01 → 02 → 03 → 04 → 05`. Run each action's `## Test` before moving to the next.
2524

2625
## Transversal rules
2726

plugins/aidd-context/skills/02-project-init/actions/05-init-rules-skeleton.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

plugins/aidd-context/skills/02-project-init/actions/06-sync-memory.md renamed to plugins/aidd-context/skills/02-project-init/actions/05-sync-memory.md

File renamed without changes.

plugins/aidd-context/skills/02-project-init/assets/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ All templates live alongside the skill that owns them, under `plugins/<plugin>/s
2323
| `aidd-context:03:context-generate/assets/agents/` | Agent file template |
2424
| `aidd-context:03:context-generate/assets/rules/` | Rule file template |
2525
| `aidd-pm:03:prd/assets/` | PRD body template |
26-
| `aidd-pm:05:spec/assets/` | Spec template and validator |
26+
| `aidd-pm:04:spec/assets/` | Spec template and validator |
2727
| `aidd-dev:01:plan/assets/` | Plan and master-plan templates |
2828
| `aidd-vcs:01:commit/assets/` | Conventional commit message template |
2929
| `aidd-vcs:02:pull-request/assets/` | Pull/merge request body template, contributing example |

plugins/aidd-context/skills/02-project-init/assets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ A typical change cycles through skills from several plugins. The order below is
109109

110110
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.
111111
2. **Project init** (once per project, re-runnable to refresh): `aidd-context:02:project-init` 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.
112-
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:05:spec` to formalize scope.
112+
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.
113113
4. **Plan**: `aidd-dev:01:plan` produces the technical plan, component behavior model, or design-image extraction.
114114
5. **Implement and assert**: `aidd-dev:02:implement` writes code against the plan; `aidd-dev:03:assert` verifies the result.
115115
6. **Review**: `aidd-dev:05:review` for code and functional review; `aidd-refine:02:challenge` to stress-test the result.
Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,36 @@
1-
---
2-
name: generate_agent
3-
description: Generates a customized agent based on user-defined parameters.
4-
model: sonnet
5-
---
1+
# 01 - Generate agent
62

7-
# Goal
3+
Generate a specialized agent file tailored to user requirements, validated with the user before write, and saved to every installed AI tool's native agents location.
84

9-
Generate a specialized agent template tailored to specific user requirements.
5+
## Inputs
106

11-
## Context
12-
13-
### Coordination with other agents
14-
15-
```markdown
16-
@../../references/agents-coordination.md
17-
```
18-
19-
### Agent template
20-
21-
```markdown
22-
@../../assets/agents/agent-template.md
7+
```yaml
8+
agent_request: <free-form description of the agent's purpose, tools, and instructions>
239
```
2410
25-
### AI Mapping
26-
27-
Apply tool-native conventions for agent file paths, naming, and extensions.
11+
## Outputs
2812
29-
```markdown
30-
@../../references/ai-mapping.md
13+
```yaml
14+
agent_path: <tool-specific agents location>/<generated-agent-name>.<ext>
15+
name_proposals:
16+
- <short catchy name 1>
17+
- <short catchy name 2>
18+
- <short catchy name 3>
19+
quality_score: 1-10
3120
```
3221
33-
## Rules
22+
## Process
3423
35-
- Input and Output for the agent MUST be ULTRA concise and precise.
36-
- Ask clarifying questions if the user's request is ambiguous or lacks detail.
37-
- When mentioning templates in `aidd_docs`, always provide full path
24+
1. **Gather requirements.** Ask the user clarifying questions until the agent template is fillable. Iterate until the agent's purpose, tools, inputs, and instructions are unambiguous.
25+
2. **Fill the template** at `@../../assets/agents/agent-template.md`. Apply the coordination conventions in `@../../references/agents-coordination.md`.
26+
3. **Review.** Score the generated agent 1-10 on clarity and completeness. Boundaries:
27+
- Inputs and outputs MUST be ultra concise and precise.
28+
- When mentioning templates in `aidd_docs/`, always provide the full path.
29+
4. **Wait for user confirmation** before finalizing.
30+
5. **Propose 3 first names** for the agent. Each name must be short and catchy, making sense with the agent's purpose (word game, acronym, etc.).
31+
6. **Save.** Write the completed agent file to every installed AI tool's native agents location using its path, naming, and extension conventions from `@../../references/ai-mapping.md`. Skip tools whose agents surface is marked "not supported".
32+
7. **Update the catalog.** Add the new agent entry into `@aidd_docs/CATALOG.md`.
3833

39-
## Instruction steps
34+
## Test
4035

41-
1. Ask following questions to the user until you gather all necessary information in agent's template.
42-
1. Discuss with the user until you have a clear understanding of the agent's purpose, tools, and instructions.
43-
2. Use the gathered information to fill in the agent template.
44-
2. Review the generated agent to ensure it is straightforward with 0 ambiguity.
45-
1. Affect a note between 1 and 10 to the generated agent based on its relevance and completeness.
46-
3. **Wait for user confirmation before finalizing the agent.**
47-
4. Propose 3 real first names for the agent, each name must be short and catchy, making sense with the agent's purpose (could be word game, acronym, etc.).
48-
5. Provide the completed agent template as the final output, written to the AI tool's native agents directory as `<generated-agent-name>.md`.
49-
6. Add the new prompt into the `@aidd_docs/CATALOG.md` to keep documentation up to date.
36+
The agent file exists at `agent_path` in every installed tool's agents location (skipping unsupported surfaces); the file matches the structure of `@../../assets/agents/agent-template.md`; `quality_score >= 8`; `@aidd_docs/CATALOG.md` contains a new row referencing the generated agent.
Lines changed: 43 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,61 @@
1-
---
2-
name: generate_rules
3-
description: Generate or modify coding rules manually or auto-scan the codebase to propose rules
4-
argument-hint: "Rule topic to write, or 'auto' to scan codebase and propose rules"
5-
model: sonnet
6-
---
1+
# 01 - Generate rules
72

8-
# Generate Rules
3+
Generate or modify coding rules, either from user input (manual mode) or by scanning the codebase (auto mode), then write each rule into every installed AI tool's native rules surface.
94

10-
## Goal
5+
## Inputs
116

12-
Generate or modify coding rules, either from user input (manual) or by scanning the codebase (auto).
13-
14-
## Outcome
15-
16-
Create structured markdown rule (.mdc or .md depending on the IDE) files with proper front-matter and content, plus IDE bridge files.
17-
18-
## Resources
19-
20-
### Template
21-
22-
```markdown
23-
@../../assets/rules/rule-template.md
7+
```yaml
8+
arguments: <rule topic to write, or "auto"/"scan" to scan the codebase and propose rules>
249
```
2510
26-
### IDE Mapping
27-
28-
Apply tool-native conventions for rule file paths, naming, and extensions.
29-
30-
```markdown
31-
@../../references/ai-mapping.md
32-
```
33-
34-
## Context
35-
36-
### User input
11+
## Outputs
3712
38-
```text
39-
$ARGUMENTS
13+
```yaml
14+
mode: auto | manual
15+
files_written:
16+
- { tool: <id>, path: <tool rules root>/<category>/<slug>.<ext> }
17+
- ...
4018
```
4119
42-
### Example rule file structure
20+
## Process
4321
44-
```text
45-
03-frameworks-and-libraries/
46-
├── 3-react@19-components-structure.md (globs: ['**/*.tsx', '**/components/**', ...])
47-
│ ├── Component definition basics
48-
│ ├── Export patterns
49-
│ ├── Props and typing
50-
│ └── Naming conventions
51-
└── ...
52-
```
53-
54-
## Rules
55-
56-
- Be concise, less is more
57-
- If multiple examples, then multiple rule files
58-
- Frontmatter and tool-specific syntax (extensions, paths, globs) live in the references below
59-
60-
### Rule writing standards
61-
62-
```markdown
63-
@../../references/rule-writing.md
64-
```
65-
66-
### Rule file structure
67-
68-
```markdown
69-
@../../references/rule-structure.md
70-
```
22+
1. **Detect mode.**
23+
- `arguments` is `auto` or `scan` -> auto mode (step 2A).
24+
- Otherwise -> manual mode (step 2B).
7125

72-
## Steps
26+
2A. **Auto mode - scan codebase.**
27+
- Scan source files, configs, dependencies, and directory structure.
28+
- Identify patterns, conventions, tech stack usage, existing rules.
29+
- Propose a complete rules architecture: list categories and rule files, show groups and sub-groups per file, display the proposed file tree.
30+
- WAIT FOR USER APPROVAL before proceeding to step 3.
7331

74-
### Step 1: Detect mode
32+
2B. **Manual mode - user-guided.**
33+
- Remind project context: tech stack, versions, architecture, existing rules.
34+
- Define categories, one file per category.
35+
- Look for existing rules to update.
36+
- Plan the new rule(s) structure: file, groups and sub-groups, display the proposed architecture.
37+
- WAIT FOR USER APPROVAL before proceeding to step 3.
7538

76-
- If `$ARGUMENTS` is "auto" or "scan" → **Auto mode** (Step 2A)
77-
- Otherwise → **Manual mode** (Step 2B)
39+
3. **Generate.** For every installed AI tool, write the rule file inside that tool's rules root using `@../../assets/rules/rule-template.md` and the conventions in `@../../references/ai-mapping.md` (path, naming, extension, frontmatter). Skip any tool whose rules surface is marked "not supported". Create the rules root and the category subdirectory on demand (`mkdir -p`) before writing; do not assume the directory tree has been pre-scaffolded.
7840

79-
### Step 2A: Auto mode - Scan codebase
41+
The category subdirectory and the slug stay identical across tools; only the root, extension, and frontmatter shape differ. Refer to `@../../references/rule-structure.md` and `@../../references/rule-writing.md` for content conventions.
8042

81-
1. Scan project: source files, configs, dependencies, directory structure
82-
2. Identify patterns, conventions, tech stack usage, and existing rules
83-
3. Propose a complete rules architecture:
84-
- List categories and rule files
85-
- Show groups and sub-groups per file
86-
- Display proposed file tree
87-
4. **Wait for user approval** before proceeding
88-
5. → Go to Step 3
43+
Reference example rule file structure (illustrative):
8944

90-
### Step 2B: Manual mode - User-guided
45+
```text
46+
03-frameworks-and-libraries/
47+
├── 3-react@19-components-structure.<ext> (paths: ['**/*.tsx', '**/components/**', ...])
48+
│ ├── Component definition basics
49+
│ ├── Export patterns
50+
│ ├── Props and typing
51+
│ └── Naming conventions
52+
└── ...
53+
```
9154

92-
1. Remind project context: tech stack, versions, architecture, existing rules
93-
2. Define categories, 1 file per category
94-
3. Look for existing rules to update
95-
4. Plan the new rule(s) structure:
96-
- File
97-
- Define groups and sub-groups
98-
- Display proposed architecture
99-
5. **Wait for user approval** before proceeding
100-
6. → Go to Step 3
55+
4. **Boundaries.**
56+
- Be concise. Less is more.
57+
- If multiple examples warrant separate files, create multiple rule files.
10158

102-
### Step 3: Generate
59+
## Test
10360

104-
Generate the rules based on the template, following the IDE mapping conventions for file path, naming and extension.
61+
For every installed AI tool whose rules surface is supported, the generated rule file exists at `<tool rules root>/<category>/<slug>.<ext>` with frontmatter matching the tool-specific shape from `@../../references/ai-mapping.md`. Content follows the conventions in `@../../references/rule-writing.md` and `@../../references/rule-structure.md`.

plugins/aidd-context/skills/03-context-generate/references/rule-structure.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ Naming pattern for React rules in `03-frameworks-and-libraries` category:
3737
- `3-react@19-hooks`
3838
- `3-react@19.1-hooks`
3939

40+
## Path convention
41+
42+
The physical location of a rule encodes its `category` and `slug`. The category is the subdirectory; the slug is the file name (`<#-slug[@version][-specificity]>.<ext>`). Frontmatter never carries the rule path; downstream tools derive it from the file location alone.
43+
44+
The base directory and the file extension are tool-specific. Refer to `@ai-mapping.md` for the exact path per AI tool, including tools where rules are not supported.
45+
4046
## Frontmatter and tool-specific syntax
4147

4248
Frontmatter fields, file extensions, glob path syntax, and on-disk locations are tool-specific. Refer to `@ai-mapping.md` for the exact shape per AI tool.

0 commit comments

Comments
 (0)