POCDD — Work (the gap-closing engine)
This is the heart of POCDD. Read ../shared/conventions.md
first. Resolve the target with pocdd_resolve <name> from
../shared/context.sh.
Budget: close at most 2 [agent] gap(s) per /poc work
invocation (profile mid). Then stop, summarize, and invite another pass.
The loop
- Load the POC fully — Goal, Implementation, Remaining gaps,
phase. Setphase: shaping. - Work up to 2
[agent]gap(s) in id order:- Do the investigation: run the script (for runnable POCs, with the relevant flags), read the referenced code paths, or diff output against expectations.
- Capture the result as a Finding in Implementation, tagged with
provenance (
[ran it],[code: path:line], …). - Remove the gap from Remaining gaps. Add any newly discovered gaps.
- If you hit the per-pass budget, stop closing further
[agent]gaps.
- Defer every
[user]gap — never stop. For each decision gap you encounter:- Record a default assumption to proceed with.
- Link the dependent Implementation (e.g. "§4 assumes G3 = hourly").
- Leave the gap in Remaining gaps (owner
[user]); keep going.
- Re-derive the phase:
- any gaps left → stays
shaping. - none left →
ready-to-implement. - a gap proved the goal infeasible/too costly →
not-viable(record the killer finding).
- any gaps left → stays
- Surface decisions in a batch. At the end of the pass, present the open
[user]gaps (with the assumption you ran with for each) and any remaining[agent]gaps still open after the budget. Resolving a gap may close it or spawn new gaps — re-run/poc workafterward.
Rules
- Execution never blocks on a human. Decisions become deferred gaps, not stop points.
- Move proven knowledge into Implementation with provenance — don't leave findings buried in chat.
- Keep directives verifiable: every "what to do" gets a done-check.
- Reference codebase by path; never copy production code into the file.
- Report progress as a short summary: gaps closed this pass, findings added,
decisions awaiting the developer, remaining
[agent]gaps, new phase.