con un clic
plan-cross-wp-validation
Cross-WP consistency check, config schemas
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-WP consistency check, config schemas
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.
Test failure diagnosis, source code fixes, and regression detection
Environment verification, dependency installation, baseline test verification
Contract-first single-task implementation dispatched by Coder Coordinator
Integration test writing for component boundaries and external dependencies
Unit test writing and execution with coverage threshold enforcement
API reference documentation skill. Produces and updates API endpoint documentation from contract files in .sdd/docs/api-reference.md.
Basado en la clasificación ocupacional SOC
| name | plan-cross-wp-validation |
| description | Cross-WP consistency check, config schemas |
| argument-hint | Invoked by Planner Coordinator - do not call directly |
Phase: 2 (Contract Generation -- runs last) Common contract:
.github/skills/PLAN-SKILL-CONTRACT.mdSpec refs: FR-051, FR-052, FR-053, FR-054
This skill is dispatched by the Planner Coordinator as the final Phase 2 skill. It reads ALL plan files and ALL contract files generated by earlier skills, performs a 7-point consistency audit, generates a shared configuration schema, fixes any inconsistencies, and verifies 100% spec artifact coverage.
| # | Input | Description |
|---|---|---|
| 1 | skill_path | Path to this SKILL.md file |
| 2 | plan_dir | Path to .sdd/plans/ directory |
| 3 | contracts_dir | Path to .sdd/plans/contracts/ directory |
| 4 | spec_path | Path to the source spec file |
| 5 | spec_artifacts_dir | Path to spec companion artifacts |
| 6 | research_summary | Key findings from the research phase |
| 7 | target_language | Programming language for contract generation |
| 8 | patterns | Active plan-domain patterns to avoid |
| 9 | phase | Phase indicator (always 2 for this skill) |
contracts_dirspec_artifacts_dir. Read multiple independent files in parallel via concurrent tool calls.This skill requires the broadest read scope of any plan skill:
plan_dir/README.md and all plan_dir/WP*.md filescontracts_dir/ (per-WP and shared directories)spec_pathspec_artifacts_dir/ (interfaces, data-schemas, api-contracts, state-machines, error-catalog)Perform each check and collect findings. For each finding, record:
For each entity that appears in data-schemas across multiple WPs:
Example inconsistency: WP01 defines userId: string but WP03 uses userId: number. Fix: use the spec's canonical type.
For each endpoint or interface referenced across multiple WPs:
Example inconsistency: WP02 defines POST /api/orders expecting { userId: string } but WP04 sends { user_id: string }. Fix: use the spec's canonical field name.
Depends on fieldsDepends on reference is a valid WP ID (not a typo, not a non-existent WP)Parallelisable: Yes, verify they do not share mutable state:
Scan all WP files and contract files for environment variables and config keys:
process.env.DATABASE_URL, os.environ['DATABASE_URL'])Spec refs from all tasks across all WPscontracts_dir/After completing the consistency audit, aggregate all environment variables and config keys into a shared config schema:
Write <contracts_dir>/shared/config-schema.<ext>:
// Generated by: plan-cross-wp-validation skill
// Source spec: <spec_path>
// Work package: shared
// Target language: <target_language>
// DO NOT EDIT MANUALLY -- regenerated on plan revision
// TypeScript example
export interface AppConfig {
DATABASE_URL: string; // PostgreSQL connection string
JWT_SECRET: string; // JWT signing secret (min 32 chars)
PORT: number; // HTTP server port (default: 3000)
LOG_LEVEL: 'debug' | 'info' | 'warn' | 'error'; // (default: 'info')
REDIS_URL?: string; // Redis connection string (optional)
}
export const CONFIG_DEFAULTS: Partial<AppConfig> = {
PORT: 3000,
LOG_LEVEL: 'info',
};
export const CONFIG_VALIDATION = {
DATABASE_URL: { type: 'string', required: true, format: 'uri' },
JWT_SECRET: { type: 'string', required: true, minLength: 32 },
PORT: { type: 'number', required: false, default: 3000, min: 1, max: 65535 },
LOG_LEVEL: { type: 'string', required: false, default: 'info', enum: ['debug', 'info', 'warn', 'error'] },
REDIS_URL: { type: 'string', required: false, format: 'uri' },
} as const;
# Python example
from pydantic import BaseModel, Field
from typing import Literal, Optional
class AppConfig(BaseModel):
DATABASE_URL: str = Field(..., description='PostgreSQL connection string')
JWT_SECRET: str = Field(..., min_length=32, description='JWT signing secret')
PORT: int = Field(3000, ge=1, le=65535, description='HTTP server port')
LOG_LEVEL: Literal['debug', 'info', 'warn', 'error'] = Field('info', description='Log level')
REDIS_URL: Optional[str] = Field(None, description='Redis connection string')
Each config entry MUST include:
For each finding from Step 2:
[CONSISTENCY FIX] marker per FR-027 when modifying existing filesDo NOT fix by removing content -- always fix by correcting to the canonical value.
Update <plan_dir>/README.md with a "Consistency Notes" section:
## Consistency Notes
Cross-WP consistency audit performed by plan-cross-wp-validation. Findings:
- **Data contracts**: [summary of findings and corrections]
- **API/Interface contracts**: [summary]
- **Dependency integrity**: [summary]
- **Configuration**: [summary]
- **Test consistency**: [summary]
- **Spec traceability**: [summary - X orphan FRs found and assigned, Y duplicate assignments resolved]
- **Contract-to-task alignment**: [summary - X orphan contracts, Y missing contracts]
### Corrections Applied
| # | Category | Files Affected | What Changed |
|---|----------|---------------|--------------|
| 1 | Data contract | WP03/data-schemas.ts | Changed userId type from number to string per spec |
| 2 | Config | WP01.md, WP03.md | Unified PORT default to 3000 |
If no inconsistencies are found, state it explicitly:
## Consistency Notes
Cross-WP consistency audit performed. No inconsistencies found across all 7 checks.
Compare spec companion artifacts against generated contract files:
spec_artifacts_dir/data-schemas.<ext> must appear in at least one WP's data-schemas.<ext>spec_artifacts_dir/api-contracts.<ext> must appear in at least one WP's api-contracts.<ext>spec_artifacts_dir/error-catalog.<ext> must appear in at least one WP's error-catalog.<ext>spec_artifacts_dir/state-machines.<ext> must appear in at least one WP's state-machines.<ext>spec_artifacts_dir/interfaces.<ext> must appear in at least one WP's interfaces.<ext>Output a coverage matrix:
### Spec Artifact Coverage
| Artifact Type | Spec Count | Plan Count | Coverage |
|--------------|-----------|-----------|----------|
| Entities | 5 | 5 | 100% |
| Endpoints | 10 | 10 | 100% |
| Error codes | 15 | 15 | 100% |
| State machines | 2 | 2 | 100% |
| Interfaces | 8 | 8 | 100% |
**Overall**: 100% coverage
If coverage is below 100%, list the missing items and flag them for resolution.
If spec companion artifacts do not exist (spec was prose-only), note it and skip coverage verification:
### Spec Artifact Coverage
No companion artifacts found at `<spec_artifacts_dir>`. Coverage verification skipped.
Plan contracts were generated from spec prose (see individual skill outputs).
[CONSISTENCY FIX] marker when modifying existing files (FR-027)contracts/shared/, not to individual WP directories