Skip to content

feat: add Claude Code and Cursor plugins for AIDLC methodology#222

Open
rsmets wants to merge 3 commits into
awslabs:mainfrom
rsmets:main
Open

feat: add Claude Code and Cursor plugins for AIDLC methodology#222
rsmets wants to merge 3 commits into
awslabs:mainfrom
rsmets:main

Conversation

@rsmets
Copy link
Copy Markdown

@rsmets rsmets commented Apr 28, 2026

Summary

Add native plugin packages for Claude Code and Cursor so users can install the AIDLC methodology in one step instead of manually downloading a zip, copying rule files, and overwriting their project config. Both packages are generated from the canonical aidlc-rules/ source by a single stdlib-only Python script, and CI enforces zero drift between source and generated output.

Changes

New files

  • scripts/build-plugins.py — generator script (stdlib-only Python, no dependencies) that reads aidlc-rules/ and produces both plugin packages. Supports --target cc|cursor|all for building independently.

  • plugins/claude-code-aidlc/ (44 files) — Claude Code plugin with:

    Component Count Description
    Orchestrator agent 1 Drives the three-phase workflow, detects phase from workspace
    Slash commands 4 /aidlc, /aidlc:inception, /aidlc:construction, /aidlc:operations
    Skills 7 Core workflow, 3 phase skills, common rules, 2 opt-in extensions
    Bundled rule references 29 Byte-identical copies of canonical rule-detail files
  • plugins/cursor-aidlc/ (33 files) — Cursor .mdc rule bundle with:

    Component Detail
    Orchestrator rule alwaysApply: true — loaded on every interaction
    Core workflow rule Cursor-specific path-resolution transform
    Phase/common/extension rules 29 .mdc files with Agent Requested frontmatter (description-only)

Modified files

  • .github/workflows/ci.yml — added plugin-sync job that regenerates both plugins and fails via git diff --exit-code if committed output is stale
  • .github/labeler.yml — added plugin label for plugins/**
  • .github/CODEOWNERS — added plugins/ ownership (@awslabs/aidlc-admins @awslabs/aidlc-maintainers)
  • AGENTS.md — added both plugin directories and the generator script to the repo structure section
  • README.md — added recommended plugin-based install paths for both Claude Code (Option 1) and Cursor (Option 1), demoting the manual zip-and-copy instructions to Option 2/3
  • CONTRIBUTING.md — added section explaining that plugins/ is generated content and must not be edited directly

How the generator works

  1. Reads aidlc-rules/VERSION and stamps it into both plugin packages
  2. For Claude Code: copies rule-detail files into skills/*/references/ directories; emits orchestrator agent, commands, and SKILL.md files from embedded templates
  3. For Cursor: wraps each rule-detail file in .mdc frontmatter with a description tuned for Cursor's Agent Requested mechanism; emits an orchestrator rule with alwaysApply: true
  4. Transforms core-workflow.md path-resolution differently for each target (plugin skill references in CC, sibling rule paths in Cursor)
  5. Copies the aidlc-rules/.markdownlint-cli2.yaml overrides into each plugin directory so generated content passes the repo's markdown linter

User experience

Before

Claude Code: Download zip → extract → cp core-workflow.md ./CLAUDE.md (overwrites existing config) → cp -R aws-aidlc-rule-details/ .aidlc-rule-details/ (pollutes workspace). No update path.

Cursor: Download zip → extract → create frontmatter wrapper → cat rule into .mdc file → copy rule-details. Multi-step, error-prone.

After

Claude Code (local development):

claude --plugin-dir ./plugins/claude-code-aidlc

Then /aidlc to start the workflow.

Cursor (recommended):

