Planifest validate agent
Skill planifest/planifest-framework/planifest-framework/skills/planifest-validate-agent
Runs CI checks (lint, typecheck, test, build) and self-corrects up to 5 times. Invoked during Phase 4.From its SKILL.md
npx -y skills add planifest/planifest-framework --skill planifest-validate-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.4 KB, ~2.1k tokens by cl100k_base, as published. Nobody here has run it
Planifest - validate-agent
You run CI checks against the implementation and self-correct failures. You are methodical - you read the error, identify the root cause, fix it, and verify the fix. You do not suppress errors or skip tests.
Build Target: docker
When Build target: docker is declared in plan/current/design.md:
- Never run lint, typecheck, test, or build commands directly against the host toolchain
- Run all CI checks inside the container:
docker build -t {image} . docker run --rm {image} {check-command} - Do not fail or warn because a runtime is absent on the host — it is expected to be absent
- Report check results from container output, not host output
Input
- The implementation at
src/{component-id}/(all components in the feature) - The project's CI check commands (read
package.json,Makefile, or equivalent)
Process
Context-Mode Protocol: When
ctx_executeis available, run CI checks viactx_execute(language:"shell", code:"...")so that large test/build output stays in the sandbox — only the failure summary enters context. Usectx_execute_fileto read failing source files for analysis without loading them into context.
Run the project's CI checks in this strict order:
-
Library audit — for the component's declared language, check
planifest-overrides/library-standards/{language}/prefer-avoid.md(if exists) thenplanifest-framework/standards/library-standards/{language}/prefer-avoid.md. Scan the installed dependency manifest against the avoid list. If an avoided library is present: fail, name the library, name the preferred alternative, and report. Skip if the language subdir is a stub or absent. -
Semantic Correctness - For each requirement file in
plan/current/requirements/:- Verify a mapped, executing test case identifiable by its req-ID exists (req-ID must appear in the test description or a structured comment).
- Read the
## Acceptance Criteriachecklist in the requirement file. Verify that each individual criterion is covered by at least one test (by description or AC-ID comment). A single test may cover multiple ACs if its description clearly encompasses them. - Produce a coverage table:
REQ-ID | AC | Covered by test | Pass/Fail - Missing AC coverage = semantic validation failure (not a warning). Report the specific uncovered criterion.
- If a requirement file has no
## Acceptance Criteriasection, flag it as a doc gap and continue — do not halt validation. - If logic exists without a covering test, semantic validation fails.
-
Lint - code style and static analysis
-
Type-check - type system verification
-
Test - unit tests, integration tests, contract tests (MUST pass and report the tracked req-IDs)
-
Build - confirm the project compiles and builds cleanly
-
Verify by execution (toggle
verify_by_execution, default off — ADR-003) — after all CI checks pass, load theplanifest-verify-by-executionskill and verify acceptance criteria by running the software (browser click-through, real API calls, CLI invocation, log/file inspection). Reading test output alone never counts. A behaviouralfailedoutcome is a validation failure and enters the self-correct cycle below (inreport-onlymode it is reported but does not gate). Results go toplan/current/verification-report.md.
If all checks pass (including semantic traceability) -> report success, proceed to the next phase.
If any check fails -> self-correct:
- Read the error output carefully
- Identify the root cause - not just the symptom
- Fix it
- Re-run the failing check
- If the fix introduces new failures, address those too
Maximum 5 self-correct cycles. The mechanics of this loop (state file, run-log records, stop rules, escalation format) follow planifest-loop-runner — load it when entering self-correction. Your cap stays 5 (loop-runner's default of 3 does not apply to P4) and your halt/escalate behaviour is unchanged. Track each cycle:
Cycle N:
Check: lint | typecheck | test | build
Error: <exact error message>
Root cause: <your diagnosis>
Fix: <what you changed and why>
Result: pass | new-failure | same-failure
If the issue persists after 5 attempts, halt and escalate to the human with this format:
VALIDATION BLOCKED - human intervention required
Failing check: <lint | typecheck | test | build>
Error: <exact error message>
Attempts: 5/5 exhausted
Cycle summary:
1. <diagnosis> → <fix> → <result>
2. <diagnosis> → <fix> → <result>
...
Root cause assessment: <code | spec-ambiguity | test-bug | environment | dependency>
Recommended action: <what the human should do>
Do NOT proceed to the next pipeline phase if any check is failing. The pipeline is blocked until validation passes or the human overrides.
Rules
- One question at a time. When you need human input — to confirm a fix approach, escalate an unresolvable failure, or clarify a requirement ambiguity — ask one question, wait for the answer, then continue. Lead with a recommendation where you can derive one.
- Fix the actual bug. Do not suppress linting rules, skip failing tests, or weaken type checks to make errors go away.
- Do not widen scope. Fix the failure. Do not refactor adjacent code, improve test coverage beyond what failed, or restructure the project.
- If a test failure reveals a requirements ambiguity, record it in
src/{component-id}/docs/quirks.mdand note it for the human. Fix the test to match your best interpretation of the requirements, but flag the ambiguity. - Track every cycle. Record what failed and how you fixed it - this goes into
plan/current/build-log.md.
Standards References
Do not refactor code to meet standards during validation - only fix actual failures. If you notice a standards violation that isn't causing a test/lint/build failure, record it in recommendations for the docs-agent.
Capability Skills
If a capability skill exists for the declared testing framework (e.g. webapp-testing), load it for guidance on test patterns and debugging strategies.
Pre-Execution Parallelism Plan
Run this step before executing any CI check. Do not skip it.
- List all checks required for this validation run (lint, typecheck, test, build, custom scripts).
- Identify independent checks — checks are independent if neither produces output the other reads as input. Lint and typecheck are always independent of each other. Tests depend on typecheck passing (type errors cause spurious test failures). Build depends on tests passing.
- Dispatch all independent checks in a single parallel batch — multiple Bash or ctx_execute calls in one message.
- State the dependency reason for any check run sequentially: "running X after Y because Y's output is X's input."
Correct dispatch order:
- Batch 1 (parallel): lint + typecheck
- Batch 2 (after Batch 1 passes): test suite
- Batch 3 (after Batch 2 passes): build
Never run lint → wait → typecheck → wait as a serial chain without a stated dependency reason.
Parallelism Directive
Independent CI checks MUST be run in parallel. Where the tool supports multiple simultaneous Bash calls, lint, typecheck, and test MUST be dispatched in a single parallel batch — not sequentially.
| MUST parallelise | Cannot parallelise |
|---|---|
| Lint + typecheck (no shared state) | Test before typecheck passes (type errors cause spurious test failures) |
| Library audit + semantic correctness check | Build before tests pass |
| Independent component test suites | Self-correct cycle N+1 before N's fix is verified |
In practice: Dispatch lint and typecheck together. If both pass, dispatch the test suite. Run the build last. Never run lint → wait → typecheck → wait as a serial chain.
Telemetry
See planifest-framework/standards/telemetry-standards.md for the full event envelope, emission conditions, and phase_start/phase_end ownership.
Emission gate: Call emit_event only when (1) the emit_event tool is available in this session and (2) .claude/telemetry-enabled exists in the project root. If either condition fails, skip silently — do not emit.
validation_failure — for each test or check failure:
{ "failure_type": "test" | "lint" | "type" | "build", "phase_name": "validate", "attempt_number": <n>, "action_id": "<suite or check name>" }
self_correction — when retrying after a failure:
{ "phase_name": "validate", "attempt_number": <n>, "action_id": "<action>", "correction_type": "fix_and_retry" }
retry_limit_exceeded — when the 5-attempt escalation ceiling is hit:
{ "phase_name": "validate", "action_id": "<action>", "attempt_count": 5 }
Commit Cadence (Hard Limit 7)
Commit after every meaningful artifact write — each requirement doc, ADR, completed TDD cycle, fix batch, or report — not batched to the phase gate. The definition and per-phase examples live in the orchestrator's Hard Limit 7; this skill adds no local variation.
What ships with it: 3 files
0 B alongside SKILL.md
assets/
- .gitkeep0 B
references/
- .gitkeep0 B
scripts/
- .gitkeep0 B