@ambystech/ambykit 1.3.1 → 1.5.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.
- package/CHANGELOG.md +95 -1
- package/README.md +8 -0
- package/dist/cli/activity.d.ts +5 -1
- package/dist/cli/activity.js +22 -8
- package/dist/cli/activity.js.map +1 -1
- package/dist/cli/add.js +12 -5
- package/dist/cli/add.js.map +1 -1
- package/dist/cli/analyze.js +68 -4
- package/dist/cli/analyze.js.map +1 -1
- package/dist/cli/base-command.js +6 -0
- package/dist/cli/base-command.js.map +1 -1
- package/dist/cli/check.js +18 -3
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/dashboard.js +3 -1
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/directive.d.ts +7 -0
- package/dist/cli/directive.js +43 -0
- package/dist/cli/directive.js.map +1 -0
- package/dist/cli/fleet.d.ts +16 -0
- package/dist/cli/fleet.js +472 -0
- package/dist/cli/fleet.js.map +1 -0
- package/dist/cli/graph.d.ts +13 -0
- package/dist/cli/graph.js +40 -0
- package/dist/cli/graph.js.map +1 -0
- package/dist/cli/index.js +10 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/io/fsops.d.ts +4 -0
- package/dist/cli/io/fsops.js +62 -0
- package/dist/cli/io/fsops.js.map +1 -1
- package/dist/cli/mcp.d.ts +21 -0
- package/dist/cli/mcp.js +27 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/sync.d.ts +2 -0
- package/dist/cli/sync.js +31 -5
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/trace.d.ts +14 -0
- package/dist/cli/trace.js +89 -0
- package/dist/cli/trace.js.map +1 -0
- package/dist/cli/ui/dashboard/feature-chart.js +15 -2
- package/dist/cli/ui/dashboard/feature-chart.js.map +1 -1
- package/dist/cli/ui/dashboard/feature-view.js +11 -1
- package/dist/cli/ui/dashboard/feature-view.js.map +1 -1
- package/dist/cli/ui/dashboard/graph-view.d.ts +44 -0
- package/dist/cli/ui/dashboard/graph-view.js +78 -0
- package/dist/cli/ui/dashboard/graph-view.js.map +1 -0
- package/dist/cli/ui/dashboard/help-overlay.d.ts +1 -1
- package/dist/cli/ui/dashboard/help-overlay.js +9 -0
- package/dist/cli/ui/dashboard/help-overlay.js.map +1 -1
- package/dist/cli/ui/dashboard/quality-view.d.ts +8 -0
- package/dist/cli/ui/dashboard/quality-view.js +31 -0
- package/dist/cli/ui/dashboard/quality-view.js.map +1 -0
- package/dist/cli/ui/dashboard/story-detail.d.ts +1 -1
- package/dist/cli/ui/dashboard/story-detail.js +10 -3
- package/dist/cli/ui/dashboard/story-detail.js.map +1 -1
- package/dist/cli/ui/dashboard/tokens.d.ts +26 -0
- package/dist/cli/ui/dashboard/tokens.js +26 -0
- package/dist/cli/ui/dashboard/tokens.js.map +1 -1
- package/dist/cli/ui/interactive/overview.d.ts +13 -1
- package/dist/cli/ui/interactive/overview.js +62 -0
- package/dist/cli/ui/interactive/overview.js.map +1 -1
- package/dist/cli/ui/tool-options.d.ts +3 -2
- package/dist/cli/ui/tool-options.js +3 -3
- package/dist/cli/ui/tool-options.js.map +1 -1
- package/dist/cli/update.d.ts +1 -1
- package/dist/cli/update.js +8 -3
- package/dist/cli/update.js.map +1 -1
- package/dist/core/activity.d.ts +15 -2
- package/dist/core/activity.js +19 -4
- package/dist/core/activity.js.map +1 -1
- package/dist/core/analyze.d.ts +80 -2
- package/dist/core/analyze.js +200 -61
- package/dist/core/analyze.js.map +1 -1
- package/dist/core/checkouts.js +2 -0
- package/dist/core/checkouts.js.map +1 -1
- package/dist/core/config.d.ts +28 -1
- package/dist/core/config.js +44 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/dashboard.d.ts +4 -0
- package/dist/core/dashboard.js +5 -3
- package/dist/core/dashboard.js.map +1 -1
- package/dist/core/decisions.d.ts +60 -0
- package/dist/core/decisions.js +231 -0
- package/dist/core/decisions.js.map +1 -0
- package/dist/core/emit.d.ts +16 -1
- package/dist/core/emit.js +49 -5
- package/dist/core/emit.js.map +1 -1
- package/dist/core/features.js +6 -1
- package/dist/core/features.js.map +1 -1
- package/dist/core/fleet/claims.d.ts +45 -0
- package/dist/core/fleet/claims.js +85 -0
- package/dist/core/fleet/claims.js.map +1 -0
- package/dist/core/fleet/directives.d.ts +56 -0
- package/dist/core/fleet/directives.js +99 -0
- package/dist/core/fleet/directives.js.map +1 -0
- package/dist/core/fleet/flow-input.d.ts +6 -0
- package/dist/core/fleet/flow-input.js +35 -0
- package/dist/core/fleet/flow-input.js.map +1 -0
- package/dist/core/fleet/index.d.ts +9 -0
- package/dist/core/fleet/index.js +10 -0
- package/dist/core/fleet/index.js.map +1 -0
- package/dist/core/fleet/lane-status.d.ts +39 -0
- package/dist/core/fleet/lane-status.js +63 -0
- package/dist/core/fleet/lane-status.js.map +1 -0
- package/dist/core/fleet/lock.d.ts +23 -0
- package/dist/core/fleet/lock.js +103 -0
- package/dist/core/fleet/lock.js.map +1 -0
- package/dist/core/fleet/notes.d.ts +31 -0
- package/dist/core/fleet/notes.js +56 -0
- package/dist/core/fleet/notes.js.map +1 -0
- package/dist/core/fleet/run-flow.d.ts +157 -0
- package/dist/core/fleet/run-flow.js +205 -0
- package/dist/core/fleet/run-flow.js.map +1 -0
- package/dist/core/fleet/runs.d.ts +46 -0
- package/dist/core/fleet/runs.js +182 -0
- package/dist/core/fleet/runs.js.map +1 -0
- package/dist/core/fleet/types.d.ts +63 -0
- package/dist/core/fleet/types.js +11 -0
- package/dist/core/fleet/types.js.map +1 -0
- package/dist/core/graph-format.d.ts +51 -0
- package/dist/core/graph-format.js +99 -0
- package/dist/core/graph-format.js.map +1 -0
- package/dist/core/graph-paths.d.ts +27 -0
- package/dist/core/graph-paths.js +94 -0
- package/dist/core/graph-paths.js.map +1 -0
- package/dist/core/graph-scope.d.ts +7 -0
- package/dist/core/graph-scope.js +31 -0
- package/dist/core/graph-scope.js.map +1 -0
- package/dist/core/graph-types.d.ts +55 -0
- package/dist/core/graph-types.js +6 -0
- package/dist/core/graph-types.js.map +1 -0
- package/dist/core/graph.d.ts +14 -0
- package/dist/core/graph.js +144 -0
- package/dist/core/graph.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/markers.d.ts +44 -0
- package/dist/core/markers.js +139 -0
- package/dist/core/markers.js.map +1 -0
- package/dist/core/merge-json.d.ts +15 -0
- package/dist/core/merge-json.js +46 -0
- package/dist/core/merge-json.js.map +1 -0
- package/dist/core/moved-targets.d.ts +23 -0
- package/dist/core/moved-targets.js +23 -0
- package/dist/core/moved-targets.js.map +1 -0
- package/dist/core/overview-types.d.ts +27 -1
- package/dist/core/overview-types.js.map +1 -1
- package/dist/core/overview.d.ts +1 -1
- package/dist/core/overview.js +91 -74
- package/dist/core/overview.js.map +1 -1
- package/dist/core/path-guard.d.ts +5 -0
- package/dist/core/path-guard.js +9 -0
- package/dist/core/path-guard.js.map +1 -0
- package/dist/core/paths.d.ts +2 -0
- package/dist/core/paths.js +4 -0
- package/dist/core/paths.js.map +1 -1
- package/dist/core/query.d.ts +91 -0
- package/dist/core/query.js +197 -0
- package/dist/core/query.js.map +1 -0
- package/dist/core/report.d.ts +36 -0
- package/dist/core/report.js +62 -0
- package/dist/core/report.js.map +1 -0
- package/dist/core/rules.js +3 -0
- package/dist/core/rules.js.map +1 -1
- package/dist/core/scaffold.d.ts +2 -2
- package/dist/core/scaffold.js +3 -1
- package/dist/core/scaffold.js.map +1 -1
- package/dist/core/subagents.d.ts +29 -0
- package/dist/core/subagents.js +52 -0
- package/dist/core/subagents.js.map +1 -0
- package/dist/core/tasks-edit.d.ts +34 -0
- package/dist/core/tasks-edit.js +115 -0
- package/dist/core/tasks-edit.js.map +1 -0
- package/dist/core/test-design.d.ts +94 -0
- package/dist/core/test-design.js +325 -0
- package/dist/core/test-design.js.map +1 -0
- package/dist/core/trace-cite.d.ts +16 -0
- package/dist/core/trace-cite.js +24 -0
- package/dist/core/trace-cite.js.map +1 -0
- package/dist/core/trace-coverage.d.ts +8 -0
- package/dist/core/trace-coverage.js +40 -0
- package/dist/core/trace-coverage.js.map +1 -0
- package/dist/core/trace-design.d.ts +6 -0
- package/dist/core/trace-design.js +16 -0
- package/dist/core/trace-design.js.map +1 -0
- package/dist/core/trace-io.d.ts +14 -0
- package/dist/core/trace-io.js +97 -0
- package/dist/core/trace-io.js.map +1 -0
- package/dist/core/trace-requirements.d.ts +9 -0
- package/dist/core/trace-requirements.js +27 -0
- package/dist/core/trace-requirements.js.map +1 -0
- package/dist/core/trace-tests.d.ts +7 -0
- package/dist/core/trace-tests.js +27 -0
- package/dist/core/trace-tests.js.map +1 -0
- package/dist/core/trace-types.d.ts +81 -0
- package/dist/core/trace-types.js +3 -0
- package/dist/core/trace-types.js.map +1 -0
- package/dist/core/trace.d.ts +18 -0
- package/dist/core/trace.js +109 -0
- package/dist/core/trace.js.map +1 -0
- package/dist/core/types.d.ts +43 -1
- package/dist/emitters/antigravity-cli.d.ts +4 -0
- package/dist/emitters/antigravity-cli.js +8 -0
- package/dist/emitters/antigravity-cli.js.map +1 -1
- package/dist/emitters/antigravity.d.ts +6 -0
- package/dist/emitters/antigravity.js +8 -0
- package/dist/emitters/antigravity.js.map +1 -1
- package/dist/emitters/base-emitter.d.ts +28 -0
- package/dist/emitters/base-emitter.js +41 -1
- package/dist/emitters/base-emitter.js.map +1 -1
- package/dist/emitters/claude.d.ts +12 -2
- package/dist/emitters/claude.js +34 -5
- package/dist/emitters/claude.js.map +1 -1
- package/dist/emitters/copilot-cli.d.ts +7 -1
- package/dist/emitters/copilot-cli.js +9 -0
- package/dist/emitters/copilot-cli.js.map +1 -1
- package/dist/emitters/copilot.d.ts +5 -0
- package/dist/emitters/copilot.js +23 -1
- package/dist/emitters/copilot.js.map +1 -1
- package/dist/emitters/cursor.d.ts +3 -0
- package/dist/emitters/cursor.js +8 -1
- package/dist/emitters/cursor.js.map +1 -1
- package/dist/emitters/index.d.ts +10 -3
- package/dist/emitters/index.js +6 -6
- package/dist/emitters/index.js.map +1 -1
- package/dist/emitters/opencode.d.ts +8 -0
- package/dist/emitters/opencode.js +23 -0
- package/dist/emitters/opencode.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/protocol.d.ts +44 -0
- package/dist/mcp/protocol.js +114 -0
- package/dist/mcp/protocol.js.map +1 -0
- package/dist/mcp/registry.d.ts +40 -0
- package/dist/mcp/registry.js +44 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.js +14 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/common.d.ts +12 -0
- package/dist/mcp/tools/common.js +12 -0
- package/dist/mcp/tools/common.js.map +1 -0
- package/dist/mcp/tools/fleet.d.ts +10 -0
- package/dist/mcp/tools/fleet.js +102 -0
- package/dist/mcp/tools/fleet.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +3 -0
- package/dist/mcp/tools/index.js +13 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/read.d.ts +6 -0
- package/dist/mcp/tools/read.js +62 -0
- package/dist/mcp/tools/read.js.map +1 -0
- package/dist/mcp/tools/write.d.ts +6 -0
- package/dist/mcp/tools/write.js +34 -0
- package/dist/mcp/tools/write.js.map +1 -0
- package/dist/plugins/api.d.ts +39 -0
- package/dist/plugins/api.js +28 -0
- package/dist/plugins/api.js.map +1 -0
- package/dist/plugins/index.d.ts +11 -0
- package/dist/plugins/index.js +9 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/loader.d.ts +35 -0
- package/dist/plugins/loader.js +117 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/manifest.d.ts +21 -0
- package/dist/plugins/manifest.js +53 -0
- package/dist/plugins/manifest.js.map +1 -0
- package/dist/plugins/registry.d.ts +36 -0
- package/dist/plugins/registry.js +30 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/report.d.ts +9 -0
- package/dist/plugins/report.js +19 -0
- package/dist/plugins/report.js.map +1 -0
- package/dist/plugins/semver.d.ts +23 -0
- package/dist/plugins/semver.js +106 -0
- package/dist/plugins/semver.js.map +1 -0
- package/dist/plugins/session.d.ts +18 -0
- package/dist/plugins/session.js +22 -0
- package/dist/plugins/session.js.map +1 -0
- package/dist/testkit/contract.d.ts +33 -0
- package/dist/testkit/contract.js +118 -0
- package/dist/testkit/contract.js.map +1 -0
- package/dist/testkit/index.d.ts +15 -0
- package/dist/testkit/index.js +15 -0
- package/dist/testkit/index.js.map +1 -0
- package/docs/architecture.md +33 -5
- package/docs/artifacts/decision-record.md +54 -0
- package/docs/artifacts/tasks.md +37 -0
- package/docs/artifacts/tests.md +43 -0
- package/docs/cli-reference.md +178 -5
- package/docs/concepts/mcp-server.md +93 -0
- package/docs/contributing.md +9 -0
- package/docs/index.md +1 -1
- package/docs/plugin-api.md +124 -0
- package/docs/plugin-split.md +55 -0
- package/docs/plugin-trust.md +51 -0
- package/docs/tool-compatibility.md +54 -6
- package/docs/workflow.md +37 -5
- package/package.json +5 -2
- package/src/agents/worker.md +37 -0
- package/src/prompts/converge.md +8 -3
- package/src/prompts/decide.md +31 -0
- package/src/prompts/implement.md +15 -7
- package/src/prompts/revise.md +4 -2
- package/src/prompts/run.md +100 -0
- package/src/prompts/tasks.md +13 -3
- package/src/roles/security.md +17 -0
- package/src/templates/adr.md +29 -0
- package/src/templates/tasks.md +6 -0
- package/src/templates/tests.md +29 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: decide
|
|
3
|
+
name: amby.decide
|
|
4
|
+
description: Record a decision as a numbered record — cited by ID, supersedable, checked by analyze.
|
|
5
|
+
argument-hint: "<decision text> [--supersede ADR-###]"
|
|
6
|
+
phase: decide
|
|
7
|
+
reads: [.amby/decisions/README.md, .amby/templates/adr.md, .amby/constitution.md]
|
|
8
|
+
writes: [.amby/decisions/ADR-###.md, .amby/decisions/README.md]
|
|
9
|
+
allowedTools: [read, write, edit, bash]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Record the decision in `$ARGUMENTS`. Callable from any phase; it has no role of its own.
|
|
13
|
+
|
|
14
|
+
If a current feature applies, run `ambykit activity <feature> --agent=$AGENT --phase=decide` first; ignore any error.
|
|
15
|
+
|
|
16
|
+
1. No decision text → ask for it in one question. Read `.amby/decisions/README.md` (the index) only;
|
|
17
|
+
if a row's title already covers the decision, name that `ADR-###` and stop — do not duplicate.
|
|
18
|
+
2. Number: highest of the `ADR-###.md` files **and** the index rows, plus 1, three digits. Never reuse a
|
|
19
|
+
number, even for a deleted file. Create `.amby/decisions/` and its index (`| ID | Title | Status |`)
|
|
20
|
+
on first use.
|
|
21
|
+
3. Write `.amby/decisions/ADR-<n>.md` from `@.amby/templates/adr.md`: Context, Decision, Alternatives,
|
|
22
|
+
Consequences, each short. Fill `feature` from the current feature and `principle` when relevant.
|
|
23
|
+
The file name is the id, with no slug.
|
|
24
|
+
4. Principle conflict: if the decision conflicts with a constitution principle, set `status: proposed`,
|
|
25
|
+
list the principle numbers in `conflicts`, and tell the person it needs their call. Never write
|
|
26
|
+
`accepted` with `conflicts` filled. Otherwise `status: accepted`.
|
|
27
|
+
5. `--supersede ADR-###`: set `supersedes` on the new record, and on the old record set
|
|
28
|
+
`status: superseded` and `superseded-by: <new id>`. Both sides, always. Never edit the old record's body.
|
|
29
|
+
6. A wording-only edit of an existing record keeps its `id` and `status`.
|
|
30
|
+
7. Patch the index in place: add or update this record's row. Leave rows of deleted files (tombstones).
|
|
31
|
+
8. Cite decisions elsewhere only by `ADR-###`; never restate them. End with the id and path.
|
package/src/prompts/implement.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Execute the task list, checking off tasks and updating story status
|
|
|
5
5
|
argument-hint: "[task id or story id, defaults to next unblocked]"
|
|
6
6
|
phase: implement
|
|
7
7
|
role: developer
|
|
8
|
-
reads: [specs/NNN-slug/tasks.md, specs/NNN-slug/plan.md]
|
|
8
|
+
reads: [specs/NNN-slug/tasks.md, specs/NNN-slug/plan.md, specs/NNN-slug/tests.md]
|
|
9
9
|
writes: [specs/NNN-slug/tasks.md, specs/NNN-slug/spec.md]
|
|
10
10
|
allowedTools: [read, write, edit, bash]
|
|
11
11
|
---
|
|
@@ -20,9 +20,17 @@ Run `ambykit activity <feature> --agent=$AGENT --phase=implement` first, with th
|
|
|
20
20
|
2. Load **only** the slice you need: the task line, the relevant `plan.md` section, and the specific
|
|
21
21
|
files named. Don't read the whole spec tree (token-frugal).
|
|
22
22
|
3. Implement to satisfy the mapped `FR-###`/acceptance criteria and the constitution. Add/adjust
|
|
23
|
-
tests for the acceptance criteria.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
tests for the acceptance criteria: build to the story's cases in `tests.md` and name tests `NNN:FR-###: …`;
|
|
24
|
+
at the story checkpoint say if `tests.md` is missing, never pass silently. If you cannot finish a task, add `⚠ BLOCKED: <reason>` as the last
|
|
25
|
+
segment of its line (after the `(file/path)` group), stop that task and continue with another unblocked
|
|
26
|
+
one; note any departure from the plan as `↪ DEVIATION: <note>`. Remove `⚠ BLOCKED:` once resolved.
|
|
27
|
+
4. **Patch in place:** flip the completed task's checkbox to `- [x]` in `tasks.md`; set the story's
|
|
28
|
+
`status: in-progress` in `spec.md` while it is partway. Don't rewrite untouched sections. After each
|
|
29
|
+
checked task, run `ambykit activity <feature> --agent=$AGENT --phase=implement --task=T###` (ignore errors).
|
|
30
|
+
5. At a phase checkpoint, run that phase's `**Verify:**` check before passing it (no Verify line: say so
|
|
31
|
+
and continue). Write the result at the end of that line, replacing any earlier one: `✓ passed`,
|
|
32
|
+
`✗ failed: <why>` or `? unverified`. Never pass the checkpoint on a failure: fix it and run again. If
|
|
33
|
+
you cannot run the check, ask a person to run or confirm it and record `? unverified`. Only once the
|
|
34
|
+
Verify has passed (or there is none) and all of a story's tasks are done, set that story's
|
|
35
|
+
`status: done`. In a lane, record the result after the phase's lanes are merged.
|
|
36
|
+
6. Report what you did and the next unblocked task. Stop at a story checkpoint for review.
|
package/src/prompts/revise.md
CHANGED
|
@@ -5,8 +5,8 @@ description: Continue an existing feature's spec (or design) — add and refine
|
|
|
5
5
|
argument-hint: "[feature id, defaults to current] + what to add or refine"
|
|
6
6
|
phase: revise
|
|
7
7
|
role: pm
|
|
8
|
-
reads: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md]
|
|
9
|
-
writes: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md]
|
|
8
|
+
reads: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md, specs/NNN-slug/tests.md]
|
|
9
|
+
writes: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md, specs/NNN-slug/tests.md]
|
|
10
10
|
allowedTools: [read, edit]
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -27,6 +27,8 @@ of `@.amby/templates/spec.md`. This command **extends** an existing feature —
|
|
|
27
27
|
- New requirements use EARS (SHALL / WHEN / WHILE / IF-THEN / WHERE); new acceptance criteria use
|
|
28
28
|
Given/When/Then — consistent with `specify`.
|
|
29
29
|
- Leave any story already marked `status: done` untouched; you may still add new stories.
|
|
30
|
+
- If `tests.md` exists, mark each case citing a changed criterion `[stale]` and each citing a removed one
|
|
31
|
+
`[obsolete]` (never delete); change nothing else there.
|
|
30
32
|
4. Set the `spec.md` frontmatter `status:` to `in-progress`.
|
|
31
33
|
5. **Design (optional).** If the author is continuing the UI/design and `ui.md` exists, extend it in
|
|
32
34
|
place, preserving existing sections. If `ui.md` does **not** exist, do not create it here — direct
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: run
|
|
3
|
+
name: amby.run
|
|
4
|
+
description: Run a feature's tasks as a team — workers build, QA and architect review, state kept in files, resumable.
|
|
5
|
+
argument-hint: "<feature> [--new]"
|
|
6
|
+
phase: run
|
|
7
|
+
reads: [specs/<feature>/spec.md, specs/<feature>/plan.md, specs/<feature>/tasks.md, specs/<feature>/tests.md, .amby/fleet/<run>/run.json]
|
|
8
|
+
writes: [specs/<feature>/tasks.md, .amby/fleet/<run>/]
|
|
9
|
+
allowedTools: [read, write, edit, bash]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Run the feature in `$ARGUMENTS` (number or name; `--new` only when the person asked for a new run). You are the
|
|
13
|
+
**lead**: you start workers, hand out task IDs, run the reviews and keep the run state. You have no role of
|
|
14
|
+
your own. Run `ambykit activity <feature> --agent=$AGENT --phase=run` first; ignore any error.
|
|
15
|
+
|
|
16
|
+
Subagents on this host: `$SUBAGENTS`. If `yes`, workers are the `amby-worker` subagent and reviewers the
|
|
17
|
+
`amby-qa` and `amby-architect` subagents (roles `@.amby/roles/qa.md`, `@.amby/roles/architect.md`). If `no`,
|
|
18
|
+
say so once, then do each worker, QA and architect step yourself, in sequence, one task at a time, with the
|
|
19
|
+
same commands and state files below: claim, edit, check off, report; QA before architect, each acting as its
|
|
20
|
+
role file, and say which role you are acting as.
|
|
21
|
+
|
|
22
|
+
Every step works from files with these verbs alone, and nothing here needs a server: `ambykit fleet`,
|
|
23
|
+
`ambykit activity`, `ambykit directive`.
|
|
24
|
+
|
|
25
|
+
## 1. Resume or start
|
|
26
|
+
|
|
27
|
+
Run `ambykit fleet status <feature>`; it prints the run, the next phase, lanes, free slots and warnings.
|
|
28
|
+
|
|
29
|
+
- **Done** → say so and change nothing. **Stopped** naming `spec.md`, `plan.md` or `tasks.md` (missing, or the
|
|
30
|
+
spec still `draft`) → stop, name that artifact and the command that makes it.
|
|
31
|
+
- **No unfinished run** → `ambykit fleet start <feature>` (this invocation is the request; `--new` starts another
|
|
32
|
+
run on request only). **One** → resume it. **Several** → list them and ask which; never pick.
|
|
33
|
+
- **Warning: state missing or corrupt** → `ambykit fleet status <feature> --run=<id> --rebuild`, then go on.
|
|
34
|
+
Checked tasks in `tasks.md` stay checked, so nothing completed is repeated.
|
|
35
|
+
- Load by reference only: the current phase of `@specs/<feature>/tasks.md`, the plan sections and `US-#`/`FR-###`
|
|
36
|
+
its tasks cite, and `@specs/<feature>/tests.md` when it exists. Never whole artifacts.
|
|
37
|
+
|
|
38
|
+
## 2. Work the phase (stage `working`)
|
|
39
|
+
|
|
40
|
+
- Take the phase's open, unblocked tasks from `status`. Tasks are independent when their file ownership is
|
|
41
|
+
disjoint. If two tasks you want to run together own overlapping files, see **Overlap**.
|
|
42
|
+
- **Caps:** `status` shows free slots (default 3 workers, 2 per assistant type). Never start a worker without one.
|
|
43
|
+
- Per worker: `ambykit fleet update <feature> --worker-start=<lane> --assistant=<id> --tasks=T001,T002`
|
|
44
|
+
(`<lane>` is `lane-<phase>-<k>`, `<id>` the assistant the worker runs on, the same id as your `--agent`; it is refused
|
|
45
|
+
when no slot is free). Give the worker only: the feature, run,
|
|
46
|
+
lane, its task IDs, their file ownership and the artifacts by `@path`. It returns one line per task.
|
|
47
|
+
- Workers report on a fixed rule, which you must also keep. Report at the start of a task, at the end of a task, and whenever you are blocked or waiting. Never report on a timer and never report progress.
|
|
48
|
+
- When a worker finishes: `ambykit fleet update <feature> --worker-done=<lane>`.
|
|
49
|
+
- **Blocked:** the worker marks the task `⚠ BLOCKED: <reason>` and you continue with other unblocked tasks.
|
|
50
|
+
Blocked work is yours to resolve or give to the person; workers never ask each other.
|
|
51
|
+
- **Stalled:** `status` flags a lane with no report and no `tasks.md` change for the stall limit. Restart it with
|
|
52
|
+
`ambykit fleet update <feature> --restart=<lane>` and re-delegate its unchecked IDs. After the restart limit the
|
|
53
|
+
command pauses the lane and asks for a person: only they may approve moving it to another assistant or marking
|
|
54
|
+
its task BLOCKED.
|
|
55
|
+
- **Notes and claims:** workers claim files before editing (`ambykit fleet claim`), post one-line notes
|
|
56
|
+
(`ambykit fleet note`) and their claims are released when a task is checked off. A refused claim names the
|
|
57
|
+
owner; sort it out through the board and `status` warnings, not by editing the file.
|
|
58
|
+
|
|
59
|
+
## 3. QA (stage `qa`)
|
|
60
|
+
|
|
61
|
+
When every task of the phase is checked: `ambykit fleet update <feature> --stage=qa`. Ask QA (`@.amby/roles/qa.md`, read-only) to:
|
|
62
|
+
|
|
63
|
+
1. run the phase's `**Verify:**` line, and check the acceptance criteria of its stories; if `tests.md` exists, its
|
|
64
|
+
cases for these tasks are the expected tests. No Verify line → check the criteria only and say the phase has none.
|
|
65
|
+
2. return a verdict. You write it to `.amby/fleet/<run>/verdicts/<lane>.qa.<round>.json`
|
|
66
|
+
(`<round>` = failed rounds so far + 1): `{"verdict":"pass"|"fail","findings":[{"id","severity","finding","fix"}]}`.
|
|
67
|
+
3. record the result on the Verify line, per spec 020: `✓ passed`, `✗ failed: <why>`, or, when the check cannot be
|
|
68
|
+
run here, tell the person, ask them to confirm and record `? unverified`.
|
|
69
|
+
|
|
70
|
+
A failing Verify never passes the checkpoint. Do not tick the checkpoint or start the next phase until it passes.
|
|
71
|
+
|
|
72
|
+
## 4. Architect review (stage `architect`)
|
|
73
|
+
|
|
74
|
+
After QA passes: `ambykit fleet update <feature> --stage=architect`. Ask the architect (`@.amby/roles/architect.md`, read-only) for correctness,
|
|
75
|
+
simplification and fit with `plan.md`; findings by stable ID, same verdict file with `.architect.`.
|
|
76
|
+
|
|
77
|
+
- **Fail** (QA or architect): `ambykit fleet update <feature> --round=<failed rounds so far>`. It prints `retry` or
|
|
78
|
+
`escalate`. **retry** → return only the finding IDs and their `fix` to the **same worker** (same lane) and go back
|
|
79
|
+
to `working`. **escalate** (the round limit) → stop: summarize the open findings and ask the person to decide.
|
|
80
|
+
Record their answer with `ambykit fleet update <feature> --decision="<text>"` and continue from it.
|
|
81
|
+
- **Pass:** `ambykit fleet update <feature> --phase=<next>`; after the last phase,
|
|
82
|
+
`ambykit fleet update <feature> --done`, then suggest `/amby.converge`.
|
|
83
|
+
|
|
84
|
+
## Pause, resume, stop
|
|
85
|
+
|
|
86
|
+
When the person asks: `ambykit fleet update <feature> --pause` (or `--resume`, `--stop`; add `=<lane>` for one lane).
|
|
87
|
+
This writes a directive per lane; start no new worker while paused. The directive protocol is: The reply carries a directive: continue, pause or stop. On pause or stop, finish the task you are on, then obey it at your next report: do not start another task.
|
|
88
|
+
The run state records `paused`; the next `/amby.run` resumes from it.
|
|
89
|
+
|
|
90
|
+
## Overlap
|
|
91
|
+
|
|
92
|
+
If workers' files overlap, choose before any work starts and record it:
|
|
93
|
+
- **Serialize:** one worker after the other. `ambykit fleet update <feature> --overlap=serialized --lanes=a,b --order=a,b`
|
|
94
|
+
- **Squad:** one writer per shared file, a fixed merge order; others send change requests through the writer or you.
|
|
95
|
+
`ambykit fleet update <feature> --overlap=squad --lanes=a,b --shared=<path>,... --writer=<path>:<lane>,... --order=a,b`
|
|
96
|
+
|
|
97
|
+
## Rules
|
|
98
|
+
|
|
99
|
+
- All review roles, including `security`, stay read-only; never give them write access. Only workers write code.
|
|
100
|
+
- Keep every status line to one line; no logs, no restated artifacts.
|
package/src/prompts/tasks.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
id: tasks
|
|
3
3
|
name: amby.tasks
|
|
4
4
|
description: Break the plan into an ordered, dependency-aware task checklist.
|
|
5
|
-
argument-hint: "[feature id, defaults to current]"
|
|
5
|
+
argument-hint: "[feature id, defaults to current] [--skip-tests <reason>]"
|
|
6
6
|
phase: tasks
|
|
7
7
|
role: tech-lead
|
|
8
|
-
reads: [specs/NNN-slug/plan.md, specs/NNN-slug/spec.md]
|
|
9
|
-
writes: [specs/NNN-slug/tasks.md]
|
|
8
|
+
reads: [specs/NNN-slug/plan.md, specs/NNN-slug/spec.md, specs/NNN-slug/tests.md]
|
|
9
|
+
writes: [specs/NNN-slug/tasks.md, specs/NNN-slug/tests.md]
|
|
10
10
|
allowedTools: [read, write, edit]
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -25,5 +25,15 @@ Run `ambykit activity <feature> --agent=$AGENT --phase=tasks` first, with that f
|
|
|
25
25
|
4. Give every task a stable `T###` id and its file paths as the line's last parenthesized group:
|
|
26
26
|
comma-separated, repo-relative, dirs end `/`, no globs. Mark `[P]` only when no other task in the
|
|
27
27
|
same phase shares or nests a path.
|
|
28
|
+
5. End every phase with exactly ONE `**Verify:**` line, plain text after its tasks: a runnable check
|
|
29
|
+
or observable condition that proves the phase works (e.g. a test command). Never more than one.
|
|
30
|
+
6. Also write `tests.md` (the test design) in this phase per `@.amby/templates/tests.md`, touching only `tasks.md`
|
|
31
|
+
and `tests.md`. If `spec.md` is not `status: ready`, skip it and say the spec must be ready first. One case per
|
|
32
|
+
acceptance criterion (negative and edge ones too, max 15 per story); one too vague to test goes under `## Flags`.
|
|
33
|
+
With `--skip-tests <reason>`, write `tests.md` holding only the line `skipped: <reason>`.
|
|
34
|
+
7. Cases are `auto` unless a fixed-list reason makes them manual (add `verify:` and `record:`). Each cites its `US-n#k`
|
|
35
|
+
and `FR-###`s; `TC-###` is highest + 1, never reused. An FR with no case goes under `## Uncovered` with a reason.
|
|
36
|
+
With an existing `tests.md`, patch only the cases citing changed criteria (keep their ids, clear `[stale]`), mark
|
|
37
|
+
cases whose criterion was removed `[obsolete]` and add new ones; leave the rest untouched.
|
|
28
38
|
|
|
29
39
|
Do not start implementing. Keep descriptions to one line each.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: security
|
|
3
|
+
name: Security Reviewer
|
|
4
|
+
phases: [review]
|
|
5
|
+
---
|
|
6
|
+
Review for security risk. Read-only and advisory: never edit, never create a decision record.
|
|
7
|
+
|
|
8
|
+
**Focus:**
|
|
9
|
+
- Trust boundaries and untrusted input named for each flow
|
|
10
|
+
- Authentication, authorization and least privilege on every action
|
|
11
|
+
- Secrets, tokens and personal data: where stored, logged, transmitted
|
|
12
|
+
- Injection, path traversal and unsafe deserialization in file and command handling
|
|
13
|
+
- Dependencies and install steps: pinned, minimal, from known sources
|
|
14
|
+
- Failure modes that leak data or fail open
|
|
15
|
+
|
|
16
|
+
**Hand-off:** findings by stable ID with severity and a one-line fix. Where a choice is durable,
|
|
17
|
+
suggest recording it with `/amby.decide`; the person decides.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ADR-{{NNN}}
|
|
3
|
+
title: {{TITLE}}
|
|
4
|
+
status: proposed # proposed | accepted | superseded | deprecated
|
|
5
|
+
date: {{DATE}}
|
|
6
|
+
feature: # optional: NNN-slug this decision came from
|
|
7
|
+
principle: # optional: constitution principle number
|
|
8
|
+
conflicts: [] # principle numbers this decision conflicts with; must be empty to accept
|
|
9
|
+
supersedes: # optional: ADR-### this record replaces
|
|
10
|
+
superseded-by: # set on the OLD record when replaced
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# {{TITLE}}
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
{{WHY_A_DECISION_WAS_NEEDED}}
|
|
18
|
+
|
|
19
|
+
## Decision
|
|
20
|
+
|
|
21
|
+
{{WHAT_WAS_DECIDED}}
|
|
22
|
+
|
|
23
|
+
## Alternatives
|
|
24
|
+
|
|
25
|
+
- {{ALTERNATIVE}} — {{WHY_NOT}}
|
|
26
|
+
|
|
27
|
+
## Consequences
|
|
28
|
+
|
|
29
|
+
- {{CONSEQUENCE}}
|
package/src/templates/tasks.md
CHANGED
|
@@ -9,21 +9,27 @@ created: {{DATE}}
|
|
|
9
9
|
> `[x]` = done (source of truth for `ambykit dashboard`). `[P]` = parallelizable. `[US#]` = story tag.
|
|
10
10
|
> Paths: repo-relative, comma-separated, dirs end `/`, no globs. `[P]` tasks in a phase must not share or nest paths.
|
|
11
11
|
> Gate: no user-story task starts until Foundational completes.
|
|
12
|
+
> Markers go last on the task line, after the path group: `⚠ BLOCKED: <reason>` for a task that cannot proceed, `↪ DEVIATION: <note>` for a change from the plan. The glyph is optional (`BLOCKED:` works too); remove `⚠ BLOCKED:` when resolved.
|
|
13
|
+
> Each phase ends with one `**Verify:** <check>` line, run before the checkpoint. Record the result as a suffix on that line: `✓ passed`, `✗ failed: <why>` or `? unverified` (the words alone also work); a later run overwrites it.
|
|
12
14
|
|
|
13
15
|
## Phase 1 — Setup
|
|
14
16
|
|
|
15
17
|
- [ ] [T001] {{SETUP_TASK}} ({{PATH}})
|
|
18
|
+
- **Verify:** {{VERIFY_CHECK}}
|
|
16
19
|
|
|
17
20
|
## Phase 2 — Foundational (blocks all feature work)
|
|
18
21
|
|
|
19
22
|
- [ ] [T010] {{FOUNDATIONAL_TASK}} ({{PATH}})
|
|
23
|
+
- **Verify:** {{VERIFY_CHECK}}
|
|
20
24
|
|
|
21
25
|
## Phase 3 — User story US-1 (priority: P1)
|
|
22
26
|
|
|
23
27
|
- [ ] [T020] [P] [US1] {{TASK}} ({{PATH}})
|
|
24
28
|
- [ ] [T021] [US1] {{TASK}} ({{PATH}})
|
|
25
29
|
- **Checkpoint:** US-1 is demoable.
|
|
30
|
+
- **Verify:** {{VERIFY_CHECK}}
|
|
26
31
|
|
|
27
32
|
## Phase 4 — Polish
|
|
28
33
|
|
|
29
34
|
- [ ] [T090] {{POLISH_TASK}} ({{PATH}})
|
|
35
|
+
- **Verify:** {{VERIFY_CHECK}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
feature: {{FEATURE_ID}}
|
|
3
|
+
created: {{DATE}}
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tests — {{FEATURE_TITLE}}
|
|
7
|
+
|
|
8
|
+
> Test design, written by `/amby.tasks` before code. One case per acceptance criterion; machine-read by `ambykit analyze`.
|
|
9
|
+
> Case: `- [TC-###] [US-n#k] [FR-###, FR-###] auto — short name → expected outcome`
|
|
10
|
+
> `US-n#k` = the k-th acceptance bullet of story n (`US-n` alone = the story). `TC-###` = highest + 1, never reused or renumbered.
|
|
11
|
+
> Decision: `auto` by default. Manual only with a reason from the list: `manual:human-judgment`, `manual:external-system`,
|
|
12
|
+
> `manual:visual-check`, `manual:one-off`, and then add `; verify: <how>; record: <where the result goes>`.
|
|
13
|
+
> At most 15 cases per story (split the story otherwise). Name tests in code `NNN:FR-###: …` (qualified).
|
|
14
|
+
> Refresh: a case citing a changed criterion gets ` [stale]`; one whose criterion was removed gets ` [obsolete]` (never deleted).
|
|
15
|
+
> Skipped design: the file holds only `skipped: <reason>`.
|
|
16
|
+
|
|
17
|
+
## Cases
|
|
18
|
+
|
|
19
|
+
- [TC-001] [US-1#1] [FR-001] auto — {{CASE_NAME}} → {{EXPECTED}}
|
|
20
|
+
- [TC-002] [US-1#2] [FR-002] manual:visual-check — {{CASE_NAME}} → {{EXPECTED}}; verify: {{HOW}}; record: {{WHERE}}
|
|
21
|
+
|
|
22
|
+
## Uncovered
|
|
23
|
+
|
|
24
|
+
- FR-###: deliberately uncovered — {{REASON}}
|
|
25
|
+
uncovered: FR-### — {{REASON}}
|
|
26
|
+
|
|
27
|
+
## Flags
|
|
28
|
+
|
|
29
|
+
- US-n#k: too vague to test — {{REASON}}
|