mcp tuning

This commit is contained in:
2026-04-01 13:29:41 +03:00
parent 586229a974
commit 1e46073dd6
19 changed files with 1324 additions and 28593 deletions

View File

@@ -12,7 +12,7 @@ You **MUST** consider the user input before proceeding (if not empty).
## Goal
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.
Identify inconsistencies, duplications, ambiguities, underspecified items, and decision-memory drift across the core artifacts (`spec.md`, `plan.md`, `tasks.md`, and ADR sources) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.
## Operating Constraints
@@ -29,6 +29,7 @@ Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --inclu
- SPEC = FEATURE_DIR/spec.md
- PLAN = FEATURE_DIR/plan.md
- TASKS = FEATURE_DIR/tasks.md
- ADR = `docs/architecture.md` and/or feature-local decision files when present
Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
@@ -37,7 +38,7 @@ For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot
Load only the minimal necessary context from each artifact:
**From spec.md:**
**From `spec.md`:**
- Overview/Context
- Functional Requirements
@@ -45,20 +46,29 @@ Load only the minimal necessary context from each artifact:
- User Stories
- Edge Cases (if present)
**From plan.md:**
**From `plan.md`:**
- Architecture/stack choices
- Data Model references
- Phases
- Technical constraints
- ADR references or emitted decisions
**From tasks.md:**
**From `tasks.md`:**
- Task IDs
- Descriptions
- Phase grouping
- Parallel markers [P]
- Referenced file paths
- Guardrail summaries derived from `@RATIONALE` / `@REJECTED`
**From ADR sources:**
- `[DEF:id:ADR]` nodes
- `@RATIONALE`
- `@REJECTED`
- `@RELATION`
**From constitution:**
@@ -73,6 +83,7 @@ Create internal representations (do not include raw artifacts in output):
- **User story/action inventory**: Discrete user actions with acceptance criteria
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
- **Decision-memory inventory**: ADR ids, accepted paths, rejected paths, and the tasks/contracts expected to inherit them
### 4. Detection Passes (Token-Efficient Analysis)
@@ -112,13 +123,21 @@ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder i
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
#### G. Decision-Memory Drift
- ADR exists in planning but has no downstream task guardrail
- Task carries a guardrail with no upstream ADR or plan rationale
- Task text accidentally schedules an ADR-rejected path
- Missing preventive `@RATIONALE` / `@REJECTED` summaries for known traps
- Rejected-path notes that contradict later plan or task language without explicit decision revision
### 5. Severity Assignment
Use this heuristic to prioritize findings:
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, missing blocking ADR, rejected path scheduled as work, or requirement with zero coverage that blocks baseline functionality
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion, ADR guardrail drift
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case, incomplete decision-memory propagation
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
### 6. Produce Compact Analysis Report
@@ -138,6 +157,11 @@ Output a Markdown report (no file writes) with the following structure:
| Requirement Key | Has Task? | Task IDs | Notes |
|-----------------|-----------|----------|-------|
**Decision Memory Summary Table:**
| ADR / Guardrail | Present in Plan | Propagated to Tasks | Rejected Path Protected | Notes |
|-----------------|-----------------|---------------------|-------------------------|-------|
**Constitution Alignment Issues:** (if any)
**Unmapped Tasks:** (if any)
@@ -150,6 +174,8 @@ Output a Markdown report (no file writes) with the following structure:
- Ambiguity Count
- Duplication Count
- Critical Issues Count
- ADR Count
- Guardrail Drift Count
### 7. Provide Next Actions
@@ -179,6 +205,7 @@ Ask the user: "Would you like me to suggest concrete remediation edits for the t
- **Prioritize constitution violations** (these are always CRITICAL)
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
- **Report zero issues gracefully** (emit success report with coverage statistics)
- **Treat missing ADR propagation as a real defect, not a documentation nit**
## Context