@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
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# CLI reference
|
|
2
|
+
|
|
3
|
+
`@ambystech/ambykit`, bin name `ambykit`. Run via `npx @ambystech/ambykit <command>` or install and
|
|
4
|
+
use `ambykit <command>`.
|
|
5
|
+
|
|
6
|
+
## Global flags
|
|
7
|
+
|
|
8
|
+
- `--verbose` — detailed logging.
|
|
9
|
+
- `--dry-run` — show what would change without writing files.
|
|
10
|
+
- `--yes` — assume yes for prompts (non-interactive); skips interactive tool selection.
|
|
11
|
+
|
|
12
|
+
## Terminal output
|
|
13
|
+
|
|
14
|
+
The CLI adapts its output to your terminal. It colorizes and uses box-drawing glyphs on an
|
|
15
|
+
interactive terminal, and **degrades cleanly** everywhere else so logs and pipes stay readable:
|
|
16
|
+
|
|
17
|
+
- Piped / redirected / non-interactive (CI): plain text, no color, no control sequences.
|
|
18
|
+
- `NO_COLOR` set: color is dropped (glyphs and words remain).
|
|
19
|
+
- Terminals without extended glyphs: an ASCII fallback (`[ok]`/`x`, `#`/`-` bars) is used.
|
|
20
|
+
- Narrow terminals: the dashboard drops lower-priority columns rather than wrapping.
|
|
21
|
+
- `--json` output is always unstyled and byte-stable — safe to parse.
|
|
22
|
+
|
|
23
|
+
Multi-step commands (`init`, `add`, `sync`, `update`) show a spinner while working and a
|
|
24
|
+
created/updated/unchanged/skipped summary when done.
|
|
25
|
+
|
|
26
|
+
When a newer AmbyKit is published, an interactive command shows a yellow **"Update available"** callout
|
|
27
|
+
between the banner and its output, naming your installed and the latest version. It's suppressed on
|
|
28
|
+
non-interactive terminals and under `--json`, checks the registry at most once a day, and never blocks
|
|
29
|
+
on network failure. Run [`ambykit update`](#ambykit-update) to upgrade.
|
|
30
|
+
|
|
31
|
+
## `ambykit init [dir]`
|
|
32
|
+
|
|
33
|
+
Scaffold AmbyKit in a project. Creates `.amby/` (constitution + `config.json`) and `specs/`, detects
|
|
34
|
+
installed assistants, lets you select targets, emits their native files, and writes the shared
|
|
35
|
+
`AGENTS.md` (+ `CLAUDE.md` bridge for Claude Code).
|
|
36
|
+
|
|
37
|
+
**Brownfield-safe.** `init` detects whether a project already exists (an existing rules file,
|
|
38
|
+
non-AmbyKit source files, or a git history) and reports the mode. For rules files it **merges** rather
|
|
39
|
+
than overwrites: existing content is preserved and only AmbyKit's `### AmbyKit usage` section is
|
|
40
|
+
added/updated in place. An existing file is backed up to `.amby/backups/` before it is changed, and a
|
|
41
|
+
section you hand-edited is left untouched (reported as skipped). Use `--dry-run` to preview.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx @ambystech/ambykit init
|
|
45
|
+
npx @ambystech/ambykit init . --yes
|
|
46
|
+
npx @ambystech/ambykit init --dry-run # preview merges, write nothing
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## `ambykit add <tool…>`
|
|
50
|
+
|
|
51
|
+
Add or refresh integration for one or more targets (see [tool compatibility](./tool-compatibility.md)
|
|
52
|
+
for target names). On an interactive terminal, running it with **no target** opens a multi-select
|
|
53
|
+
prompt (`space` toggle, `enter` confirm, `esc` cancel); non-interactively it errors with the list of
|
|
54
|
+
available targets instead of blocking. `init` behaves the same when `--tools` is omitted.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ambykit add cursor claude
|
|
58
|
+
ambykit add # interactive tool picker (TTY only)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## `ambykit sync`
|
|
62
|
+
|
|
63
|
+
Re-emit all configured tools from the neutral source. Run after upgrading AmbyKit or editing
|
|
64
|
+
`.amby/` templates/prompts. Project-scoped files only by default; user-level MCP files are opt-in.
|
|
65
|
+
|
|
66
|
+
`sync` is also the **update path** for existing docs: it merges AmbyKit's section into each configured
|
|
67
|
+
tool's rules file non-destructively (same rules as `init` — preserve, back up, skip hand-edits), so
|
|
68
|
+
running it keeps your agent docs current without a full re-init.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ambykit sync
|
|
72
|
+
ambykit sync --dry-run
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Also installs any newly shipped templates, reference docs, and **roles** into `.amby/` (write-if-absent —
|
|
76
|
+
your edits are kept), warns when a role in `.amby/roles/` exceeds 150 words, and refuses to emit
|
|
77
|
+
when two roles share an id. Projects with roles get one native sub-agent per role for Claude Code,
|
|
78
|
+
OpenCode, and Copilot.
|
|
79
|
+
|
|
80
|
+
## `ambykit restore [file]`
|
|
81
|
+
|
|
82
|
+
Recover an agent-doc file (`AGENTS.md`, `CLAUDE.md`, a tool's rules file) from the timestamped backup
|
|
83
|
+
AmbyKit writes to `.amby/backups/` before modifying it. With no argument, lists the backups available
|
|
84
|
+
to restore (newest first).
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
ambykit restore # list available backups
|
|
88
|
+
ambykit restore CLAUDE.md # restore the most recent backup of CLAUDE.md
|
|
89
|
+
ambykit restore CLAUDE.md --dry-run
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## `ambykit worktree <feature> | list | remove <feature>`
|
|
93
|
+
|
|
94
|
+
Per-feature **git worktrees** so several features can be worked on in parallel — by you or by
|
|
95
|
+
several assistants — without checkout switching. Each feature gets its own working copy at
|
|
96
|
+
`.worktrees/<feature>/` (gitignored) on branch `<feature>`, created from the repository's default
|
|
97
|
+
branch when the branch does not exist yet. Zero model tokens.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
ambykit worktree 004-slug # create .worktrees/004-slug on branch 004-slug
|
|
101
|
+
ambykit worktree list # feature, branch, clean/dirty/merged, path
|
|
102
|
+
ambykit worktree remove 004-slug # delete the working copy (branch is kept); --force if dirty
|
|
103
|
+
ambykit worktree 004-slug --dry-run # show the git command without running it
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Creating twice is a no-op; removing a missing one exits 0. `ambykit check` flags worktrees whose
|
|
107
|
+
branch is already merged. Opt in to automatic creation from `/amby.specify` by answering yes at
|
|
108
|
+
`ambykit init`, or set `"worktrees": true` in `.amby/config.json`. Inside a worktree, phases resolve
|
|
109
|
+
"the current feature" from the directory name.
|
|
110
|
+
|
|
111
|
+
## `ambykit dashboard [story-id]`
|
|
112
|
+
|
|
113
|
+
Progress view over the story/task graph, computed locally from `specs/*/spec.md` + `tasks.md` (no
|
|
114
|
+
model tokens).
|
|
115
|
+
|
|
116
|
+
- **No arg** — a table of all user stories: `Feat | Story | description | X of Y tasks | % | status | priority | blocked-by`, with an overall roll-up.
|
|
117
|
+
- **`story-id`** — detail for one story. Story ids **restart per feature**, so a bare `US-3` may
|
|
118
|
+
match several; qualify it with the feature ref as `NNN:US-3` (also accepts `NNN/US-3`). A bare id
|
|
119
|
+
that matches more than one feature prints the matches so you can pick.
|
|
120
|
+
- **`--interactive`** — opt-in full-screen navigable view (TTY only): `↑`/`↓` move, `enter` opens a
|
|
121
|
+
story's tasks, `←`/`esc` goes back, `q` quits. On a non-interactive terminal it falls back to the
|
|
122
|
+
one-shot table.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ambykit dashboard
|
|
126
|
+
ambykit dashboard --interactive # full-screen navigable view (TTY only)
|
|
127
|
+
ambykit dashboard 001:US-3 # feature-qualified (recommended)
|
|
128
|
+
ambykit dashboard --status blocked
|
|
129
|
+
ambykit dashboard --feature 001-password-reset
|
|
130
|
+
ambykit dashboard --json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## `ambykit analyze`
|
|
134
|
+
|
|
135
|
+
Validate the story dependency graph, computed locally from `specs/` (no model tokens): detects
|
|
136
|
+
**cycles** and **dangling references** (structural errors), and reports **blocked** vs **buildable**
|
|
137
|
+
stories and **orphans** (stories with no tasks). Exits non-zero on structural errors, so it can gate
|
|
138
|
+
CI. Complements the generative `/amby.analyze` phase.
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
ambykit analyze
|
|
142
|
+
ambykit analyze --json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## `ambykit check`
|
|
146
|
+
|
|
147
|
+
Doctor: verify integrations are present and well-formed and that expected assistant CLIs are
|
|
148
|
+
installed. Reports drift between the neutral source and emitted files, worktrees whose branch is
|
|
149
|
+
already merged, and role problems in `.amby/roles/` (oversized roles, duplicate ids, shipped
|
|
150
|
+
defaults that were deleted — `ambykit sync` reinstalls those).
|
|
151
|
+
|
|
152
|
+
## `ambykit update`
|
|
153
|
+
|
|
154
|
+
Update the AmbyKit CLI to the latest published version, then refresh this project's tool prompts.
|
|
155
|
+
|
|
156
|
+
When your CLI is **behind**, `update` installs the latest globally and asks you to **re-run** it — the
|
|
157
|
+
first run can only upgrade the CLI, and the re-run (now on the new version) regenerates the prompts. If
|
|
158
|
+
it can't self-update (an `npx` run, or a permissions error) it prints the exact `npm install -g`
|
|
159
|
+
command and leaves your install untouched. When the CLI is already current, it refreshes the configured
|
|
160
|
+
tools' files (a `.amby/` **and** `specs/` dir at the current directory); with nothing to do it prints
|
|
161
|
+
`Everything is up to date`.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
ambykit update # outdated: upgrades the CLI, then asks you to re-run
|
|
165
|
+
ambykit update # current: refreshes this project's tool prompts
|
|
166
|
+
ambykit update --dry-run # preview the prompt refresh
|
|
167
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# The constitution
|
|
2
|
+
|
|
3
|
+
The **constitution** (`.amby/constitution.md`) holds your project's non-negotiable, cross-feature
|
|
4
|
+
principles. It is written once with `/amby.constitution`, revised rarely, and referenced by every
|
|
5
|
+
later phase — the assistant must adhere to it when specifying, designing, planning, and implementing.
|
|
6
|
+
|
|
7
|
+
Think of it as durable guardrails, distinct from per-feature specs: specs change constantly, the
|
|
8
|
+
constitution almost never does.
|
|
9
|
+
|
|
10
|
+
## What belongs in it
|
|
11
|
+
|
|
12
|
+
- **Code quality** — style, structure, review bars, "don't touch" boundaries.
|
|
13
|
+
- **Testing standards** — required coverage, test-first expectations, what "done" means.
|
|
14
|
+
- **UX consistency** — design principles, accessibility requirements, tone.
|
|
15
|
+
- **Performance & reliability** — budgets and SLAs the system must meet.
|
|
16
|
+
- **Security & compliance** — constraints that override convenience.
|
|
17
|
+
- **Architectural constraints** — patterns to follow, technologies to prefer or avoid.
|
|
18
|
+
|
|
19
|
+
## What does not belong in it
|
|
20
|
+
|
|
21
|
+
- Feature requirements (those go in `spec.md`).
|
|
22
|
+
- Technology choices for a specific feature (those go in `plan.md`).
|
|
23
|
+
- Anything that changes per feature.
|
|
24
|
+
|
|
25
|
+
## Format
|
|
26
|
+
|
|
27
|
+
Plain Markdown with numbered, named principles so they can be cited (e.g. "per Principle 3, tests
|
|
28
|
+
precede implementation"). Keep each principle short and imperative. AmbyKit ships a starter template;
|
|
29
|
+
`/amby.constitution` fills it in through a short interview and can amend it later.
|
|
30
|
+
|
|
31
|
+
## Relationship to AGENTS.md
|
|
32
|
+
|
|
33
|
+
The constitution is *project governance for the SDD workflow*. `AGENTS.md` is *general repo context*
|
|
34
|
+
for the assistant (build commands, conventions). They complement each other; AmbyKit keeps them
|
|
35
|
+
separate so each stays focused.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Spec-Driven Development
|
|
2
|
+
|
|
3
|
+
Spec-Driven Development (SDD) means the **specification is the primary artifact**, and code is
|
|
4
|
+
generated to satisfy it — not the other way around. With AI assistants, this matters more, not less:
|
|
5
|
+
an assistant is only as good as the requirements it's given, and a vague prompt yields plausible but
|
|
6
|
+
wrong software.
|
|
7
|
+
|
|
8
|
+
## Principles
|
|
9
|
+
|
|
10
|
+
1. **Separate WHAT from HOW.** The spec describes behavior and value with no technology decisions.
|
|
11
|
+
The plan describes the technical approach. Mixing them produces specs that can't be reviewed by
|
|
12
|
+
non-engineers and plans that re-litigate requirements.
|
|
13
|
+
2. **Make requirements testable.** Every requirement should map to a test. AmbyKit uses
|
|
14
|
+
[EARS](https://alistairmavin.com/ears/) notation (WHEN/WHILE/IF … THE SYSTEM SHALL …) plus
|
|
15
|
+
Given/When/Then acceptance criteria so requirements are unambiguous and traceable.
|
|
16
|
+
3. **Surface ambiguity, don't paper over it.** Unknowns become explicit `[NEEDS CLARIFICATION]`
|
|
17
|
+
markers that a dedicated phase resolves — the assistant never silently guesses.
|
|
18
|
+
4. **Independent, prioritized stories.** Each user story is independently testable and carries a
|
|
19
|
+
priority, so an MVP is a subset of stories, and work can be ordered and parallelized.
|
|
20
|
+
5. **Durable governance.** A project [constitution](./constitution.md) holds cross-feature principles
|
|
21
|
+
that every phase must honor.
|
|
22
|
+
|
|
23
|
+
## Why "author once, emit per tool"
|
|
24
|
+
|
|
25
|
+
Teams use different assistants, and each reads a different config format. Writing the workflow once
|
|
26
|
+
and compiling it to every tool keeps a single source of truth and lets specs travel with the team.
|
|
27
|
+
See [architecture](../architecture.md).
|
|
28
|
+
|
|
29
|
+
## How AmbyKit compares
|
|
30
|
+
|
|
31
|
+
AmbyKit draws on proven prior art — GitHub Spec-Kit's phase model and templates, Kiro's
|
|
32
|
+
requirements/design/tasks split and EARS usage, and the [AGENTS.md](https://agents.md) standard for
|
|
33
|
+
neutral instructions — and adds a **first-class UI design artifact** and a **cross-tool emitter**
|
|
34
|
+
model on top.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
AmbyKit is built **with** AmbyKit. Read [`AGENTS.md`](../AGENTS.md) first — it has the golden rules
|
|
4
|
+
for working in this codebase.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install
|
|
10
|
+
npm run build # compile to dist/ (ESM, NodeNext)
|
|
11
|
+
npm run typecheck # type-check only
|
|
12
|
+
npm test # vitest: emitter snapshot tests + CLI e2e
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Node ≥ 20, ESM only. Use `.js` extensions in relative imports.
|
|
16
|
+
|
|
17
|
+
## The two golden rules
|
|
18
|
+
|
|
19
|
+
1. **Author once, emit per tool.** Never hand-edit generated tool files (`.claude/commands/`,
|
|
20
|
+
`.github/prompts/`, …). Edit the neutral source in `src/templates/` or `src/prompts/`, then
|
|
21
|
+
`ambykit sync`.
|
|
22
|
+
2. **Subclass, don't duplicate.** New tool = a `BaseEmitter` subclass; new CLI verb = a `BaseCommand`
|
|
23
|
+
subclass. Override only what differs.
|
|
24
|
+
|
|
25
|
+
## Adding a tool emitter
|
|
26
|
+
|
|
27
|
+
1. Read the tool's real format and add/verify a row in
|
|
28
|
+
[`docs/tool-compatibility.md`](./tool-compatibility.md). Don't guess formats.
|
|
29
|
+
2. Create `src/emitters/<tool>.ts` extending `BaseEmitter`; set `commandSurface`, paths, and MCP
|
|
30
|
+
keys/scope; override only the differing hooks.
|
|
31
|
+
3. Register it (and any VS Code-extension alias) in `src/emitters/index.ts`.
|
|
32
|
+
4. Add a snapshot test asserting generated paths and frontmatter match the matrix.
|
|
33
|
+
|
|
34
|
+
## Adding or changing a phase
|
|
35
|
+
|
|
36
|
+
1. Edit the neutral `CommandSpec` in `src/prompts/` and any template in `src/templates/`.
|
|
37
|
+
2. Keep it **token-frugal**: load only needed artifacts by `@path`, reference IDs instead of
|
|
38
|
+
restating, patch in place. See [architecture → token efficiency](./architecture.md).
|
|
39
|
+
3. Run `ambykit sync` to regenerate this repo's own tool files and commit them.
|
|
40
|
+
|
|
41
|
+
## Dogfooding & CI
|
|
42
|
+
|
|
43
|
+
Features are specced under `specs/` using the AmbyKit workflow. CI asserts `ambykit sync` produces no
|
|
44
|
+
diff, so the repo stays a faithful consumer of itself. If your change touches emitters or prompts,
|
|
45
|
+
run `ambykit sync` and include the regenerated files in your commit.
|
|
46
|
+
|
|
47
|
+
## Commit / PR
|
|
48
|
+
|
|
49
|
+
- Keep changes small and focused; update docs and the compatibility matrix alongside code.
|
|
50
|
+
- Ensure `npm run typecheck` and `npm test` pass before opening a PR.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
## Requirements
|
|
4
|
+
|
|
5
|
+
- Node.js ≥ 20
|
|
6
|
+
- One or more supported AI coding assistants ([tool compatibility](./tool-compatibility.md))
|
|
7
|
+
|
|
8
|
+
## 1. Initialize
|
|
9
|
+
|
|
10
|
+
From your project root:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @ambystech/ambykit init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`init` will:
|
|
17
|
+
|
|
18
|
+
1. Create `.amby/` (your constitution + config) and a `specs/` directory.
|
|
19
|
+
2. Detect installed assistants and let you pick which to target.
|
|
20
|
+
3. Emit each selected tool's native command/rules files.
|
|
21
|
+
4. Write a shared `AGENTS.md` (and a `CLAUDE.md` bridge for Claude Code).
|
|
22
|
+
|
|
23
|
+
Re-run any time to add a tool (`ambykit add cursor`) or refresh generated files (`ambykit sync`).
|
|
24
|
+
|
|
25
|
+
### Already have a project (and a `CLAUDE.md` / `AGENTS.md`)?
|
|
26
|
+
|
|
27
|
+
`init` is **non-destructive**. If a rules file already exists, AmbyKit does **not** overwrite it — it
|
|
28
|
+
detects the existing project (an existing rules file, source files, or git history) and adds only its
|
|
29
|
+
own `### AmbyKit usage` section, leaving everything you wrote intact. Re-running is idempotent: the
|
|
30
|
+
section is updated in place, never duplicated. Before modifying an existing file it writes a
|
|
31
|
+
timestamped backup under `.amby/backups/`, and if you hand-edit AmbyKit's section it is left untouched
|
|
32
|
+
and reported as skipped. Preview any run with `--dry-run`; recover a file with
|
|
33
|
+
[`ambykit restore`](./cli-reference.md). Add `.amby/backups/` to your `.gitignore`.
|
|
34
|
+
|
|
35
|
+
## 2. Set your constitution (once)
|
|
36
|
+
|
|
37
|
+
Inside your assistant:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
/amby.constitution
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This captures durable, cross-feature principles — code quality bars, testing standards, UX and
|
|
44
|
+
performance expectations. Every later phase honors it. See
|
|
45
|
+
[the constitution](./concepts/constitution.md).
|
|
46
|
+
|
|
47
|
+
## 3. Specify a feature
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/amby.specify Add password reset via emailed one-time link
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Produces `specs/001-password-reset/spec.md` with user stories (`US-#`), EARS requirements (`FR-###`),
|
|
54
|
+
Given/When/Then acceptance criteria, and success criteria (`SC-###`). Ambiguities are flagged inline
|
|
55
|
+
as `[NEEDS CLARIFICATION: …]`.
|
|
56
|
+
|
|
57
|
+
## 4. Clarify, design, plan, break down
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
/amby.clarify # answer open questions; markers get resolved in place
|
|
61
|
+
/amby.design # ui.md + design-tokens.json (with a sign-off gate)
|
|
62
|
+
/amby.plan # plan.md — the technical HOW
|
|
63
|
+
/amby.tasks # tasks.md — ordered, dependency-aware checklist
|
|
64
|
+
/amby.analyze # cross-check spec ↔ plan ↔ tasks before you build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Need to grow a feature that's already specced? `/amby.revise` continues the spec (or `ui.md`) **in
|
|
68
|
+
place** — adding stories and requirements and refining existing ones while preserving every stable
|
|
69
|
+
ID. Use it instead of `/amby.specify`, which starts a new feature.
|
|
70
|
+
|
|
71
|
+
## 5. Implement and track
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/amby.implement # work through tasks.md, checking off tasks as it goes
|
|
75
|
+
/amby.converge # check the code against spec/plan/tasks; gaps become new tasks
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Repeat `implement → converge` until converge reports **converged** — it never edits code, only
|
|
79
|
+
appends tasks and updates story status.
|
|
80
|
+
|
|
81
|
+
From the terminal, watch progress across the story/task graph:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx ambykit dashboard # table of all stories with % complete
|
|
85
|
+
npx ambykit dashboard 001:US-3 # detail for one story (qualify id with the feature ref)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## 6. Keep it current
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
ambykit check # doctor: verify your integrations and report drift
|
|
92
|
+
ambykit update # update the CLI, then refresh this project's generated prompts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Where things live
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
.amby/constitution.md your project principles
|
|
99
|
+
.amby/config.json which tools are enabled
|
|
100
|
+
specs/NNN-feature/
|
|
101
|
+
spec.md ui.md design-tokens.json plan.md tasks.md
|
|
102
|
+
AGENTS.md shared instructions (native to most tools)
|
|
103
|
+
CLAUDE.md Claude Code bridge (imports @AGENTS.md)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Next: [the workflow in detail](./workflow.md).
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# AmbyKit Documentation
|
|
2
|
+
|
|
3
|
+
AmbyKit is a **Spec-Driven Development (SDD)** framework for AI coding assistants. You describe
|
|
4
|
+
*what* to build as structured, testable artifacts; AmbyKit gives your assistant a disciplined
|
|
5
|
+
workflow to turn those artifacts into working software — and it works across every assistant your
|
|
6
|
+
team uses.
|
|
7
|
+
|
|
8
|
+
## The core idea: WHAT before HOW
|
|
9
|
+
|
|
10
|
+
Most AI coding failures are requirements failures. AmbyKit separates the two concerns that usually
|
|
11
|
+
get tangled:
|
|
12
|
+
|
|
13
|
+
- **WHAT / WHY** — `spec.md`: user stories and testable requirements, with **no technology decisions**.
|
|
14
|
+
- **HOW** — `plan.md`: the technical approach, stack, and architecture, derived from the spec.
|
|
15
|
+
|
|
16
|
+
Between them sits a first-class **UI design** step (`ui.md` + `design-tokens.json`) that most spec
|
|
17
|
+
tools omit.
|
|
18
|
+
|
|
19
|
+
## Author once, emit per tool
|
|
20
|
+
|
|
21
|
+
You write the workflow and artifacts once. AmbyKit's **emitters** compile them into each assistant's
|
|
22
|
+
native format — Claude Code, OpenCode, GitHub Copilot (VS Code + CLI), Cursor (+ CLI), Antigravity
|
|
23
|
+
(IDE + CLI). One source of truth, no per-tool drift. See [architecture](./architecture.md).
|
|
24
|
+
|
|
25
|
+
## Read next
|
|
26
|
+
|
|
27
|
+
- [Getting started](./getting-started.md) — install and run your first feature.
|
|
28
|
+
- [The workflow](./workflow.md) — the eleven phases in order.
|
|
29
|
+
- Concepts: [Spec-Driven Development](./concepts/spec-driven-development.md) ·
|
|
30
|
+
[The constitution](./concepts/constitution.md)
|
|
31
|
+
- Artifacts: [spec](./artifacts/spec.md) · [UI design](./artifacts/ui-design.md) ·
|
|
32
|
+
[plan](./artifacts/plan.md) · [tasks](./artifacts/tasks.md)
|
|
33
|
+
- [Tool compatibility](./tool-compatibility.md) — exact paths & formats per assistant.
|
|
34
|
+
- [CLI reference](./cli-reference.md)
|
|
35
|
+
- [Architecture](./architecture.md) · [Contributing](./contributing.md)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Tool compatibility
|
|
2
|
+
|
|
3
|
+
Exact paths and formats AmbyKit emits for each supported assistant. Verified against official docs
|
|
4
|
+
(mid-2026). This is the source of truth for the emitters in `src/emitters/` — keep it in sync when a
|
|
5
|
+
tool's format changes.
|
|
6
|
+
|
|
7
|
+
## Selectable targets → emitters
|
|
8
|
+
|
|
9
|
+
Several targets share one emitter's output (why `BaseEmitter` + thin subclasses exist):
|
|
10
|
+
|
|
11
|
+
| Target | Emitter | Command surface |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Claude Code (CLI) | `ClaudeEmitter` | `commands` |
|
|
14
|
+
| Claude Code (VS Code extension) | `ClaudeEmitter` | identical to CLI |
|
|
15
|
+
| GitHub Copilot (VS Code extension) | `CopilotEmitter` | `commands` |
|
|
16
|
+
| GitHub Copilot CLI (`copilot`) | `CopilotCliEmitter` | `skills` (no prompt files) |
|
|
17
|
+
| OpenCode | `OpenCodeEmitter` | `commands` |
|
|
18
|
+
| Cursor | `CursorEmitter` | `commands` |
|
|
19
|
+
| Cursor CLI (`cursor-agent`) | `CursorCliEmitter` | `none` (rules-only) |
|
|
20
|
+
| Antigravity (IDE) | `AntigravityEmitter` | `workflows` |
|
|
21
|
+
| Antigravity CLI (`agy`) | `AntigravityCliEmitter` | reuses Antigravity |
|
|
22
|
+
| Codex CLI (`codex`) | `CodexEmitter` | `skills` |
|
|
23
|
+
|
|
24
|
+
## Matrix
|
|
25
|
+
|
|
26
|
+
| Concern | Claude Code | OpenCode | Copilot (VS Code) | Copilot CLI | Cursor | Cursor CLI | Antigravity | Codex CLI |
|
|
27
|
+
|---|---|---|---|---|---|---|---|---|
|
|
28
|
+
| Rules file | `CLAUDE.md` (+`@AGENTS.md` bridge) | `AGENTS.md` | `.github/copilot-instructions.md` + `AGENTS.md` | same as Copilot VS Code | `.cursor/rules/*.mdc` + `AGENTS.md` | Cursor config + `AGENTS.md` | `AGENTS.md` (+`GEMINI.md`) + `.agents/rules/*.md` | `AGENTS.md` |
|
|
29
|
+
| Commands/prompts | `.claude/commands/amby/*.md` | `.opencode/commands/*.md` | `.github/prompts/*.prompt.md` | **none** → skills | `.cursor/commands/*.md` | none | `.agents/workflows/*.md` | `.agents/skills/*/SKILL.md` |
|
|
30
|
+
| Command frontmatter | `description`, `argument-hint`, `allowed-tools`, `model` | `description`, `agent`, `model`, `subtask` | `description`, `name`, `agent`, `model`, `tools` | (skills) `name`, `description`, `allowed-tools` | plain body | — | `description` (+ `// turbo` line) | `name`, `description` |
|
|
31
|
+
| Scoped instructions | `.claude/rules/*.md` (`paths:`) | `instructions[]` in `opencode.json` | `.github/instructions/*.instructions.md` (`applyTo`) | same (`applyTo`, `excludeAgent`) | `.mdc` `globs`/`alwaysApply` | via `.mdc` | `.agents/rules/*.md` | nested `AGENTS.md`/`AGENTS.override.md` per directory (no glob key) |
|
|
32
|
+
| Args placeholder | `$ARGUMENTS`, `$N`, `$name` | `$ARGUMENTS`, `$1` | `${input:x}` | — | prompt text | — | steps in body | none — trailing free text only (AmbyKit reworks `$ARGUMENTS` into prose) |
|
|
33
|
+
| Agents | `.claude/agents/*.md` | `.opencode/agents/*.md` | `.github/agents/*.agent.md` | `.github/agents/*.agent.md` | UI modes (no file) | — | none (SDK only) | none (skills only) |
|
|
34
|
+
| Agent frontmatter | `name`*, `description`*, `tools`, `model` (body = system prompt) | `description`* (+`mode`, `permission`; filename = id) | `description`*, `name`, `tools` | same as Copilot VS Code | — | — | — | — |
|
|
35
|
+
| MCP file | `.mcp.json` | `opencode.json` → `mcp` | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` (user) | `.cursor/mcp.json` | reads `.cursor/mcp.json` | `mcp_config.json` (user) | `.codex/config.toml` (TOML) — **out of scope**, AmbyKit does not write it |
|
|
36
|
+
| MCP top-level key | (per-server `type`) | `mcp` | `servers` | `mcpServers` | `mcpServers` | — | `mcpServers` | `mcp_servers.<id>` (not written) |
|
|
37
|
+
| AGENTS.md native | No (bridge) | Yes | Yes (opt-in) | Yes | Yes | Yes | Yes | Yes |
|
|
38
|
+
|
|
39
|
+
## Gotchas the emitters encode
|
|
40
|
+
|
|
41
|
+
- **Claude Code does not read `AGENTS.md`.** Emit a `CLAUDE.md` whose first line is `@AGENTS.md` (or a
|
|
42
|
+
symlink) so there's a single shared rules source. This bridge line is preserved (re-added if missing)
|
|
43
|
+
when merging into an existing `CLAUDE.md`.
|
|
44
|
+
- **Rules files are merged, not overwritten.** Every rules file wraps AmbyKit's content in a
|
|
45
|
+
`### AmbyKit usage` section so it can be spliced into a file the user already authored; only that
|
|
46
|
+
section is AmbyKit's. (Command/prompt/skill/workflow files remain fully generated and overwritten.)
|
|
47
|
+
- **MCP top-level key differs**: `servers` (Copilot VS Code) vs `mcpServers` (Cursor, Copilot CLI,
|
|
48
|
+
Antigravity) vs `mcp` (OpenCode) vs per-server `type` blocks (Claude `.mcp.json`).
|
|
49
|
+
- **MCP scope differs**: Copilot CLI and Antigravity use **user-level** files outside the repo — AmbyKit
|
|
50
|
+
writes these only with explicit consent and excludes them from the "repo in sync" check.
|
|
51
|
+
- **Scoped-instruction key differs**: Copilot `applyTo` vs Cursor `globs` (+ `alwaysApply`).
|
|
52
|
+
- **Command surface differs**: Copilot CLI has no `.prompt.md`; phases map to `SKILL.md`. Antigravity
|
|
53
|
+
uses `.agents/workflows/*.md` with a `// turbo` line to auto-run a step. Cursor CLI is rules-only.
|
|
54
|
+
- **OpenCode** uses plural dirs (`agents/`, `commands/`) and `provider/model-id` model strings.
|
|
55
|
+
- **Antigravity** dir is `.agents/` (plural); `.agent/` is legacy read-compat.
|
|
56
|
+
- **Codex** shares the `.agents/` root with Antigravity but a different subdirectory (`skills/` vs
|
|
57
|
+
`workflows/`) — the two coexist without collision when both targets are selected. Codex's skills
|
|
58
|
+
frontmatter has no argument-placeholder key, so AmbyKit rewrites the neutral `$ARGUMENTS` token into
|
|
59
|
+
prose rather than leaving a literal, un-substituted placeholder in the emitted `SKILL.md`. Codex's
|
|
60
|
+
deprecated, user-level custom-prompts mechanism (`~/.codex/prompts/`, which does support
|
|
61
|
+
placeholders) is intentionally not targeted — see `specs/008-codex-integration/spec.md` FR-003/
|
|
62
|
+
FR-004. Codex also resolves nested `AGENTS.md`/`AGENTS.override.md` files per directory (closer
|
|
63
|
+
wins) with a 32 KiB combined-size cap; AmbyKit does not special-case this, consistent with every
|
|
64
|
+
other `AGENTS.md`-native tool.
|
|
65
|
+
|
|
66
|
+
## To verify against a live install
|
|
67
|
+
|
|
68
|
+
Docs conflicted on a couple of points; confirm before shipping those emitters:
|
|
69
|
+
|
|
70
|
+
- Antigravity `.agents/` vs `.agent/` default on the targeted version.
|
|
71
|
+
- Whether the `agy` CLI's `--output-format json` exists.
|
|
72
|
+
|
|
73
|
+
## Sources
|
|
74
|
+
|
|
75
|
+
Claude Code: code.claude.com/docs · OpenCode: opencode.ai/docs · Copilot: code.visualstudio.com/docs
|
|
76
|
+
and docs.github.com/copilot · Cursor: cursor.com/docs · Antigravity: antigravity.google/docs and
|
|
77
|
+
Google Cloud blog. Codex CLI: developers.openai.com/codex (skills, custom prompts, config reference,
|
|
78
|
+
AGENTS.md guide). AGENTS.md standard: agents.md.
|
package/docs/workflow.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# The AmbyKit workflow
|
|
2
|
+
|
|
3
|
+
Eleven phases, each a slash command in your assistant, each producing or updating one artifact. The
|
|
4
|
+
happy path is **specify → design → plan → tasks → implement**, with `constitution` once up front and
|
|
5
|
+
`clarify`/`revise`/`analyze`/`converge`/`review` when you need them.
|
|
6
|
+
|
|
7
|
+
| Phase | Command | Reads | Writes |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Governance (once) | `/amby.constitution` | — | `.amby/constitution.md` |
|
|
10
|
+
| Specify (WHAT/WHY) | `/amby.specify` | constitution | `specs/NNN/spec.md` |
|
|
11
|
+
| Clarify | `/amby.clarify` | spec | spec (resolves markers) |
|
|
12
|
+
| Revise | `/amby.revise` | spec, ui | spec / ui (continues in place) |
|
|
13
|
+
| Design (UI) | `/amby.design` | spec | `ui.md`, `design-tokens.json` |
|
|
14
|
+
| Plan (HOW) | `/amby.plan` | spec, ui | `plan.md` (+ `data-model.md`, `contracts/`) |
|
|
15
|
+
| Tasks | `/amby.tasks` | plan | `tasks.md` |
|
|
16
|
+
| Analyze | `/amby.analyze` | all | consistency report |
|
|
17
|
+
| Implement | `/amby.implement` | tasks (one slice) | code + task/status updates |
|
|
18
|
+
| Converge | `/amby.converge` | spec, plan, tasks + code | `tasks.md` (appends gap tasks), story status |
|
|
19
|
+
| Review | `/amby.review` | any artifact + a role | findings (advisory); the artifact only with `--apply` |
|
|
20
|
+
|
|
21
|
+
## 1. Constitution
|
|
22
|
+
|
|
23
|
+
Durable, project-wide principles that constrain every feature. Written once, revised rarely. See
|
|
24
|
+
[the constitution](./concepts/constitution.md).
|
|
25
|
+
|
|
26
|
+
## 2. Specify — the WHAT and WHY
|
|
27
|
+
|
|
28
|
+
Describe the feature in business terms. The spec contains **no technology choices**. It defines user
|
|
29
|
+
stories with priorities, EARS functional requirements, Given/When/Then acceptance criteria, and
|
|
30
|
+
measurable success criteria. Unknowns become `[NEEDS CLARIFICATION: …]` markers rather than
|
|
31
|
+
guesses. See [the spec artifact](./artifacts/spec.md).
|
|
32
|
+
|
|
33
|
+
## 3. Clarify
|
|
34
|
+
|
|
35
|
+
Walks the open `[NEEDS CLARIFICATION]` markers, asks you targeted questions, and edits **only** those
|
|
36
|
+
lines — cheap and non-destructive.
|
|
37
|
+
|
|
38
|
+
## 4. Revise
|
|
39
|
+
|
|
40
|
+
Continues an existing feature: adds new user stories, requirements, and success criteria and refines
|
|
41
|
+
existing ones **in place**, preserving every stable ID. Distinct from `specify` (new feature) and
|
|
42
|
+
`clarify` (markers only). If the spec is already `done` it makes no edits and points you to
|
|
43
|
+
`/amby.specify`; otherwise it sets the spec `in-progress` and leaves completed stories untouched. Can
|
|
44
|
+
also extend an existing `ui.md`.
|
|
45
|
+
|
|
46
|
+
## 5. Design — UI as a first-class artifact
|
|
47
|
+
|
|
48
|
+
Produces `ui.md` (layout/wireframe, component inventory with props and states, interaction criteria)
|
|
49
|
+
and `design-tokens.json` (primitive → semantic → component tokens). A **sign-off gate** makes the
|
|
50
|
+
approved UI binding for `plan`/`tasks`/`implement`. See [UI design](./artifacts/ui-design.md).
|
|
51
|
+
|
|
52
|
+
## 6. Plan — the HOW
|
|
53
|
+
|
|
54
|
+
The first place technology appears. Chooses the stack and architecture consistent with the
|
|
55
|
+
constitution, and generates supporting artifacts (`data-model.md`, `contracts/`, `research.md`) as
|
|
56
|
+
needed. See [the plan artifact](./artifacts/plan.md).
|
|
57
|
+
|
|
58
|
+
## 7. Tasks
|
|
59
|
+
|
|
60
|
+
Turns the plan into an ordered, dependency-aware checklist: stable `T###` IDs, `[P]` parallel
|
|
61
|
+
markers, `[US#]` story tags, and file paths, grouped so foundational work precedes feature work. See
|
|
62
|
+
[the tasks artifact](./artifacts/tasks.md).
|
|
63
|
+
|
|
64
|
+
## 8. Analyze
|
|
65
|
+
|
|
66
|
+
Cross-checks spec ↔ plan ↔ tasks for coverage gaps and inconsistencies, and validates the story
|
|
67
|
+
**dependency graph** (cycles, dangling references, orphan stories, what's currently unblocked).
|
|
68
|
+
|
|
69
|
+
## 9. Implement
|
|
70
|
+
|
|
71
|
+
Executes tasks one slice at a time, checking off `tasks.md` checkboxes and updating each story's
|
|
72
|
+
`status:` as it goes — which is what `ambykit dashboard` reports on.
|
|
73
|
+
|
|
74
|
+
## 10. Converge
|
|
75
|
+
|
|
76
|
+
Closes the loop after implementation: checks the code against every `FR-###`/`SC-###`, plan
|
|
77
|
+
decision, and checked task; appends one unchecked task per gap under `## Convergence` in `tasks.md`
|
|
78
|
+
(`[VERIFY]` for inconclusive items); marks fully covered stories `done`. Append-only and idempotent —
|
|
79
|
+
it never edits source. Loop `implement → converge` until it reports **converged**.
|
|
80
|
+
|
|
81
|
+
## 11. Review
|
|
82
|
+
|
|
83
|
+
Asks a *different* role to critique an artifact — QA on a spec or task list, the Architect on a
|
|
84
|
+
plan, the PM on a UI design, or any role via `--as <id>`. Findings are one per line, each tied to a
|
|
85
|
+
stable ID with severity and a suggested fix; nothing is modified. `--apply` patches the artifact in
|
|
86
|
+
place (IDs are never renumbered) and appends a `## Reviews` record. Advisory, like `analyze`.
|
|
87
|
+
|
|
88
|
+
## Roles
|
|
89
|
+
|
|
90
|
+
Every phase acts as a role defined in `.amby/roles/<id>.md` (PM, UX Designer, Architect, Tech
|
|
91
|
+
Lead, Developer, QA by default — project-owned and editable, ≤ 150 words each). Phases load only
|
|
92
|
+
their role, by path; pass `--as <id>` to any phase for a one-run alternative perspective. `sync`
|
|
93
|
+
warns on oversized roles and refuses duplicate ids; `check` reports removed defaults.
|
|
94
|
+
|
|
95
|
+
## Parallel features (worktrees)
|
|
96
|
+
|
|
97
|
+
Every feature has its own branch; `ambykit worktree <feature>` gives it its own **working copy** at
|
|
98
|
+
`.worktrees/<feature>/` so two features — or two assistants — can progress side by side with no
|
|
99
|
+
checkout switching. Inside a worktree, every phase resolves "the current feature" from the directory
|
|
100
|
+
name. Opt in at `ambykit init` (or `"worktrees": true` in `.amby/config.json`) and `/amby.specify`
|
|
101
|
+
creates the worktree for each new feature; `ambykit worktree list|remove` and `ambykit check` keep
|
|
102
|
+
them tidy.
|
|
103
|
+
|
|
104
|
+
## Dependencies & prioritization
|
|
105
|
+
|
|
106
|
+
Stories and features carry `priority` (P1/P2/P3) and `depends-on`/`blocked-by` references by stable
|
|
107
|
+
ID. `tasks` orders work topologically within the foundational-first gate; `analyze` validates the
|
|
108
|
+
graph; `dashboard` shows blocked vs. buildable. See [the spec artifact](./artifacts/spec.md) for the
|
|
109
|
+
metadata shape.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ambystech/ambykit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Spec-Driven Development framework that helps AI coding assistants build better software — author your specs, user stories, UI design, plans and tasks once, and emit native config for Claude Code, OpenCode, GitHub Copilot, Cursor, Antigravity and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"spec-driven-development",
|
|
@@ -13,7 +13,15 @@
|
|
|
13
13
|
"cursor",
|
|
14
14
|
"antigravity",
|
|
15
15
|
"agents.md",
|
|
16
|
-
"codex"
|
|
16
|
+
"codex",
|
|
17
|
+
"agents-md",
|
|
18
|
+
"spec-kit",
|
|
19
|
+
"ai-agents",
|
|
20
|
+
"slash-commands",
|
|
21
|
+
"requirements",
|
|
22
|
+
"ears",
|
|
23
|
+
"prd",
|
|
24
|
+
"design-tokens"
|
|
17
25
|
],
|
|
18
26
|
"license": "MIT",
|
|
19
27
|
"author": "ambystech",
|
|
@@ -38,7 +46,11 @@
|
|
|
38
46
|
"src/templates",
|
|
39
47
|
"src/prompts",
|
|
40
48
|
"src/reference",
|
|
41
|
-
"
|
|
49
|
+
"src/roles",
|
|
50
|
+
"README.md",
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"CHANGELOG.md",
|
|
53
|
+
"docs"
|
|
42
54
|
],
|
|
43
55
|
"engines": {
|
|
44
56
|
"node": ">=20"
|