@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,41 @@
|
|
|
1
|
+
import type { TaskLine } from "./dashboard.js";
|
|
2
|
+
/**
|
|
3
|
+
* Sibling reads (feature 039) — a `[P]` task whose description names a file another `[P]` task of the same parallel
|
|
4
|
+
* stage writes. The two run at the same time in separate lanes, so the reader runs against a file that is not there
|
|
5
|
+
* yet (the 2.0 dogfood: 038's T013 tested the docs T012 wrote). Pure functions over parsed `tasks.md`; no fs, no model
|
|
6
|
+
* tokens. `readsAmong` is the shared rule (FR-008): `ambykit lane` (040) calls it on a candidate stage.
|
|
7
|
+
*/
|
|
8
|
+
export interface SiblingRead {
|
|
9
|
+
feature: string;
|
|
10
|
+
phase: number;
|
|
11
|
+
/** The task whose description names the path. */
|
|
12
|
+
reader: string;
|
|
13
|
+
/** The task that owns (writes) the path. */
|
|
14
|
+
owner: string;
|
|
15
|
+
/** The named paths the owner owns, normalized and sorted. */
|
|
16
|
+
paths: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Tokens of a description that look like repo paths (FR-002, spec edge cases): they contain `/` or end in a file
|
|
20
|
+
* extension. Backticks, quotes and surrounding punctuation are stripped, then the token is normalized like a declared
|
|
21
|
+
* path (`normalizePath`), so `` `docs/X.md` ``, `docs/x.md.` and `./docs/x.md` are the same path. URLs are skipped.
|
|
22
|
+
* Unique, in order of first mention.
|
|
23
|
+
*/
|
|
24
|
+
export declare function namedPaths(description: string): string[];
|
|
25
|
+
/**
|
|
26
|
+
* The (reader, owner) pairs among tasks that run at the same time (FR-001, FR-008): `reader`'s description names a
|
|
27
|
+
* path `owner` owns. A path the reader owns itself is never a sibling read (FR-007); checked-off tasks are ignored.
|
|
28
|
+
* One finding per pair, listing every path; in task order (reader, then owner). The caller decides which tasks run
|
|
29
|
+
* together — `siblingReads` passes one parallel run at a time, 040 passes a candidate stage.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readsAmong(tasks: readonly TaskLine[], feature?: string): SiblingRead[];
|
|
32
|
+
/**
|
|
33
|
+
* The runs of tasks that execute together in parallel: per phase, the open tasks in `tasks.md` order, split into runs
|
|
34
|
+
* of consecutive `[P]` tasks (an open non-`[P]` task ends a run — the grouping `nextStageTasks` uses for a parallel
|
|
35
|
+
* stage). Runs of a single task are dropped: it has no sibling.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parallelRuns(tasks: readonly TaskLine[]): TaskLine[][];
|
|
38
|
+
/** Every sibling read of a feature (FR-001, FR-007): `readsAmong` over each parallel run of each phase. */
|
|
39
|
+
export declare function siblingReads(feature: string, tasks: readonly TaskLine[]): SiblingRead[];
|
|
40
|
+
/** One-line human message for a sibling read, ending with the fix (FR-003). */
|
|
41
|
+
export declare function describeSiblingRead(r: SiblingRead): string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { normalizePath } from "./lanes.js";
|
|
2
|
+
/** Characters that wrap a path in prose: quotes, backticks, brackets, and sentence punctuation. */
|
|
3
|
+
const WRAP_START = /^[`'"([{<*_]+/;
|
|
4
|
+
const WRAP_END = /[`'")\]}>*_,;:!?.]+$/;
|
|
5
|
+
/** A file extension at the end of a token: `.md`, `.ts`, `.json`… */
|
|
6
|
+
const EXTENSION = /\.[a-z0-9]{1,8}$/i;
|
|
7
|
+
/**
|
|
8
|
+
* Tokens of a description that look like repo paths (FR-002, spec edge cases): they contain `/` or end in a file
|
|
9
|
+
* extension. Backticks, quotes and surrounding punctuation are stripped, then the token is normalized like a declared
|
|
10
|
+
* path (`normalizePath`), so `` `docs/X.md` ``, `docs/x.md.` and `./docs/x.md` are the same path. URLs are skipped.
|
|
11
|
+
* Unique, in order of first mention.
|
|
12
|
+
*/
|
|
13
|
+
export function namedPaths(description) {
|
|
14
|
+
const out = [];
|
|
15
|
+
const seen = new Set();
|
|
16
|
+
for (const raw of description.split(/[\s`,]+/)) {
|
|
17
|
+
const token = raw.replace(WRAP_START, "").replace(WRAP_END, "");
|
|
18
|
+
if (token.length === 0 || token.includes("://"))
|
|
19
|
+
continue;
|
|
20
|
+
if (!token.includes("/") && !EXTENSION.test(token))
|
|
21
|
+
continue;
|
|
22
|
+
const path = normalizePath(token);
|
|
23
|
+
if (path.length === 0 || seen.has(path))
|
|
24
|
+
continue;
|
|
25
|
+
seen.add(path);
|
|
26
|
+
out.push(path);
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
/** A task owns `path` when it is one of its declared paths or lies under one of its declared folders (FR-002). */
|
|
31
|
+
function owns(task, path) {
|
|
32
|
+
return task.paths.some((p) => path === p || path.startsWith(`${p}/`));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The (reader, owner) pairs among tasks that run at the same time (FR-001, FR-008): `reader`'s description names a
|
|
36
|
+
* path `owner` owns. A path the reader owns itself is never a sibling read (FR-007); checked-off tasks are ignored.
|
|
37
|
+
* One finding per pair, listing every path; in task order (reader, then owner). The caller decides which tasks run
|
|
38
|
+
* together — `siblingReads` passes one parallel run at a time, 040 passes a candidate stage.
|
|
39
|
+
*/
|
|
40
|
+
export function readsAmong(tasks, feature = "") {
|
|
41
|
+
const open = tasks.filter((t) => !t.done);
|
|
42
|
+
const out = [];
|
|
43
|
+
for (const reader of open) {
|
|
44
|
+
const named = namedPaths(reader.description).filter((p) => !owns(reader, p));
|
|
45
|
+
if (named.length === 0)
|
|
46
|
+
continue;
|
|
47
|
+
for (const owner of open) {
|
|
48
|
+
if (owner.id === reader.id)
|
|
49
|
+
continue;
|
|
50
|
+
const paths = named.filter((p) => owns(owner, p)).sort();
|
|
51
|
+
if (paths.length > 0)
|
|
52
|
+
out.push({ feature, phase: reader.phase, reader: reader.id, owner: owner.id, paths });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The runs of tasks that execute together in parallel: per phase, the open tasks in `tasks.md` order, split into runs
|
|
59
|
+
* of consecutive `[P]` tasks (an open non-`[P]` task ends a run — the grouping `nextStageTasks` uses for a parallel
|
|
60
|
+
* stage). Runs of a single task are dropped: it has no sibling.
|
|
61
|
+
*/
|
|
62
|
+
export function parallelRuns(tasks) {
|
|
63
|
+
const byPhase = new Map();
|
|
64
|
+
for (const t of tasks) {
|
|
65
|
+
if (t.done)
|
|
66
|
+
continue;
|
|
67
|
+
const list = byPhase.get(t.phase);
|
|
68
|
+
if (list)
|
|
69
|
+
list.push(t);
|
|
70
|
+
else
|
|
71
|
+
byPhase.set(t.phase, [t]);
|
|
72
|
+
}
|
|
73
|
+
const runs = [];
|
|
74
|
+
for (const [, list] of [...byPhase].sort((x, y) => x[0] - y[0])) {
|
|
75
|
+
let run = [];
|
|
76
|
+
for (const t of list) {
|
|
77
|
+
if (t.parallel) {
|
|
78
|
+
run.push(t);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (run.length > 1)
|
|
82
|
+
runs.push(run);
|
|
83
|
+
run = [];
|
|
84
|
+
}
|
|
85
|
+
if (run.length > 1)
|
|
86
|
+
runs.push(run);
|
|
87
|
+
}
|
|
88
|
+
return runs;
|
|
89
|
+
}
|
|
90
|
+
/** Every sibling read of a feature (FR-001, FR-007): `readsAmong` over each parallel run of each phase. */
|
|
91
|
+
export function siblingReads(feature, tasks) {
|
|
92
|
+
return parallelRuns(tasks).flatMap((run) => readsAmong(run, feature));
|
|
93
|
+
}
|
|
94
|
+
/** One-line human message for a sibling read, ending with the fix (FR-003). */
|
|
95
|
+
export function describeSiblingRead(r) {
|
|
96
|
+
const paths = r.paths.map((p) => `\`${p}\``).join(", ");
|
|
97
|
+
return (`${r.feature} phase ${r.phase}: ${r.reader} names ${paths}, which ${r.owner} writes; both are [P] in the same ` +
|
|
98
|
+
`stage — order ${r.reader} after ${r.owner} (drop its [P], or move it after a non-parallel task or to a later phase)`);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=sibling-reads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sibling-reads.js","sourceRoot":"","sources":["../../src/core/sibling-reads.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAoB3C,mGAAmG;AACnG,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AACxC,qEAAqE;AACrE,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,WAAmB;IAC5C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,SAAS;QAC1D,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,SAAS;QAC7D,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,IAAI,CAAC,MAA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E,CAAC;QACX,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,KAA0B;IACtE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,mBAAmB,CAAC,CAAc;IAChD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,CACL,GAAG,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM,UAAU,KAAK,WAAW,CAAC,CAAC,KAAK,oCAAoC;QAC/G,iBAAiB,CAAC,CAAC,MAAM,UAAU,CAAC,CAAC,KAAK,2EAA2E,CACtH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const FENCE_OPEN: RegExp;
|
|
2
|
+
export interface Block {
|
|
3
|
+
/** 1-based line of the opening and closing fence. */
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
indent: string;
|
|
7
|
+
/** Block body, de-indented. */
|
|
8
|
+
src: string;
|
|
9
|
+
ours: boolean;
|
|
10
|
+
/** Number of `## ` headings seen up to the block (1-based phase ordinal; 0 before the first heading). */
|
|
11
|
+
ordinal: number;
|
|
12
|
+
/** The task id of the task line the block directly follows, or null. */
|
|
13
|
+
followsTask: string | null;
|
|
14
|
+
unclosed: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function scanBlocks(text: string): {
|
|
17
|
+
lines: string[];
|
|
18
|
+
blocks: Block[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Fenced yaml blocks of a tasks.md (026 `scanBlocks`). A block is ours only if it has a top-level `files` or `verify`
|
|
2
|
+
// key (026:D-10); any other yaml fence is documentation and is ignored.
|
|
3
|
+
export const FENCE_OPEN = /^(\s*)(`{3,})\s*yaml\s*$/;
|
|
4
|
+
const FENCE_CLOSE = /^\s*(`{3,})\s*$/;
|
|
5
|
+
export function scanBlocks(text) {
|
|
6
|
+
const lines = text.split(/\r?\n/);
|
|
7
|
+
const taskRe = /^\s*-\s*\[([ xX])\]\s*\[(T\d+)\]/;
|
|
8
|
+
const blocks = [];
|
|
9
|
+
let ordinal = 0;
|
|
10
|
+
let lastTask = null;
|
|
11
|
+
let sinceTask = 0; // non-blank, non-block lines since the last task line
|
|
12
|
+
for (let i = 0; i < lines.length; i++) {
|
|
13
|
+
const line = lines[i] ?? "";
|
|
14
|
+
if (/^##\s+/.test(line)) {
|
|
15
|
+
ordinal += 1;
|
|
16
|
+
lastTask = null;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const o = FENCE_OPEN.exec(line);
|
|
20
|
+
if (o) {
|
|
21
|
+
const indent = o[1] ?? "";
|
|
22
|
+
const ticks = (o[2] ?? "").length;
|
|
23
|
+
let j = i + 1;
|
|
24
|
+
while (j < lines.length) {
|
|
25
|
+
const c = FENCE_CLOSE.exec(lines[j] ?? "");
|
|
26
|
+
if (c && (c[1] ?? "").length >= ticks)
|
|
27
|
+
break;
|
|
28
|
+
j++;
|
|
29
|
+
}
|
|
30
|
+
const src = lines
|
|
31
|
+
.slice(i + 1, j)
|
|
32
|
+
.map((l) => (l.startsWith(indent) ? l.slice(indent.length) : l))
|
|
33
|
+
.join("\n");
|
|
34
|
+
blocks.push({
|
|
35
|
+
start: i + 1,
|
|
36
|
+
end: j + 1,
|
|
37
|
+
indent,
|
|
38
|
+
src,
|
|
39
|
+
ours: /^(files|verify):/m.test(src),
|
|
40
|
+
ordinal,
|
|
41
|
+
followsTask: lastTask && sinceTask === 0 ? lastTask : null,
|
|
42
|
+
unclosed: j >= lines.length,
|
|
43
|
+
});
|
|
44
|
+
i = j;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const t = taskRe.exec(line);
|
|
48
|
+
if (t) {
|
|
49
|
+
lastTask = t[2] ?? null;
|
|
50
|
+
sinceTask = 0;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (line.trim() !== "")
|
|
54
|
+
sinceTask += 1;
|
|
55
|
+
}
|
|
56
|
+
return { lines, blocks };
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../../src/core/spec-format/blocks.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,wEAAwE;AACxE,MAAM,CAAC,MAAM,UAAU,GAAG,0BAA0B,CAAC;AACrD,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAiBtC,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,kCAAkC,CAAC;IAClD,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,QAAQ,GAAkB,IAAI,CAAC;IACnC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,sDAAsD;IACzE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CA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,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;gBAC1D,QAAQ,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM;aAC5B,CAAC,CAAC;YACH,CAAC,GAAG,CAAC,CAAC;YACN,SAAS;QACX,CAAC;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,EAAE,CAAC;YACN,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;YACxB,SAAS,GAAG,CAAC,CAAC;YACd,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,SAAS,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Format } from "./model.js";
|
|
2
|
+
export interface Detected {
|
|
3
|
+
format: Format;
|
|
4
|
+
/** `format: 2` is written in the frontmatter. A v2 file without it is read as v2 and warned about (030:FR-019). */
|
|
5
|
+
marker: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A spec.md is v2 iff its frontmatter says `format: 2`. Story data without the marker, or frontmatter whose YAML is
|
|
9
|
+
* broken but still declares `stories:`, is v2 intent: it is read as v2 so its errors surface instead of silently
|
|
10
|
+
* falling back to 1.x (026:F-7).
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectSpecFormat(text: string): Detected;
|
|
13
|
+
/** A tasks.md is v2 iff `format: 2` is in its frontmatter or it has at least one of our yaml fences. Per file, never per project. */
|
|
14
|
+
export declare function detectTasksFormat(text: string): Detected;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { scanBlocks } from "./blocks.js";
|
|
2
|
+
import { readFrontmatter } from "./frontmatter.js";
|
|
3
|
+
const hasMarker = (data) => data["format"] === 2 || data["format"] === "2";
|
|
4
|
+
/**
|
|
5
|
+
* A spec.md is v2 iff its frontmatter says `format: 2`. Story data without the marker, or frontmatter whose YAML is
|
|
6
|
+
* broken but still declares `stories:`, is v2 intent: it is read as v2 so its errors surface instead of silently
|
|
7
|
+
* falling back to 1.x (026:F-7).
|
|
8
|
+
*/
|
|
9
|
+
export function detectSpecFormat(text) {
|
|
10
|
+
const scratch = [];
|
|
11
|
+
const fm = readFrontmatter(text, "spec.md", scratch);
|
|
12
|
+
if (hasMarker(fm.data))
|
|
13
|
+
return { format: 2, marker: true };
|
|
14
|
+
if (Array.isArray(fm.data["stories"]))
|
|
15
|
+
return { format: 2, marker: false };
|
|
16
|
+
// a block that closes but does not parse still has its raw text: a `stories:` key there is v2 intent
|
|
17
|
+
if (fm.present && /^stories\s*:/m.test(fm.raw))
|
|
18
|
+
return { format: 2, marker: /^format\s*:\s*["']?2["']?\s*$/m.test(fm.raw) };
|
|
19
|
+
return { format: 1, marker: false };
|
|
20
|
+
}
|
|
21
|
+
/** A tasks.md is v2 iff `format: 2` is in its frontmatter or it has at least one of our yaml fences. Per file, never per project. */
|
|
22
|
+
export function detectTasksFormat(text) {
|
|
23
|
+
const scratch = [];
|
|
24
|
+
const fm = readFrontmatter(text, "tasks.md", scratch);
|
|
25
|
+
if (hasMarker(fm.data))
|
|
26
|
+
return { format: 2, marker: true };
|
|
27
|
+
const ours = scanBlocks(text).blocks.some((b) => b.ours);
|
|
28
|
+
return { format: ours ? 2 : 1, marker: false };
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=detect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.js","sourceRoot":"","sources":["../../../src/core/spec-format/detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AASnD,MAAM,SAAS,GAAG,CAAC,IAA6B,EAAW,EAAE,CAAC,IAA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CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReadCtx, SpecRead, TasksRead } from "./model.js";
|
|
2
|
+
/** Read a spec.md: stories, feature meta, feature-level depends-on and the issues found. */
|
|
3
|
+
export declare function readSpec(feature: string, text: string, ctx?: ReadCtx): SpecRead;
|
|
4
|
+
/** Read a tasks.md: task lines, phase Verify data and the issues found. */
|
|
5
|
+
export declare function readTasks(text: string, ctx?: ReadCtx): TasksRead;
|
|
6
|
+
/**
|
|
7
|
+
* The 1.x readers, forced: what the shipped parsers return whatever the file contains. `migrate` uses them to compute the
|
|
8
|
+
* "before" model it must reproduce (030:FR-024); nothing else should.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readSpecV1(feature: string, text: string): SpecRead["stories"];
|
|
11
|
+
export declare function readTasksV1(text: string): Pick<TasksRead, "tasks" | "phases">;
|
|
12
|
+
/** Convenience for callers that only need the phases. */
|
|
13
|
+
export declare function readPhases(text: string, ctx?: ReadCtx): TasksRead["phases"];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The per-file reader dispatcher (030:FR-021, 026:D-9). Every reader of a spec.md or tasks.md goes through here, so
|
|
2
|
+
// history readers (burndown blobs, `git show <branch>:…`) see the right format per revision. Format is decided from the
|
|
3
|
+
// content of each file, never from the project.
|
|
4
|
+
import { parseStories, parseTasks } from "../dashboard.js";
|
|
5
|
+
import { parsePhases } from "../markers.js";
|
|
6
|
+
import { detectSpecFormat, detectTasksFormat } from "./detect.js";
|
|
7
|
+
import { LEGACY_REFUSED_KIND, activeTally, legacyRefusedMessage, refuseLegacy } from "./legacy.js";
|
|
8
|
+
import { readSpecMeta } from "./meta.js";
|
|
9
|
+
import { readSpecV2 } from "./read-spec.js";
|
|
10
|
+
import { readTasksV2 } from "./read-tasks.js";
|
|
11
|
+
/** Whether 1.x files are refused: the `LEGACY_READING` switch, or the setting a test injects (035:FR-002). Never the version. */
|
|
12
|
+
function refusesLegacy(ctx) {
|
|
13
|
+
return refuseLegacy(ctx?.legacyReading);
|
|
14
|
+
}
|
|
15
|
+
/** Record the format of a read file, when the caller named it, in the explicit or the running command's tally. */
|
|
16
|
+
function tally(ctx, format) {
|
|
17
|
+
if (!ctx?.file)
|
|
18
|
+
return;
|
|
19
|
+
(ctx.tally ?? activeTally())?.record(ctx.file, format);
|
|
20
|
+
}
|
|
21
|
+
const refused = (file) => ({ file, line: 1, severity: "error", kind: LEGACY_REFUSED_KIND, message: legacyRefusedMessage(file) });
|
|
22
|
+
/** Read a spec.md: stories, feature meta, feature-level depends-on and the issues found. */
|
|
23
|
+
export function readSpec(feature, text, ctx) {
|
|
24
|
+
const detected = detectSpecFormat(text);
|
|
25
|
+
if (detected.format === 2) {
|
|
26
|
+
const v2 = readSpecV2(feature, text, ctx?.file ?? "spec.md", detected.marker);
|
|
27
|
+
tally(ctx, 2);
|
|
28
|
+
return v2;
|
|
29
|
+
}
|
|
30
|
+
tally(ctx, 1);
|
|
31
|
+
if (refusesLegacy(ctx))
|
|
32
|
+
return { format: 1, stories: [], meta: {}, dependsOn: [], issues: [refused(ctx?.file ?? "spec.md")] };
|
|
33
|
+
const issues = [];
|
|
34
|
+
return { format: 1, stories: parseStories(text, feature), meta: readSpecMeta(text), dependsOn: [], issues };
|
|
35
|
+
}
|
|
36
|
+
/** Read a tasks.md: task lines, phase Verify data and the issues found. */
|
|
37
|
+
export function readTasks(text, ctx) {
|
|
38
|
+
const detected = detectTasksFormat(text);
|
|
39
|
+
if (detected.format === 2) {
|
|
40
|
+
const v2 = readTasksV2(text, ctx?.file ?? "tasks.md", detected.marker);
|
|
41
|
+
tally(ctx, 2);
|
|
42
|
+
return v2;
|
|
43
|
+
}
|
|
44
|
+
tally(ctx, 1);
|
|
45
|
+
if (refusesLegacy(ctx))
|
|
46
|
+
return { format: 1, tasks: [], phases: [], issues: [refused(ctx?.file ?? "tasks.md")] };
|
|
47
|
+
const issues = [];
|
|
48
|
+
return { format: 1, tasks: parseTasks(text), phases: parsePhases(text), issues };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The 1.x readers, forced: what the shipped parsers return whatever the file contains. `migrate` uses them to compute the
|
|
52
|
+
* "before" model it must reproduce (030:FR-024); nothing else should.
|
|
53
|
+
*/
|
|
54
|
+
export function readSpecV1(feature, text) {
|
|
55
|
+
return parseStories(text, feature);
|
|
56
|
+
}
|
|
57
|
+
export function readTasksV1(text) {
|
|
58
|
+
return { tasks: parseTasks(text), phases: parsePhases(text) };
|
|
59
|
+
}
|
|
60
|
+
/** Convenience for callers that only need the phases. */
|
|
61
|
+
export function readPhases(text, ctx) {
|
|
62
|
+
return readTasks(text, ctx).phases;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/core/spec-format/dispatch.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,wHAAwH;AACxH,gDAAgD;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,iIAAiI;AACjI,SAAS,aAAa,CAAC,GAAwB;IAC7C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AE,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;AAChE,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,GAAa;IACpD,OAAO,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormatIssue } from "./model.js";
|
|
2
|
+
export interface Frontmatter {
|
|
3
|
+
/** Parsed mapping; `{}` when absent or broken. */
|
|
4
|
+
data: Record<string, unknown>;
|
|
5
|
+
/** Raw YAML text between the fences, or "" when there is none. */
|
|
6
|
+
raw: string;
|
|
7
|
+
/** 1-based first YAML line and the line of the closing `---`; 0 when there is no frontmatter. */
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
/** Whole text split on `\n` or `\r\n`. */
|
|
11
|
+
lines: string[];
|
|
12
|
+
/** A well-formed `---` block exists (even if its YAML is broken). */
|
|
13
|
+
present: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Parse YAML, turning a failure into a located issue (1-based, offset from `baseLine`) instead of a throw. */
|
|
16
|
+
export declare function parseYaml(src: string, baseLine: number, where: string, file: string, issues: FormatIssue[]): unknown;
|
|
17
|
+
/** Split and parse `---` frontmatter. An unclosed or unparseable block adds an issue and yields no data. */
|
|
18
|
+
export declare function readFrontmatter(text: string, file: string, issues: FormatIssue[]): Frontmatter;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import matter from "gray-matter";
|
|
2
|
+
const yamlEngine = matter.engines.yaml;
|
|
3
|
+
/** Parse YAML, turning a failure into a located issue (1-based, offset from `baseLine`) instead of a throw. */
|
|
4
|
+
export function parseYaml(src, baseLine, where, file, issues) {
|
|
5
|
+
try {
|
|
6
|
+
return yamlEngine.parse(src);
|
|
7
|
+
}
|
|
8
|
+
catch (e) {
|
|
9
|
+
const err = e;
|
|
10
|
+
const mark = err.mark?.line;
|
|
11
|
+
issues.push({
|
|
12
|
+
file,
|
|
13
|
+
line: baseLine + (typeof mark === "number" ? mark : 0),
|
|
14
|
+
severity: "error",
|
|
15
|
+
kind: "bad-yaml",
|
|
16
|
+
message: `${where}: invalid YAML (${String(err.reason ?? err.message).split("\n")[0]})`,
|
|
17
|
+
});
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** Split and parse `---` frontmatter. An unclosed or unparseable block adds an issue and yields no data. */
|
|
22
|
+
export function readFrontmatter(text, file, issues) {
|
|
23
|
+
const lines = text.split(/\r?\n/);
|
|
24
|
+
const none = { data: {}, raw: "", start: 0, end: 0, lines, present: false };
|
|
25
|
+
if (lines[0] !== "---")
|
|
26
|
+
return none;
|
|
27
|
+
const close = lines.indexOf("---", 1);
|
|
28
|
+
if (close === -1) {
|
|
29
|
+
issues.push({ file, line: 1, severity: "error", kind: "frontmatter-unclosed", message: "frontmatter is not closed with ---" });
|
|
30
|
+
return none;
|
|
31
|
+
}
|
|
32
|
+
const raw = lines.slice(1, close).join("\n");
|
|
33
|
+
const parsed = parseYaml(raw, 2, "frontmatter", file, issues);
|
|
34
|
+
const data = parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
35
|
+
return { data, raw, start: 2, end: close + 1, lines, present: true };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../../src/core/spec-format/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,MAAM,UAAU,GAAI,MAA0E,CAAC,OAAO,CAAC,IAAI,CAAC;AAgB5G,+GAA+G;AAC/G,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,QAAgB,EAAE,KAAa,EAAE,IAAY,EAAE,MAAqB;IACzG,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG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,EAAE,CAAC,CAAC;QAC/H,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAkC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FormatTally } from "./model.js";
|
|
2
|
+
/** Environment switch: `AMBYKIT_LEGACY_WARNING=0` silences the warning. */
|
|
3
|
+
export declare const LEGACY_ENV = "AMBYKIT_LEGACY_WARNING";
|
|
4
|
+
/** Stable issue kind the dispatcher returns for a 1.x file it refuses to read. */
|
|
5
|
+
export declare const LEGACY_REFUSED_KIND = "legacy-format-refused";
|
|
6
|
+
export type LegacyReading = "on" | "off";
|
|
7
|
+
/**
|
|
8
|
+
* Whether 1.x files are still read (035:FR-002, decision D-8). "on" until 035's go decision is accepted (T012) and T080 flips it;
|
|
9
|
+
* `legacyOffProblems` lists what the decision record must hold before "off" is allowed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LEGACY_READING: LegacyReading;
|
|
12
|
+
/** Start collecting the formats of every file read through the dispatcher; returns the tally. */
|
|
13
|
+
export declare function beginTally(): FormatTally;
|
|
14
|
+
/** The tally readers record into when the caller passes none, or null outside a command run. */
|
|
15
|
+
export declare function activeTally(): FormatTally | null;
|
|
16
|
+
export declare function endTally(): void;
|
|
17
|
+
/** Config and environment decide whether the warning is shown: `legacyWarning: false` or `AMBYKIT_LEGACY_WARNING=0` silences it. */
|
|
18
|
+
export declare function legacyEnabled(config: {
|
|
19
|
+
legacyWarning?: boolean;
|
|
20
|
+
} | undefined, env?: Record<string, string | undefined>): boolean;
|
|
21
|
+
/** The one line printed per run (C-5). */
|
|
22
|
+
export declare function legacyWarningLine(count: number): string;
|
|
23
|
+
/** True when 1.x files are refused instead of read (030:FR-013, 035:FR-002). The setting is injected in tests. */
|
|
24
|
+
export declare function refuseLegacy(reading?: LegacyReading): boolean;
|
|
25
|
+
/** The title of feature 035's go-decision record in `.amby/decisions/` (035:FR-001). */
|
|
26
|
+
export declare const LEGACY_DECISION_TITLE = "End 1.x reading in 2.1";
|
|
27
|
+
/**
|
|
28
|
+
* The conditions the go decision records, one line each: `- **<condition>:** met, <YYYY-MM-DD>, <evidence>` (035:FR-001, D-1, D-6).
|
|
29
|
+
* T010 drafts the record with these lines and T011 extends the test; the line shape here is the minimum both rely on.
|
|
30
|
+
*/
|
|
31
|
+
export declare const LEGACY_DECISION_CONDITIONS: readonly ["Gate wording", "Adoption window", "No open migrate data-loss defect", "Documented path"];
|
|
32
|
+
/**
|
|
33
|
+
* What stops `LEGACY_READING` from being "off": the go-decision record (its text, or undefined when none exists) must be
|
|
34
|
+
* `status: accepted` and record every condition as met, with a date and evidence. Empty while reading stays "on".
|
|
35
|
+
*/
|
|
36
|
+
export declare function legacyOffProblems(reading: LegacyReading, decision: string | undefined): string[];
|
|
37
|
+
/** Feature directories that have a file on the 1.x format in the tally, in the order first seen. */
|
|
38
|
+
export declare function legacyFeatures(tally: FormatTally | null): string[];
|
|
39
|
+
/** The refusal message, naming the file (FR-013). */
|
|
40
|
+
export declare function legacyRefusedMessage(file: string): string;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Reading 1.x files in 2.x (030:FR-012, FR-013, FR-019; 035:FR-002). While `LEGACY_READING` is "on" a 1.x spec or task file
|
|
2
|
+
// is read exactly as before, and the CLI prints ONE concise line per run saying how many files use the old format and how to
|
|
3
|
+
// migrate. When it is "off" the dispatcher refuses to read them. The switch is explicit, not a version gate, so a version bump
|
|
4
|
+
// alone can never end 1.x reading: it goes "off" only with the accepted go decision of feature 035 (a test enforces that).
|
|
5
|
+
import { FormatTally } from "./model.js";
|
|
6
|
+
/** Environment switch: `AMBYKIT_LEGACY_WARNING=0` silences the warning. */
|
|
7
|
+
export const LEGACY_ENV = "AMBYKIT_LEGACY_WARNING";
|
|
8
|
+
/** Stable issue kind the dispatcher returns for a 1.x file it refuses to read. */
|
|
9
|
+
export const LEGACY_REFUSED_KIND = "legacy-format-refused";
|
|
10
|
+
/**
|
|
11
|
+
* Whether 1.x files are still read (035:FR-002, decision D-8). "on" until 035's go decision is accepted (T012) and T080 flips it;
|
|
12
|
+
* `legacyOffProblems` lists what the decision record must hold before "off" is allowed.
|
|
13
|
+
*/
|
|
14
|
+
export const LEGACY_READING = "on";
|
|
15
|
+
let active = null;
|
|
16
|
+
/** Start collecting the formats of every file read through the dispatcher; returns the tally. */
|
|
17
|
+
export function beginTally() {
|
|
18
|
+
active = new FormatTally();
|
|
19
|
+
return active;
|
|
20
|
+
}
|
|
21
|
+
/** The tally readers record into when the caller passes none, or null outside a command run. */
|
|
22
|
+
export function activeTally() {
|
|
23
|
+
return active;
|
|
24
|
+
}
|
|
25
|
+
export function endTally() {
|
|
26
|
+
active = null;
|
|
27
|
+
}
|
|
28
|
+
/** Config and environment decide whether the warning is shown: `legacyWarning: false` or `AMBYKIT_LEGACY_WARNING=0` silences it. */
|
|
29
|
+
export function legacyEnabled(config, env = process.env) {
|
|
30
|
+
if (config?.legacyWarning === false)
|
|
31
|
+
return false;
|
|
32
|
+
const v = env[LEGACY_ENV];
|
|
33
|
+
return !(v === "0" || v?.toLowerCase() === "false");
|
|
34
|
+
}
|
|
35
|
+
/** The one line printed per run (C-5). */
|
|
36
|
+
export function legacyWarningLine(count) {
|
|
37
|
+
return `${count} file${count === 1 ? "" : "s"} use${count === 1 ? "s" : ""} the 1.x spec format (read as before). Run \`ambykit migrate\` to upgrade; support ends in 2.1.`;
|
|
38
|
+
}
|
|
39
|
+
/** True when 1.x files are refused instead of read (030:FR-013, 035:FR-002). The setting is injected in tests. */
|
|
40
|
+
export function refuseLegacy(reading = LEGACY_READING) {
|
|
41
|
+
return reading === "off";
|
|
42
|
+
}
|
|
43
|
+
/** The title of feature 035's go-decision record in `.amby/decisions/` (035:FR-001). */
|
|
44
|
+
export const LEGACY_DECISION_TITLE = "End 1.x reading in 2.1";
|
|
45
|
+
/**
|
|
46
|
+
* The conditions the go decision records, one line each: `- **<condition>:** met, <YYYY-MM-DD>, <evidence>` (035:FR-001, D-1, D-6).
|
|
47
|
+
* T010 drafts the record with these lines and T011 extends the test; the line shape here is the minimum both rely on.
|
|
48
|
+
*/
|
|
49
|
+
export const LEGACY_DECISION_CONDITIONS = ["Gate wording", "Adoption window", "No open migrate data-loss defect", "Documented path"];
|
|
50
|
+
/**
|
|
51
|
+
* What stops `LEGACY_READING` from being "off": the go-decision record (its text, or undefined when none exists) must be
|
|
52
|
+
* `status: accepted` and record every condition as met, with a date and evidence. Empty while reading stays "on".
|
|
53
|
+
*/
|
|
54
|
+
export function legacyOffProblems(reading, decision) {
|
|
55
|
+
if (reading === "on")
|
|
56
|
+
return [];
|
|
57
|
+
if (decision === undefined)
|
|
58
|
+
return [`no decision record titled '${LEGACY_DECISION_TITLE}' in .amby/decisions/`];
|
|
59
|
+
const problems = [];
|
|
60
|
+
const status = /^status:[ \t]*(\S+)/m.exec(decision)?.[1];
|
|
61
|
+
if (status !== "accepted")
|
|
62
|
+
problems.push(`the decision record is '${status ?? "without a status"}', not 'accepted'`);
|
|
63
|
+
for (const c of LEGACY_DECISION_CONDITIONS) {
|
|
64
|
+
const m = new RegExp("^\\s*[-*]\\s*\\*\\*" + c + ":\\*\\*[ \\t]*(.*)$", "mi").exec(decision);
|
|
65
|
+
const v = m?.[1]?.trim() ?? "";
|
|
66
|
+
if (v === "")
|
|
67
|
+
problems.push(`the decision records no '${c}'`);
|
|
68
|
+
else if (!/^met\b/i.test(v))
|
|
69
|
+
problems.push(`'${c}' is '${v}', not met`);
|
|
70
|
+
else if (!/\d{4}-\d{2}-\d{2}/.test(v))
|
|
71
|
+
problems.push(`'${c}' has no date`);
|
|
72
|
+
else if (v.replace(/^met\b/i, "").replace(/\d{4}-\d{2}-\d{2}/, "").replace(/[,;:\s]/g, "") === "")
|
|
73
|
+
problems.push(`'${c}' has no evidence`);
|
|
74
|
+
}
|
|
75
|
+
return problems;
|
|
76
|
+
}
|
|
77
|
+
/** Feature directories that have a file on the 1.x format in the tally, in the order first seen. */
|
|
78
|
+
export function legacyFeatures(tally) {
|
|
79
|
+
const dirs = [];
|
|
80
|
+
for (const file of tally?.v1 ?? []) {
|
|
81
|
+
const dir = /^specs\/([^/]+)\//.exec(file)?.[1];
|
|
82
|
+
if (dir && !dirs.includes(dir))
|
|
83
|
+
dirs.push(dir);
|
|
84
|
+
}
|
|
85
|
+
return dirs.sort();
|
|
86
|
+
}
|
|
87
|
+
/** The refusal message, naming the file (FR-013). */
|
|
88
|
+
export function legacyRefusedMessage(file) {
|
|
89
|
+
return `${file} uses the 1.x spec format, which this version no longer reads; migrate it with AmbyKit 2.0 (\`npx @ambystech/ambykit@2.0 migrate\`).`;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../src/core/spec-format/legacy.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,6HAA6H;AAC7H,+HAA+H;AAC/H,2HAA2H;AAC3H,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAEnD,kFAAkF;A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,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,EAAE;YAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC7I,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,cAAc,CAAC,KAAyB;IACtD,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAChD,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,GAAG,IAAI,sIAAsI,CAAC;AACvJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import matter from "gray-matter";
|
|
2
|
+
/** Feature meta from the spec frontmatter; identical in 1.x and v2. Broken YAML is reported by the v2 reader, not here. */
|
|
3
|
+
export function readSpecMeta(text) {
|
|
4
|
+
let data = {};
|
|
5
|
+
try {
|
|
6
|
+
data = (matter(text).data ?? {});
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
/* reported as a FormatIssue by the v2 reader */
|
|
10
|
+
}
|
|
11
|
+
const s = (v) => (v === undefined || v === null ? undefined : String(v));
|
|
12
|
+
const meta = {};
|
|
13
|
+
const feature = s(data["feature"]);
|
|
14
|
+
const title = s(data["title"]);
|
|
15
|
+
const status = s(data["status"]);
|
|
16
|
+
if (feature !== undefined)
|
|
17
|
+
meta.feature = feature;
|
|
18
|
+
if (title !== undefined)
|
|
19
|
+
meta.title = title;
|
|
20
|
+
if (status !== undefined)
|
|
21
|
+
meta.status = status;
|
|
22
|
+
return meta;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/core/spec-format/meta.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,2HAA2H;AAC3H,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,IAAI,GAA4B,EAAE,CAAC;IACvC,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,gDAAgD;IAClD,CAAC;IACD,MAAM,CAAC,GAAG,CAAC,CAAU,EAAsB,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,IAAI,OAAO,KAAK,SAAS;QAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAClD,IAAI,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5C,IAAI,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAC/C,OAAO,IAAI,CAAC;AACd,CAAC"}
|