@ambystech/ambykit 1.5.0 → 2.0.0-rc.1
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 +190 -1
- package/README.md +12 -7
- package/dist/cli/add.js +9 -0
- package/dist/cli/add.js.map +1 -1
- package/dist/cli/analyze.js +25 -4
- package/dist/cli/analyze.js.map +1 -1
- package/dist/cli/base-command.d.ts +8 -0
- package/dist/cli/base-command.js +30 -0
- package/dist/cli/base-command.js.map +1 -1
- package/dist/cli/check.d.ts +2 -0
- package/dist/cli/check.js +38 -4
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/dashboard.d.ts +5 -2
- package/dist/cli/dashboard.js +95 -24
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/edit.d.ts +17 -0
- package/dist/cli/edit.js +71 -0
- package/dist/cli/edit.js.map +1 -0
- package/dist/cli/fleet.d.ts +2 -0
- package/dist/cli/fleet.js +23 -1
- package/dist/cli/fleet.js.map +1 -1
- package/dist/cli/index.d.ts +1 -5
- package/dist/cli/index.js +21 -109
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.js +9 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lane.d.ts +38 -3
- package/dist/cli/lane.js +124 -108
- package/dist/cli/lane.js.map +1 -1
- package/dist/cli/main.d.ts +6 -0
- package/dist/cli/main.js +111 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/mcp.d.ts +2 -0
- package/dist/cli/mcp.js +4 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/migrate.d.ts +17 -0
- package/dist/cli/migrate.js +67 -0
- package/dist/cli/migrate.js.map +1 -0
- package/dist/cli/node-guard.d.ts +4 -0
- package/dist/cli/node-guard.js +12 -0
- package/dist/cli/node-guard.js.map +1 -0
- package/dist/cli/run-budget.d.ts +25 -0
- package/dist/cli/run-budget.js +112 -0
- package/dist/cli/run-budget.js.map +1 -0
- package/dist/cli/run-control.d.ts +40 -0
- package/dist/cli/run-control.js +161 -0
- package/dist/cli/run-control.js.map +1 -0
- package/dist/cli/run-files.d.ts +96 -0
- package/dist/cli/run-files.js +120 -0
- package/dist/cli/run-files.js.map +1 -0
- package/dist/cli/run-fleet-control.d.ts +16 -0
- package/dist/cli/run-fleet-control.js +23 -0
- package/dist/cli/run-fleet-control.js.map +1 -0
- package/dist/cli/run-fleet-loop.d.ts +77 -0
- package/dist/cli/run-fleet-loop.js +156 -0
- package/dist/cli/run-fleet-loop.js.map +1 -0
- package/dist/cli/run-fleet-merge.d.ts +22 -0
- package/dist/cli/run-fleet-merge.js +69 -0
- package/dist/cli/run-fleet-merge.js.map +1 -0
- package/dist/cli/run-fleet-prepare.d.ts +35 -0
- package/dist/cli/run-fleet-prepare.js +58 -0
- package/dist/cli/run-fleet-prepare.js.map +1 -0
- package/dist/cli/run-fleet.d.ts +28 -0
- package/dist/cli/run-fleet.js +382 -0
- package/dist/cli/run-fleet.js.map +1 -0
- package/dist/cli/run-gates.d.ts +25 -0
- package/dist/cli/run-gates.js +45 -0
- package/dist/cli/run-gates.js.map +1 -0
- package/dist/cli/run-launch.d.ts +17 -0
- package/dist/cli/run-launch.js +106 -0
- package/dist/cli/run-launch.js.map +1 -0
- package/dist/cli/run-loop.d.ts +39 -0
- package/dist/cli/run-loop.js +197 -0
- package/dist/cli/run-loop.js.map +1 -0
- package/dist/cli/run-merger.d.ts +18 -0
- package/dist/cli/run-merger.js +126 -0
- package/dist/cli/run-merger.js.map +1 -0
- package/dist/cli/run-phase-check.d.ts +32 -0
- package/dist/cli/run-phase-check.js +173 -0
- package/dist/cli/run-phase-check.js.map +1 -0
- package/dist/cli/run-plan.d.ts +28 -0
- package/dist/cli/run-plan.js +62 -0
- package/dist/cli/run-plan.js.map +1 -0
- package/dist/cli/run-process.d.ts +45 -0
- package/dist/cli/run-process.js +111 -0
- package/dist/cli/run-process.js.map +1 -0
- package/dist/cli/run-protocol-prompts.d.ts +17 -0
- package/dist/cli/run-protocol-prompts.js +63 -0
- package/dist/cli/run-protocol-prompts.js.map +1 -0
- package/dist/cli/run-protocol.d.ts +17 -0
- package/dist/cli/run-protocol.js +128 -0
- package/dist/cli/run-protocol.js.map +1 -0
- package/dist/cli/run-script.d.ts +11 -0
- package/dist/cli/run-script.js +67 -0
- package/dist/cli/run-script.js.map +1 -0
- package/dist/cli/run-session.d.ts +93 -0
- package/dist/cli/run-session.js +21 -0
- package/dist/cli/run-session.js.map +1 -0
- package/dist/cli/run-stages.d.ts +11 -0
- package/dist/cli/run-stages.js +34 -0
- package/dist/cli/run-stages.js.map +1 -0
- package/dist/cli/run-supervisor.d.ts +20 -0
- package/dist/cli/run-supervisor.js +167 -0
- package/dist/cli/run-supervisor.js.map +1 -0
- package/dist/cli/run.d.ts +81 -0
- package/dist/cli/run.js +437 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/sync.js +10 -5
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/ui/dashboard/empty-state.d.ts +5 -0
- package/dist/cli/ui/dashboard/empty-state.js +7 -0
- package/dist/cli/ui/dashboard/empty-state.js.map +1 -1
- package/dist/cli/ui/dashboard/filter-line.d.ts +13 -0
- package/dist/cli/ui/dashboard/filter-line.js +20 -0
- package/dist/cli/ui/dashboard/filter-line.js.map +1 -0
- package/dist/cli/ui/dashboard/fleet-tab.d.ts +25 -0
- package/dist/cli/ui/dashboard/fleet-tab.js +91 -0
- package/dist/cli/ui/dashboard/fleet-tab.js.map +1 -0
- package/dist/cli/ui/dashboard/fleet-tokens.d.ts +404 -0
- package/dist/cli/ui/dashboard/fleet-tokens.js +405 -0
- package/dist/cli/ui/dashboard/fleet-tokens.js.map +1 -0
- package/dist/cli/ui/dashboard/fleet-view.d.ts +51 -0
- package/dist/cli/ui/dashboard/fleet-view.js +211 -0
- package/dist/cli/ui/dashboard/fleet-view.js.map +1 -0
- package/dist/cli/ui/dashboard/help-overlay.d.ts +3 -1
- package/dist/cli/ui/dashboard/help-overlay.js +36 -3
- package/dist/cli/ui/dashboard/help-overlay.js.map +1 -1
- package/dist/cli/ui/dashboard/layout.d.ts +15 -0
- package/dist/cli/ui/dashboard/layout.js +22 -0
- package/dist/cli/ui/dashboard/layout.js.map +1 -1
- package/dist/cli/ui/dashboard/metrics-panel.d.ts +15 -0
- package/dist/cli/ui/dashboard/metrics-panel.js +143 -0
- package/dist/cli/ui/dashboard/metrics-panel.js.map +1 -0
- package/dist/cli/ui/dashboard/tab-bar.d.ts +14 -0
- package/dist/cli/ui/dashboard/tab-bar.js +37 -0
- package/dist/cli/ui/dashboard/tab-bar.js.map +1 -0
- package/dist/cli/ui/dashboard/tab-frame.d.ts +43 -0
- package/dist/cli/ui/dashboard/tab-frame.js +68 -0
- package/dist/cli/ui/dashboard/tab-frame.js.map +1 -0
- package/dist/cli/ui/dashboard/tab-tokens.d.ts +569 -0
- package/dist/cli/ui/dashboard/tab-tokens.js +570 -0
- package/dist/cli/ui/dashboard/tab-tokens.js.map +1 -0
- package/dist/cli/ui/icons.d.ts +22 -0
- package/dist/cli/ui/icons.js +17 -0
- package/dist/cli/ui/icons.js.map +1 -0
- package/dist/cli/ui/interactive/fleet-actions.d.ts +24 -0
- package/dist/cli/ui/interactive/fleet-actions.js +30 -0
- package/dist/cli/ui/interactive/fleet-actions.js.map +1 -0
- package/dist/cli/ui/interactive/fleet.d.ts +54 -0
- package/dist/cli/ui/interactive/fleet.js +98 -0
- package/dist/cli/ui/interactive/fleet.js.map +1 -0
- package/dist/cli/ui/interactive/fullscreen.js +38 -10
- package/dist/cli/ui/interactive/fullscreen.js.map +1 -1
- package/dist/cli/ui/interactive/list-filter.d.ts +25 -0
- package/dist/cli/ui/interactive/list-filter.js +38 -0
- package/dist/cli/ui/interactive/list-filter.js.map +1 -0
- package/dist/cli/ui/interactive/live.d.ts +8 -0
- package/dist/cli/ui/interactive/live.js +13 -0
- package/dist/cli/ui/interactive/live.js.map +1 -1
- package/dist/cli/ui/interactive/overview.d.ts +52 -3
- package/dist/cli/ui/interactive/overview.js +354 -15
- package/dist/cli/ui/interactive/overview.js.map +1 -1
- package/dist/cli/ui/interactive/tabs.d.ts +15 -0
- package/dist/cli/ui/interactive/tabs.js +27 -0
- package/dist/cli/ui/interactive/tabs.js.map +1 -0
- package/dist/cli/ui/tool-options.d.ts +5 -1
- package/dist/cli/ui/tool-options.js +9 -3
- package/dist/cli/ui/tool-options.js.map +1 -1
- package/dist/cli/update.js +13 -2
- package/dist/cli/update.js.map +1 -1
- package/dist/core/analyze.d.ts +11 -0
- package/dist/core/analyze.js +33 -3
- package/dist/core/analyze.js.map +1 -1
- package/dist/core/burndown.d.ts +1 -1
- package/dist/core/burndown.js +2 -2
- package/dist/core/burndown.js.map +1 -1
- package/dist/core/checkouts.js +3 -2
- package/dist/core/checkouts.js.map +1 -1
- package/dist/core/config-schema.d.ts +45 -0
- package/dist/core/config-schema.js +63 -0
- package/dist/core/config-schema.js.map +1 -0
- package/dist/core/config.d.ts +6 -0
- package/dist/core/config.js +16 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/dashboard.js +3 -2
- package/dist/core/dashboard.js.map +1 -1
- package/dist/core/decisions.d.ts +12 -1
- package/dist/core/decisions.js +7 -2
- package/dist/core/decisions.js.map +1 -1
- package/dist/core/deprecation.d.ts +15 -0
- package/dist/core/deprecation.js +27 -0
- package/dist/core/deprecation.js.map +1 -0
- package/dist/core/features.js +11 -5
- package/dist/core/features.js.map +1 -1
- package/dist/core/fleet/fleet-text.d.ts +2 -0
- package/dist/core/fleet/fleet-text.js +41 -0
- package/dist/core/fleet/fleet-text.js.map +1 -0
- package/dist/core/fleet/fleet-view.d.ts +35 -0
- package/dist/core/fleet/fleet-view.js +43 -0
- package/dist/core/fleet/fleet-view.js.map +1 -0
- package/dist/core/fleet/fleets.d.ts +18 -0
- package/dist/core/fleet/fleets.js +64 -0
- package/dist/core/fleet/fleets.js.map +1 -0
- package/dist/core/fleet/flow-input.js +3 -4
- package/dist/core/fleet/flow-input.js.map +1 -1
- package/dist/core/fleet/index.d.ts +3 -0
- package/dist/core/fleet/index.js +3 -0
- package/dist/core/fleet/index.js.map +1 -1
- package/dist/core/fleet/runs.d.ts +18 -2
- package/dist/core/fleet/runs.js +67 -16
- package/dist/core/fleet/runs.js.map +1 -1
- package/dist/core/fleet-plan/budget.d.ts +18 -0
- package/dist/core/fleet-plan/budget.js +13 -0
- package/dist/core/fleet-plan/budget.js.map +1 -0
- package/dist/core/fleet-plan/contain.d.ts +10 -0
- package/dist/core/fleet-plan/contain.js +37 -0
- package/dist/core/fleet-plan/contain.js.map +1 -0
- package/dist/core/fleet-plan/format.d.ts +4 -0
- package/dist/core/fleet-plan/format.js +52 -0
- package/dist/core/fleet-plan/format.js.map +1 -0
- package/dist/core/fleet-plan/index.d.ts +7 -0
- package/dist/core/fleet-plan/index.js +8 -0
- package/dist/core/fleet-plan/index.js.map +1 -0
- package/dist/core/fleet-plan/order.d.ts +30 -0
- package/dist/core/fleet-plan/order.js +96 -0
- package/dist/core/fleet-plan/order.js.map +1 -0
- package/dist/core/fleet-plan/ownership.d.ts +12 -0
- package/dist/core/fleet-plan/ownership.js +36 -0
- package/dist/core/fleet-plan/ownership.js.map +1 -0
- package/dist/core/fleet-plan/plan.d.ts +23 -0
- package/dist/core/fleet-plan/plan.js +40 -0
- package/dist/core/fleet-plan/plan.js.map +1 -0
- package/dist/core/fleet-plan/read.d.ts +19 -0
- package/dist/core/fleet-plan/read.js +35 -0
- package/dist/core/fleet-plan/read.js.map +1 -0
- package/dist/core/fleet-plan/schedule.d.ts +15 -0
- package/dist/core/fleet-plan/schedule.js +27 -0
- package/dist/core/fleet-plan/schedule.js.map +1 -0
- package/dist/core/fleet-plan/select.d.ts +20 -0
- package/dist/core/fleet-plan/select.js +64 -0
- package/dist/core/fleet-plan/select.js.map +1 -0
- package/dist/core/fleet-plan/types.d.ts +123 -0
- package/dist/core/fleet-plan/types.js +2 -0
- package/dist/core/fleet-plan/types.js.map +1 -0
- package/dist/core/fleet-view/derive.d.ts +14 -0
- package/dist/core/fleet-view/derive.js +54 -0
- package/dist/core/fleet-view/derive.js.map +1 -0
- package/dist/core/fleet-view/group.d.ts +51 -0
- package/dist/core/fleet-view/group.js +73 -0
- package/dist/core/fleet-view/group.js.map +1 -0
- package/dist/core/fleet-view/json.d.ts +37 -0
- package/dist/core/fleet-view/json.js +25 -0
- package/dist/core/fleet-view/json.js.map +1 -0
- package/dist/core/fleet-view/read.d.ts +8 -0
- package/dist/core/fleet-view/read.js +44 -0
- package/dist/core/fleet-view/read.js.map +1 -0
- package/dist/core/fleet-view/types.d.ts +52 -0
- package/dist/core/fleet-view/types.js +2 -0
- package/dist/core/fleet-view/types.js.map +1 -0
- package/dist/core/graph-format.d.ts +2 -0
- package/dist/core/graph-format.js +4 -3
- package/dist/core/graph-format.js.map +1 -1
- package/dist/core/graph-types.d.ts +4 -0
- package/dist/core/graph.js +38 -1
- package/dist/core/graph.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/lane-merge.d.ts +29 -0
- package/dist/core/lane-merge.js +105 -0
- package/dist/core/lane-merge.js.map +1 -0
- package/dist/core/lanes.d.ts +53 -0
- package/dist/core/lanes.js +131 -0
- package/dist/core/lanes.js.map +1 -1
- package/dist/core/legacy.d.ts +2 -1
- package/dist/core/legacy.js +7 -2
- package/dist/core/legacy.js.map +1 -1
- package/dist/core/markers.d.ts +7 -0
- package/dist/core/markers.js +3 -2
- package/dist/core/markers.js.map +1 -1
- package/dist/core/metrics/cycle.d.ts +3 -0
- package/dist/core/metrics/cycle.js +47 -0
- package/dist/core/metrics/cycle.js.map +1 -0
- package/dist/core/metrics/gap.d.ts +9 -0
- package/dist/core/metrics/gap.js +35 -0
- package/dist/core/metrics/gap.js.map +1 -0
- package/dist/core/metrics/index.d.ts +21 -0
- package/dist/core/metrics/index.js +67 -0
- package/dist/core/metrics/index.js.map +1 -0
- package/dist/core/metrics/model.d.ts +23 -0
- package/dist/core/metrics/model.js +46 -0
- package/dist/core/metrics/model.js.map +1 -0
- package/dist/core/metrics/revisions.d.ts +22 -0
- package/dist/core/metrics/revisions.js +88 -0
- package/dist/core/metrics/revisions.js.map +1 -0
- package/dist/core/metrics/types.d.ts +74 -0
- package/dist/core/metrics/types.js +3 -0
- package/dist/core/metrics/types.js.map +1 -0
- package/dist/core/migrate/convert-spec.d.ts +19 -0
- package/dist/core/migrate/convert-spec.js +99 -0
- package/dist/core/migrate/convert-spec.js.map +1 -0
- package/dist/core/migrate/convert-tasks.d.ts +16 -0
- package/dist/core/migrate/convert-tasks.js +121 -0
- package/dist/core/migrate/convert-tasks.js.map +1 -0
- package/dist/core/migrate/run.d.ts +36 -0
- package/dist/core/migrate/run.js +178 -0
- package/dist/core/migrate/run.js.map +1 -0
- package/dist/core/migrate/safety.d.ts +33 -0
- package/dist/core/migrate/safety.js +199 -0
- package/dist/core/migrate/safety.js.map +1 -0
- package/dist/core/migrate/summary.d.ts +36 -0
- package/dist/core/migrate/summary.js +140 -0
- package/dist/core/migrate/summary.js.map +1 -0
- package/dist/core/moved-targets.d.ts +73 -8
- package/dist/core/moved-targets.js +79 -1
- package/dist/core/moved-targets.js.map +1 -1
- package/dist/core/overview-types.d.ts +7 -0
- package/dist/core/overview-types.js.map +1 -1
- package/dist/core/overview.js +4 -0
- package/dist/core/overview.js.map +1 -1
- package/dist/core/query.js +3 -2
- package/dist/core/query.js.map +1 -1
- package/dist/core/run-gate-actions.d.ts +51 -0
- package/dist/core/run-gate-actions.js +105 -0
- package/dist/core/run-gate-actions.js.map +1 -0
- package/dist/core/run-launch-plan.d.ts +53 -0
- package/dist/core/run-launch-plan.js +32 -0
- package/dist/core/run-launch-plan.js.map +1 -0
- package/dist/core/run-prompt.d.ts +89 -0
- package/dist/core/run-prompt.js +73 -0
- package/dist/core/run-prompt.js.map +1 -0
- package/dist/core/run-result.d.ts +42 -0
- package/dist/core/run-result.js +163 -0
- package/dist/core/run-result.js.map +1 -0
- package/dist/core/run-review.d.ts +50 -0
- package/dist/core/run-review.js +20 -0
- package/dist/core/run-review.js.map +1 -0
- package/dist/core/run-schedule.d.ts +23 -0
- package/dist/core/run-schedule.js +40 -0
- package/dist/core/run-schedule.js.map +1 -0
- package/dist/core/run-stability.d.ts +23 -0
- package/dist/core/run-stability.js +38 -0
- package/dist/core/run-stability.js.map +1 -0
- package/dist/core/run-supervise.d.ts +71 -0
- package/dist/core/run-supervise.js +61 -0
- package/dist/core/run-supervise.js.map +1 -0
- package/dist/core/runners.d.ts +114 -0
- package/dist/core/runners.js +146 -0
- package/dist/core/runners.js.map +1 -0
- package/dist/core/sibling-reads.d.ts +41 -0
- package/dist/core/sibling-reads.js +100 -0
- package/dist/core/sibling-reads.js.map +1 -0
- package/dist/core/spec-format/blocks.d.ts +19 -0
- package/dist/core/spec-format/blocks.js +58 -0
- package/dist/core/spec-format/blocks.js.map +1 -0
- package/dist/core/spec-format/detect.d.ts +14 -0
- package/dist/core/spec-format/detect.js +30 -0
- package/dist/core/spec-format/detect.js.map +1 -0
- package/dist/core/spec-format/dispatch.d.ts +13 -0
- package/dist/core/spec-format/dispatch.js +64 -0
- package/dist/core/spec-format/dispatch.js.map +1 -0
- package/dist/core/spec-format/frontmatter.d.ts +18 -0
- package/dist/core/spec-format/frontmatter.js +37 -0
- package/dist/core/spec-format/frontmatter.js.map +1 -0
- package/dist/core/spec-format/legacy.d.ts +40 -0
- package/dist/core/spec-format/legacy.js +91 -0
- package/dist/core/spec-format/legacy.js.map +1 -0
- package/dist/core/spec-format/meta.d.ts +3 -0
- package/dist/core/spec-format/meta.js +24 -0
- package/dist/core/spec-format/meta.js.map +1 -0
- package/dist/core/spec-format/model.d.ts +50 -0
- package/dist/core/spec-format/model.js +9 -0
- package/dist/core/spec-format/model.js.map +1 -0
- package/dist/core/spec-format/read-spec.d.ts +4 -0
- package/dist/core/spec-format/read-spec.js +102 -0
- package/dist/core/spec-format/read-spec.js.map +1 -0
- package/dist/core/spec-format/read-tasks.d.ts +2 -0
- package/dist/core/spec-format/read-tasks.js +146 -0
- package/dist/core/spec-format/read-tasks.js.map +1 -0
- package/dist/core/spec-format/write.d.ts +23 -0
- package/dist/core/spec-format/write.js +382 -0
- package/dist/core/spec-format/write.js.map +1 -0
- package/dist/core/subagents.js +0 -2
- package/dist/core/subagents.js.map +1 -1
- package/dist/core/tasks-edit.d.ts +4 -1
- package/dist/core/tasks-edit.js +19 -6
- package/dist/core/tasks-edit.js.map +1 -1
- package/dist/core/types.d.ts +21 -0
- package/dist/emitters/index.d.ts +0 -4
- package/dist/emitters/index.js +0 -10
- package/dist/emitters/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/plugins/api.d.ts +14 -8
- package/dist/plugins/api.js +9 -8
- package/dist/plugins/api.js.map +1 -1
- package/dist/plugins/index.d.ts +3 -2
- package/dist/plugins/index.js +3 -2
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/loader.d.ts +8 -0
- package/dist/plugins/loader.js +36 -6
- package/dist/plugins/loader.js.map +1 -1
- package/dist/plugins/report.d.ts +1 -1
- package/dist/plugins/report.js +3 -4
- package/dist/plugins/report.js.map +1 -1
- package/dist/plugins/session.d.ts +1 -0
- package/dist/plugins/session.js +1 -1
- package/dist/plugins/session.js.map +1 -1
- package/dist/testkit/index.d.ts +1 -1
- package/docs/architecture.md +16 -1
- package/docs/artifacts/decision-record.md +15 -0
- package/docs/artifacts/spec.md +35 -6
- package/docs/artifacts/tasks.md +67 -16
- package/docs/cli-reference.md +274 -5
- package/docs/contributing.md +6 -0
- package/docs/migration.md +191 -0
- package/docs/plugin-api.md +21 -13
- package/docs/plugin-split.md +5 -3
- package/docs/plugin-trust.md +2 -2
- package/docs/plugins-release.md +105 -0
- package/docs/release.md +103 -0
- package/docs/stability.md +152 -0
- package/docs/tool-compatibility.md +41 -3
- package/docs/workflow.md +10 -6
- package/package.json +4 -2
- package/src/agents/worker.md +2 -1
- package/src/prompts/converge.md +2 -2
- package/src/prompts/implement.md +13 -11
- package/src/prompts/revise.md +5 -2
- package/src/prompts/run.md +7 -4
- package/src/prompts/specify.md +5 -3
- package/src/prompts/tasks.md +9 -8
- package/src/templates/spec.md +10 -4
- package/src/templates/tasks.md +35 -13
- package/dist/emitters/antigravity-cli.d.ts +0 -15
- package/dist/emitters/antigravity-cli.js +0 -20
- package/dist/emitters/antigravity-cli.js.map +0 -1
- package/dist/emitters/antigravity.d.ts +0 -20
- package/dist/emitters/antigravity.js +0 -24
- package/dist/emitters/antigravity.js.map +0 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Migrating to the v2 spec format
|
|
2
|
+
|
|
3
|
+
AmbyKit 2.0 stores a spec's machine-read data in structured form instead of scattered bullets and trailing
|
|
4
|
+
parentheses. `ambykit migrate` converts your existing `spec.md` and `tasks.md` files for you, without rewriting any
|
|
5
|
+
prose. This page says what changes, how to run it safely, and what to do when it skips a file.
|
|
6
|
+
|
|
7
|
+
## Upgrade a 1.x project to 2.0
|
|
8
|
+
|
|
9
|
+
Do these steps in order. Each links to the section with the detail.
|
|
10
|
+
|
|
11
|
+
1. **Node 22 or newer.** Run AmbyKit on Node 22 or newer, locally and in CI; an older Node exits with a message naming the required
|
|
12
|
+
version ([Also in 2.0](#also-in-20)).
|
|
13
|
+
2. **Upgrade every tool that reads your specs first.** Local installs, CI and teammates move to 2.0 **before** you commit migrated
|
|
14
|
+
files: a 1.x AmbyKit reads a v2 file without an error but loses data ([A 1.x AmbyKit loses data on a v2 file](#a-1x-ambykit-loses-data-on-a-v2-file)).
|
|
15
|
+
Check with `ambykit --version`.
|
|
16
|
+
3. **Preview.** Commit your work, then:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
ambykit migrate --dry-run
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
It writes nothing and lists each file it would convert or skip. Fix every skipped file using the table in
|
|
23
|
+
[When it skips a file](#when-it-skips-a-file).
|
|
24
|
+
4. **Migrate.**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
ambykit migrate
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Running it again changes nothing. It also adds `"schemaVersion": 2` to `.amby/config.json` ([Migrate in four steps](#migrate-in-four-steps)).
|
|
31
|
+
5. **Review.** `git diff`, then confirm both are clean:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ambykit check
|
|
35
|
+
ambykit analyze
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
6. **Antigravity users: install the plugin.** If `.amby/config.json` lists `antigravity` or `antigravity-cli`, follow
|
|
39
|
+
[Antigravity is a plugin in 2.0](#antigravity-is-a-plugin-in-20), then run `ambykit sync`.
|
|
40
|
+
7. **What `run` and the plugin API now promise.** The plugin API and `ambykit run` are stable from 2.0 (one fleet of this
|
|
41
|
+
repository built two dependent features with a verified runner). Both promise only what
|
|
42
|
+
[the stability contract](./stability.md) lists, and a change follows its deprecation policy.
|
|
43
|
+
8. **A CI pinned to 1.x.** If some reader must stay on 1.x for a while, migrate with `ambykit migrate --dual-write` instead, and run
|
|
44
|
+
`ambykit migrate` without the flag once everything is on 2.x ([A 1.x AmbyKit loses data on a v2 file](#a-1x-ambykit-loses-data-on-a-v2-file)).
|
|
45
|
+
|
|
46
|
+
1.x files are still read until 2.1 ([Timeline](#timeline)).
|
|
47
|
+
|
|
48
|
+
## What changes
|
|
49
|
+
|
|
50
|
+
| | 1.x | v2 |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Story priority | `(priority: P1)` in the heading | `priority: P1` in the spec's frontmatter `stories:` list |
|
|
53
|
+
| Story status, `depends-on`, `blocked-by` | bullets under each heading | the same story entry in the frontmatter |
|
|
54
|
+
| A task's files | trailing `(src/a.ts, test/a.test.ts)` on the task line | `files:` in the phase's `yaml` block |
|
|
55
|
+
| A phase's Verify check and result | a `**Verify:** <check> ✓ passed` line | `verify:` (`check`, `result`, `why`) in the same block |
|
|
56
|
+
| Marker | no `format` key | `format: 2` in the frontmatter of both files |
|
|
57
|
+
|
|
58
|
+
Everything else stays: the prose, headings, checkboxes, `[P]` and `[US#]` tags, `⚠ BLOCKED:` and `↪ DEVIATION:`
|
|
59
|
+
markers on the task line, requirements, `plan.md`, `tests.md` and every ID. Plans and `tests.md` are not migrated.
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
<!-- before: spec.md -->
|
|
63
|
+
### US-2 — Export the report (priority: P2)
|
|
64
|
+
- **depends-on:** [US-1]
|
|
65
|
+
- **status:** in-progress
|
|
66
|
+
|
|
67
|
+
<!-- after -->
|
|
68
|
+
---
|
|
69
|
+
format: 2
|
|
70
|
+
stories:
|
|
71
|
+
- id: US-2
|
|
72
|
+
priority: P2
|
|
73
|
+
status: in-progress
|
|
74
|
+
depends-on: [US-1]
|
|
75
|
+
---
|
|
76
|
+
### US-2 — Export the report
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Migrate in four steps
|
|
80
|
+
|
|
81
|
+
1. **Commit or stash your work.** `migrate` warns, and names the files, if a file it is about to convert has
|
|
82
|
+
uncommitted changes, but a clean tree makes the result easy to review and to undo with `git`.
|
|
83
|
+
2. **Preview.** `ambykit migrate --dry-run` writes nothing and prints, per feature, each file it would convert with
|
|
84
|
+
the lines added and removed, each file it would skip and why. Add `--diff` to see every change.
|
|
85
|
+
3. **Migrate.** `ambykit migrate` (or `ambykit migrate 023` for one feature). Running it again changes nothing.
|
|
86
|
+
4. **Review and commit.** `git diff` shows the move; `ambykit analyze` and `ambykit dashboard` read the migrated
|
|
87
|
+
specs exactly as before.
|
|
88
|
+
|
|
89
|
+
`migrate` only ever touches `spec.md` and `tasks.md` of **this checkout**, never another worktree. It also adds
|
|
90
|
+
`"schemaVersion": 2` to `.amby/config.json`, keeping every setting (including ones it does not know). A config from a
|
|
91
|
+
newer AmbyKit, or one that is not valid JSON, is left untouched and reported.
|
|
92
|
+
|
|
93
|
+
## It is safe by construction
|
|
94
|
+
|
|
95
|
+
- A file that is **not provably safe is left untouched and listed**, with the reason and the fix (below).
|
|
96
|
+
- Every conversion is **read back** through the same readers every command uses; if its meaning differs from the 1.x
|
|
97
|
+
reading, the file is skipped and left as it was.
|
|
98
|
+
- Each file is **written once**, to a temporary file in the same directory and then renamed over the original, after
|
|
99
|
+
checking that nobody changed it since it was read. Interrupt it at any point and every file is either wholly old
|
|
100
|
+
or wholly new; run it again to finish.
|
|
101
|
+
|
|
102
|
+
### When it skips a file
|
|
103
|
+
|
|
104
|
+
| Skip reason | Fix |
|
|
105
|
+
|---|---|
|
|
106
|
+
| Story metadata inside a sentence (`The **status:** field…`) | put the metadata on its own bullet, or reword the sentence |
|
|
107
|
+
| Story metadata or task markup inside a code fence | reword or move the fenced example |
|
|
108
|
+
| Two `status` (or `depends-on`, …) bullets for one story | keep one |
|
|
109
|
+
| A heading priority that conflicts with a priority bullet | make them agree |
|
|
110
|
+
| Two `**Verify:**` lines in one phase | keep one |
|
|
111
|
+
| A task id repeated in a phase | give each task its own id |
|
|
112
|
+
| Mixed line endings, or a byte-order mark | make the endings consistent, or save without a BOM |
|
|
113
|
+
| Frontmatter that is not closed | close it with a `---` line |
|
|
114
|
+
|
|
115
|
+
Fix the file, then run `migrate` again: files already converted are skipped as `already v2`.
|
|
116
|
+
|
|
117
|
+
## A 1.x AmbyKit loses data on a v2 file
|
|
118
|
+
|
|
119
|
+
A 1.x AmbyKit reads a v2 file **without an error** but loses story statuses, dependencies, file ownership and Verify
|
|
120
|
+
results: its `analyze` would list every story as buildable. Upgrade every tool that reads your specs (local installs,
|
|
121
|
+
CI, teammates) to 2.0 **before** committing migrated files. If some must stay on 1.x for a while, use
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
ambykit migrate --dual-write
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
which keeps the 1.x bullets, groups and Verify lines **and** adds the v2 data, so both versions read the file. Dual-write
|
|
128
|
+
files are transitional: they cost about 12% more tokens and every edit must be made twice by hand, so run
|
|
129
|
+
`migrate` without the flag once everything is on 2.x.
|
|
130
|
+
|
|
131
|
+
## Editing a v2 file
|
|
132
|
+
|
|
133
|
+
Do not edit the `files:` and `verify:` data or a story's status by hand: one YAML typo makes a phase unreadable.
|
|
134
|
+
Use the writer, which works on 1.x and v2 files alike and refuses anything it cannot do safely:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
ambykit edit files <feature> T### <path…>
|
|
138
|
+
ambykit edit verify <feature> <phase> --result=passed|failed|unverified [--why=<text>]
|
|
139
|
+
ambykit edit status <feature> US-# <status>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The phase prompts (`/amby.implement`, `/amby.run` and the others) use it. If a v2 file does have an error,
|
|
143
|
+
`ambykit analyze` names the file and line and exits non-zero.
|
|
144
|
+
|
|
145
|
+
## Timeline
|
|
146
|
+
|
|
147
|
+
- **2.0** reads 1.x and v2 files, per file, side by side (a repository can hold both, and so can its git history).
|
|
148
|
+
Every command that reads 1.x files prints one line saying how many and how to migrate. Silence it with
|
|
149
|
+
`"legacyWarning": false` in `.amby/config.json` or `AMBYKIT_LEGACY_WARNING=0`; it never appears in `--json`.
|
|
150
|
+
`ambykit check` lists the features still on 1.x.
|
|
151
|
+
- **2.1** stops reading 1.x files and tells you to migrate with 2.0. It ships only once no migration issue has been
|
|
152
|
+
open for a release.
|
|
153
|
+
|
|
154
|
+
## Antigravity is a plugin in 2.0
|
|
155
|
+
|
|
156
|
+
> **Applies from AmbyKit 2.0.** In 1.x Antigravity is still bundled and nothing here applies.
|
|
157
|
+
|
|
158
|
+
AmbyKit 2.0 keeps Claude Code, Codex, Copilot, Cursor and OpenCode (with their variants `claude-vscode`, `copilot-cli`,
|
|
159
|
+
`cursor-cli` and the `pi` alias) built in. **Both Antigravity targets, `antigravity` and `antigravity-cli`, move to an official
|
|
160
|
+
plugin.** The files it writes are identical, so a project synced with 1.x has no diff afterwards.
|
|
161
|
+
|
|
162
|
+
If your `.amby/config.json` lists either Antigravity target:
|
|
163
|
+
|
|
164
|
+
1. Install the plugin in your project: `npm install --save-exact @ambystech/ambykit-emitter-antigravity`.
|
|
165
|
+
2. List it, pinned to the exact installed version, next to your tools (the target ids do not change):
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"tools": ["claude", "antigravity", "antigravity-cli"],
|
|
170
|
+
"plugins": { "@ambystech/ambykit-emitter-antigravity": "1.0.0" }
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
3. Run `ambykit sync`. It writes nothing new; `ambykit check` should pass.
|
|
175
|
+
|
|
176
|
+
Until you do, `sync`, `check` and `update` name the target and print these two lines, keep syncing your other targets, exit
|
|
177
|
+
non-zero, and **never delete or rewrite** the files Antigravity already has. AmbyKit does not install the package or edit your
|
|
178
|
+
config for you. Read [plugin trust](./plugin-trust.md) first: a plugin is code that runs on your machine.
|
|
179
|
+
|
|
180
|
+
`init` and `add` list Antigravity as "official plugin, install first" and refuse it with the same lines until the plugin is
|
|
181
|
+
installed and listed. The files stay shared with Codex and Pi under `.agents/skills/`: removing one owner from your config
|
|
182
|
+
leaves them for the others.
|
|
183
|
+
|
|
184
|
+
Seven other targets (`gemini`, `llxprt`, `qwen`, `kilo`, `augment`, `windsurf`, `kiro`) stay bundled in 2.0 and print a one-line
|
|
185
|
+
notice naming the plugin that will replace each one once it is published. Nothing to do yet.
|
|
186
|
+
|
|
187
|
+
## Also in 2.0
|
|
188
|
+
|
|
189
|
+
- **Node 22 or newer.** An older Node exits with a message naming the required version.
|
|
190
|
+
- **`.amby/config.json` has a `schemaVersion`.** A config without one is read as version 1 and only `migrate`
|
|
191
|
+
upgrades it.
|
package/docs/plugin-api.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Plugin API
|
|
1
|
+
# Plugin API
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
> which API range they support, and AmbyKit refuses a plugin outside it. Read
|
|
3
|
+
> **Stable from 2.0.** What [`stability.md`](./stability.md) lists does not change incompatibly within 2.x; additions are
|
|
4
|
+
> allowed in a minor release. Plugins say which API range they support, and AmbyKit refuses a plugin outside it. Read
|
|
5
5
|
> [`plugin-trust.md`](./plugin-trust.md) before you install one: a plugin is code that runs on your
|
|
6
|
-
> machine.
|
|
6
|
+
> machine. Maintainers releasing an official plugin: [`plugins-release.md`](./plugins-release.md).
|
|
7
7
|
|
|
8
8
|
A plugin adds **emitter targets**: a new assistant that `ambykit sync` writes native command files for.
|
|
9
9
|
Roles, phases and templates are not extensible yet (they ship in a later 1.x release).
|
|
@@ -38,12 +38,15 @@ working example with all three extension points is in
|
|
|
38
38
|
|
|
39
39
|
```json
|
|
40
40
|
{ "name": "ambykit-emitter-mytool", "version": "1.0.0", "type": "module",
|
|
41
|
-
"ambykit": { "pluginApi": "^
|
|
42
|
-
"peerDependencies": { "@ambystech/ambykit": ">=
|
|
41
|
+
"ambykit": { "pluginApi": "^2" },
|
|
42
|
+
"peerDependencies": { "@ambystech/ambykit": ">=2.0.0" } }
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
The current API version is `
|
|
46
|
-
refused, and the message names the range it asked for and the version found.
|
|
45
|
+
The current API version is `2.0.0` (`PLUGIN_API_VERSION`). A plugin whose range contains neither it nor the 1.x API is
|
|
46
|
+
refused, and the message names the range it asked for and the version found. **A plugin written for the 1.x API (`^1`)
|
|
47
|
+
still loads**: 2.0 keeps everything 1.0 had and only adds, so `sync` prints a one-line note that the plugin declares
|
|
48
|
+
the 1.x API; declare `^2` once you have tested it. A 1.x plugin that imported a name the API does not export is refused with
|
|
49
|
+
the name it relied on (and, if the factory's `api` argument provides it, where to get it). Ranges may use an exact
|
|
47
50
|
version, `^`, `~`, `>=`, `>`, `<=`, `<`, spaces (AND) and `||` (OR); anything else is refused.
|
|
48
51
|
|
|
49
52
|
## Extension points
|
|
@@ -59,7 +62,10 @@ Import from `@ambystech/ambykit/plugin`, or take them from the factory's `api` a
|
|
|
59
62
|
- `skillName`, `skillPath`, `skillFrontmatter` — the skills helpers, for an emitter that cannot extend
|
|
60
63
|
`SkillsEmitter`.
|
|
61
64
|
- `tomlBasic`, `tomlPrompt` — TOML string helpers.
|
|
62
|
-
- `
|
|
65
|
+
- `MCP_SERVER_NAME`, `MCP_COMMAND` — the name AmbyKit's MCP server is registered under and how a host starts it, for an
|
|
66
|
+
emitter that writes a project MCP file through the inherited `mcpFile()` helper (override `mcpFiles()`; return `null`
|
|
67
|
+
from `mcpSkipReason()`).
|
|
68
|
+
- `PLUGIN_API_VERSION` — the API version.
|
|
63
69
|
|
|
64
70
|
Types: `TargetDef`, `CommandSpec`, `CommandSurface`, `EmittedFile`, `RulesContext`, `Role`,
|
|
65
71
|
`PluginModule`, `PluginFactory`, `PluginApi`.
|
|
@@ -82,8 +88,8 @@ Types: `TargetDef`, `CommandSpec`, `CommandSurface`, `EmittedFile`, `RulesContex
|
|
|
82
88
|
naming both owners (and their plugins).
|
|
83
89
|
- **Failures are isolated.** A plugin that is missing, mis-pinned, out of range, malformed or throws on
|
|
84
90
|
load is reported with a reason; the other targets still sync, and `sync` exits 1.
|
|
85
|
-
- **What AmbyKit prints.** On every `sync`, each loaded plugin as `name@version
|
|
86
|
-
|
|
91
|
+
- **What AmbyKit prints.** On every `sync`, each loaded plugin as `name@version`, plus a note under a plugin that
|
|
92
|
+
loaded through 1.x compatibility.
|
|
87
93
|
|
|
88
94
|
## Using a plugin
|
|
89
95
|
|
|
@@ -120,5 +126,7 @@ without a documented row for its host cannot pass.
|
|
|
120
126
|
|
|
121
127
|
## Stability
|
|
122
128
|
|
|
123
|
-
- 1.
|
|
124
|
-
- 2.0:
|
|
129
|
+
- 1.x: experimental.
|
|
130
|
+
- 2.0: stable. [`stability.md`](./stability.md) lists what is promised and how a stable name is deprecated and removed.
|
|
131
|
+
`[plugin-api]` entries in `CHANGELOG.md` say whether a release affects plugins; a change that would break a listed name is
|
|
132
|
+
held for the next major plugin API version (3.0).
|
package/docs/plugin-split.md
CHANGED
|
@@ -11,7 +11,9 @@ what to extract (SC-007). If a target does move, the mechanism for telling a pro
|
|
|
11
11
|
(VS Code and CLI variants, and Pi, which reuses Codex's output). The later additions are *plugin
|
|
12
12
|
candidates*: Gemini CLI, LLxprt Code, Qwen Code, Kilo Code, Augment Code, Windsurf and Kiro.
|
|
13
13
|
|
|
14
|
-
## The 18 targets
|
|
14
|
+
## The 18 targets (as of the 2026-11-16 measurement)
|
|
15
|
+
|
|
16
|
+
**Status after 2.0 (feature 036):** both Antigravity targets moved to the official plugin `@ambystech/ambykit-emitter-antigravity` (`plugins/antigravity/`); the seven later additions stay bundled with a deprecation notice until their plugins exist; everything else is built in. The registry holds sixteen ids. The table below is the evidence the decision used, so its Antigravity rows keep their old emitter file names.
|
|
15
17
|
|
|
16
18
|
Churn is measured from git history of the target's emitter source file as of 2026-11-16: commits that
|
|
17
19
|
touched the file, the date it was added and the date of the last change. It counts **our own** edits too
|
|
@@ -27,8 +29,8 @@ count of it. Aliases share their parent's file.
|
|
|
27
29
|
| `opencode` | `opencode.ts` | built in | 5 · 2026-07-07 · 2026-11-16 | not collected |
|
|
28
30
|
| `cursor` | `cursor.ts` | built in | 4 · 2026-07-07 · 2026-11-16 | not collected |
|
|
29
31
|
| `cursor-cli` | `cursor-cli.ts` | built in (sibling) | 1 · 2026-07-07 · 2026-07-07 | not collected |
|
|
30
|
-
| `antigravity` | `antigravity.ts` |
|
|
31
|
-
| `antigravity-cli` | `antigravity-cli.ts`
|
|
32
|
+
| `antigravity` | `antigravity.ts` (removed in 2.0) | official plugin | 4 · 2026-07-07 · 2026-11-16 | not collected |
|
|
33
|
+
| `antigravity-cli` | `antigravity-cli.ts` (removed in 2.0) | official plugin | 3 · 2026-07-07 · 2026-11-16 | not collected |
|
|
32
34
|
| `codex` | `codex.ts` | built in | 2 · 2026-07-13 · 2026-11-03 | not collected |
|
|
33
35
|
| `gemini` | `gemini.ts` | plugin candidate | 1 · 2026-11-03 · 2026-11-03 | not collected |
|
|
34
36
|
| `llxprt` | `llxprt.ts` | plugin candidate | 1 · 2026-11-03 · 2026-11-03 | not collected |
|
package/docs/plugin-trust.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Plugin trust
|
|
2
2
|
|
|
3
|
-
> The plugin API is **
|
|
4
|
-
> sandbox.** A plugin is JavaScript that runs inside `ambykit sync` with your permissions. Install one
|
|
3
|
+
> The plugin API is **stable from 2.0** (see [`plugin-api.md`](./plugin-api.md) and [`stability.md`](./stability.md)), but
|
|
4
|
+
> stable is not safe. **There is no sandbox.** A plugin is JavaScript that runs inside `ambykit sync` with your permissions. Install one
|
|
5
5
|
> only if you would run its author's code.
|
|
6
6
|
|
|
7
7
|
## What AmbyKit does to keep this safe
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Releasing an official plugin
|
|
2
|
+
|
|
3
|
+
> For maintainers. Official plugins (the targets that moved out of the core, spec 036) live **in this repository**, one
|
|
4
|
+
> directory each under `plugins/`, and are published to npm by **one** workflow, `.github/workflows/publish-plugins.yml`.
|
|
5
|
+
> It runs only when something under `plugins/` changes on `main`. The core package has its own workflow (`publish.yml`).
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
plugins/<name>/
|
|
11
|
+
package.json name @ambystech/ambykit-emitter-<name>, its own version, "ambykit": { "pluginApi": "^2" }
|
|
12
|
+
tsconfig.json builds src/ to dist/
|
|
13
|
+
src/index.ts default-export factory(api); only `import type` from "@ambystech/ambykit/plugin"
|
|
14
|
+
test/*.test.ts run by the root vitest, with the contract kit from "@ambystech/ambykit/testkit"
|
|
15
|
+
CHANGELOG.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- **No npm workspaces.** A plugin gets everything through the `api` its factory receives (see [`plugin-api.md`](./plugin-api.md)),
|
|
19
|
+
so it has no runtime dependency. TypeScript and vitest come from the repository root.
|
|
20
|
+
- **Independent versions.** Releasing one plugin never releases another, or the core.
|
|
21
|
+
- The core package ships an allowlist (`files` in the root `package.json`), so `plugins/` is never part of it.
|
|
22
|
+
- Tests import `@ambystech/ambykit/plugin` and `@ambystech/ambykit/testkit`; `vitest.config.ts` resolves those names to this
|
|
23
|
+
checkout's `src/`, so a plugin's tests always run against the core of the same commit and need no build.
|
|
24
|
+
|
|
25
|
+
`package.json` must also carry what npm provenance checks:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"name": "@ambystech/ambykit-emitter-antigravity",
|
|
30
|
+
"version": "1.0.0",
|
|
31
|
+
"type": "module",
|
|
32
|
+
"main": "dist/index.js",
|
|
33
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
34
|
+
"ambykit": { "pluginApi": "^2" },
|
|
35
|
+
"repository": { "type": "git", "url": "git+https://github.com/ambystechcom/AmbyKit.git", "directory": "plugins/antigravity" }
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## How a release happens
|
|
40
|
+
|
|
41
|
+
A release is a **version bump merged to `main`**. The workflow runs only when a push to `main` changes something under `plugins/`,
|
|
42
|
+
so a core change or a core release never starts it, and a plugin change never starts the core's `publish.yml`.
|
|
43
|
+
|
|
44
|
+
1. In a pull request, bump `version` in `plugins/<name>/package.json` and add the entry to `plugins/<name>/CHANGELOG.md`.
|
|
45
|
+
2. Merge it. The workflow publishes every plugin whose version is not on npm yet. A change under `plugins/` without a bump
|
|
46
|
+
(a test, a README) publishes nothing.
|
|
47
|
+
3. After a publish it tags the merge commit `plugin/<name>/v<x.y.z>` and creates a GitHub Release for it. You don't create that
|
|
48
|
+
Release yourself. The workflow creates it with its own `GITHUB_TOKEN`, and GitHub starts no workflow from that, so
|
|
49
|
+
no skipped run of either workflow appears.
|
|
50
|
+
|
|
51
|
+
The plugin name is the directory under `plugins/` (lowercase letters, digits and dashes; anything else, including a path, is refused).
|
|
52
|
+
|
|
53
|
+
## What the workflow does
|
|
54
|
+
|
|
55
|
+
`.github/workflows/publish-plugins.yml`, on a push to `main` that touches `plugins/**`, or by hand (**Actions, Publish plugin to
|
|
56
|
+
npm, Run workflow**, with the plugin name). Two jobs:
|
|
57
|
+
|
|
58
|
+
- **plan**: `node scripts/plugin-release.mjs pending` lists the plugins whose `package.json` version is not on npm (a manual run
|
|
59
|
+
takes the plugin named). With none, the publish job is skipped.
|
|
60
|
+
- **publish**, once per listed plugin, one at a time, on Linux with Node 22 in the `Prod` environment, stopping at the first failing step:
|
|
61
|
+
1. `npm ci`, `npm run typecheck`, `npm run build` (the core of this commit).
|
|
62
|
+
2. `node scripts/plugin-release.mjs verify <name>`: the package name is `@ambystech/ambykit-emitter-<name>`, the version is
|
|
63
|
+
`x.y.z`, the `pluginApi` range includes the current plugin API (`PLUGIN_API_VERSION`), the package is not private and has no
|
|
64
|
+
`workspaces`, and `repository` points at this repository and the plugin's directory.
|
|
65
|
+
3. `npm run build:plugins`, then the plugin's tests (`npx vitest run plugins/<name>/`, so a plugin needs at least one test).
|
|
66
|
+
4. `npm pack --dry-run`, so the file list is in the log.
|
|
67
|
+
5. If that exact version is already on npm, it stops here (a manual run of a published version changes nothing).
|
|
68
|
+
6. `npm publish --access public` from `plugins/<name>/`, using Trusted Publishing (OIDC). Provenance is automatic.
|
|
69
|
+
7. The `plugin/<name>/v<x.y.z>` tag and GitHub Release (skipped if the Release exists).
|
|
70
|
+
|
|
71
|
+
## The first publish of a new plugin is manual
|
|
72
|
+
|
|
73
|
+
npm only lets you configure a trusted publisher for a package that **already exists**; there is no "pending publisher".
|
|
74
|
+
So for each new plugin, once:
|
|
75
|
+
|
|
76
|
+
1. From your machine, in `plugins/<name>/`: `npm run build:plugins` at the root, then `npm publish --access public` (you sign in with
|
|
77
|
+
your own npm account and 2FA). Publish `1.0.0`, or the version in `package.json`.
|
|
78
|
+
2. On npmjs.com, open the package, then **Settings, Trusted Publisher, GitHub Actions**, and enter: this repository,
|
|
79
|
+
workflow filename `publish-plugins.yml` (the file name with its extension, **case-sensitive**), environment `Prod`, and under
|
|
80
|
+
**Allowed actions** tick **npm publish**: new entries can default to staged publishing only, and a direct publish then fails with
|
|
81
|
+
`403 OIDC permission denied for this action`. npm does not validate the entry when you save it, so a typo shows up only when a
|
|
82
|
+
publish fails.
|
|
83
|
+
3. Prove it: merge the next version bump to `main` **within 2 days** (npm's limit for a new
|
|
84
|
+
configuration to complete its first publish).
|
|
85
|
+
|
|
86
|
+
## Adding a plugin
|
|
87
|
+
|
|
88
|
+
1. Create `plugins/<name>/` as above; write a factory that extends `api.BaseEmitter` (or `SkillsEmitter`), declare `ambykit.pluginApi`.
|
|
89
|
+
2. Add tests that run the contract kit against the target's row in [`tool-compatibility.md`](./tool-compatibility.md).
|
|
90
|
+
3. `npm run build:plugins` and `npx vitest run plugins/<name>/` pass locally.
|
|
91
|
+
4. Do the manual first publish and set the trusted publisher (above).
|
|
92
|
+
5. Mention it in the core `CHANGELOG.md` and in `docs/plugin-split.md`.
|
|
93
|
+
|
|
94
|
+
## When something goes wrong
|
|
95
|
+
|
|
96
|
+
- **A bad version is out.** Merge a fixed version (a new version bump). `npm unpublish` is only possible in the first 72 hours and for
|
|
97
|
+
versions nothing depends on; prefer `npm deprecate "@ambystech/ambykit-emitter-<name>@<version>" "reason, use <fixed version>"`.
|
|
98
|
+
- **A plugin must stop being used.** `npm deprecate "@ambystech/ambykit-emitter-<name>" "reason"` (all versions), and say what
|
|
99
|
+
replaces it in the plugin's `CHANGELOG.md`.
|
|
100
|
+
- **The workflow fails at "Verify".** The `::error::` lines say what to fix in `package.json`. A failure there publishes nothing;
|
|
101
|
+
merge the fix and the next push publishes the version.
|
|
102
|
+
- **A publish failed after the merge.** Fix the cause (for example the trusted publisher on npm), then re-run the failed job, or run
|
|
103
|
+
the workflow by hand with the plugin name.
|
|
104
|
+
- **The publish worked but the tag or Release is missing.** Run the workflow by hand with the plugin name: it skips the publish
|
|
105
|
+
and creates them if they are missing.
|
package/docs/release.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Releasing AmbyKit 2.0
|
|
2
|
+
|
|
3
|
+
> For maintainers. How the core package `@ambystech/ambykit` goes from a release candidate to 2.0.0, the gate that must pass
|
|
4
|
+
> first, and the rollback plan. Spec: `specs/034-release-2-0/`. Official plugins are released separately, by their own tags
|
|
5
|
+
> (see [`plugins-release.md`](./plugins-release.md)); the steps that apply to every release are in
|
|
6
|
+
> [`contributing.md`](./contributing.md#release-checklist).
|
|
7
|
+
|
|
8
|
+
An assistant may prepare a branch, run the checks and fill evidence. **Only the release maintainer** (an npm owner of
|
|
9
|
+
`@ambystech/ambykit` with GitHub release rights) logs in to npm, creates releases and tags, publishes and changes dist-tags.
|
|
10
|
+
|
|
11
|
+
## Release checklist
|
|
12
|
+
|
|
13
|
+
Follow it in order. Stop at the first step that fails; nothing is waived.
|
|
14
|
+
|
|
15
|
+
1. **Preconditions.**
|
|
16
|
+
- The Antigravity plugin `@ambystech/ambykit-emitter-antigravity` is published, install-tested and has its trusted publisher
|
|
17
|
+
(036 T034, T035, T037). Check: `npm view @ambystech/ambykit-emitter-antigravity version`.
|
|
18
|
+
- Every 2.0 feature (030 to 033, 036) is merged, and AmbyKit's own specs are migrated (030 T095), the last commit before release.
|
|
19
|
+
2. **Release candidate.** On a branch `release/2.0.0-rc.1`: set the version with `npm version 2.0.0-rc.1 --no-git-tag-version`,
|
|
20
|
+
add the changelog heading, re-record the goldens and run `ambykit sync` twice (the second a no-op), then `npm test`. Merge it,
|
|
21
|
+
then the maintainer creates the GitHub Release marked as a prerelease:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
gh release create v2.0.0-rc.1 --prerelease --title "v2.0.0-rc.1" --notes "Release candidate for 2.0.0"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`publish.yml` publishes it under the `next` dist-tag (`scripts/release-tag.mjs`). Confirm `latest` did not move:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm dist-tag ls @ambystech/ambykit
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. **Try the candidate on another project.** Install `@ambystech/ambykit@next` in at least one project that is not this repository,
|
|
34
|
+
migrate it and build a real feature. Record it in `specs/034-release-2-0/rc-report.md` with a `- **Project:**` and a
|
|
35
|
+
`- **Date:**` line. A data-loss bug in `migrate` means a fix and a second candidate (`2.0.0-rc.2`), never a final release.
|
|
36
|
+
4. **Gate.** Fill each row of `specs/034-release-2-0/gate.md` (C1 to C5) with `met`, the date and the evidence, then:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run release:check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
It names the first condition or precondition that is not met. The same check runs in `publish.yml` before a 2.0.x is published.
|
|
43
|
+
5. **Release branch.** Cut `release/2.0.0` from `main`: `npm version 2.0.0 --no-git-tag-version`, retitle `[Unreleased]` to
|
|
44
|
+
`[2.0.0] — <date>` keeping the `Plugins:` line, goldens once, `ambykit sync` twice, then `npm run typecheck`, `npm test`,
|
|
45
|
+
`node scripts/check-docs-sync.mjs`, `ambykit sync --check`, `ambykit analyze` and `ambykit trace 034`. Fill C5 with the
|
|
46
|
+
branch's CI run URL.
|
|
47
|
+
6. **Publish.** Merge the release branch, save the `[2.0.0]` changelog block as `release-notes.md`, then:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
gh release create v2.0.0 --title "v2.0.0" --notes-file release-notes.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`publish.yml` checks the tag equals the package version, runs the gate and publishes with provenance through trusted publishing
|
|
54
|
+
(no stored token) under `latest`. If provenance fails, do not publish again under another version without writing down why.
|
|
55
|
+
7. **Fresh-install check.** In an empty directory:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx -y @ambystech/ambykit@2.0.0 --version
|
|
59
|
+
npx -y @ambystech/ambykit@2.0.0 migrate --help
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The first prints `2.0.0`. Record the result in `gate.md`.
|
|
63
|
+
|
|
64
|
+
## Rollback
|
|
65
|
+
|
|
66
|
+
Use this when a serious defect is found after 2.0.0 is published. The last 1.x version is **1.6.0**. The release maintainer runs every
|
|
67
|
+
command; each needs an npm owner login (`npm login`) or GitHub release rights.
|
|
68
|
+
|
|
69
|
+
1. **Point `latest` back at 1.x**, so a new install gets 1.6.0 again:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm dist-tag add @ambystech/ambykit@1.6.0 latest
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
2. **Deprecate 2.0.0** with a message naming the version that fixes it:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm deprecate @ambystech/ambykit@2.0.0 "Serious defect, use 2.0.1 (or 1.6.0 until it ships)"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
3. **Edit the GitHub release** so readers see the problem first:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
gh release edit v2.0.0 --prerelease --notes "Withdrawn: <defect>. Use 2.0.1."
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
4. **Ship the fix as 2.0.1.** An npm version cannot be unpublished and published again: the number 2.0.0 is used for good, even if it
|
|
88
|
+
is unpublished. Fix on `main`, cut `release/2.0.1`, run the gate and publish it. Then move `latest` forward with
|
|
89
|
+
`npm dist-tag add @ambystech/ambykit@2.0.1 latest` (the workflow already publishes a plain version under `latest`) and update the
|
|
90
|
+
deprecation message if needed.
|
|
91
|
+
|
|
92
|
+
### Projects already migrated by 2.0
|
|
93
|
+
|
|
94
|
+
A project that ran `ambykit migrate` has v2 files. **A 1.x AmbyKit reads a v2 file without an error but loses story statuses,
|
|
95
|
+
dependencies, file ownership and Verify results**: its `analyze` lists every story as buildable. There are two ways back to 1.x:
|
|
96
|
+
|
|
97
|
+
- **Restore from version control:** check out the spec and task files from before the migration commit
|
|
98
|
+
(`git checkout <migration-commit>^ -- specs/`). 1.6.0 and 2.0 both read them.
|
|
99
|
+
- **Dual-write:** after restoring, run `ambykit migrate --dual-write` with 2.0 if you want the v2 data as well. It keeps the 1.x
|
|
100
|
+
bullets, groups and Verify lines beside the v2 data, so 1.6.0 and 2.x both read the files. `migrate` leaves a file that is already
|
|
101
|
+
v2 alone, so dual-write starts from the 1.x files, not from migrated ones.
|
|
102
|
+
|
|
103
|
+
Details are in [the migration guide](./migration.md#a-1x-ambykit-loses-data-on-a-v2-file).
|