Skip to content

Commit f2d372e

Browse files
rsmetsRay Smetsclaude
authored
feat: add Claude Code and Cursor plugins for AIDLC methodology (#1)
* feat: add Claude Code plugin for AIDLC methodology Replace the manual setup flow (download zip, copy core-workflow.md to CLAUDE.md, copy rule-details) with a first-class Claude Code plugin installable via `claude plugin install`. The plugin provides: - An orchestrator agent that drives the three-phase workflow - Slash commands: /aidlc, /aidlc:inception, /aidlc:construction, /aidlc:operations - 7 skills bundling all rule-detail content with progressive disclosure - Opt-in extension skills for security baseline and property-based testing A stdlib-only Python generator (scripts/build-cc-plugin.py) produces the entire plugin from the canonical aidlc-rules/ source files, with a CI job that enforces zero drift between source and generated output. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: remove brainstorm and plan docs from branch These artifacts informed the PR description and are not needed as committed files in the repository. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * readme * feat: add Cursor plugin alongside Claude Code plugin Extend the plugin generator to produce a Cursor rules bundle in addition to the Claude Code plugin. Cursor doesn't have a native "plugin" format like CC, but it supports Remote Rules via GitHub — users can install the whole rule set in a single Settings UI step. Changes: - Rename scripts/build-cc-plugin.py → scripts/build-plugins.py - Add build_cursor_plugin() that emits plugins/cursor-aidlc/ with the rule tree as .mdc files preserving source directory structure - Orchestrator rule uses alwaysApply: true; all other rules are Agent Requested (description-only) for context efficiency - Cursor-specific path-resolution transform for core-workflow.md - Add --target flag to build cc or cursor independently - README: add Remote Rules (GitHub) as Cursor Option 1 (recommended) - CI: update plugin-sync job to run the renamed script - CONTRIBUTING + AGENTS.md: document both generated plugins Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: flatten Cursor plugin structure and fix README accuracy Move .mdc files from plugins/cursor-aidlc/.cursor/rules/aidlc/ to plugins/cursor-aidlc/rules/ for a cleaner manual copy path. Update README to recommend the copy method as primary since Remote Rules produces deeply nested import paths in a monorepo. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Ray Smets <rsmets@amazon.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent bc75a08 commit f2d372e

85 files changed

Lines changed: 13789 additions & 8 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.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CODE_OF_CONDUCT.md @awslabs/aidlc-admins
1414
CONTRIBUTING.md @awslabs/aidlc-admins
1515
LICENSE @awslabs/aidlc-admins
1616
README.md @awslabs/aidlc-admins
17+
plugins/ @awslabs/aidlc-admins @awslabs/aidlc-maintainers
1718
scripts/ @awslabs/aidlc-admins @awslabs/aidlc-maintainers
1819

1920
## Secure the CODEOWNERS file

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ documentation:
1111
- '**/*.md'
1212
- '!aidlc-rules/**'
1313

14+
plugin:
15+
- changed-files:
16+
- any-glob-to-any-file: 'plugins/**'
17+
1418
github:
1519
- changed-files:
1620
- any-glob-to-any-file: '.github/**'

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,22 @@ jobs:
2424
- uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 #v23.0.0
2525
with:
2626
globs: "**/*.md"
27+
28+
plugin-sync:
29+
name: Plugin Sync Check
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
steps:
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
35+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
36+
with:
37+
python-version: '3.x'
38+
- name: Regenerate plugins (Claude Code + Cursor)
39+
run: python scripts/build-plugins.py
40+
- name: Check for drift
41+
run: |
42+
if ! git diff --exit-code plugins/; then
43+
echo "::error::Plugin output is out of sync with aidlc-rules/. Run 'python scripts/build-plugins.py' and commit the result."
44+
exit 1
45+
fi

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ aidlc-rules/
2121
├── construction/ # Design and implementation rules
2222
├── extensions/ # Optional cross-cutting constraint rules
2323
└── operations/ # Deployment and monitoring rules
24+
plugins/claude-code-aidlc/ # Claude Code plugin (GENERATED — do not edit directly)
25+
plugins/cursor-aidlc/ # Cursor rules bundle (GENERATED — do not edit directly)
26+
scripts/build-plugins.py # Generator: aidlc-rules/ → plugins/{claude-code,cursor}-aidlc/
2427
scripts/aidlc-evaluator/ # Python evaluation framework (uv-managed)
2528
docs/
2629
├── ADMINISTRATIVE_GUIDE.md # CI/CD, workflows, secrets, release process

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ aidlc-rules/
3232
└── operations/
3333
```
3434

35+
### Generated Plugins — Do Not Edit Directly
36+
37+
The `plugins/` directory contains generated plugin packages for Claude Code
38+
(`plugins/claude-code-aidlc/`) and Cursor (`plugins/cursor-aidlc/`). Both are
39+
produced by `scripts/build-plugins.py` from the canonical `aidlc-rules/`
40+
source. Do not edit files in `plugins/` directly — your changes will be
41+
overwritten and CI will reject the PR.
42+
43+
To update plugin content:
44+
45+
1. Edit the source files in `aidlc-rules/`
46+
2. Run `python scripts/build-plugins.py` to regenerate both plugins
47+
3. Commit both the source changes and the regenerated plugin output
48+
49+
To build only one target during development:
50+
51+
```bash
52+
python scripts/build-plugins.py --target cc # Claude Code only
53+
python scripts/build-plugins.py --target cursor # Cursor only
54+
```
55+
56+
CI runs the generator and checks `git diff --exit-code plugins/` — if the committed output doesn't match the regenerated result, the PR fails.
57+
3558
### Rule Structure
3659

3760
Rules are organized by phase:

README.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,31 @@ To verify the rules are loaded:
162162

163163
AI-DLC uses [Cursor Rules](https://cursor.com/docs/context/rules) to implement its intelligent workflow.
164164

165-
The commands below assume you extracted the zip to your `Downloads` folder. If you used a different location, replace `Downloads` with your actual folder path.
165+
#### Option 1: Copy Generated Rules (Recommended)
166+
167+
Copy the pre-built `.mdc` rules from this repository into your project:
168+
169+
```bash
170+
# From a clone of this repo, at the repo root:
171+
mkdir -p /path/to/your/project/.cursor/rules
172+
cp -R plugins/cursor-aidlc/rules/* /path/to/your/project/.cursor/rules/
173+
```
166174

167-
#### Option 1: Project Rules (Recommended)
175+
Open the project in Cursor — it picks up the rules automatically. The
176+
`aidlc-orchestrator.mdc` rule is set to `alwaysApply: true`, so it loads
177+
on every interaction. Just describe your task and the orchestrator routes
178+
to the appropriate phase rules.
179+
180+
See `plugins/cursor-aidlc/README.md` for details on the generated rule
181+
structure and alternative install methods (Remote Rules via GitHub).
182+
183+
> **Note:** If you previously set up AI-DLC manually (Option 2 below),
184+
> remove the manual `.cursor/rules/ai-dlc-workflow.mdc` and the
185+
> `.aidlc-rule-details/` directory to avoid duplicate context.
186+
187+
#### Option 2: Project Rules (Manual, from Zip)
188+
189+
The commands below assume you extracted the zip to your `Downloads` folder. If you used a different location, replace `Downloads` with your actual folder path.
168190

169191
**Unix/Linux/macOS:**
170192

@@ -223,7 +245,7 @@ mkdir .aidlc-rule-details
223245
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I
224246
```
225247

226-
#### Option 2: AGENTS.md (Simple Alternative)
248+
#### Option 3: AGENTS.md (Simple Alternative)
227249

228250
**Unix/Linux/macOS:**
229251

@@ -257,7 +279,7 @@ xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-
257279

258280
![AI-DLC Rules in Cursor](./assets/images/cursor-ide-aidlc-rules-loaded.png?raw=true "AI-DLC Rules in Cursor")
259281

260-
**Directory Structure (Option 1):**
282+
**Directory Structure (Option 2):**
261283

262284
```text
263285
<my-project>/
@@ -361,11 +383,23 @@ xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-
361383

362384
### Claude Code
363385

364-
AI-DLC uses Claude Code's project memory file (`CLAUDE.md`) to implement its intelligent workflow.
386+
#### Option 1: Plugin Install (Recommended)
365387

366-
The commands below assume you extracted the zip to your `Downloads` folder. If you used a different location, replace `Downloads` with your actual folder path.
388+
Install AI-DLC as a Claude Code plugin — no file copying, no `CLAUDE.md` overwrite, and versioned updates:
389+
390+
```bash
391+
claude plugin install --from https://github.com/awslabs/aidlc-workflows/tree/main/plugins/claude-code-aidlc
392+
```
367393

368-
#### Option 1: Project Root (Recommended)
394+
Once installed, use `/aidlc` to start a new workflow or resume an existing one. Phase-specific commands are also available: `/aidlc:inception`, `/aidlc:construction`, `/aidlc:operations`.
395+
396+
> **Note:** If you previously set up AI-DLC manually (copied `core-workflow.md` to `CLAUDE.md`), remove the manual setup to avoid duplicate context. Delete `CLAUDE.md` (if it only contains AIDLC content) and the `.aidlc-rule-details/` directory from your project.
397+
398+
#### Option 2: Project Root (Manual)
399+
400+
AI-DLC can also be set up manually using Claude Code's project memory file (`CLAUDE.md`).
401+
402+
The commands below assume you extracted the zip to your `Downloads` folder. If you used a different location, replace `Downloads` with your actual folder path.
369403

370404
**Unix/Linux/macOS:**
371405

@@ -391,7 +425,7 @@ mkdir .aidlc-rule-details
391425
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I
392426
```
393427

394-
#### Option 2: .claude Directory
428+
#### Option 3: .claude Directory (Manual)
395429

396430
**Unix/Linux/macOS:**
397431

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "aidlc",
3+
"version": "0.1.8",
4+
"description": "AI-Driven Development Life Cycle \u2014 structured adaptive workflow for software development with AI coding agents",
5+
"repository": "https://github.com/awslabs/aidlc-workflows",
6+
"license": "Apache-2.0"
7+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# markdownlint overrides for aidlc-rules/ (LLM prompt files)
2+
# These rules are temporarily disabled pending incremental remediation.
3+
# Each rule is re-enabled in a separate PR after fixing its violations.
4+
# See PR #159 for the full remediation plan ordered by LLM prompt impact.
5+
6+
config:
7+
# --- Tier 1: Zero prompt impact (invisible whitespace) ---
8+
MD009: false # no-trailing-spaces (9 violations)
9+
MD012: false # no-multiple-blanks (2 violations)
10+
MD047: false # single-trailing-newline (4 violations)
11+
12+
# --- Tier 2: Zero prompt impact (formatting normalization) ---
13+
MD029: false # ol-prefix (1 violation)
14+
MD026: false # no-trailing-punctuation (17 violations)
15+
16+
# --- Tier 3: Zero prompt impact (blank line structure) ---
17+
MD022: false # blanks-around-headings (274 violations)
18+
MD032: false # blanks-around-lists (426 violations)
19+
MD031: false # blanks-around-fences (31 violations)
20+
21+
# --- Tier 4: Minimal prompt impact (table/URL formatting) ---
22+
MD060: false # table-column-style (34 violations)
23+
24+
# --- Tier 5: Low prompt impact (structural cosmetic) ---
25+
MD046: false # code-block-style (8 violations)
26+
MD007: false # ul-indent (34 violations)
27+
28+
# --- Tier 6: Needs review (adds content or changes structure) ---
29+
MD040: false # fenced-code-language (18 violations)
30+
MD025: false # single-title (13 violations)
31+
32+
# --- Plugin-specific overrides ---
33+
MD041: false # first-line-heading — plugin files use YAML frontmatter
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# AI-DLC Claude Code Plugin
2+
3+
AI-Driven Development Life Cycle (AI-DLC) packaged as a Claude Code plugin.
4+
Provides an adaptive three-phase software development workflow (Inception,
5+
Construction, Operations) driven by an orchestrator agent, phase-specific slash
6+
commands, and progressive-disclosure skills.
7+
8+
**Version**: 0.1.8
9+
**Source of truth**: `aidlc-rules/` in this repository
10+
**Generator**: `scripts/build-cc-plugin.py`
11+
12+
> This directory is **generated**. Do not edit files here directly — edit the
13+
> canonical sources in `aidlc-rules/` and run the generator. CI enforces sync.
14+
15+
## What You Get
16+
17+
| Component | Purpose |
18+
| ---------------------------- | ------------------------------------------------------------ |
19+
| `/aidlc` | Start or resume an AI-DLC workflow |
20+
| `/aidlc:inception` | Start or resume the Inception phase |
21+
| `/aidlc:construction` | Start or resume the Construction phase |
22+
| `/aidlc:operations` | Start or resume the Operations phase (placeholder) |
23+
| `aidlc-orchestrator` agent | Drives the three-phase workflow, detects phase from state |
24+
| `aidlc-core-workflow` skill | Master workflow definition |
25+
| `aidlc-inception` skill | Inception phase rules (workspace detection, requirements, …) |
26+
| `aidlc-construction` skill | Construction phase rules (design, NFR, code generation, …) |
27+
| `aidlc-operations` skill | Operations phase rules (placeholder) |
28+
| `aidlc-common` skill | Cross-cutting rules (terminology, depth, error handling, …) |
29+
| `aidlc-security-baseline` | Opt-in security extension |
30+
| `aidlc-property-testing` | Opt-in property-based testing extension |
31+
32+
## Installing
33+
34+
### For Development (Local Path)
35+
36+
Use `--plugin-dir` to load the plugin from a local path for a single session.
37+
This is the fastest way to iterate on plugin changes without publishing.
38+
39+
```bash
40+
# From a clone of this repo, at the repo root:
41+
claude --plugin-dir ./plugins/claude-code-aidlc
42+
```
43+
44+
The flag is repeatable for loading multiple plugins side-by-side:
45+
46+
```bash
47+
claude --plugin-dir ./plugins/claude-code-aidlc --plugin-dir ../other-plugin
48+
```
49+
50+
Inside the session, use `/reload-plugins` to pick up changes without
51+
restarting Claude Code.
52+
53+
### For Persistent Local Install (Development)
54+
55+
Add this repo as a local marketplace, then install the plugin from it:
56+
57+
```bash
58+
# Register the repo as a marketplace (persists across sessions)
59+
claude plugin marketplace add /absolute/path/to/aws-aidlc-workflows
60+
61+
# Install the aidlc plugin
62+
claude plugin install aidlc
63+
```
64+
65+
Scope the install with `--scope user|project|local` if needed (defaults to
66+
`user`).
67+
68+
### For End Users (Git Install)
69+
70+
Once published, users install directly from the repository:
71+
72+
```bash
73+
claude plugin marketplace add https://github.com/awslabs/aidlc-workflows
74+
claude plugin install aidlc
75+
```
76+
77+
## Using the Plugin
78+
79+
After installation, start or resume a workflow:
80+
81+
```text
82+
/aidlc
83+
```
84+
85+
With no argument, the orchestrator detects existing AIDLC state in the
86+
workspace (via `aidlc-docs/aidlc-state.md`) and either resumes or shows the
87+
welcome message. You can also provide an initial request:
88+
89+
```text
90+
/aidlc build a REST API for order management
91+
```
92+
93+
Target a specific phase:
94+
95+
```text
96+
/aidlc:inception
97+
/aidlc:construction
98+
/aidlc:operations
99+
```
100+
101+
## How It Works
102+
103+
1. The orchestrator agent detects current phase from workspace state
104+
2. It loads the appropriate phase skill (`aidlc-inception`,
105+
`aidlc-construction`, or `aidlc-operations`) on demand
106+
3. Each skill's `references/` directory contains the rule-detail files —
107+
loaded lazily as the workflow progresses
108+
4. The `aidlc-common` skill provides cross-cutting rules (terminology,
109+
question formatting, error handling) referenced throughout
110+
5. Extension skills (`aidlc-security-baseline`, `aidlc-property-testing`) are
111+
loaded only when the user opts in during Requirements Analysis
112+
113+
All rule content is bundled with the plugin — no workspace file copies
114+
required.
115+
116+
## Contributing
117+
118+
Do not edit files in this directory directly. Edit the canonical source in
119+
`aidlc-rules/` at the repository root, then regenerate:
120+
121+
```bash
122+
python scripts/build-cc-plugin.py
123+
```
124+
125+
CI (`plugin-sync` job) runs the generator on every PR and fails if the
126+
committed output drifts from the source.
127+
128+
## Structure
129+
130+
```text
131+
plugins/claude-code-aidlc/
132+
├── .claude-plugin/
133+
│ └── plugin.json # Plugin manifest (name, version, metadata)
134+
├── agents/
135+
│ └── aidlc-orchestrator.md # Orchestrator agent definition
136+
├── commands/
137+
│ ├── aidlc.md # /aidlc entry command
138+
│ ├── aidlc-inception.md # /aidlc:inception
139+
│ ├── aidlc-construction.md # /aidlc:construction
140+
│ └── aidlc-operations.md # /aidlc:operations
141+
└── skills/
142+
├── aidlc-core-workflow/
143+
├── aidlc-inception/
144+
├── aidlc-construction/
145+
├── aidlc-operations/
146+
├── aidlc-common/
147+
├── aidlc-security-baseline/
148+
└── aidlc-property-testing/
149+
```
150+
151+
Each skill contains a `SKILL.md` and a `references/` subdirectory with the
152+
bundled rule-detail files.
153+
154+
## License
155+
156+
Apache-2.0 — see [LICENSE](../../LICENSE).

0 commit comments

Comments
 (0)