cp -R plugins/cursor-aidlc/rules/* /path/to/project/.cursor/rules/

Open the project — the orchestrator rule loads automatically.

Both paths preserve the user's existing project config and keep methodology files out of the workspace root.

Checklist

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Test Plan

  • Run python scripts/build-plugins.py && git diff --exit-code plugins/ — confirms idempotent generation for both plugins
  • Run python scripts/build-plugins.py --target cc — produces only plugins/claude-code-aidlc/
  • Run python scripts/build-plugins.py --target cursor — produces only plugins/cursor-aidlc/
  • Run npx markdownlint-cli2 "plugins/**/*.md" — all generated markdown passes lint
  • Verify plugins/claude-code-aidlc/.claude-plugin/plugin.json version matches aidlc-rules/VERSION
  • Verify Cursor .mdc files have correct frontmatter (alwaysApply: true only on orchestrator; all others have description set, alwaysApply: false)
  • Install CC plugin locally with claude --plugin-dir ./plugins/claude-code-aidlc and run /aidlc — welcome message appears
  • Copy Cursor rules into a project's .cursor/rules/ and verify the orchestrator activates in Cursor
  • Verify CI plugin-sync job passes

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

* 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>
@rsmets rsmets requested a review from a team as a code owner April 28, 2026 22:13
@github-actions github-actions Bot added documentation Improvements or additions to documentation github labels Apr 28, 2026
@rsmets rsmets changed the title feat: add Claude Code and Cursor plugins for AIDLC methodology (#1) feat: add Claude Code and Cursor plugins for AIDLC methodology Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class, generated plugin bundles for the AI-DLC methodology (Claude Code + Cursor) and wires CI/docs to make plugins the recommended installation path while preventing drift from aidlc-rules/.

Changes:

  • Introduces scripts/build-plugins.py to generate both plugin targets from aidlc-rules/.
  • Adds generated plugin outputs under plugins/claude-code-aidlc/ and plugins/cursor-aidlc/.
  • Updates CI and docs to recommend plugins and enforce plugin/source synchronization.

Reviewed changes

Copilot reviewed 85 out of 85 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
scripts/build-plugins.py Generator that produces Claude Code + Cursor plugin artifacts from aidlc-rules/.
plugins/claude-code-aidlc/** Generated Claude Code plugin (agents/commands/skills/references/manifest/docs).
plugins/cursor-aidlc/** Generated Cursor .mdc rules bundle + docs + markdownlint overrides.
.github/workflows/ci.yml Adds plugin-sync job to regenerate plugins and fail on drift.
.github/labeler.yml Adds plugin label targeting plugins/**.
.github/CODEOWNERS Adds ownership for plugins/.
README.md Promotes plugin-based install paths for Cursor and Claude Code.
CONTRIBUTING.md Documents that plugins/ is generated and how to regenerate.
AGENTS.md Updates repo structure to include plugins and generator script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/build-plugins.py
Comment thread plugins/claude-code-aidlc/README.md Outdated
Comment thread plugins/cursor-aidlc/README.md Outdated
Comment thread plugins/cursor-aidlc/rules/common/terminology.mdc
Comment thread scripts/build-plugins.py
Comment thread plugins/claude-code-aidlc/README.md
Comment thread plugins/cursor-aidlc/rules/common/content-validation.mdc
Comment thread plugins/claude-code-aidlc/skills/aidlc-common/references/common/terminology.md Outdated
The orchestrator agents previously used descriptive language ("guide the
user", numbered how-to steps) that the LLM could rationalize away when
a task seemed simple. In practice this led to agents skipping the
welcome message, audit.md, aidlc-state.md, Workspace Detection, and
per-stage approvals while still claiming the work was AIDLC-driven.

This change replaces descriptive language with enforcement language and
adds explicit violation callouts:

- core-workflow.md: add a Pre-Flight Hard Gate block at the top of the
  authoritative rules file with 7 required actions before any substantive
  response; add an "Adaptive Depth vs. Mandatory Steps" clause clarifying
  that the workflow is adaptive in depth, not in mandatory steps.
- Claude Code orchestrator agent: rewrite with a First-Turn Hard Gate,
  per-stage approval gate, question-format gate, continuous audit-trail
  requirements, self-audit checklist, and an enumerated "What Counts as
  a Violation" list targeting each specific failure mode.
- Cursor orchestrator rule: apply the same enforcement text, adapted to
  .mdc sibling-rule references.
- build-plugins.py: regenerate both plugins with the new orchestrator
  text and the updated core-workflow.md.

Adaptive depth (minimal / standard / comprehensive) is preserved. What
is no longer permitted is skipping stages, rolling multiple stages under
one approval, or asking clarifying questions in chat instead of question
files.

Co-authored-by: Ray Smets <rsmets@amazon.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@rsmets rsmets requested a review from a team as a code owner April 28, 2026 23:01
@github-actions github-actions Bot added the rules label Apr 28, 2026
- Correct generator script name references (build-cc-plugin.py → build-plugins.py)
- Fix glossary plan paths to match actual phase-specific locations
- Escape nested mermaid fence in content-validation example
- Update Cursor README orchestrator path to .cursor/rules/ prefix

Canonical sources updated; plugins regenerated via scripts/build-plugins.py.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 88 out of 88 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


**Adaptive Phase**: Always executes. Detail level adapts to problem complexity.

**See [depth-levels.md](../common/depth-levels.md) for adaptive depth explanation**
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file links to ../common/depth-levels.md, but the Cursor bundle ships ../common/depth-levels.mdc. As written, a consumer (or the agent following instructions) will try to open a nonexistent file. Update the link (and ideally the generator) to reference the .mdc filename (or use extensionless links) consistently across the Cursor rules.

Copilot uses AI. Check for mistakes.

## Step 4: Note Adaptive Detail

**See [depth-levels.md](../common/depth-levels.md) for adaptive depth explanation**
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file links to ../common/depth-levels.md, but the Cursor rule bundle contains ../common/depth-levels.mdc. Adjust the link (and generator rewrite rules if applicable) so the referenced file name matches what’s actually generated, otherwise the workflow instructions point to a missing file.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +24
1. **LOAD** `common/ascii-diagram-standards.md`
2. **VALIDATE** each diagram:
- Count characters per line (all lines MUST be same width)
- Use ONLY: `+` `-` `|` `^` `v` `<` `>` and spaces
- NO Unicode box-drawing characters
- Spaces only (NO tabs)
3. **TEST** alignment by verifying box corners align vertically

**See `common/ascii-diagram-standards.md` for patterns and validation checklist.**
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions here reference common/ascii-diagram-standards.md, but in this Cursor bundle the rule file is common/ascii-diagram-standards.mdc. To avoid failed loads / broken references, update these file references (and the generator templates) to use the .mdc extension consistently for Cursor rules.

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +52
## Error Handling
If artifacts are missing or corrupted during session resumption, see [error-handling.md](error-handling.md) for guidance on recovery procedures. No newline at end of file
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error-handling reference/link uses error-handling.md, but the rule file shipped in this bundle is error-handling.mdc. Update the link/filename so it resolves correctly within the Cursor rules directory.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +16
1. **Create or append to `aidlc-docs/audit.md`**: Log the user's complete raw input with ISO-8601 timestamp per the format in the "Prompts Logging Requirements" section below. If the file does not exist, create it. NEVER overwrite; always append.
2. **Resolve the rule-details directory**: Probe the four paths listed under "MANDATORY: Rule Details Loading" below and record the resolved path in `audit.md`.
3. **Load common rules** from the resolved rule-details directory: `common/process-overview.md`, `common/session-continuity.md`, `common/content-validation.md`, `common/question-format-guide.md`.
4. **Display the welcome message** from `common/welcome-message.md` (first turn only — do not re-display on subsequent turns).
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this Cursor bundle the actual rule files are .mdc, but the pre-flight steps instruct loading common/*.md files. Even though a later note explains the mapping, this is easy to follow incorrectly and can lead to failed file loads. Prefer updating these references to the real .mdc filenames (or removing extensions entirely) so the instructions are self-consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +82
- Use the standardized 2-option completion message defined in the stage's
rule file. Do NOT invent 3-option menus.
- Log the approval prompt in `audit.md` BEFORE asking; log the user's
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section mandates a “standardized 2-option completion message” and forbids 3-option menus, but several stage templates in this same bundle explicitly include conditional third options (e.g., “Add User Stories” / “Add Units Generation”). Align the orchestrator guidance with the stage rule definitions (e.g., ‘use exactly the options defined by the current stage’s rule file’) to avoid contradictory instructions.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants