con un clic
spec-kitty-analyze
Cross-artifact consistency and quality analysis
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Cross-artifact consistency and quality analysis
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Validate an approved mission before merge
Interview and compile a project charter
Open the mission dashboard
Execute a work package implementation
Merge an accepted mission
Create an implementation plan
| name | spec-kitty.analyze |
| description | Cross-artifact consistency and quality analysis |
| user-invocable | true |
Run this at most once per active agent session before the first Spec Kitty command workflow.
If you already ran spec-kitty upgrade --agent-check --json in this session, reuse that result and skip this block.
Do not run or announce an upgrade check again for later Spec Kitty commands in the same session.
Otherwise, before continuing, run:
spec-kitty upgrade --agent-check --json
If JSON action is none, continue.
If action is auto_upgrade, run upgrade_command before continuing. If it fails, tell the user and continue with the current Spec Kitty version.
If action is guidance, show upgrade_note briefly, then continue.
If action is prompt, ask the user with the host-native question UI when available:
Spec Kitty {latest_version} is available. You are on {installed_version}. Upgrade now?
Use these choices:
upgrade_now, run upgrade_command, then continue.always, run upgrade_command, then continue.not_now, then continue.never_ask, then continue.Record the selected choice before continuing:
spec-kitty upgrade --agent-choice <upgrade_now|always|not_now|never_ask> --agent-latest <latest_version> --json
If no host-native question UI is available, present the same four choices in plain text and wait for the user.
In non-interactive hosts, choose not_now and continue.
The content of the user's message that invoked this skill (everything after the skill invocation token, e.g. after /spec-kitty.<command> or $spec-kitty.<command>) is the User Input referenced elsewhere in these instructions.
You MUST consider this user input before proceeding (if not empty).
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 /tasks has successfully produced a complete tasks.md.
NON-REMEDIATING: Do not modify spec.md, plan.md, tasks.md, WP files, source code, or any remediation target. The only permitted file mutation is persisting this command's report to kitty-specs/<mission>/analysis-report.md via spec-kitty agent mission record-analysis. Offer an optional remediation plan only after the report is persisted (user must explicitly approve before any follow-up editing commands would be invoked manually).
Charter Authority: The project charter (/charter/charter.md) is non-negotiable within this analysis scope. Charter conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit charter update outside /analyze.
Run spec-kitty agent mission check-prerequisites --json --include-tasks --mission <mission-slug> once from repo root and parse JSON for feature_dir, available_docs, target_branch, and base_branch. Derive absolute paths:
Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
Load only the minimal necessary context from each artifact:
From spec.md:
From plan.md:
From tasks.md:
From charter:
/charter/charter.md for principle validationCreate internal representations (do not include raw artifacts in output):
user-can-upload-file)Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
<placeholder>, etc.)Use this heuristic to prioritize findings:
The report MUST begin with a structured analysis-findings/v1 YAML frontmatter carrier, immediately followed by the human-readable Markdown body. The recorder computes the verdict and issue counts from this carrier only — report prose is presentation and is NEVER parsed for severity. Emit the carrier exactly in this shape:
---
schema: analysis-findings/v1
findings:
- id: A1 # stable finding id (same id used in the body table)
severity: high # one of: low | medium | high | critical (closed vocabulary; no other values)
category: coverage
summary: "One-line description of the finding."
counts: {critical: 0, high: 1, medium: 0, low: 0, info: 0} # MUST equal the findings[] tally per severity
verdict_hint: blocked # OPTIONAL author hint; the recorder COMPUTES the verdict — if your hint disagrees, recording FAILS LOUDLY
---
Carrier rules (binding — a violation makes record-analysis fail on the write path):
findings[].severity MUST be one of low, medium, high, critical. Any other value fails schema validation.counts per-severity values MUST equal the actual findings[] tally. info is a presentation-only bucket and never affects the verdict.high or critical finding → blocked; otherwise → ready. Do not rely on prose wording.verdict_hint, it MUST match the computed verdict, or recording fails loudly.findings: [] and counts: {critical: 0, high: 0, medium: 0, low: 0, info: 0} → verdict ready.After the closing ---, draft the Markdown body with the following structure:
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|---|---|---|---|---|---|
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
(Add one row per finding; generate stable IDs prefixed by category initial.)
Coverage Summary Table:
| Requirement Key | Has Task? | Task IDs | Notes |
|---|
Charter Alignment Issues: (if any)
Unmapped Tasks: (if any)
Metrics:
Save the Markdown report body to kitty-specs/<mission>/analysis-report.md by running the recorder with a temp report file outside the repository checkout:
spec-kitty agent mission record-analysis --mission <mission-slug> --input-file <path-to-temp-report.md> --json
If your host supports piping reliable multiline stdin, this equivalent form is acceptable:
spec-kitty agent mission record-analysis --mission <mission-slug> --input-file - --json
The report file you pass MUST start with the analysis-findings/v1 carrier from step 6. The recorder derives the verdict and counts from it; a malformed carrier (unknown severity, counts not matching the findings[] tally, or a disagreeing verdict_hint) makes the recorder fail loudly — fix the carrier and re-run.
Treat persistence failure as command failure. The command is not complete until the JSON response reports success and names analysis-report.md.
⚠️ Caution — Do not write
analysis-report.mddirectlyThe
analysis-findings/v1carrier (step 6) is the input format forrecord-analysis, not the persisted format.record-analysiswraps the carrier in the outer-wrapper format (artifact_type: spec-kitty.analysis-report) that the implement gate accepts.Writing
analysis-report.mddirectly — without piping throughrecord-analysis— leaves the file in carrier format, which the implement gate rejects withcarrier_format_not_wrapped. If this happens, recover by running:spec-kitty agent mission record-analysis --mission <mission-slug> --input-file analysis-report.md --json
At end of report, output a concise Next Actions block:
/implementAsk the user: "Should all of these findings be addressed before moving on to implementation? I can suggest concrete remediation edits for the findings you want to resolve." (Do NOT apply edits automatically.)
analysis-report.md persistence step(User's invocation context is provided in the User Input section above.)