doodledood/codex-workflow — Prompts
Prompt 1: $spec — Discovery Loop Structure (verbatim)
Source: skills/spec/SKILL.md
**Loop**: Research → Expand todos → Ask questions → Write findings → Repeat until complete
**Role**: Senior Product Manager - questions that uncover hidden requirements, edge cases, and assumptions the user hasn't considered. Reduce ambiguity through concrete options.
**Todo Evolution Example**
After user says "needs to work across mobile and web":
- [x] Initial context research → found existing notification system for admin alerts
- [ ] Scope & target users
- [ ] Mobile notification delivery (push vs in-app)
- [ ] Web notification delivery (browser vs in-app)
- [ ] Cross-platform sync behavior
After user mentions "also needs email digest option":
- [ ] Email digest frequency options
- [ ] Email vs real-time preferences
**Key**: Todos grow as user reveals complexity. Never prune prematurely.
Prompting technique: Dynamic todo expansion pattern (Memento pattern). The agent is instructed to continuously add to its todo list as user answers reveal new requirement areas — the opposite of most frameworks that predefine a fixed workflow. This matches the open-ended nature of requirements discovery.
Prompt 2: $implement — Auto-Fix Gate and Commit Protocol (verbatim)
Source: skills/implement/SKILL.md
**Run gates in order**: typecheck, then tests, then lint. Stop at first failure and iterate on that gate until it passes before proceeding to the next gate.
**On failure—iterate**:
1. Analyze: parse errors, identify files/lines, understand root cause
2. Fix by addressing root cause (not by suppressing errors, skipping tests, or adding `// @ts-ignore`)
3. Re-run the failing gate
4. Track attempts per issue by error message and file:line; if same error persists after 3 distinct fix strategies, escalate per "Pause ONLY when" rules
Commit chunk: `git add [files created/modified] && git commit -m "feat(plan): implement chunk N - [Name]"` (do NOT push)
Prompting technique: Explicit anti-suppression rule (not by suppressing errors, skipping tests, or adding // @ts-ignore) combined with escalation trigger (3 distinct fix strategies). The "track attempts per issue by error message and file:line" instruction forces the agent to maintain a structured error registry rather than applying random fixes.
Prompt 3: $review — Detection-Based Orchestration (verbatim)
Source: skills/review/SKILL.md
| Review Type | Skill | When to Include |
|-------------|-------|-----------------|
| Bugs | $review-bugs | Always (unless skipped) |
| Type Safety | $review-type-safety | TypeScript/typed Python detected |
| AGENTS.md | $review-agents-md-adherence | AGENTS.md file exists |
Detection logic:
- TypeScript: tsconfig.json exists
- Typed Python: pyproject.toml with mypy config OR py.typed marker
- Test files: *.test.*, *.spec.*, __tests__/, tests/ exist
Prompting technique: Context-sensitive dispatch table. The orchestrator uses filesystem inspection to decide which specialized reviews to run, making the review suite adaptive to the project's tech stack without requiring user configuration.