Dataface Tasks

Task-new authoring flow with full worksheet and strict validate

IDINFRA_TOOLING-TASK_NEW_AUTHORING_FLOW_WITH_FULL_WORKSHEET_AND_STRICT_VALIDATE
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownersr-engineer-architect

Problem

Today plans_cli.task_create only seeds Problem from --description (and optionally Possible Solutions). Context and Plan stay placeholders, and the printed “next steps” tell authors to focus on Problem and Possible Solutions—not Plan. Agents following /plan-task often stop after task create, so queued work lacks an actionable plan.

We also want slash commands namespaced under task (/task-new or /task-plan) instead of plan-task, and validation that can enforce a real worksheet without overloading the word “plan” in the CLI once the consolidated task surface lands.

Context

  • Blocking dependency: converge-plans-and-plan-commands-to-a-single-task-cli-surface — this task assumes the converged task/tasks CLI and docs; new validate flags and examples must use the consolidated invocation (e.g. just task validate, not just plan task validate).
  • Implementation touchpoints: tasks/tools/plans_cli.py (task_create, task_validate, printed next steps), .codex/commands/plan-task.md and .claude/commands/plan-task.md (rename + expand workflow), AGENTS.md / CLAUDE.md if they reference the old command name, tests/core/test_plans_cli.py.
  • Related product direction: prefer editing the generated markdown as the default thorough path for agents; optional CLI flags for --context / --plan if one-shot creation is required without sacrificing depth.
  • Sibling (parallel): tasks-server-universal-doc-context-chat-sidebar adds in-browser planning chat with tools and manager handoff; it does not replace this authoring/validate work.

Possible Solutions

  • A — CLI-only: Add --context, --plan, and longer --description patterns so a single task create can emit a complete worksheet. Fast for scripts; easy for agents to under-fill if flags are optional.
  • B — Authoring contract only: Rename slash commands and document a mandatory second step (“open the new file and complete Context → Possible Solutions with Recommended → Plan”) with no code changes beyond messaging. Cheap; enforcement is weak unless validate strict mode exists.
  • C — Hybrid (Recommended): Keep task create as the single file creator. Update slash-command docs to /task-new or /task-plan with a two-step flow: create via CLI, then edit the markdown worksheet in the same session for thoroughness. Add optional --context / --plan (or file-based flags) for automation. Add task validate --require-worksheet (exact flag name TBD) that rejects placeholder-only Plan and Context, with a policy note that ready should not be set until strict validation passes (grandfather existing tasks or scope strictly to new files if needed). Refresh post-create “next steps” in plans_cli to match.

Plan

  1. Land or rebase on converge-plans-and-plan-commands-to-a-single-task-cli-surface; use the new task/tasks command names in all new docs and validate UX from this task.
  2. Rename /plan-task to /task-new or /task-plan in .codex/commands/ and .claude/commands/; sync any copies; update references in rules and skills.
  3. Extend task_validate with an opt-in strict worksheet check (detect empty or comment-only Plan / Context); add tests in tests/core/test_plans_cli.py.
  4. Update task_create “Next steps” output to require Context, Possible Solutions (with Recommended), and Plan; optionally add --context / --plan if the implementer agrees it is worth the API surface.
  5. Update AGENTS.md / CLAUDE.md / cli-reference snippets to describe the full authoring flow and strict validate flag.

Implementation Progress

Changes made

  1. tasks/tools/task_cli.py: - Added _is_placeholder_section(body, heading) helper — detects empty or HTML-comment-only worksheet sections. - task_validate now accepts --require-worksheet flag; when set, rejects placeholder-only Context and Plan sections. - task_create accepts --context and --plan flags to seed those sections at creation time (skipping placeholder comments). - Updated post-create "Next steps" output to list all three worksheet sections (Context, Possible Solutions with Recommended, Plan) and reference --require-worksheet validation.

  2. tests/core/test_task_cli.py — 8 new tests: - Strict worksheet validation: passes with real content, rejects placeholder Context, rejects placeholder Plan, rejects empty Context, passes without flag. - Parser: --require-worksheet flag presence and default. - --context and --plan flags in task_create. - Next-steps messaging mentions full worksheet.

  3. .claude/commands/task-new.md and .codex/commands/task-new.md — new /task-new slash command describing the two-step authoring flow (create → fill worksheet → strict validate).

  4. .claude/commands/task.md and .codex/commands/task.md — updated to reference --context, --plan, --solutions, --require-worksheet, and /task-new.

  5. CLAUDE.md — Task Management section updated with --require-worksheet, optional one-shot flags, and /task-new reference.

QA Exploration

N/A — CLI and docs workflow; no browser surface in this task.

  • [x] QA exploration completed (or N/A for non-UI tasks)

Review Feedback

  • [ ] Review cleared