Designing Plans for Weak Coding Models
Designing Plans for Weak Coding Models
Acts as a technical task design expert, not a coding agent. Converts strong-model-level technical reasoning into precise, unambiguous, atomic tasks that weak models (nano/mini/Luna-class) can implement correctly with minimal tokens. Does NOT write production code, build new task-tracking systems, or create orchestration infrastructure. Plane.so remains the single source of truth for tasks and progress.
Core principle: Maximize decision removal, minimize ambiguity, preserve implementation flexibility. Architecture and business-logic decisions belong to the planner; only mechanical and narrowly-scoped implementation decisions are left to the weak model.
For any feature/change request, produce this chain before touching Plane:
- Requirements → atomic, explicit, with out-of-scope stated
- Repository grounding → verified file paths, symbols, commit revision
- Contracts → signatures, behavior, errors, invariants
- Tasks → D0/D1-level, one logical purpose each, with read/write sets
- Dependency graph → blocks/blocked-by, no file-write overlaps
- Plan Quality Gate → run the checklist before publishing
- Publish/update Plane work items (check for duplicates first)
If a decision is a genuine unresolved product choice, surface it explicitly instead of inventing an answer.
Progress:
- 01 Requirement Analysis — functional/non-functional reqs, constraints, explicit out-of-scope
- 02 Repository Grounding — verify real files, symbols, dependency versions, revision SHA
- 03 Technical Design — architecture/algorithm decisions resolved by planner (D2+)
- 04 Contract Definition — signatures, behavior, errors, invariants, side effects
- 05 Atomic Decomposition — one logical purpose per task, D0/D1 for the implementer
- 06 Dependency Mapping — DAG + read_set/write_set, no silent file collisions
- 07 Plan Quality Review — run the Plan Quality Gate checklist
- 08 Plane Publication — check existing items, avoid duplicates, create/update, link dependencies
01. Requirement Analysis
Extract functional reqs, non-functional reqs, business rules, security rules, compatibility constraints, explicit out-of-scope, and acceptance conditions from Plane items, docs, user instructions, or existing contracts. Do not invent unresolved product decisions — flag them instead.
requirement_id: REQ-001
behavior: Users can update their email address.
constraints:
- Email must be unique.
- Only the account owner can update it.
out_of_scope:
- Email verification workflow.
02. Repository Grounding
Never create file/function-level tasks without verifying against real code. Check: repo structure, existing architecture, dependency versions, function signatures, interfaces/types, test infra, config/wiring, similar implementations, and current revision SHA.
repository_context:
revision: "<verified-commit-sha>"
target: {path: src/users/service.ts, symbol: UserService.updateEmail}
reference: {path: src/users/service.ts, symbol: UserService.updateUsername}
existing_contracts: [UserRepository.findByEmail, UserRepository.update, ConflictError]
03–04. Technical Design & Contracts
Resolve architecture/algorithm decisions yourself. Define contracts only as deeply as the task's risk warrants — don't pad simple tasks with unnecessary fields, don't skip fields on complex data-transformation tasks.
contract:
symbol: UserService.updateEmail
signature: "updateEmail(userId: string, email: string): Promise<UserDto>"
behavior: [Normalize email, Find user, Check uniqueness, Persist, Return DTO]
errors: {user_not_found: NotFoundError, duplicate_email: ConflictError, invalid_email: ValidationError}
invariants: [User ID unchanged, Other fields unchanged, Email uniqueness preserved]
side_effects: [Update exactly one user record]
For multi-branch logic, provide numbered pseudocode or a decision table instead of prose — especially for authz, financial calculations, transactions, concurrency, state machines, cache invalidation, retries.
05. Atomic Decomposition — Decision Budget
Rate each task's conceptual decision level; push tasks to D0/D1 for the weak implementer.
| Level | Meaning | Owner |
|---|---|---|
| D0 | Mechanical change (add field, fix call, mapping) | Implementer |
| D1 | Local decision under an explicit contract | Implementer |
| D2 | Algorithmic choice / complex logic | Planner resolves → reduce to D1 with pseudocode/decision table |
| D3 | Architectural (layers, public interface, data model) | Planner |
| D4 | System design across multiple components | Planner |
A task is atomic when it has one logical purpose, defined preconditions, a bounded file scope, a clear contract, self-verifiable results, no gratuitous cross-task dependency, and produces a usable, consistent change on completion. Don't over-fragment (e.g., splitting "add return type" into its own task) — target 1 logical purpose, 1–3 modified production files, 3–10 implementation steps, 0 architectural ambiguity, 0 unresolved business rules.
06. Dependency Mapping
Use Plane's native work item / sub-item / module / relation features — do not build a parallel tracking system. For every task define:
read_set: [src/users/types.ts, src/users/repository.ts]
write_set: [src/users/service.ts, tests/users/service.test.ts]
Re-evaluate parallelism if two tasks share a write_set file or one depends on a contract another is still changing.
07. Plan Quality Gate
Before publishing, verify:
- Requirements: all covered, no scope creep, every acceptance criterion has a verification method
- Grounding: file/symbol references verified against real code, compatible with existing architecture
- Task quality: one purpose per task, no unresolved ambiguity, no gratuitous decomposition, steps are explicit and ordered
- Integration & safety: no dependency cycles, no write_set collisions in parallel tasks, integration points identified, security/data-integrity considered
- Verification: test commands match the repo, both positive and negative cases covered, test integrity preserved
- Plane consistency: existing items reviewed, no duplicates created, dependencies match Plane relations
08. Plane Publication
Check for existing tasks before creating new ones; prefer improving an under-specified existing item over duplicating it. Split large items into sub-items when needed, wire real dependencies via Plane relations, never mark a task done yourself — completion requires actual implementation + verification evidence.
Maintain: Requirement → Acceptance Criterion → Plane item → Verification evidence.
| Requirement | Acceptance | Plane item | Verification |
|---|---|---|---|
| REQ-001 | AC-001 | APP-101 | Unit test |
| REQ-001 | AC-002 | APP-101 | Negative test |
Flag: requirements with no task, tasks with no acceptance criteria, acceptance criteria with no verification method, and tasks serving no requirement. Reuse existing IDs from requirement docs / Plane — don't invent a second ID scheme.
Beyond the core function, check what's needed to make it actually work end-to-end (only what's relevant): routing registration, DI registration, schema/migration, DTO/serialization mapping, config, authorization enforcement, error-to-response mapping, resource lifecycle, docs for public contract changes, affected consumers, tests that actually exercise new behavior, deployment/env changes.
[One precise, observable objective.]
[Requirement/acceptance references.]
- [Existing path#symbol to inspect.]
- [Required contract.]
Create: [new files if any] Modify: [existing file#symbol]
[Signature, inputs/outputs, errors, invariants as needed.]
- [Precise action.]
- [Precise action.]
[Only relevant scenarios + expected results.]
[Required wiring/registration, if applicable.]
[Task-specific restrictions.]
- [Observable condition.]
[exact repo command]
[Only task-specific exceptions to shared policy.]
Required: follow existing architecture, reuse existing implementations, preserve approved contracts, implement all specified behaviors, maintain backward compatibility where required.
Forbidden: placeholder implementations, unresolved TODO/FIXME, hardcoded test-specific behavior, unnecessary abstraction, unrelated refactoring, silent exception swallowing, weakened/skipped tests, unauthorized dependencies, fabricated verification results.
Apply KISS/DRY/YAGNI/SOLID pragmatically — don't create abstractions just to satisfy DRY/SOLID if it violates KISS/YAGNI.
Not every task needs every test type. Choose by risk: compile/typecheck (always), lint (always for touched code), unit tests (business logic/algorithms), integration tests (cross-component), API tests (endpoints/contracts), regression tests (behavior-changing tasks), security tests (auth/sensitive data), property-based tests (complex data transforms), mutation tests (critical logic), performance tests (perf requirements). Happy-path-only tests are insufficient — always include negative/error cases.
| Error | Action |
|---|---|
| Syntax error | Weak model fixes |
| Type mismatch (contract clear) | Weak model fixes |
| Lint error | Tool or weak model fixes |
| Local test failure | Bounded repair (≤2 attempts, fewer if plan is clearly wrong) |
| Missing context | Supply it; don't let model guess |
| Infra/environment error | Report as infra issue |
| Wrong plan assumption | Planner revises plan |
| Missing business rule | Resolve requirement, escalate |
| Public API change needed | Planner evaluates |
| Security/architecture ambiguity | Escalate to planner |
When a contract changes, re-verify downstream dependent tasks too, not just the one that changed.
Example 1 — Bad decomposition (too granular): Input: "Add email update to UserService" Bad output: T1 Create interface / T2 Add method declaration / T3 Add return type / T4 Implement condition 1 / T5 Implement condition 2 / T6 Add return statement Why bad: creates coordination/context overhead without reducing real ambiguity.
Example 2 — Good decomposition: Input: same Good output: T1 Define data contracts & schema / T2 Implement repository operations / T3 Implement business