Frontend Sprint Pattern
UI work has a different shape than backend work. Backend work tends to be a few large structural decisions; UI work tends to be dozens of fast tweaks — padding, color, spacing, copy, hover state, animation. Running the full CAP Pro workflow (prototype → iterate → test → review) on every "make this padding 16px" edit costs more than the edit itself.
CAP Pro auto-detects this and adapts: a two-phase pattern where Phase 1 is hands-off and Phase 2 catches up at the end.
Phase 1 — Free Edit Sprint
CAP Pro recognises a frontend sprint when any of these signal:
- File path is
*.tsx,*.jsx,*.css,*.scss, Storybook story, or component-only - You ask for visual changes — "padding bigger / change color / spacing / hover state / animation / the design / the layout"
- You're doing rapid back-and-forth on the same file (3+ edits in a row)
- You explicitly say "let me try something" / "schnell mal" / "quick"
In Phase 1:
- No
/cap:prototypeinvocation — CAP Pro just edits directly - No
/cap:iterateinvocation — same, edits directly - No tag discipline — tags are batched at the end, not per-edit
- No research gate, no AC confirmation, no agent spawn
- The session-state stays in whatever phase it was
The point: get out of your way. UI design is a fluid, iterative process; the agent ceremony interferes with flow.
Phase 2 — Catch-up
CAP Pro auto-invokes Phase 2 when:
- You say "ok das passt jetzt / fertig / lass uns das aufräumen / commit ready"
- You shift topic away from visual to logic/data/tests
- A natural pause — e.g. starting a new feature
Phase 2 runs:
/cap:annotate— retroactively adds@cap-featureand@cap-todotags to the changed files/cap:test— writes RED-GREEN tests against the now-stable form- Optional
/cap:save— snapshots the sprint result for future continuation
This keeps tag discipline and AC traceability intact without slowing down the visual work.
Why two phases?
Without this pattern, two failure modes appear:
- The tag tax. Every visual edit triggers a "should I tag this?" prompt, which makes the agent slow and noisy. After 5 edits you give up and disable the agent — losing tag discipline entirely.
- The premature lock-in. The agent writes a test for
padding: 12pxafter the first edit. You change topadding: 16px. The test breaks. You change again. The test breaks again. Now you fight the test instead of designing.
The Phase-1/Phase-2 split solves both: tags are added once, against the stable design, and tests are written against what the team is committing to, not what was tried at minute 3.
When NOT to use Phase 1
- Logic changes that look like UI changes. "The price calculation is wrong" sounds visual but is a backend test. Phase 1 doesn't apply.
- Data-fetch pattern changes. Refactoring a
useQuerycall is not a sprint — it deserves the full workflow. - Inter-component contract changes. If the change spans multiple components and adds a new prop type, that's a real prototype, not a sprint.
Manual override
If CAP Pro misreads the situation and forces tags during a sprint:
just edit, no tags yet — sprint modeCAP Pro will switch to Phase 1 explicitly. To force Phase 2 catch-up:
ok das passt, lass uns aufräumen(or any of the catch-up trigger phrases above.)
Replacing the retired /cap:quick and /cap:finalize
In code-as-plan@7.x, this pattern was implemented as two slash commands: /cap:quick to enter sprint mode, /cap:finalize to exit. We retired both in CAP Pro 1.0 because they required users to explicitly opt in — and most users either forgot to (got the tag tax) or overused them (lost discipline).
The auto-detection model is more honest: CAP Pro reads the situation and adjusts.