@ambystech/ambykit 1.1.0 → 1.1.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 +103 -0
- package/README.md +60 -21
- package/docs/architecture.md +93 -0
- package/docs/artifacts/plan.md +31 -0
- package/docs/artifacts/spec.md +70 -0
- package/docs/artifacts/tasks.md +40 -0
- package/docs/artifacts/ui-design.md +59 -0
- package/docs/cli-reference.md +167 -0
- package/docs/concepts/constitution.md +35 -0
- package/docs/concepts/spec-driven-development.md +34 -0
- package/docs/contributing.md +50 -0
- package/docs/getting-started.md +106 -0
- package/docs/index.md +35 -0
- package/docs/tool-compatibility.md +78 -0
- package/docs/workflow.md +109 -0
- package/package.json +15 -3
- package/src/roles/architect.md +17 -0
- package/src/roles/developer.md +17 -0
- package/src/roles/pm.md +17 -0
- package/src/roles/qa.md +17 -0
- package/src/roles/tech-lead.md +17 -0
- package/src/roles/ux.md +17 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to AmbyKit are documented here.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
6
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Release notes with full detail live on the
|
|
9
|
+
[GitHub releases page](https://github.com/ambystechcom/AmbyKit/releases).
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
## [1.1.1] — 2026-09-11
|
|
14
|
+
|
|
15
|
+
Packaging fix.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `ambykit init` failed with `ENOENT` on `src/roles/pm.md` when installed from npm: the default
|
|
20
|
+
role files were missing from the published package. A test now checks the packed tarball for
|
|
21
|
+
every runtime asset.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The npm package now also ships `LICENSE`, `CHANGELOG.md`, and `docs/`.
|
|
26
|
+
|
|
27
|
+
## [1.1.0] — 2026-08-26
|
|
28
|
+
|
|
29
|
+
Converge, worktree isolation, and multi-agent roles.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **`/amby.converge` phase** — checks the codebase against every `FR-###`, `SC-###`, plan decision,
|
|
34
|
+
and checked-off `T###`, classifying each as covered, gap, or unverified. Appends one unchecked
|
|
35
|
+
task per gap under a `## Convergence` section in `tasks.md` (`[VERIFY]` for inconclusive items)
|
|
36
|
+
and marks fully covered stories `done`. Append-only and idempotent; cannot edit source.
|
|
37
|
+
- **`ambykit worktree`** — per-feature git worktrees (`create` / `list` / `remove`) so several
|
|
38
|
+
features, or several assistants, progress side by side without checkout switching. `.worktrees/`
|
|
39
|
+
is added to `.gitignore` automatically; `ambykit check` flags worktrees whose branch is merged.
|
|
40
|
+
- **Multi-agent roles** — each phase acts as a role defined in `.amby/roles/<id>.md` (Product
|
|
41
|
+
Manager, UX Designer, Architect, Tech Lead, Developer, QA), shipped as editable defaults.
|
|
42
|
+
`--as <id>` gives any phase a one-run alternative perspective. Roles are emitted as native
|
|
43
|
+
sub-agents for `.claude/agents/`, `.opencode/agents/`, and `.github/agents/`.
|
|
44
|
+
- **`/amby.review`** — has a different role critique an artifact, returning findings keyed by stable
|
|
45
|
+
ID with severity and a suggested fix. Read-only unless `--apply`. Advisory; no phase waits on it.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- `ambykit sync` warns when a role exceeds 150 words and refuses duplicate role ids.
|
|
50
|
+
|
|
51
|
+
## [1.0.0] — 2026-07-21
|
|
52
|
+
|
|
53
|
+
First stable release.
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- **Brownfield support** — `ambykit init` is non-destructive. An existing `CLAUDE.md` / `AGENTS.md`
|
|
58
|
+
is preserved; AmbyKit adds and updates only its own `### AmbyKit usage` section, idempotently,
|
|
59
|
+
writing a timestamped backup under `.amby/backups/` first. Hand-edited AmbyKit sections are left
|
|
60
|
+
untouched and reported as skipped.
|
|
61
|
+
- **`ambykit restore [file]`** — rolls an agent-doc file back from its backup.
|
|
62
|
+
- **`--dry-run`** — preview any run.
|
|
63
|
+
- **`/amby.revise` phase** — continues an existing feature's spec (or `ui.md`) in place, adding and
|
|
64
|
+
refining stories, requirements, and success criteria while preserving every stable ID. Makes no
|
|
65
|
+
edits when the spec is already `done`.
|
|
66
|
+
- **`ambykit update`** — updates the CLI, then refreshes the project's generated prompts. An
|
|
67
|
+
outdated-version callout is backed by a 24h cached registry lookup that never blocks the hot path.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- `src/cli` reorganized: UI and IO grouped, `emit` moved to `core`.
|
|
72
|
+
- Docs cover the full nine-phase workflow and all eight CLI verbs; the docs-sync checker now keeps
|
|
73
|
+
the README, `docs/`, the workflow overview, and `AGENTS.md` from drifting.
|
|
74
|
+
- `codex` added to the package keywords.
|
|
75
|
+
|
|
76
|
+
## [0.2.0] — 2026-07-13
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **OpenAI Codex CLI target** — `ambykit init` / `ambykit sync` emit Codex-native files: the
|
|
81
|
+
`skills` command surface (`.agents/skills/amby-*/SKILL.md`) plus a native `AGENTS.md` rules file.
|
|
82
|
+
`$ARGUMENTS` is rewritten to free-text prose, since Codex skills have no placeholder convention.
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- Cross-platform path handling in `src/core/paths.ts` and `src/cli/fsops.ts`, so emitted paths and
|
|
87
|
+
fs operations behave on Windows as well as POSIX. CI matrix extended to cover it.
|
|
88
|
+
|
|
89
|
+
## [0.1.1] — 2026-07-11
|
|
90
|
+
|
|
91
|
+
Packaging fixes.
|
|
92
|
+
|
|
93
|
+
## [0.1.0] — 2026-07-11
|
|
94
|
+
|
|
95
|
+
Initial release: the enhanced terminal UI and the AmbyKit documentation site.
|
|
96
|
+
|
|
97
|
+
[Unreleased]: https://github.com/ambystechcom/AmbyKit/compare/v1.1.1...HEAD
|
|
98
|
+
[1.1.1]: https://github.com/ambystechcom/AmbyKit/compare/v1.1.0...v1.1.1
|
|
99
|
+
[1.1.0]: https://github.com/ambystechcom/AmbyKit/compare/v1.0.0...v1.1.0
|
|
100
|
+
[1.0.0]: https://github.com/ambystechcom/AmbyKit/compare/v0.2.0...v1.0.0
|
|
101
|
+
[0.2.0]: https://github.com/ambystechcom/AmbyKit/compare/v0.1.1...v0.2.0
|
|
102
|
+
[0.1.1]: https://github.com/ambystechcom/AmbyKit/compare/v0.1.0...v0.1.1
|
|
103
|
+
[0.1.0]: https://github.com/ambystechcom/AmbyKit/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="
|
|
2
|
+
<img src="https://raw.githubusercontent.com/ambystechcom/AmbyKit/main/public/ambykit_logo.png" alt="AmbyKit" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/@ambystech/ambykit"><img src="https://img.shields.io/npm/v/@ambystech/ambykit" alt="npm version"></a>
|
|
7
7
|
<a href="https://github.com/ambystechcom/AmbyKit/actions/workflows/ci.yml"><img src="https://github.com/ambystechcom/AmbyKit/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
8
|
-
<a href="https://ambystech.io/
|
|
8
|
+
<a href="https://ambykit.ambystech.io/"><img src="https://img.shields.io/badge/docs-live-EE1199" alt="Docs"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/node-%E2%89%A520-5FA04E" alt="Node >= 20">
|
|
9
10
|
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license">
|
|
10
11
|
</p>
|
|
11
12
|
|
|
12
13
|
# AmbyKit
|
|
13
14
|
|
|
14
|
-
**Spec-Driven Development
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
**Spec-Driven Development that specs your UI too.** Most SDD frameworks take you from user stories
|
|
16
|
+
straight to a technical plan and leave the interface to the model's imagination. AmbyKit adds a
|
|
17
|
+
first-class design phase — `ui.md` plus a real `design-tokens.json` — between the *what* and the
|
|
18
|
+
*how*, then emits native commands and rules for every AI coding assistant your team uses.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
<p align="center">
|
|
21
|
+
<img src="https://raw.githubusercontent.com/ambystechcom/AmbyKit/main/public/demo.gif" alt="One ambykit init emits native commands for Claude Code, Cursor, and Copilot at once" />
|
|
22
|
+
</p>
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
## Quick start
|
|
21
25
|
|
|
22
26
|
```bash
|
|
27
|
+
npx @ambystech/ambykit init # scaffold .amby/ and pick your assistants
|
|
28
|
+
# — or install it —
|
|
23
29
|
npm install -g @ambystech/ambykit
|
|
24
|
-
ambykit init
|
|
25
|
-
# — or run it without installing —
|
|
26
|
-
npx @ambystech/ambykit init
|
|
30
|
+
ambykit init
|
|
27
31
|
```
|
|
28
32
|
|
|
33
|
+
Node ≥ 20. No Python toolchain, no separate installer — it's an npm package.
|
|
34
|
+
|
|
29
35
|
Already have a project? `init` is **non-destructive** — an existing `CLAUDE.md`/`AGENTS.md` is
|
|
30
36
|
preserved (and backed up); AmbyKit only adds/updates its own `### AmbyKit usage` section. Re-run
|
|
31
37
|
`ambykit sync` any time to keep it current, or `ambykit restore` to roll a file back.
|
|
@@ -52,21 +58,50 @@ ambykit dashboard
|
|
|
52
58
|
ambykit dashboard 001:US-3 # story ids restart per feature — qualify with the feature ref
|
|
53
59
|
```
|
|
54
60
|
|
|
55
|
-
📖 Full documentation: **[ambystech.io
|
|
61
|
+
📖 Full documentation: **[ambykit.ambystech.io](https://ambykit.ambystech.io/)**
|
|
56
62
|
|
|
57
63
|
## Why
|
|
58
64
|
|
|
59
|
-
AI coding assistants build better software when they start from good requirements.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
truth that compiles to each tool's native format.
|
|
65
|
+
AI coding assistants build better software when they start from good requirements. AmbyKit gives you
|
|
66
|
+
a rigorous, tech-agnostic SDD workflow **and** a single source of truth that compiles to each tool's
|
|
67
|
+
native format.
|
|
63
68
|
|
|
69
|
+
- **UI is a first-class artifact.** `/amby.design` produces a UI spec plus design tokens — the part
|
|
70
|
+
every other spec framework skips. Your assistant builds the interface you described, not the one
|
|
71
|
+
it guessed.
|
|
64
72
|
- **WHAT before HOW.** `spec.md` captures user stories + testable requirements with no tech
|
|
65
73
|
decisions; `plan.md` captures the technical approach separately.
|
|
66
|
-
- **
|
|
67
|
-
|
|
74
|
+
- **Parallel work is built in.** `ambykit worktree` gives each feature its own git worktree, so
|
|
75
|
+
several features — or several assistants — run side by side without checkout switching.
|
|
68
76
|
- **Author once, emit per tool.** One neutral source → Claude Code, OpenCode, GitHub Copilot
|
|
69
|
-
(VS Code + CLI), Cursor (+ CLI), Antigravity (IDE + CLI).
|
|
77
|
+
(VS Code + CLI), Cursor (+ CLI), Antigravity (IDE + CLI), Codex CLI.
|
|
78
|
+
|
|
79
|
+
## How AmbyKit compares
|
|
80
|
+
|
|
81
|
+
The honest version. [GitHub Spec-Kit](https://github.com/github/spec-kit) is the big one in this
|
|
82
|
+
category and it is genuinely good — if you want the widest assistant coverage and the largest
|
|
83
|
+
community, use it. AmbyKit is the choice when the UI matters and you live in the Node ecosystem.
|
|
84
|
+
|
|
85
|
+
| | AmbyKit | GitHub Spec-Kit | Kiro |
|
|
86
|
+
|---|---|---|---|
|
|
87
|
+
| UI design phase + design tokens | ✅ `ui.md` + `design-tokens.json` | ❌ | ❌ (`design.md` is architecture) |
|
|
88
|
+
| Native git worktree isolation | ✅ `ambykit worktree` | ❌ [open issue](https://github.com/github/spec-kit/issues/1476); third-party forks | ❌ |
|
|
89
|
+
| Cross-role artifact review | ✅ `/amby.review`, findings by ID, `--apply` patches in place | Role "bundles" for setup, no review phase | ❌ |
|
|
90
|
+
| Dependency-graph dashboard | ✅ `ambykit dashboard` / `analyze` | ❌ | ❌ |
|
|
91
|
+
| Code-vs-spec drift check | ✅ `/amby.converge` | ✅ `/speckit.converge` | ❌ |
|
|
92
|
+
| Brownfield / revise in place | ✅ `/amby.revise` | ✅ evolving-specs guide | ✅ |
|
|
93
|
+
| EARS requirements | ✅ | ✅ | ✅ |
|
|
94
|
+
| **Assistants supported** | **6 families / 10 targets** | **37 integrations** | self-contained |
|
|
95
|
+
| Runtime | Node ≥ 20, `npx` | Python 3.11+, `uv`/`pipx` | proprietary IDE + CLI |
|
|
96
|
+
| License | MIT | MIT | proprietary (Crew is Apache 2.0) |
|
|
97
|
+
| Maturity | young, v1.1 | very large community | AWS-backed, paid tiers |
|
|
98
|
+
|
|
99
|
+
**Why not just Spec-Kit?** If breadth of assistant support is your constraint, use Spec-Kit — it
|
|
100
|
+
covers far more tools. Pick AmbyKit if you want the design phase, per-feature worktrees, and an
|
|
101
|
+
install that's one `npx` away instead of a Python toolchain.
|
|
102
|
+
|
|
103
|
+
*Comparison current as of AmbyKit v1.1.0; competitors move fast — corrections welcome via
|
|
104
|
+
[issue](https://github.com/ambystechcom/AmbyKit/issues) or PR.*
|
|
70
105
|
|
|
71
106
|
## The workflow
|
|
72
107
|
|
|
@@ -91,7 +126,10 @@ work can be ordered and blocked; `ambykit dashboard` reports progress across the
|
|
|
91
126
|
## Supported tools
|
|
92
127
|
|
|
93
128
|
Claude Code (CLI + VS Code), GitHub Copilot (VS Code + CLI), OpenCode, Cursor (+ CLI),
|
|
94
|
-
Antigravity (IDE + CLI). See [`docs/tool-compatibility.md`](./docs/tool-compatibility.md).
|
|
129
|
+
Antigravity (IDE + CLI), Codex CLI. See [`docs/tool-compatibility.md`](./docs/tool-compatibility.md).
|
|
130
|
+
|
|
131
|
+
Missing yours? [Open a request](https://github.com/ambystechcom/AmbyKit/issues/new/choose) — a new
|
|
132
|
+
target is a thin `BaseEmitter` subclass.
|
|
95
133
|
|
|
96
134
|
## CLI
|
|
97
135
|
|
|
@@ -111,5 +149,6 @@ See [`docs/cli-reference.md`](./docs/cli-reference.md).
|
|
|
111
149
|
|
|
112
150
|
## Contributing
|
|
113
151
|
|
|
114
|
-
AmbyKit is built with AmbyKit — see [`
|
|
115
|
-
[`docs/contributing.md`](./docs/contributing.md).
|
|
152
|
+
AmbyKit is built with AmbyKit — see [`CONTRIBUTING.md`](./CONTRIBUTING.md),
|
|
153
|
+
[`AGENTS.md`](./AGENTS.md), and [`docs/contributing.md`](./docs/contributing.md).
|
|
154
|
+
Changes are logged in [`CHANGELOG.md`](./CHANGELOG.md). MIT licensed.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
AmbyKit is a Node/TypeScript CLI (`@ambystech/ambykit`) built on two ideas: **author once, emit per
|
|
4
|
+
tool**, and **token frugality**.
|
|
5
|
+
|
|
6
|
+
## Author once, emit per tool
|
|
7
|
+
|
|
8
|
+
There is one neutral source of truth. Emitters compile it into each assistant's native format.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
src/templates/ ── artifact templates (constitution, spec, ui, design-tokens, plan, tasks)
|
|
12
|
+
src/prompts/ ── neutral phase CommandSpecs (constitution → implement)
|
|
13
|
+
│
|
|
14
|
+
▼ ambykit init / add / sync
|
|
15
|
+
┌────────────┐
|
|
16
|
+
│ Emitters │ BaseEmitter + per-tool subclasses
|
|
17
|
+
└────────────┘
|
|
18
|
+
│
|
|
19
|
+
├── .claude/commands/amby/*.md (ClaudeEmitter)
|
|
20
|
+
├── .github/prompts/*.prompt.md (CopilotEmitter)
|
|
21
|
+
├── .github/skills/amby-*/SKILL.md (CopilotCliEmitter)
|
|
22
|
+
├── .opencode/commands/*.md (OpenCodeEmitter)
|
|
23
|
+
├── .cursor/commands/*.md + rules (CursorEmitter / CursorCliEmitter)
|
|
24
|
+
├── .agents/workflows/*.md (AntigravityEmitter / AntigravityCliEmitter)
|
|
25
|
+
└── AGENTS.md (+ CLAUDE.md bridge) (shared rules layer)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
On `init`, the neutral source is also copied into the consumer's `.amby/` so their project owns its
|
|
29
|
+
templates and can customize them.
|
|
30
|
+
|
|
31
|
+
## `BaseEmitter`
|
|
32
|
+
|
|
33
|
+
An abstract class holding all shared state and behavior; each tool is a thin subclass.
|
|
34
|
+
|
|
35
|
+
- **Properties:** `toolId`, `displayName`, `commandDir`, `rulesFile`, `commandSurface`
|
|
36
|
+
(`'commands' | 'skills' | 'workflows' | 'none'`), `supportsAgents`, `mcpConfigPath`,
|
|
37
|
+
`mcpConfigScope` (`'project' | 'user'`), `mcpTopLevelKey`.
|
|
38
|
+
- **Template method** `emit(specs, ctx): EmittedFile[]` — orchestrates: resolve target dir → render
|
|
39
|
+
rules file → render each phase prompt **via `commandSurface`** → render MCP config → collect files.
|
|
40
|
+
Subclasses don't re-implement orchestration.
|
|
41
|
+
- **Overridable hooks:** `commandFrontmatter(spec)`, `commandPath(spec)`, `rulesContent(ctx)`,
|
|
42
|
+
`mcpConfig(servers)`. Defaults live in the base; a subclass overrides only its differences.
|
|
43
|
+
- **Reuse subclasses:** `CursorCliEmitter` (`commandSurface: 'none'`) and `AntigravityCliEmitter`
|
|
44
|
+
reuse a sibling's output; VS Code extension targets resolve to their base tool's emitter unchanged
|
|
45
|
+
via the **target→emitter map** in the registry.
|
|
46
|
+
|
|
47
|
+
Adding a tool = one subclass + a compatibility-matrix row + a snapshot test.
|
|
48
|
+
|
|
49
|
+
## `BaseCommand`
|
|
50
|
+
|
|
51
|
+
The CLI verbs mirror the same pattern. An abstract `BaseCommand` holds project/`.amby/` discovery,
|
|
52
|
+
config load/save, emitter resolution, tool detection, logging, error handling, and `--dry-run`/
|
|
53
|
+
`--yes`. Its template method `run()` validates context then calls each subclass's `execute()`.
|
|
54
|
+
Subclasses: `InitCommand`, `AddCommand`, `SyncCommand`, `CheckCommand`, `RestoreCommand`,
|
|
55
|
+
`UpgradeCommand`, `DashboardCommand`.
|
|
56
|
+
|
|
57
|
+
## Non-destructive rules merge (brownfield)
|
|
58
|
+
|
|
59
|
+
Generated **command** files are AmbyKit's alone and are overwritten. **Rules files** (`AGENTS.md`,
|
|
60
|
+
the `CLAUDE.md` bridge, `copilot-instructions.md`, Cursor's `.mdc`) are different: a user may have
|
|
61
|
+
authored them. Each such `EmittedFile` is tagged `merge: "region"`, and the writer (`applyFiles`)
|
|
62
|
+
reconciles it through a pure core (`src/core/merge.ts`) instead of overwriting:
|
|
63
|
+
|
|
64
|
+
- The AmbyKit-owned span is a Markdown section that opens with `### AmbyKit usage` and ends at the
|
|
65
|
+
next same-or-higher heading (or EOF). On a fresh file the whole emitted file is written; on an
|
|
66
|
+
existing file only that region is spliced in, preserving every other byte.
|
|
67
|
+
- A short **fingerprint** is embedded in the region footer. On re-run, a region whose body no longer
|
|
68
|
+
matches its fingerprint was hand-edited, so it is left untouched and reported as *skipped*.
|
|
69
|
+
- Before modifying an existing file, the writer copies it to `.amby/backups/<name>.<ts>.bak`
|
|
70
|
+
(`ambykit restore` reverses this). Backups are outside the emitted set, so `check` stays green.
|
|
71
|
+
- `classifyProject` (`src/core/classify.ts`) labels a project greenfield/brownfield from three
|
|
72
|
+
signals — an existing rules file, non-AmbyKit source files, or a git history — defaulting to the
|
|
73
|
+
safe (non-destructive) path when uncertain.
|
|
74
|
+
|
|
75
|
+
## Token efficiency
|
|
76
|
+
|
|
77
|
+
Spec generation must be cheap. This is designed into the prompts and templates:
|
|
78
|
+
|
|
79
|
+
- **Progressive disclosure** — each phase loads only the artifact it needs via `@path`
|
|
80
|
+
(specify→constitution, plan→spec, tasks→plan, implement→one task slice). Reference material (EARS
|
|
81
|
+
guide, examples) lives in separate on-demand files, not inlined in every prompt.
|
|
82
|
+
- **Reference by stable ID** — downstream artifacts cite `US-#`/`FR-###`/`SC-###` instead of copying
|
|
83
|
+
text.
|
|
84
|
+
- **Patch, don't regenerate** — `clarify` edits only clarification markers; `implement` flips
|
|
85
|
+
checkboxes and updates `status:` in place.
|
|
86
|
+
- **Structured over prose for machine reads** — `dashboard` and `analyze` parse frontmatter and
|
|
87
|
+
checkboxes locally in the CLI at **zero model tokens**; only generative phases call the model.
|
|
88
|
+
|
|
89
|
+
## Self-hosting
|
|
90
|
+
|
|
91
|
+
AmbyKit is built with AmbyKit. The repo's own `.claude/` (and other tool files) are generated by
|
|
92
|
+
`ambykit sync` from `src/prompts/`; CI asserts `sync` produces no diff so the repo stays a faithful
|
|
93
|
+
consumer of itself. See [contributing](./contributing.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Artifact: `plan.md`
|
|
2
|
+
|
|
3
|
+
The plan defines **HOW** the feature is built. It is the first artifact where technology appears.
|
|
4
|
+
Produced by `/amby.plan` from the approved spec and UI design; must stay consistent with the
|
|
5
|
+
[constitution](../concepts/constitution.md).
|
|
6
|
+
|
|
7
|
+
## Sections
|
|
8
|
+
|
|
9
|
+
1. **Technical context** — chosen stack, key libraries, and the constraints that drove them.
|
|
10
|
+
2. **Architecture** — components, boundaries, and how they interact (diagrams welcome).
|
|
11
|
+
3. **Phased approach** — Phase 0 research → Phase 1 foundation (data model, contracts) → later phases.
|
|
12
|
+
4. **Requirement mapping** — how the design satisfies each `FR-###`/`US-#` (reference by ID, don't
|
|
13
|
+
restate).
|
|
14
|
+
5. **Risks & decisions** — trade-offs made and why.
|
|
15
|
+
|
|
16
|
+
## Supporting artifacts (generated as needed)
|
|
17
|
+
|
|
18
|
+
- **`data-model.md`** — entities, fields, relationships, invariants.
|
|
19
|
+
- **`contracts/`** — API/interface specs (`openapi.yaml`, `events.md`, etc.).
|
|
20
|
+
- **`research.md`** — technology evaluations and decisions with rationale.
|
|
21
|
+
|
|
22
|
+
## Consistency
|
|
23
|
+
|
|
24
|
+
`/amby.analyze` cross-checks the plan against the spec: every `FR-###` should be addressed, and the
|
|
25
|
+
plan should not introduce requirements that aren't in the spec (scope creep). Because the plan
|
|
26
|
+
references spec IDs rather than copying text, changes to the spec are easy to trace forward.
|
|
27
|
+
|
|
28
|
+
## Token efficiency
|
|
29
|
+
|
|
30
|
+
The plan links to the spec and UI artifacts by `@path` and cites IDs; it does not duplicate their
|
|
31
|
+
content. This keeps the plan small and the downstream `tasks`/`implement` phases cheap to run.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Artifact: `spec.md`
|
|
2
|
+
|
|
3
|
+
The specification defines **WHAT** to build and **WHY**, with no technology decisions. Produced by
|
|
4
|
+
`/amby.specify`, refined by `/amby.clarify`. One `spec.md` per feature under `specs/NNN-feature/`.
|
|
5
|
+
|
|
6
|
+
## Sections
|
|
7
|
+
|
|
8
|
+
1. **Metadata** — feature ID/slug, branch, status, created date.
|
|
9
|
+
2. **User Scenarios & Testing** — the user stories.
|
|
10
|
+
3. **Requirements** — EARS functional requirements.
|
|
11
|
+
4. **Success Criteria** — measurable, tech-agnostic outcomes.
|
|
12
|
+
5. **Edge Cases** and **Assumptions**.
|
|
13
|
+
|
|
14
|
+
## User stories
|
|
15
|
+
|
|
16
|
+
Each story is independently testable and prioritized:
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
### US-1 — Reset password via email (priority: P1)
|
|
20
|
+
|
|
21
|
+
As a registered user, I want to reset my password via an emailed one-time link,
|
|
22
|
+
so that I can regain access without contacting support.
|
|
23
|
+
|
|
24
|
+
- **Why P1:** account lockout is the top support driver.
|
|
25
|
+
- **Independent test:** can be demoed alone as a viable slice.
|
|
26
|
+
- **depends-on:** [] # e.g. [US-0] to block until a prerequisite ships
|
|
27
|
+
- **status:** draft # draft | ready | in-progress | blocked | done
|
|
28
|
+
|
|
29
|
+
**Acceptance criteria**
|
|
30
|
+
- Given a registered email, When a reset is requested, Then a one-time link is sent within 30s.
|
|
31
|
+
- Given an expired link, When it is opened, Then the user is told it expired and offered a new one.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Functional requirements (EARS)
|
|
35
|
+
|
|
36
|
+
Numbered `FR-###`, using [EARS](https://alistairmavin.com/ears/) patterns — unambiguous and directly
|
|
37
|
+
testable:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
- FR-001 WHEN a reset is requested for a known email, THE SYSTEM SHALL send a one-time link.
|
|
41
|
+
- FR-002 WHILE a reset link is unused and unexpired, THE SYSTEM SHALL accept it exactly once.
|
|
42
|
+
- FR-003 IF a reset link is older than 15 minutes, THEN THE SYSTEM SHALL reject it.
|
|
43
|
+
- FR-004 WHERE email delivery is configured, THE SYSTEM SHALL record a delivery audit entry.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
EARS keywords: **ubiquitous** (SHALL), **WHEN** (event), **WHILE** (state), **IF/THEN** (unwanted
|
|
47
|
+
behavior), **WHERE** (optional feature).
|
|
48
|
+
|
|
49
|
+
## Success criteria
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
- SC-001 95% of reset emails are delivered within 30 seconds.
|
|
53
|
+
- SC-002 Password reset completion rate ≥ 80% for users who start it.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Ambiguity markers
|
|
57
|
+
|
|
58
|
+
Unknowns are flagged inline, never guessed:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
- FR-005 THE SYSTEM SHALL lock the account after [NEEDS CLARIFICATION: how many?] failed attempts.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`/amby.clarify` walks these, asks you, and edits only those lines.
|
|
65
|
+
|
|
66
|
+
## IDs & traceability
|
|
67
|
+
|
|
68
|
+
Stable IDs (`US-#`, `FR-###`, `SC-###`) let downstream artifacts reference the spec instead of
|
|
69
|
+
restating it. `tasks.md` tags each task with its `[US#]`; `analyze` builds a traceability view
|
|
70
|
+
story → requirements → tasks and validates the `depends-on`/`blocked-by` graph.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Artifact: `tasks.md`
|
|
2
|
+
|
|
3
|
+
An ordered, dependency-aware checklist that turns the plan into executable work. Produced by
|
|
4
|
+
`/amby.tasks`; consumed by `/amby.implement` and by `ambykit dashboard`.
|
|
5
|
+
|
|
6
|
+
## Task line format
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
- [ ] [T001] [P] [US1] Create reset_tokens table and migration (db/migrations/003_reset_tokens.sql)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- **checkbox** `- [ ]` / `- [x]` — completion state; the **source of truth** for `dashboard` progress.
|
|
13
|
+
- **`T###`** — stable task ID.
|
|
14
|
+
- **`[P]`** — optional; the task is parallelizable with its siblings.
|
|
15
|
+
- **`[US#]`** — the user story this task serves (enables story-level progress roll-up).
|
|
16
|
+
- **description (file path)** — what to do and where.
|
|
17
|
+
|
|
18
|
+
## Phase grouping
|
|
19
|
+
|
|
20
|
+
Tasks are grouped so structure precedes features:
|
|
21
|
+
|
|
22
|
+
1. **Setup** — tooling, scaffolding.
|
|
23
|
+
2. **Foundational** — shared infrastructure that everything depends on. **Blocks all feature work.**
|
|
24
|
+
3. **User stories** — grouped by story and priority, each ending in a checkpoint (a demoable slice).
|
|
25
|
+
4. **Polish** — hardening, docs, cleanup.
|
|
26
|
+
|
|
27
|
+
The **foundational-before-features** gate is enforced: no user-story task starts until foundational
|
|
28
|
+
tasks complete.
|
|
29
|
+
|
|
30
|
+
## Ordering & dependencies
|
|
31
|
+
|
|
32
|
+
`/amby.tasks` orders tasks by the story **dependency graph** (`depends-on`/`blocked-by`) and
|
|
33
|
+
**priority**, within the phase gate. `[P]` marks tasks that can run concurrently. This supports
|
|
34
|
+
MVP-first, incremental, or parallel-team execution.
|
|
35
|
+
|
|
36
|
+
## Status flow
|
|
37
|
+
|
|
38
|
+
As `/amby.implement` completes work it flips checkboxes to `- [x]` and updates the corresponding
|
|
39
|
+
story's `status:` in `spec.md`. `ambykit dashboard` reads both — counting checked tasks per `[US#]`
|
|
40
|
+
tag — to report `X of Y tasks done`, `%`, and status per story.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Artifact: `ui.md` + `design-tokens.json`
|
|
2
|
+
|
|
3
|
+
UI design is a **first-class artifact** in AmbyKit — the step most spec tools skip. Produced by
|
|
4
|
+
`/amby.design` from the spec, with a **sign-off gate**: once you approve it, the UI is binding for
|
|
5
|
+
`plan`, `tasks`, and `implement`.
|
|
6
|
+
|
|
7
|
+
## `ui.md`
|
|
8
|
+
|
|
9
|
+
Captures the interface for each relevant user story:
|
|
10
|
+
|
|
11
|
+
1. **Layout / wireframe** — ASCII sketch or embedded SVG showing structure and hierarchy.
|
|
12
|
+
2. **Component inventory** — each component with its props, states (default/hover/disabled/loading/
|
|
13
|
+
error/empty), and the design tokens it uses.
|
|
14
|
+
3. **Interaction criteria** — behavior in Given/When/Then, tied back to the story's `US-#`.
|
|
15
|
+
4. **Content & accessibility** — copy, empty/error states, focus order, contrast, ARIA needs.
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
## US-1 — Reset request form
|
|
19
|
+
|
|
20
|
+
Layout:
|
|
21
|
+
+------------------------------------------+
|
|
22
|
+
| Reset your password |
|
|
23
|
+
| [ email____________________ ] |
|
|
24
|
+
| ( Send reset link ) |
|
|
25
|
+
| Back to sign in |
|
|
26
|
+
+------------------------------------------+
|
|
27
|
+
|
|
28
|
+
### Component: EmailField
|
|
29
|
+
- props: value, onChange, invalid
|
|
30
|
+
- states: default, focus, invalid, disabled
|
|
31
|
+
- tokens: color.semantic.input.border, space.md, radius.sm
|
|
32
|
+
|
|
33
|
+
### Interaction
|
|
34
|
+
- Given an empty email, When "Send reset link" is pressed, Then the field shows an inline error.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## `design-tokens.json`
|
|
38
|
+
|
|
39
|
+
Design decisions as data, in three tiers so they compose and stay consistent
|
|
40
|
+
([why tiers](https://martinfowler.com/articles/design-token-based-ui-architecture.html)):
|
|
41
|
+
|
|
42
|
+
```jsonc
|
|
43
|
+
{
|
|
44
|
+
"primitive": { "color": { "blue-600": "#2563eb" }, "space": { "4": "16px" } },
|
|
45
|
+
"semantic": { "color": { "action": "{primitive.color.blue-600}" },
|
|
46
|
+
"space": { "md": "{primitive.space.4}" } },
|
|
47
|
+
"component": { "button": { "primary": { "bg": "{semantic.color.action}" } } }
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- **primitive** — raw values (palette, scale). No usage meaning.
|
|
52
|
+
- **semantic** — usage-based aliases (`action`, `danger`, `md`).
|
|
53
|
+
- **component** — per-component values referencing semantic tokens.
|
|
54
|
+
|
|
55
|
+
## The sign-off gate
|
|
56
|
+
|
|
57
|
+
`/amby.design` presents the UI for review. On approval it records the sign-off in `ui.md`; later
|
|
58
|
+
phases treat the approved layout, components, and tokens as constraints rather than suggestions. This
|
|
59
|
+
keeps generated code aligned with an intentional design instead of an ad-hoc one.
|