ace-assign 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/assign/catalog/composition-rules.yml +211 -0
  3. data/.ace-defaults/assign/catalog/recipes/batch-tasks.recipe.yml +44 -0
  4. data/.ace-defaults/assign/catalog/recipes/documentation.recipe.yml +35 -0
  5. data/.ace-defaults/assign/catalog/recipes/fix-and-review.recipe.yml +32 -0
  6. data/.ace-defaults/assign/catalog/recipes/implement-simple.recipe.yml +29 -0
  7. data/.ace-defaults/assign/catalog/recipes/implement-with-pr.recipe.yml +48 -0
  8. data/.ace-defaults/assign/catalog/recipes/release-only.recipe.yml +34 -0
  9. data/.ace-defaults/assign/catalog/steps/apply-feedback.step.yml +22 -0
  10. data/.ace-defaults/assign/catalog/steps/commit.step.yml +22 -0
  11. data/.ace-defaults/assign/catalog/steps/create-pr.step.yml +28 -0
  12. data/.ace-defaults/assign/catalog/steps/create-retro.step.yml +22 -0
  13. data/.ace-defaults/assign/catalog/steps/fix-tests.step.yml +22 -0
  14. data/.ace-defaults/assign/catalog/steps/lint.step.yml +22 -0
  15. data/.ace-defaults/assign/catalog/steps/mark-task-done.step.yml +57 -0
  16. data/.ace-defaults/assign/catalog/steps/onboard-base.step.yml +19 -0
  17. data/.ace-defaults/assign/catalog/steps/onboard.step.yml +19 -0
  18. data/.ace-defaults/assign/catalog/steps/plan-task.step.yml +17 -0
  19. data/.ace-defaults/assign/catalog/steps/pre-commit-review.step.yml +34 -0
  20. data/.ace-defaults/assign/catalog/steps/push-to-remote.step.yml +28 -0
  21. data/.ace-defaults/assign/catalog/steps/rebase-with-main.step.yml +28 -0
  22. data/.ace-defaults/assign/catalog/steps/reflect-and-refactor.step.yml +57 -0
  23. data/.ace-defaults/assign/catalog/steps/release-minor.step.yml +23 -0
  24. data/.ace-defaults/assign/catalog/steps/release.step.yml +23 -0
  25. data/.ace-defaults/assign/catalog/steps/reorganize-commits.step.yml +28 -0
  26. data/.ace-defaults/assign/catalog/steps/research.step.yml +19 -0
  27. data/.ace-defaults/assign/catalog/steps/review-pr.step.yml +22 -0
  28. data/.ace-defaults/assign/catalog/steps/security-audit.step.yml +22 -0
  29. data/.ace-defaults/assign/catalog/steps/split-subtree-root.step.yml +25 -0
  30. data/.ace-defaults/assign/catalog/steps/squash-changelog.step.yml +28 -0
  31. data/.ace-defaults/assign/catalog/steps/task-load.step.yml +29 -0
  32. data/.ace-defaults/assign/catalog/steps/update-docs.step.yml +38 -0
  33. data/.ace-defaults/assign/catalog/steps/update-pr-desc.step.yml +28 -0
  34. data/.ace-defaults/assign/catalog/steps/verify-e2e.step.yml +42 -0
  35. data/.ace-defaults/assign/catalog/steps/verify-test-suite.step.yml +48 -0
  36. data/.ace-defaults/assign/catalog/steps/verify-test.step.yml +36 -0
  37. data/.ace-defaults/assign/catalog/steps/work-on-task.step.yml +23 -0
  38. data/.ace-defaults/assign/config.yml +48 -0
  39. data/.ace-defaults/assign/presets/fix-bug.yml +65 -0
  40. data/.ace-defaults/assign/presets/quick-implement.yml +41 -0
  41. data/.ace-defaults/assign/presets/release-only.yml +35 -0
  42. data/.ace-defaults/assign/presets/work-on-docs.yml +41 -0
  43. data/.ace-defaults/assign/presets/work-on-task.yml +179 -0
  44. data/.ace-defaults/nav/protocols/skill-sources/ace-assign.yml +19 -0
  45. data/.ace-defaults/nav/protocols/wfi-sources/ace-assign.yml +19 -0
  46. data/CHANGELOG.md +1415 -0
  47. data/README.md +87 -0
  48. data/Rakefile +16 -0
  49. data/docs/exit-codes.md +61 -0
  50. data/docs/getting-started.md +121 -0
  51. data/docs/handbook.md +40 -0
  52. data/docs/usage.md +224 -0
  53. data/exe/ace-assign +16 -0
  54. data/handbook/guides/fork-context.g.md +231 -0
  55. data/handbook/skills/as-assign-compose/SKILL.md +24 -0
  56. data/handbook/skills/as-assign-create/SKILL.md +23 -0
  57. data/handbook/skills/as-assign-drive/SKILL.md +24 -0
  58. data/handbook/skills/as-assign-prepare/SKILL.md +23 -0
  59. data/handbook/skills/as-assign-recover-fork/SKILL.md +22 -0
  60. data/handbook/skills/as-assign-run-in-batches/SKILL.md +23 -0
  61. data/handbook/skills/as-assign-start/SKILL.md +25 -0
  62. data/handbook/workflow-instructions/assign/compose.wf.md +256 -0
  63. data/handbook/workflow-instructions/assign/create.wf.md +215 -0
  64. data/handbook/workflow-instructions/assign/drive.wf.md +666 -0
  65. data/handbook/workflow-instructions/assign/prepare.wf.md +469 -0
  66. data/handbook/workflow-instructions/assign/recover-fork.wf.md +233 -0
  67. data/handbook/workflow-instructions/assign/run-in-batches.wf.md +212 -0
  68. data/handbook/workflow-instructions/assign/start.wf.md +46 -0
  69. data/lib/ace/assign/atoms/assign_frontmatter_parser.rb +173 -0
  70. data/lib/ace/assign/atoms/catalog_loader.rb +101 -0
  71. data/lib/ace/assign/atoms/composition_rules.rb +219 -0
  72. data/lib/ace/assign/atoms/number_generator.rb +110 -0
  73. data/lib/ace/assign/atoms/preset_expander.rb +277 -0
  74. data/lib/ace/assign/atoms/step_file_parser.rb +207 -0
  75. data/lib/ace/assign/atoms/step_numbering.rb +227 -0
  76. data/lib/ace/assign/atoms/step_sorter.rb +66 -0
  77. data/lib/ace/assign/atoms/tree_formatter.rb +106 -0
  78. data/lib/ace/assign/cli/commands/add.rb +102 -0
  79. data/lib/ace/assign/cli/commands/assignment_target.rb +55 -0
  80. data/lib/ace/assign/cli/commands/create.rb +63 -0
  81. data/lib/ace/assign/cli/commands/fail.rb +43 -0
  82. data/lib/ace/assign/cli/commands/finish.rb +88 -0
  83. data/lib/ace/assign/cli/commands/fork_run.rb +229 -0
  84. data/lib/ace/assign/cli/commands/list.rb +166 -0
  85. data/lib/ace/assign/cli/commands/retry_cmd.rb +42 -0
  86. data/lib/ace/assign/cli/commands/select.rb +45 -0
  87. data/lib/ace/assign/cli/commands/start.rb +40 -0
  88. data/lib/ace/assign/cli/commands/status.rb +407 -0
  89. data/lib/ace/assign/cli.rb +144 -0
  90. data/lib/ace/assign/models/assignment.rb +107 -0
  91. data/lib/ace/assign/models/assignment_info.rb +66 -0
  92. data/lib/ace/assign/models/queue_state.rb +326 -0
  93. data/lib/ace/assign/models/step.rb +197 -0
  94. data/lib/ace/assign/molecules/assignment_discoverer.rb +57 -0
  95. data/lib/ace/assign/molecules/assignment_manager.rb +276 -0
  96. data/lib/ace/assign/molecules/fork_session_launcher.rb +102 -0
  97. data/lib/ace/assign/molecules/queue_scanner.rb +130 -0
  98. data/lib/ace/assign/molecules/skill_assign_source_resolver.rb +376 -0
  99. data/lib/ace/assign/molecules/step_renumberer.rb +227 -0
  100. data/lib/ace/assign/molecules/step_writer.rb +246 -0
  101. data/lib/ace/assign/organisms/assignment_executor.rb +1299 -0
  102. data/lib/ace/assign/version.rb +7 -0
  103. data/lib/ace/assign.rb +141 -0
  104. metadata +289 -0
