Skip to content

Commit 58b24b9

Browse files
committed
feat: add preflight quality audit rule document
Add new "preflight" protocol for multi-dimensional quality audits of plans, requirements, and artifacts before execution. Updates README with documentation including trigger keywords, usage examples, scope variants, aliases, and pipeline integration as a quality gate step. Bumps curated rule document count from 11 to 12.
1 parent 76109e1 commit 58b24b9

3 files changed

Lines changed: 69 additions & 4 deletions

File tree

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server providing AI coding agents with universal, l
44

55
## What It Does
66

7-
**codeops-mcp** bundles 11 curated rule documents that teach AI agents how to code, test, plan, commit, gather requirements, reverse-engineer codebases, create technical documentation, upgrade outdated artifacts, disambiguate designs, and behave — across any programming language and project type. It exposes these rules via 5 MCP tools.
7+
**codeops-mcp** bundles 12 curated rule documents that teach AI agents how to code, test, plan, commit, gather requirements, reverse-engineer codebases, create technical documentation, upgrade outdated artifacts, disambiguate designs, run preflight reviews, and behave — across any programming language and project type. It exposes these rules via 5 MCP tools.
88

99
### Rule Documents
1010

@@ -19,6 +19,7 @@ MCP (Model Context Protocol) server providing AI coding agents with universal, l
1919
| **techdocs** | Technical architecture documentation protocol (`make_techdocs`) |
2020
| **upgrade_plan** | Upgrade outdated plans and requirements to current standards |
2121
| **grill_me** | Deep disambiguation protocol — relentless interview before planning or requirements |
22+
| **preflight** | Multi-dimensional quality audit for plans, requirements, and artifacts (`preflight`) |
2223
| **agents** | Mandatory AI agent behavior: compliance, context management, multi-session execution |
2324
| **project-template** | Template for `.clinerules/project.md` — project-specific toolchain configuration |
2425

@@ -120,6 +121,7 @@ codeops-mcp defines **trigger keywords** — when you type these phrases, the AI
120121
| `upgrade_plan [name]` | Upgrades an outdated plan to current CodeOps standards |
121122
| `upgrade_requirements` | Upgrades outdated requirements to current CodeOps standards |
122123
| `grill_me` | Relentless interview to eliminate ambiguity before planning or requirements |
124+
| `preflight <artifact>` | Multi-dimensional quality audit — iterates until artifact passes clean |
123125
| `gitcm` | Stages all changes and commits with a detailed conventional commit message |
124126
| `gitcmp` | Same as `gitcm` plus rebase and push |
125127

