mach10 icon indicating copy to clipboard operation
mach10 copied to clipboard

Add task tracking to issue-implement

Open LeanAndMean opened this issue 7 months ago • 1 comments

Summary

Add TaskCreate/TaskUpdate progress tracking to the issue-implement command. Despite having only 4 nominal steps, this command is deceptively complex -- Step 2 (Ensure Feature Branch) is a mini-workflow with 5+ conditional paths for branch detection/creation, plus parent and sub-issue assignment with fallback strategies. Task tracking will ensure the branch setup and context gathering steps are not conflated or skipped before delegation.

Part of #81 (Tier 1 -- VERY HIGH priority). See #81 for task tracking conventions and overall context.

File: commands/issue-implement.md

What Is Task Tracking?

mach10 commands should use TaskCreate and TaskUpdate to establish visible progress checkpoints. Tasks are created upfront after input parsing, then transitioned to in_progress / completed as work proceeds. This makes long-running commands observable and forces the execution to explicitly pass through each checkpoint. See #81 for the full conventions.

Task Graph

All 3 tasks are created in a single block after Step 1 (input parsing). Each task starts as pending.

Task Subject activeForm in_progress completed
T1 Ensure feature branch and assign issue Setting up branch Before Step 2 After Step 2 (branch confirmed, issue assigned, sub-issues assigned)
T2 Gather implementation context Gathering context Before Step 3 After Step 3 (plan located, stage identified, scope confirmed)
T3 Implement stage via feature-dev Implementing stage Before Step 4 (Skill call) After Step 4 returns

Notes:

  • T1 covers the entire branch detection/creation/checkout flow plus issue assignment and sub-issue assignment. This is one logical unit: "set up for implementation."
  • T2 is reading the issue, locating the plan comment via the <!-- mach10-plan --> marker, and identifying the target stage.
  • T3 wraps the feature-dev skill delegation. This is the bulk of the command's execution time.
  • Only 3 tasks because the command is thin orchestration -- the real work happens inside feature-dev. Note: feature-dev already has its own internal todo-list instruction.

Delegation Notes

  • Step 4 delegates to /feature-dev:feature-dev via the Skill tool. T3 brackets this delegation.
  • The skill's internal 7-phase development plan is not tracked by this command -- feature-dev manages its own progress.

Shared Task Context Warning

Step 4 delegates to /feature-dev:feature-dev via the Skill tool, which runs in the same session context. Any tasks that feature-dev creates internally will appear in the same flat task list alongside T1-T3. The feature-dev skill already has an internal todo-list instruction that creates tasks for its 7 development phases. When implementing task tracking for this command:

  • Expect a mixed task list after T3 transitions to in_progress. Feature-dev will likely add its own phase tasks (e.g., "Explore the codebase", "Implement changes", "Run tests") at the same level as T1-T3.
  • Use task subjects (not positional IDs) to locate T1-T3 when transitioning them after delegation returns.
  • Do not suppress feature-dev's internal task creation -- those tasks provide valuable progress visibility during the implementation phase. The mixed list is acceptable.
  • Consider whether a naming convention (e.g., prefixing command tasks with the command name) is needed to visually distinguish command-level tasks from feature-dev tasks. If so, coordinate with #81's conventions.
  • Test with the current version of feature-dev and document what the resulting mixed task list looks like in the PR.

Acceptance Criteria

  • [ ] All 3 tasks are created after input parsing, before any work begins
  • [ ] Each task transitions in_progress -> completed at the boundaries described above
  • [ ] T1 covers all branch and assignment logic including user interaction for branch selection
  • [ ] T2 is not marked completed until the plan is located and stage is identified
  • [ ] T3 brackets the Skill invocation
  • [ ] If the plan cannot be located (Step 3), T2 remains in_progress and the command reports the error
  • [ ] Task tracking does not interfere with the delegated /feature-dev:feature-dev skill's behavior
  • [ ] The mixed task list (command tasks + feature-dev tasks) remains intelligible
  • [ ] allowed-tools in frontmatter includes Task (if not already present)

LeanAndMean avatar Apr 09 '26 17:04 LeanAndMean

Note: The task tracking conventions have been revised (see comment on issue 81). The task graph in this issue body follows the old "3-5 compound tasks" convention and is now stale. When implementing this sub-issue, derive the task graph using 1-to-1 step mapping: one task per command step, with a Step 0 that handles input parsing and task list creation. See the updated CLAUDE.md conventions and commands/pr-review.md for the reference implementation.

LeanAndMean avatar Apr 13 '26 19:04 LeanAndMean