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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CODE_OF_CONDUCT.md @awslabs/aidlc-admins
CONTRIBUTING.md @awslabs/aidlc-admins
LICENSE @awslabs/aidlc-admins
README.md @awslabs/aidlc-admins
plugins/ @awslabs/aidlc-admins @awslabs/aidlc-maintainers
scripts/ @awslabs/aidlc-admins @awslabs/aidlc-maintainers

## Secure the CODEOWNERS file
Expand Down
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ documentation:
- '**/*.md'
- '!aidlc-rules/**'

plugin:
- changed-files:
- any-glob-to-any-file: 'plugins/**'

github:
- changed-files:
- any-glob-to-any-file: '.github/**'
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,22 @@ jobs:
- uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 #v23.0.0
with:
globs: "**/*.md"

plugin-sync:
name: Plugin Sync Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Regenerate plugins (Claude Code + Cursor)
run: python scripts/build-plugins.py
- name: Check for drift
run: |
if ! git diff --exit-code plugins/; then
echo "::error::Plugin output is out of sync with aidlc-rules/. Run 'python scripts/build-plugins.py' and commit the result."
exit 1
fi
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ aidlc-rules/
├── construction/ # Design and implementation rules
├── extensions/ # Optional cross-cutting constraint rules
└── operations/ # Deployment and monitoring rules
plugins/claude-code-aidlc/ # Claude Code plugin (GENERATED — do not edit directly)
plugins/cursor-aidlc/ # Cursor rules bundle (GENERATED — do not edit directly)
scripts/build-plugins.py # Generator: aidlc-rules/ → plugins/{claude-code,cursor}-aidlc/
scripts/aidlc-evaluator/ # Python evaluation framework (uv-managed)
docs/
├── ADMINISTRATIVE_GUIDE.md # CI/CD, workflows, secrets, release process
Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ aidlc-rules/
└── operations/
```

### Generated Plugins — Do Not Edit Directly

The `plugins/` directory contains generated plugin packages for Claude Code
(`plugins/claude-code-aidlc/`) and Cursor (`plugins/cursor-aidlc/`). Both are
produced by `scripts/build-plugins.py` from the canonical `aidlc-rules/`
source. Do not edit files in `plugins/` directly — your changes will be
overwritten and CI will reject the PR.

To update plugin content:

1. Edit the source files in `aidlc-rules/`
2. Run `python scripts/build-plugins.py` to regenerate both plugins
3. Commit both the source changes and the regenerated plugin output

To build only one target during development:

```bash
python scripts/build-plugins.py --target cc # Claude Code only
python scripts/build-plugins.py --target cursor # Cursor only
```

CI runs the generator and checks `git diff --exit-code plugins/` — if the committed output doesn't match the regenerated result, the PR fails.

### Rule Structure

Rules are organized by phase:
Expand Down
50 changes: 42 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,31 @@ To verify the rules are loaded:

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

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.
#### Option 1: Copy Generated Rules (Recommended)

Copy the pre-built `.mdc` rules from this repository into your project:

```bash
# From a clone of this repo, at the repo root:
mkdir -p /path/to/your/project/.cursor/rules
cp -R plugins/cursor-aidlc/rules/* /path/to/your/project/.cursor/rules/
```

#### Option 1: Project Rules (Recommended)
Open the project in Cursor — it picks up the rules automatically. The
`aidlc-orchestrator.mdc` rule is set to `alwaysApply: true`, so it loads
on every interaction. Just describe your task and the orchestrator routes
to the appropriate phase rules.

See `plugins/cursor-aidlc/README.md` for details on the generated rule
structure and alternative install methods (Remote Rules via GitHub).

> **Note:** If you previously set up AI-DLC manually (Option 2 below),
> remove the manual `.cursor/rules/ai-dlc-workflow.mdc` and the
> `.aidlc-rule-details/` directory to avoid duplicate context.

#### Option 2: Project Rules (Manual, from Zip)

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.

**Unix/Linux/macOS:**

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

#### Option 2: AGENTS.md (Simple Alternative)
#### Option 3: AGENTS.md (Simple Alternative)

**Unix/Linux/macOS:**

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

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

**Directory Structure (Option 1):**
**Directory Structure (Option 2):**

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

### Claude Code

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

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.
Install AI-DLC as a Claude Code plugin — no file copying, no `CLAUDE.md` overwrite, and versioned updates:

```bash
claude plugin install --from https://github.com/awslabs/aidlc-workflows/tree/main/plugins/claude-code-aidlc
```

#### Option 1: Project Root (Recommended)
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`.

> **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.

#### Option 2: Project Root (Manual)

AI-DLC can also be set up manually using Claude Code's project memory file (`CLAUDE.md`).

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.

**Unix/Linux/macOS:**

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

#### Option 2: .claude Directory
#### Option 3: .claude Directory (Manual)

**Unix/Linux/macOS:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
```

### Implementation Pattern
```markdown
````markdown
## Workflow Visualization

### Mermaid Diagram (if syntax valid)
Expand All @@ -53,6 +53,7 @@ Phase 1: INCEPTION
- Stage 2: Requirements Analysis (COMPLETED)
[continue with text representation]
```
````

## General Content Validation

Expand Down
2 changes: 1 addition & 1 deletion aidlc-rules/aws-aidlc-rule-details/common/terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Examples (these are internal sub-steps within a single stage, not separate stage

### Plans
Documents with checkboxes and questions that guide execution.
- Located in `aidlc-docs/plans/`
- Located in phase-specific plan directories such as `aidlc-docs/inception/plans/` and `aidlc-docs/construction/plans/`
- Examples: `story-generation-plan.md`, `unit-of-work-plan.md`

### Artifacts
Expand Down
25 changes: 25 additions & 0 deletions aidlc-rules/aws-aidlc-rules/core-workflow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# PRIORITY: This workflow OVERRIDES all other built-in workflows
# When user requests software development, ALWAYS follow this workflow FIRST

## MANDATORY: Pre-Flight Hard Gate (Execute Before ANY Substantive Response)

**CRITICAL**: On the FIRST turn of any AI-DLC workflow request, you MUST complete every item below BEFORE producing any plan, code, recommendation, or other substantive output. Failing to complete a pre-flight item is a bug in your behavior, not a permissible shortcut.

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).
5. **Scan `extensions/` for opt-in files** per the "MANDATORY: Extensions Loading" section below. Do NOT load full extension rule files yet.
6. **Check for session state**: Read `aidlc-docs/aidlc-state.md` if it exists. If present, follow `common/session-continuity.md` to resume. If absent, initialize it during Workspace Detection.
7. **Execute Workspace Detection stage** (ALWAYS EXECUTE — see stage definition below).

**Hard stop rule**: If you cannot complete a pre-flight item (e.g., missing file, unresolvable path), STOP, report the specific failure to the user, and do not proceed with their requested work. Do not substitute, simplify, or skip.

## Adaptive Depth vs. Mandatory Steps

**The workflow is adaptive in DEPTH (minimal / standard / comprehensive), NOT in mandatory steps.**

- Stages marked ALWAYS EXECUTE run on every workflow. Their depth varies; their existence does not.
- Stages marked MANDATORY in any sub-section run regardless of perceived task simplicity.
- Compressing Inception + Construction + Operations into a single informal chat exchange is a violation.
- Rolling multiple stages under one approval is a violation — each stage requires its own completion message and its own approval.
- Asking clarifying questions in freeform chat instead of a question file (per `common/question-format-guide.md`) is a violation.
- "The task is small" is not a valid reason to skip MANDATORY items. It IS a valid reason to choose minimal depth within each stage.

## Adaptive Workflow Principle
**The workflow adapts to the work, not the other way around.**

Expand Down
7 changes: 7 additions & 0 deletions plugins/claude-code-aidlc/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "aidlc",
"version": "0.1.8",
"description": "AI-Driven Development Life Cycle \u2014 structured adaptive workflow for software development with AI coding agents",
"repository": "https://github.com/awslabs/aidlc-workflows",
"license": "Apache-2.0"
}
33 changes: 33 additions & 0 deletions plugins/claude-code-aidlc/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# markdownlint overrides for aidlc-rules/ (LLM prompt files)
# These rules are temporarily disabled pending incremental remediation.
# Each rule is re-enabled in a separate PR after fixing its violations.
# See PR #159 for the full remediation plan ordered by LLM prompt impact.

config:
# --- Tier 1: Zero prompt impact (invisible whitespace) ---
MD009: false # no-trailing-spaces (9 violations)
MD012: false # no-multiple-blanks (2 violations)
MD047: false # single-trailing-newline (4 violations)

# --- Tier 2: Zero prompt impact (formatting normalization) ---
MD029: false # ol-prefix (1 violation)
MD026: false # no-trailing-punctuation (17 violations)

# --- Tier 3: Zero prompt impact (blank line structure) ---
MD022: false # blanks-around-headings (274 violations)
MD032: false # blanks-around-lists (426 violations)
MD031: false # blanks-around-fences (31 violations)

# --- Tier 4: Minimal prompt impact (table/URL formatting) ---
MD060: false # table-column-style (34 violations)

# --- Tier 5: Low prompt impact (structural cosmetic) ---
MD046: false # code-block-style (8 violations)
MD007: false # ul-indent (34 violations)

# --- Tier 6: Needs review (adds content or changes structure) ---
MD040: false # fenced-code-language (18 violations)
MD025: false # single-title (13 violations)

# --- Plugin-specific overrides ---
MD041: false # first-line-heading — plugin files use YAML frontmatter
Loading