@@ -159,6 +161,14 @@ The protocols form a complete development pipeline:
159161
│ grill_me → make_requirements → make_plan → exec_plan │
160162
│ grill_me (standalone deep-dive) │
161163
└──────────────────────────────────────────────────────────────────┘
164+
165+
┌──────────────────────────────────────────────────────────────────┐
166+
│ QUALITY GATE (review artifacts before execution) │
167+
│ │
168+
│ make_plan → preflight [feature] → exec_plan │
169+
│ make_requirements → preflight requirements → make_plan │
170+
│ preflight (standalone audit of any artifact) │
171+
└──────────────────────────────────────────────────────────────────┘
162172
```
163173

164174
You can use any part of the pipeline independently — they're designed to work together but none requires the others.
@@ -448,6 +458,51 @@ Agent: [Transitions to make_plan with Phase 1.1 already complete]
448458

449459
---
450460

461+
### Preflight Review (`preflight`)
462+
463+
Run a rigorous multi-dimensional quality audit on any plan, requirement set, or artifact — grounded in the actual codebase.
464+
465+
**Example:**
466+
467+
```
468+
User: preflight jwt-auth
469+
470+
Agent: [Reads all plan documents in plans/jwt-auth/, then systematically audits:]
471+
472+
Dimension 1: Codebase Grounding
473+
— Verifies every file reference, import, and component actually exists
474+
— Checks that assumed patterns match what the code actually uses
475+
476+
Dimension 2: Completeness & Coverage
477+
— Finds missing error handling, edge cases, rollback steps
478+
479+
Dimension 3: Internal Consistency
480+
— Cross-checks claims between documents for contradictions
481+
482+
Dimension 4: Feasibility & Risk
483+
— Identifies technical risks, dependency conflicts, performance concerns
484+
485+
Dimension 5: Clarity & Actionability
486+
— Flags vague language, ambiguous terms, missing acceptance criteria
487+
488+
Output: Findings report with severity ratings, options analysis for each
489+
finding, and recommendations. Iterates until clean pass.
490+
```
491+
492+
**Scope variants:**
493+
494+
```
495+
preflight requirements # Audit all requirement documents
496+
preflight requirements RD-03 # Audit a specific requirement document
497+
preflight jwt-auth 03-api-design # Audit a specific plan document
498+
preflight src/auth/ # Audit any file or directory
499+
preflight --continue # Resume an interrupted session
500+
```
501+
502+
**Aliases:** `pre-flight`, `pre_flight`, `flight-check`, `quality-audit`, `review-gate`, `audit`
503+
504+
---
505+
451506
### Project Configuration (`analyze_project`)
452507

453508
Auto-detect your project's toolchain and generate a configuration file:
@@ -506,7 +561,7 @@ src/
506561
└── __tests__/
507562
├── store/ # Store & search engine tests
508563
└── tools/ # Tool integration tests
509-
docs/ # 11 bundled rule markdown files
564+
docs/ # 12 bundled rule markdown files
510565
```
511566

512567
## License

src/__tests__/tools/analyze-project-merge.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,17 @@ No special rules — this is an MCP server project.
152152
153153
The generic rule files that read this \`project.md\`:
154154
155-
- **make_plan.md** — Uses verify command, file paths, commit scope
155+
- **make_plan.md** — Uses verify command, file paths, commit scope, task file path patterns
156156
- **code.md** — Uses language conventions, architecture rules
157157
- **testing.md** — Uses test commands, test locations, test framework
158158
- **git-commands.md** — Uses commit scope, verify command
159159
- **agents.md** — Uses shell commands, verify command
160-
- **plans.md** — Uses task file path patterns`;
160+
- **requirements.md** — Uses project type, tech stack, and conventions for requirements discovery
161+
- **retro_requirements.md** — Uses project type, tech stack for codebase analysis adaptation
162+
- **techdocs.md** — Uses project type, tech stack for documentation generation
163+
- **upgrade_plan.md** — Uses project context for upgrade compatibility checks
164+
- **grill_me.md** — Uses project context for deep disambiguation before planning or requirements
165+
- **preflight.md** — Uses project type, tech stack, and conventions for grounded quality audits`;
161166

162167
/** A project.md with user-customized description */
163168
const FIXTURE_WITH_CUSTOM_DESCRIPTION = FIXTURE_FULL_PROJECT_MD.replace(

src/tools/analyze-project.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,12 @@ function formatProjectMd(analysis: ProjectAnalysis): string {
592592
parts.push('- **testing.md** — Uses test commands, test locations, test framework');
593593
parts.push('- **git-commands.md** — Uses commit scope, verify command');
594594
parts.push('- **agents.md** — Uses shell commands, verify command');
595+
parts.push('- **requirements.md** — Uses project type, tech stack, and conventions for requirements discovery');
596+
parts.push('- **retro_requirements.md** — Uses project type, tech stack for codebase analysis adaptation');
597+
parts.push('- **techdocs.md** — Uses project type, tech stack for documentation generation');
598+
parts.push('- **upgrade_plan.md** — Uses project context for upgrade compatibility checks');
595599
parts.push('- **grill_me.md** — Uses project context for deep disambiguation before planning or requirements');
600+
parts.push('- **preflight.md** — Uses project type, tech stack, and conventions for grounded quality audits');
596601

597602
return parts.join('\n');
598603
}

0 commit comments

Comments
 (0)