cursor/skills/vibeflow-implement/SKILL.md
Implements a feature from its spec with guardrails: budget, DoD, anti-scope, and pattern compliance. Runs an 8-phase pipeline (find spec → extract guardrails → load patterns → plan → implement → test → refine → self-verify DoD). Use after gen-spec when ready to implement.
npx skillsauth add pe-menezes/vibeflow vibeflow-implementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reads a spec from .vibeflow/specs/, loads applicable patterns and conventions
from .vibeflow/, and implements the feature following all spec guardrails
(DoD, budget, anti-scope, pattern compliance). Runs tests and self-verifies
each DoD check before finishing. This puts the agent in Coding Agent mode
— it follows the spec, it does NOT make architectural decisions.
Usage: Provide the spec file path or feature name as input.
Detect the language of the user's input. Write ALL output in that same language. Technical terms in English are acceptable regardless of the detected language.
You are a Coding Agent. You receive a spec and implement it. You do NOT:
If the spec is unclear or seems wrong, STOP and ask the user rather than making assumptions. The architect owns decisions; you own execution.
Locate the spec.
/ or ends in .md), read that file..vibeflow/specs/:
.vibeflow/specs/<name>.md.vibeflow/specs/:" followed by the listing.
Suggest: "Run the vibeflow-gen-spec skill to create one."Validate the spec has required sections. The spec MUST contain at minimum:
If any required section is missing: STOP with: "Spec is incomplete — missing: [list]. Run the vibeflow-gen-spec skill to produce a complete spec."
Check for multi-part dependencies. If the spec has a Dependencies section listing other specs:
.vibeflow/audits/
with verdict PASS.<dependency> which has not been implemented and audited yet.
Implement and audit the dependencies first, in order:
[list dependencies].".vibeflow/audits/ directory exists: warn but continue with:
"Dependencies listed but no audit reports found. Proceeding — verify
that dependencies are already implemented."Read the spec and extract these fields into your working context:
Extract every DoD check as a numbered list. These are your implementation checklist — every check MUST pass by the time you finish.
What you MUST implement. Stay within this boundary.
What you MUST NOT do. Treat each item as a hard stop. If you find yourself about to touch something in anti-scope: STOP immediately.
Extract the budget (max files to change) from the spec. Check in this order:
Budget field in the specSuggested budget line in .vibeflow/index.mdTrack every file you create or modify against this budget.
Extract all decisions from the spec. These are constraints you follow, not suggestions you evaluate.
Extract the list of patterns the spec references. You will load these next.
Check .vibeflow/ exists.
.vibeflow/ found. Implementation will
proceed without pattern guidance. For better results, run the
vibeflow-analyze skill first." Then skip to Phase 3.Read .vibeflow/conventions.md — always. These are the coding standards
you must follow.
Read applicable pattern docs from .vibeflow/patterns/.
## Pattern Registry YAML block from index.md (between
<!-- vibeflow:patterns:start/end --> markers). Cross-reference the
registry's tags and modules against the spec's scope and target file paths.
Load the top 3-5 matching patterns. If no registry exists, infer based
on scope description (max 3 pattern docs).Read .vibeflow/index.md — for project structure, key files, and
stack context.
Do NOT read all of .vibeflow/. Load only what this spec needs.
Before writing any code, plan:
Based on the spec's scope, technical decisions, and pattern docs:
Budget check: If the count exceeds the budget, STOP with: "Implementation plan requires N files but budget is ≤ M. Options:
Cross-check your file list and plan against the anti-scope. If any planned change touches anti-scope territory: remove it from the plan.
For each DoD check, identify what code changes satisfy it. If a DoD check cannot be mapped to a concrete change: flag it as "requires manual verification" — you will revisit in Phase 7.
Before implementing, show the user:
## Implementation Plan
**Spec:** <spec name>
**Budget:** ≤ N files (using M)
**DoD checks:** N
### Files to create
- path/to/new-file.ext — <purpose>
### Files to modify
- path/to/existing.ext — <what changes>
### DoD mapping
1. <DoD check 1> → <which files/changes satisfy it>
2. <DoD check 2> → <which files/changes satisfy it>
...
### Anti-scope confirmed
- <anti-scope item 1> — not touched
- <anti-scope item 2> — not touched
Proceed to implementation after presenting the plan. If the plan seems straightforward and well-scoped, do NOT wait for user confirmation — execute. If the plan has uncertainties or the spec is ambiguous on any point, ask the user before proceeding.
Execute the plan. Follow these rules strictly:
Follow patterns exactly. If a pattern doc shows how components, routes, handlers, or tests are structured in this project — replicate that structure. Do not invent new patterns.
Follow conventions. Naming, file organization, import style,
error handling — all from .vibeflow/conventions.md.
Minimum change. Implement what closes the DoD. Nothing beyond. No "while I'm here" improvements. No opportunistic refactoring.
Anti-scope is sacred. If you catch yourself about to modify something in anti-scope, stop and revert that change.
Budget is a hard limit. Track files as you go. If you are about to exceed the budget: STOP, report which files you have changed so far, and ask the user whether to continue or adjust.
Technical decisions are constraints. If the spec says "use X library", use X. If it says "single file", do not split into modules. Do not second-guess the architect.
New dependencies require justification. If the spec does not explicitly authorize a dependency and you find you need one: STOP and ask. Include a 1-line justification.
No architectural decisions. If you encounter a design choice that is not covered by the spec: STOP and ask. Do not decide on your own.
After all code changes are complete:
.vibeflow/index.md to identify the project stack.npm testpytest or python -m pytestcargo testgo test ./...rake test or bundle exec rspecmvn testgradle testOnly run this phase if Phase 5 tests PASSED. If tests failed, were skipped, or no test runner exists, SKIP this phase entirely and continue to Phase 7 — never refactor without a green baseline to protect against regressions.
Review ONLY the files you created or modified in this implementation. Apply clarity and maintainability cleanups that preserve behavior exactly:
.vibeflow/conventions.md and the loaded patterns.Boundaries (same guardrails as Phase 4):
After refining, re-run the test suite (Phase 5.1 detection):
If there is nothing worth simplifying, state "No refinement needed" and continue.
Before finishing, verify EACH Definition of Done check yourself:
For each DoD check:
Present the self-verification:
## Self-Verification
### DoD Checklist
- [x] Check 1 — evidence: <file:line or description>
- [x] Check 2 — evidence: <file:line or description>
- [ ] Check 3 — NOT MET: <what's missing>
### Budget
Files changed: N / ≤ M budget
### Anti-scope
All anti-scope items respected: YES/NO
### Tests
Result: PASS / FAIL (N failures)
### Pattern Compliance
- <pattern name> — followed: <brief evidence>
### Overall: READY FOR AUDIT / HAS GAPS
If any DoD check is NOT MET:
After self-verification, report the final status to the user:
"Implementation complete. All N DoD checks verified. Budget: M/N files. Tests: PASS.
Run the vibeflow-audit skill to get the formal verification."
"Implementation complete with gaps.
The audit will likely return PARTIAL or FAIL. Consider fixing the gaps above, then run the vibeflow-audit skill."
These rules are ALWAYS active during implementation:
| Rule | Detail |
|------|--------|
| Budget hard limit | Do NOT exceed the file budget. Stop and ask if needed. |
| Anti-scope is sacred | Never touch what's explicitly out of scope. |
| DoD is the checklist | Every check must pass. Nothing beyond. |
| Follow patterns | Replicate real patterns from .vibeflow/patterns/. |
| Follow conventions | All code follows .vibeflow/conventions.md. |
| No architectural decisions | If undecided by spec, ask — don't decide. |
| No scope creep | No "while I'm here" improvements or refactoring. |
| Refine stays in-scope | Phase 6 only cleans the just-written diff on a green baseline; never changes behavior or pre-existing code. |
| New deps need justification | Stop and ask if a new dependency is needed. |
| Tests must pass | Run tests. Fix failures in your code (max 2 attempts). |
| 2-attempt limit on test fixes | Do not loop forever fixing tests. |
| Situation | Action |
|-----------|--------|
| No spec found | STOP. List available specs. Suggest vibeflow-gen-spec. |
| Spec missing required sections | STOP. List what's missing. Suggest vibeflow-gen-spec. |
| Dependencies not audited | STOP. List what needs to be done first. |
| .vibeflow/ missing | Warn. Proceed without pattern guidance. |
| Budget exceeded during planning | STOP. Report count. Ask user to adjust. |
| Budget exceeded during implementation | STOP. Report what's done. Ask user. |
| Anti-scope violation detected | STOP. Revert the offending change. |
| Architectural decision needed | STOP. Ask the user or suggest gen-spec update. |
| Tests fail after 2 fix attempts | Report failures. Continue to self-verify. |
| Ambiguous spec | STOP. Ask ONE clarifying question. |
development
Audits implementation against its DoD and project patterns. Runs the test suite, compares code against the spec, and reports PASS / PARTIAL / FAIL. Also runs the Critical Gate — a safety scan of the diff for destructive or dangerous operations. Use after implementation to verify quality before shipping.
development
Implements a feature from its spec following all guardrails: budget, DoD, anti-scope, and pattern compliance. Runs an 8-phase pipeline (find spec → extract guardrails → load patterns → plan → implement → test → refine → self-verify DoD). Use after gen-spec when you're ready to code. The agent has filesystem access and acts as Coding Agent.
development
Audits recent work against its Definition of Done and project patterns. Runs the test suite, compares code against the spec, and reports PASS / PARTIAL / FAIL. Also runs the Critical Gate — a safety scan of the diff for destructive or dangerous operations. Generates an incremental prompt pack for any gaps found. Use after implementation to verify quality before shipping.
testing
Updates .vibeflow/ with corrections, new conventions, architectural decisions, or new patterns from natural language feedback. Also imports from external repos via --from <url|path>. Use to keep .vibeflow/ accurate as the project evolves.