data/README.md ADDED
@@ -0,0 +1,87 @@
1
+ <div align="center">
2
+ <h1> ACE - Assign </h1>
3
+
4
+ Multi-step assignment execution with nesting, fork delegation, and inspectable traces.
5
+
6
+ <img src="../docs/brand/AgenticCodingEnvironment.Logo.S.png" alt="ACE Logo" width="480">
7
+
8
+ <a href="https://rubygems.org/gems/ace-assign"><img alt="Gem Version" src="https://img.shields.io/gem/v/ace-assign.svg" /></a>
9
+ <a href="https://www.ruby-lang.org"><img alt="Ruby" src="https://img.shields.io/badge/Ruby-3.2+-CC342D?logo=ruby" /></a>
10
+ <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" /></a>
11
+
12
+ </div>
13
+
14
+ > Works with: Claude Code, Codex CLI, OpenCode, Gemini CLI, pi-agent, and more.
15
+
16
+ [Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md)
17
+
18
+ `ace-assign` turns work into a multi-step assignment with nested substeps, fork delegation to long-running agent subprocesses, and inspectable session traces. Steps are defined from a [step catalog](.ace-defaults/assign/catalog/steps/) and assembled via [presets](.ace-defaults/assign/presets/work-on-task.yml) or composed manually. Each step can reference a [workflow instruction](../ace-task/handbook/workflow-instructions/task/work.wf.md) for execution details. Assignments are restartable -- failed steps keep their lineage so you can retry or inject fixes without losing history.
19
+ ```
20
+
21
+ ❯ ace-assign status
22
+ QUEUE - Assignment: work-on-task-8qm.t.5nx-job.yml (8qm5rt)
23
+
24
+ NUMBER STATUS NAME FORK CHILDREN
25
+ ------------------------------------------------------------------------------
26
+ 000 ✓ Done onboard
27
+ 010 ✓ Done batch-tasks (28/28 done)
28
+ |-- 010.01 ✓ Done work-on-8qm.t.5nx.0 yes (8/8 done)
29
+ |-- 010.01.01 ✓ Done onboard-base
30
+ |-- 010.01.02 ✓ Done task-load
31
+ |-- 010.01.03 ✓ Done plan-task
32
+ |-- 010.01.04 ✓ Done work-on-task
33
+ |-- 010.01.05 ✓ Done pre-commit-review
34
+ |-- 010.01.06 ✓ Done verify-test
35
+ |-- 010.01.07 ✓ Done release-minor
36
+ \-- 010.01.08 ✓ Done create-retro
37
+ |-- 010.02 ✓ Done work-on-8qm.t.5nx.1 yes (8/8 done)
38
+ # ... multiple tasks hidden
39
+ 012 ✓ Done verify-test-suite
40
+ 015 ✓ Done verify-e2e yes
41
+ 020 ✓ Done release-minor
42
+ 025 ✓ Done update-docs
43
+ 030 ✓ Done create-pr
44
+ 040 ✓ Done review-valid-1 yes (3/3 done)
45
+ |-- 040.01 ✓ Done review-pr
46
+ |-- 040.02 ✓ Done apply-feedback
47
+ \-- 040.03 ✓ Done release
48
+ 070 ✓ Done review-fit-1 yes (3/3 done)
49
+ |-- 070.01 ✓ Done review-pr
50
+ |-- 070.02 ✓ Done apply-feedback
51
+ \-- 070.03 ✓ Done release
52
+ 100 ○ Pending review-shine-1 yes (2/3 done)
53
+ |-- 100.01 ✗ Failed review-pr - Fork agent blocked by pre-existing unrelated changes (now stashed). Retrying.
54
+ |-- 100.02 ✓ Done apply-feedback
55
+ \-- 100.03 ✓ Done release
56
+ 101 ✓ Done review-pr
57
+ 130 ✓ Done reorganize-commits
58
+ 140 ✓ Done push-to-remote
59
+ 150 ✓ Done update-pr-desc yes
60
+ 155 ✓ Done mark-tasks-done
61
+ 160 ✓ Done create-retro
62
+ 161 ✓ Done review-pr yes
63
+ 162 ✓ Done apply-feedback yes
64
+ 163 ✓ Done release yes
65
+ ```
66
+
67
+
68
+ The easiest way to start is through [ace-overseer](../ace-overseer) -- define a task and run `ace-overseer work-on --task <ref> --preset work-on-task` , which creates the assignment, worktree, and tmux window in one shot.
69
+
70
+ ## How It Works
71
+
72
+ 1. Define steps from a [preset](.ace-defaults/assign/presets/work-on-task.yml) or compose from the [step catalog](.ace-defaults/assign/catalog/steps/) -- steps can nest into substeps and reference workflow instructions for execution details.
73
+ 2. Expand the definition into a session with explicit per-step instructions, state tracking (`pending` → `in_progress` → `done`/`failed`), and numbered hierarchy (e.g., `010`, `010.01`, `010.01.01`).
74
+ 3. Drive execution with `/as-assign-drive` -- fork long-running steps to isolated agent subprocesses, advance the queue on completion, and retry or inject fix steps on failure.
75
+
76
+ ## Use Cases
77
+
78
+ **Define assignments from presets** - pick a [preset](.ace-defaults/assign/presets/) like [`work-on-task`](.ace-defaults/assign/presets/work-on-task.yml) or `release-only`, pass parameters (task refs, packages), and [`ace-assign create`](docs/usage.md) expands it into a concrete step queue. Steps are defined in the [catalog](.ace-defaults/assign/catalog/steps/) (e.g., [`work-on-task.step.yml`](.ace-defaults/assign/catalog/steps/work-on-task.step.yml)) and ordered by [composition rules](.ace-defaults/assign/catalog/composition-rules.yml). Compose custom assignments with `/as-assign-compose`.
79
+
80
+ **Run with orchestrator and fork agents** - use `/as-assign-drive` to walk through steps, forking long-running work (implementation, review, release) to isolated agent subprocesses with configurable [execution defaults](.ace-defaults/assign/config.yml). Forks can run sequentially or as parallel batches, each producing inspectable traces and session reports under `.ace-local/assign/`.
81
+
82
+ **Recover from failure without losing history** - keep failed-step lineage intact, inject targeted retries or fix steps, and continue execution with auditable failure evidence.
83
+
84
+ **Compose assignments from templates** - use `/as-assign-compose` and `/as-assign-prepare` to build assignment plans from reusable patterns, then pair with [ace-task](../ace-task) for task lifecycle, [ace-bundle](../ace-bundle) for context loading, and [ace-review](../ace-review) for quality checks.
85
+
86
+ ---
87
+ [Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md) | Part of [ACE](https://github.com/cs3b/ace)
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ desc "Run tests using ace-test"
7
+ task :test do
8
+ sh "ace-test"
9
+ end
10
+
11
+ desc "Run tests directly (CI mode)"
12
+ Minitest::TestTask.create(:ci)
13
+
14
+ # Alias for CI compatibility
15
+ task spec: :test
16
+ task default: :test
@@ -0,0 +1,61 @@
1
+ ---
2
+ doc-type: user
3
+ title: CLI Exit Codes
4
+ purpose: Documentation for ace-assign/docs/exit-codes.md
5
+ ace-docs:
6
+ last-updated: 2026-03-18
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # CLI Exit Codes
11
+
12
+ This document describes the exit codes returned by the `ace-assign` CLI.
13
+
14
+ ## Exit Code Reference
15
+
16
+ | Code | Meaning | Example Scenario |
17
+ |------|---------|------------------|
18
+ | 0 | Success | Command executed successfully |
19
+ | 1 | General error | Unhandled error, invalid step reference, finish rejected on stalled queue |
20
+ | 2 | Assignment error | No active assignment or assignment not found |
21
+ | 3 | Configuration not found | Config file does not exist |
22
+ | 4 | Step not found | Referencing a step that does not exist |
23
+
24
+ ## Exit Code Details
25
+
26
+ ### Exit Code 0: Success
27
+ The command executed successfully. This includes:
28
+ - Creating an assignment (`create`)
29
+ - Adding a step (`add`)
30
+ - Retrying a step (`retry`)
31
+ - Marking a step as failed (`fail`)
32
+ - Displaying status (`status`)
33
+ - Finishing a step (`finish`)
34
+
35
+ ### Exit Code 1: General Error
36
+ An error occurred that doesn't fit into other categories:
37
+ - Invalid step reference (e.g., `finish` with invalid step number)
38
+ - Report rejected when queue is stalled (no step currently in progress)
39
+ - Missing report input for `finish` (`--message` absent/blank and no piped stdin)
40
+ - Other unhandled errors
41
+
42
+ ### Exit Code 2: Assignment Error
43
+ Assignment state is invalid for the requested command:
44
+ - No active assignment exists. Commands that require an active assignment return this code:
45
+ - `status` when no assignment has been created
46
+ - `finish` when no assignment has been created
47
+ - Assignment ID does not exist (for commands targeting a specific assignment)
48
+
49
+ ### Exit Code 3: Configuration Not Found
50
+ A required configuration file could not be found:
51
+ - Config file does not exist when running `create`
52
+
53
+ ### Exit Code 4: Step Not Found
54
+ The requested step reference does not exist in the target assignment:
55
+ - `retry` with unknown step number
56
+ - Commands that target a specific missing step
57
+
58
+ ## See Also
59
+
60
+ - [Usage Guide](usage.md) for full command reference
61
+ - [Getting Started](getting-started.md) for tutorial
@@ -0,0 +1,121 @@
1
+ ---
2
+ doc-type: user
3
+ title: Getting Started with ace-assign
4
+ purpose: Tutorial for creating, running, and adapting assignment queues with ace-assign.
5
+ ace-docs:
6
+ last-updated: 2026-03-22
7
+ last-checked: 2026-03-22
8
+ ---
9
+
10
+ # Getting Started with ace-assign
11
+
12
+ Use `ace-assign` to run multi-step work as a durable queue instead of ad-hoc notes.
13
+
14
+ ## Prerequisites
15
+
16
+ - Ruby 3.2+
17
+ - `ace-assign` installed
18
+ - A writable project directory
19
+
20
+ ## Installation
21
+
22
+
23
+ ```bash
24
+ gem install ace-assign
25
+ ```
26
+
27
+ ## 1) Create your first assignment
28
+
29
+ Create `job.yaml`:
30
+
31
+
32
+ ```yaml
33
+ assignment:
34
+ name: docs-update
35
+ description: Update package documentation
36
+
37
+ steps:
38
+ - name: onboard
39
+ instructions: |
40
+ Load context with `ace-bundle project-base`.
41
+
42
+ - name: implement
43
+ instructions: |
44
+ Apply documentation updates.
45
+
46
+ - name: verify
47
+ instructions: |
48
+ Run lint and tests.
49
+ ```
50
+
51
+ Create the assignment:
52
+
53
+
54
+ ```bash
55
+ ace-assign create job.yaml
56
+ ```
57
+
58
+ ## 2) Check status and execute work
59
+
60
+
61
+ ```bash
62
+ ace-assign status
63
+ ace-assign finish --message onboard.md
64
+ ace-assign status
65
+ ```
66
+
67
+ Use `--message <file>` to keep reports explicit and reusable.
68
+
69
+ ## 3) Add work dynamically
70
+
71
+
72
+ ```bash
73
+ ace-assign add fix-links --instructions "Fix broken docs links"
74
+ ace-assign add verify-links --after 020 --child -i "Check all markdown links"
75
+ ```
76
+
77
+ Use `--child` to insert nested steps under a parent step.
78
+
79
+ ## 4) Work with hierarchical steps
80
+
81
+ - Parent steps complete when all children are done.
82
+ - Queue traversal prioritizes pending children before siblings.
83
+ - Renumbering cascades when inserting siblings in occupied ranges.
84
+
85
+ Use status views:
86
+
87
+
88
+ ```bash
89
+ ace-assign status
90
+ ace-assign status --flat
91
+ ```
92
+
93
+ ## 5) Use scoped assignment targeting
94
+
95
+ If you manage multiple assignments (or a subtree), always scope commands:
96
+
97
+
98
+ ```bash
99
+ ace-assign status --assignment abc123@010.01
100
+ ace-assign finish --message report.md --assignment abc123@010.01
101
+ ```
102
+
103
+ ## Common Commands
104
+
105
+ | Command | Purpose |
106
+ |---------|---------|
107
+ | `ace-assign create job.yaml` | Create assignment from YAML |
108
+ | `ace-assign status` | Show current queue |
109
+ | `ace-assign start` | Start next workable step |
110
+ | `ace-assign finish --message done.md` | Complete in-progress step |
111
+ | `ace-assign fail --message "error"` | Mark current step failed |
112
+ | `ace-assign add NAME -i "..."` | Insert new step dynamically |
113
+ | `ace-assign retry 040` | Retry failed step as linked work |
114
+ | `ace-assign fork-run --root 010.01` | Execute a subtree in forked context |
115
+
116
+ ## Next steps
117
+
118
+ - [Usage Guide](usage.md) for full command reference
119
+ - [Handbook Reference](handbook.md) for skills/workflows inventory
120
+ - [Fork Context Guide](../handbook/guides/fork-context.g.md) for delegation and recovery patterns
121
+ - Runtime help: `ace-assign --help`
data/docs/handbook.md ADDED
@@ -0,0 +1,40 @@
1
+ ---
2
+ doc-type: user
3
+ title: ace-assign Handbook Reference
4
+ purpose: Skill and workflow catalog shipped with ace-assign.
5
+ ace-docs:
6
+ last-updated: 2026-03-22
7
+ last-checked: 2026-03-22
8
+ ---
9
+
10
+ # ace-assign Handbook Reference
11
+
12
+ Canonical skills and workflow instructions bundled with `ace-assign`.
13
+
14
+ ## Skills
15
+
16
+ | Skill | What it does |
17
+ |-------|---------------|
18
+ | `as-assign-compose` | Compose a tailored assignment from catalog steps and composition rules |
19
+ | `as-assign-create` | Create assignments from public workflow, with optional handoff to drive |
20
+ | `as-assign-drive` | Drive active assignment execution step-by-step |
21
+ | `as-assign-prepare` | Legacy/internal helper for preparing job specs |
22
+ | `as-assign-run-in-batches` | Build repeated-item fan-out assignments from templates and item lists |
23
+ | `as-assign-start` | Legacy compatibility wrapper routing create then drive |
24
+
25
+ ## Workflow Instructions
26
+
27
+ | Protocol Path | Purpose | Invoked by |
28
+ |---------------|---------|------------|
29
+ | `wfi://assign/compose` | Compose assignment definitions from cataloged steps | `as-assign-compose` |
30
+ | `wfi://assign/create` | Create assignment and initialize queue from config | `as-assign-create` |
31
+ | `wfi://assign/drive` | Execute active assignment loop with status/finish/fail transitions | `as-assign-drive` |
32
+ | `wfi://assign/prepare` | Legacy preset/informal instructions to job spec preparation | `as-assign-prepare` |
33
+ | `wfi://assign/run-in-batches` | Generate a repeated-item batch assignment | `as-assign-run-in-batches` |
34
+ | `wfi://assign/start` | Legacy orchestration entrypoint for create+drive | `as-assign-start` |
35
+
36
+ ## Guides
37
+
38
+ | Guide | Purpose |
39
+ |-------|---------|
40
+ | `fork-context.g.md` | Fork subtree design, delegation boundaries, and recovery practices |
data/docs/usage.md ADDED
@@ -0,0 +1,224 @@
1
+ ---
2
+ doc-type: user
3
+ title: ace-assign Usage Guide
4
+ purpose: Complete command reference for ace-assign queue orchestration, hierarchy, and fork execution.
5
+ ace-docs:
6
+ last-updated: 2026-03-22
7
+ last-checked: 2026-03-22
8
+ ---
9
+
10
+ # ace-assign Usage Guide
11
+
12
+ `ace-assign` manages assignment queues with explicit step states and optional hierarchy.
13
+
14
+ ## Command Integrity
15
+
16
+ When documenting or automating `ace-*` flows, prefer direct commands and explicit report files.
17
+
18
+ Recommended:
19
+
20
+
21
+ ```bash
22
+ ace-assign finish --message report.md
23
+ ```
24
+
25
+ ## Core Lifecycle
26
+
27
+
28
+ ```bash
29
+ ace-assign create job.yaml
30
+ ace-assign status
31
+ ace-assign finish --message step-010.md
32
+ ace-assign status
33
+ ```
34
+
35
+ Use scoped targeting when needed:
36
+
37
+
38
+ ```bash
39
+ ace-assign status --assignment abc123@010.01
40
+ ace-assign finish --message done.md --assignment abc123@010.01
41
+ ```
42
+
43
+ ## Hierarchical Steps
44
+
45
+ ### Numbering
46
+
47
+ - Top-level: `010`, `020`, `030`
48
+ - Child: `010.01`, `010.02`
49
+ - Grandchild: `010.01.01`
50
+
51
+ ### Rules
52
+
53
+ - Parents auto-complete when all descendants are done.
54
+ - Queue traversal works deepest actionable step first.
55
+ - Inserted siblings can renumber later siblings (and descendants).
56
+
57
+ Create child/sibling steps:
58
+
59
+
60
+ ```bash
61
+ ace-assign add setup-db --after 010 --child -i "Set up DB"
62
+ ace-assign add hotfix --after 010 -i "Urgent fix"
63
+ ```
64
+
65
+ ## Commands
66
+
67
+ ### `ace-assign create CONFIG`
68
+
69
+ Create a new assignment from a YAML file.
70
+
71
+ Options:
72
+
73
+ - `--quiet, -q`
74
+ - `--debug, -d`
75
+
76
+ ### `ace-assign status`
77
+
78
+ Show queue status for active or explicitly targeted assignment.
79
+
80
+ Options:
81
+
82
+ - `--flat, -f`
83
+ - `--format table|json`
84
+ - `--assignment <id>`
85
+ - `--all, -a`
86
+ - `--quiet, -q`
87
+ - `--debug, -d`
88
+
89
+ ### `ace-assign start [STEP]`
90
+
91
+ Start next workable pending step, or an explicit pending step in the active assignment.
92
+
93
+ Options:
94
+
95
+ - `--assignment <id>`
96
+ - `--quiet, -q`
97
+ - `--debug, -d`
98
+
99
+ ### `ace-assign finish [STEP] --message VALUE`
100
+
101
+ Complete current in-progress step (or explicit step in active assignment) with report content.
102
+
103
+ `--message` accepts:
104
+
105
+ - Inline text
106
+ - File path
107
+
108
+ Options:
109
+
110
+ - `--message, -m` (required)
111
+ - `--assignment <id>`
112
+ - `--quiet, -q`
113
+ - `--debug, -d`
114
+
115
+ ### `ace-assign fail --message TEXT`
116
+
117
+ Mark current step as failed.
118
+
119
+ Options:
120
+
121
+ - `--message, -m` (required)
122
+ - `--assignment <id>`
123
+ - `--quiet, -q`
124
+ - `--debug, -d`
125
+
126
+ ### `ace-assign add NAME`
127
+
128
+ Insert a new step dynamically.
129
+
130
+ Options:
131
+
132
+ - `--instructions, -i TEXT`
133
+ - `--after, -a NUMBER`
134
+ - `--child, -c`
135
+ - `--assignment <id>`
136
+ - `--quiet, -q`
137
+ - `--debug, -d`
138
+
139
+ ### `ace-assign retry STEP_REF`
140
+
141
+ Create a linked retry step for a failed step.
142
+
143
+ Options:
144
+
145
+ - `--assignment <id>`
146
+ - `--quiet, -q`
147
+ - `--debug, -d`
148
+
149
+ ### `ace-assign fork-run`
150
+
151
+ Execute a fork-enabled subtree in an isolated process.
152
+
153
+ Options:
154
+
155
+ - `--root <step-number>`
156
+ - `--assignment <id>`
157
+ - `--provider <provider:model>`
158
+ - `--cli-args <args>`
159
+ - `--timeout <seconds>`
160
+ - `--quiet, -q`
161
+ - `--debug, -d`
162
+
163
+ ### `ace-assign list`
164
+
165
+ List assignments.
166
+
167
+ Options:
168
+
169
+ - `--all, -a`
170
+ - `--task, -t <taskref>`
171
+ - `--tree`
172
+ - `--format table|json`
173
+ - `--quiet, -q`
174
+ - `--debug, -d`
175
+
176
+ ### `ace-assign select [ID]`
177
+
178
+ Select active assignment or clear selection.
179
+
180
+ Options:
181
+
182
+ - `--clear`
183
+ - `--quiet, -q`
184
+ - `--debug, -d`
185
+
186
+ ## Workflow Patterns
187
+
188
+ ### Scoped Subtree Execution
189
+
190
+
191
+ ```bash
192
+ ace-assign status --assignment abc123@010.01
193
+ ace-assign fork-run --assignment abc123@010.01
194
+ ```
195
+
196
+ ### Recovery from Failure
197
+
198
+
199
+ ```bash
200
+ ace-assign fail --message "Lint failed in docs"
201
+ ace-assign retry 040 --assignment abc123
202
+ ```
203
+
204
+ ### Multi-assignment Management
205
+
206
+
207
+ ```bash
208
+ ace-assign list --all
209
+ ace-assign select abc123
210
+ ace-assign select --clear
211
+ ```
212
+
213
+ ## Exit Codes
214
+
215
+ | Code | Meaning |
216
+ |------|---------|
217
+ | 0 | Success |
218
+ | 1 | General error |
219
+ | 2 | Assignment error |
220
+ | 3 | Configuration not found |
221
+ | 4 | Step not found |
222
+ | 130 | Interrupted (SIGINT) |
223
+
224
+ See [exit-codes.md](exit-codes.md) for complete descriptions.
data/exe/ace-assign ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "../lib/ace/assign"
5
+
6
+ # No args → show help
7
+ args = ARGV.empty? ? ["--help"] : ARGV
8
+
9
+ # Start ace-support-cli with exception-based exit code handling (per ADR-023)
10
+ begin
11
+ exit_code = Ace::Assign::CLI.start(args)
12
+ exit(exit_code) if exit_code.nonzero?
13
+ rescue Ace::Support::Cli::Error => e
14
+ warn e
15
+ exit(e.exit_code)
16
+ end