Task — engineering-spec@1

The plan workflow

doneTASK-IMP-111
module improvement · class product · priority p2 · created 2026-07-17 · shipped null
depends on none · blocks none

TASK-IMP-111: The plan workflow

Summary

create-tasks cannot take an idea. Its command promises a standalone interview for the no-document case, but the interview's required field is source_files - hand it an idea and it asks for a document. Add plan: a workflow that turns an idea (greenfield) or an idea plus a deep repo scan (brownfield) into a plan@1 document whose proposed task set is exactly what create-tasks already consumes.

Problem

Two verified gaps.

The command promises what the skill cannot do. create-tasks.md says: "If given only an idea (no document), use the skill's standalone interview to elicit scope." task-author/STANDALONE_INTERVIEW.md's required field is source_files: "Which source file(s) should I read to draft the task? ... The skill confirms each path resolves." It is file plumbing, not elicitation. The brand-new-project case is unreachable today. This is the fourth instance this run of a spec promise with nothing under it.

The deep scan runs too late and too narrow. repo-context-map-author extracts patterns, schemas, blast radius, and a module-misplacement flag - but its inputs are {repo_root, task_id} and it runs at ship-tasks step 1, AFTER tasks exist, scoped to one task. Planning against an existing repo needs a repo-wide scan BEFORE any task exists.

Proposed Solution

plan emits plan@1 at docs/plans/PLAN-<slug>-<date>/plan.md: intent, context, options with checkable evidence, one decision with confidence, scope, a proposed task set, risks, and the BRAIN rows emitted. Section 6 (the proposed task set) is the input contract - a document with a proposed task set is exactly the "PRD or spec" task-author already consumes, so create-tasks needs no new input shape.

Roughly 70 % already exists. repo-context-map-author gains scope: repo | task (task = today's behavior, byte-for-byte). The PLAN gate's state machine, the spike's option grammar, memory-append, and the author/audit pair shape are all reused rather than reinvented.

Mode detection: no .cyberos/ and no git HEAD is greenfield; commits or a corpus is brownfield with a MANDATORY scan; ambiguous ASKS, because guessing greenfield on a live repo plans against a codebase that exists.

Alternatives Considered

Success Metrics

Scope

In scope: plan-author, plan-audit, plan_rubric@1.0, the scope input on repo-context-map, the /cyberos:plan command, suite arms.

Out of scope / Non-Goals

Dependencies

None blocking. Reuses skills that exist.

Serialisation note: touches build.sh (shared with TASK-IMP-110 - both add a vendored skill to VENDORED_SKILLS, and chain-coverage fails closed if either lands half-applied). Parent-serialised per §11a. Adding plan-author + plan-audit takes the vendored census 54 -> 56, so tools/install/tests/test_full_sdp_payload.sh's expected count is bumped in this same change (per its own bump-and-say-why comment); that test is in the cone for exactly that reason.

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

§1 - Verdict summary

Spec is 108 lines, 9 §1 clauses, 7 ACs, 6 edge cases. Closes the verified gap that create-tasks cannot accept an idea, re-composing ~70% from existing skills rather than inventing a workflow. Passes after 8 findings.

§2 - Findings (all resolved)

ISS-001 - Plan could become a second writer to docs/tasks

A second writer to the corpus re-opens the 086 class - create-tasks owns the audited write path. Resolved: §1 #1.7 forbids writing tasks, rows, code, or statuses; AC 4 asserts both paths byte-identical after a run.

ISS-002 - Extending repo-context-map risks moving the ship-tasks path

The scan is a live step-1 dependency; changing its default breaks the workflow that works. Resolved: §1 #1.3 requires scope: task to behave exactly as today; AC 2 asserts byte-identical output.

ISS-003 - A second HITL gate would make both rubber stamps

create-tasks gates the same content minutes later. Resolved: one gate at the decision (§1 #1.5); the duplicate is an explicit Non-Goal with the reasoning recorded.

ISS-004 - Ambiguous mode detection could guess

Guessing greenfield on a live repo plans against a codebase that exists. Resolved: §1 #1.1 requires a halt; AC 1 asserts the ambiguous fixture halts.

ISS-005 - An unbounded scan cannot finish on a large repo

A scan exceeding the sandbox cap is a scan that gets skipped. Resolved: §3 requires bounding and reporting what was sampled rather than implying exhaustiveness.

ISS-006 - Building IMP-21 triage separately would create two front doors

Both grade an idea before authoring. Resolved: Alternatives records the explicit rejection; triage's park/needs_info become plan outcomes, needs_spike is already a step.

ISS-007 - The output contract could drift from what create-tasks accepts

A new input shape means touching task-author, widening the blast radius. Resolved: §1 #1.8 requires §6 consumable with no contract change; AC 5 asserts an idea-only plan feeds create-tasks unmodified.

ISS-008 - An idea already covered by an existing task would be re-proposed

Planning a duplicate is worse than not planning. Resolved: §3 requires the brownfield scan to surface it and the option set to include 'this exists'.

§3 - Resolution

All 8 concerns addressed. The machine floor (task-lint) ran FIRST and was clean before any judgment family was applied, per TASK-IMP-084. Score = 10/10.


End of TASK-IMP-111 audit.

Amendment 2026-07-19 (cone growth, operator-approved)

Grew modified_files by tools/install/tests/test_full_sdp_payload.sh. Adding plan-author + plan-audit takes the vendored census 54 -> 56, and that test hard-asserts the count (its own comment mandates the bump-and-say-why pattern). This is a census update, not a behaviour change: no clause, test, or traceability was altered. Re-verified - task-lint clean; test_full_sdp_payload 9/0; plan-workflow suite 7/0; the declared cone (3 modified + 5 new = 8) now matches every actual write with 0 escapes. Audit verdict unchanged.