craftar 0.0.3 → 0.0.5

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Luiz Lima
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Luiz Lima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,169 +1,186 @@
1
- # Craftar
2
-
3
- Craft, sync and convert AI-coding workspace harnesses — rules, agents, commands, skills, MCP servers — across every client workspace you maintain and every AI coder each team uses.
4
-
5
- > Status: **phase 0 prototype**. `import`, `sync`, `status`, `diff`, `explain`, `ls` work end-to-end for the `claude-code` and `kiro` targets and are validated byte-for-byte against a real workspace (see *Oracle*). Everything else in the spec (profiles with IDP/PM-tool integrations, local services, templates, `craftar ui`, `craftar mcp`) is not built yet.
6
-
7
- ## The idea in one paragraph
8
-
9
- You write the harness **once**, in a central repository called the **Forge**, as small reusable **ingredients** (a rule, an agent, a command, a skill, an MCP server). **Recipes** bundle ingredients (`base`, `stack-backend-api`, `stack-frontend-angular`…). A **profile** describes a client: which recipes, which targets (Claude Code, Kiro, AGENTS.md…), and the parameters that differ per client. A workspace holds a tiny `craftar.yaml` pointing at the Forge and a profile; `craftar sync` generates `.claude/`, `.kiro/`, `AGENTS.md`… from it and records what it wrote in `craftar.lock`. Generated files are never edited by hand again — you edit the Forge and sync everywhere.
10
-
11
- ## Install (from source, for now)
12
-
13
- ```bash
14
- npm install
15
- npm run build # → dist/
16
- node bin/craftar.js --help
17
- # or during development
18
- npx tsx src/cli.ts --help
19
- ```
20
-
21
- Requires Node ≥ 22.
22
-
23
- ## Quick start: bring an existing workspace into a Forge
24
-
25
- ```bash
26
- # 1. Import the harness of a Claude Code workspace into a (new or existing) Forge
27
- craftar import --from claude-code \
28
- --workspace C:/Projects/acme-portal-workspace \
29
- --forge C:/Projects/forge \
30
- --profile acme-portal \
31
- --write-config # writes craftar.yaml into the workspace
32
-
33
- # 2. See what sync would do. On a freshly imported workspace everything is "adopt":
34
- # the files already on disk are exactly what the Forge produces, so they just become managed.
35
- craftar status --workspace C:/Projects/acme-portal-workspace
36
-
37
- # 3. Generate + lock
38
- craftar sync --workspace C:/Projects/acme-portal-workspace
39
- ```
40
-
41
- From then on, change a rule in `forge/ingredients/rules/<name>/rule.md`, run `craftar sync` in each workspace (or `craftar sync --check` in CI) and every target is regenerated.
42
-
43
- ## Commands
44
-
45
- | Command | What it does |
46
- |---|---|
47
- | `craftar import --from claude-code --forge <dir> --profile <name> [--workspace .] [--write-config]` | Reads `.claude/{rules,agents,commands,skills,scripts,hooks}`, `.mcp.json` and, when present, `.kiro/steering` (for inclusion modes and hand-written steering). Creates ingredients, recipes (`base`, one `stack-*` per scoped rule, `<profile>-steering`) and a profile. Identical ingredients already in the Forge are reused; differing ones become `<name>--<profile>` variants that emit under the original name, so the workspace still round-trips while you decide what to unify. Ingredients holding a secret-like value in UTF-8 text (tokens, private keys, high-entropy MCP `env`/`args` values) are rejected and listed by location — the value is never printed. UTF-16 files are not scanned yet. |
48
- | `craftar status` | Classifies every file the Forge would produce: `new`, `update`, `unchanged`, `adopt`, `drift`, `collision`, `orphan`, `orphan-drift`. `--json` for tooling. |
49
- | `craftar sync` | Writes the plan and `craftar.lock`. `--dry-run` shows without writing. `--check` exits 1 when anything is out of sync (CI). `--overwrite-drift` regenerates hand-edited files (explicit, never default). |
50
- | `craftar diff [path]` | Line diff between disk and what the Forge would generate. |
51
- | `craftar explain <path>` | Which ingredient, recipe chain, target and origin produced a file. |
52
- | `craftar ls` | Recipes and ingredients resolved for this workspace. |
53
-
54
- All commands take `--workspace <dir>` (default: current directory).
55
-
56
- ## Forge layout
57
-
58
- ```
59
- forge/
60
- ├── craftar.forge.yaml
61
- ├── ingredients/
62
- │ ├── rules/<name>/{ingredient.yaml, rule.md}
63
- │ ├── agents/<name>/{ingredient.yaml, agent.md}
64
- │ ├── commands/<name>/{ingredient.yaml, command.md}
65
- │ ├── skills/<name>/{ingredient.yaml, SKILL.md, …}
66
- │ ├── scripts/<name>/{ingredient.yaml, <file>}
67
- │ ├── hooks/<name>/{ingredient.yaml, <file>}
68
- │ ├── mcp/<name>/ingredient.yaml # server definition
69
- │ └── steerings/<name>/{ingredient.yaml, steering.md} # Kiro-only, no Claude counterpart
70
- ├── recipes/<name>.yaml
71
- └── profiles/<name>/profile.yaml
72
- ```
73
-
74
- `ingredient.yaml` (rule):
75
-
76
- ```yaml
77
- type: rule
78
- name: frontend-angular
79
- inclusion: fileMatch # always | fileMatch | manual | auto (Kiro steering modes)
80
- fileMatchPattern: projects/acme-portal-front/**
81
- targets: "*" # or [claude-code, kiro]
82
- tags: []
83
- origin: { workspace: acme-portal-workspace, path: .claude/rules/frontend-angular.md }
84
- ```
85
-
86
- Recipe:
87
-
88
- ```yaml
89
- name: stack-frontend-angular
90
- extends: []
91
- slot: frontend # optional: two recipes on one slot cannot coexist
92
- ingredients: [rule/frontend-angular, agent/frontend-reviewer]
93
- params: { angularVersion: { default: "20" } }
94
- ```
95
-
96
- Workspace `craftar.yaml`:
97
-
98
- ```yaml
99
- forge: ../forge # path today; git URL later
100
- profile: acme-portal
101
- targets: [claude-code, kiro] # optional, overrides the profile
102
- recipes: { add: [], remove: [] }
103
- overrides:
104
- params: { }
105
- ingredients: { disable: [] }
106
- ```
107
-
108
- Layer precedence, weakest → strongest: recipe defaults → profile → `craftar.yaml` → `craftar.local.yaml` (personal, git-ignored). Bodies may use `{{param}}` placeholders; a placeholder with no value in any layer is left untouched and reported as a warning by `status` and `sync` (Angular's `{{ 'X' | localize }}` does not look like a placeholder and passes silently). Between layers, objects merge key by key while arrays and scalars from the stronger layer replace the weaker one — `targets: [kiro]` in `craftar.local.yaml` means exactly `[kiro]`. Omit a key in `craftar.local.yaml` to inherit it — an empty list there means empty.
109
-
110
- ## Targets
111
-
112
- **claude-code** — emits `.claude/rules|agents|commands|skills|scripts|hooks` and `.mcp.json` verbatim from the Forge (frontmatter kept byte-for-byte). Existing files keep their line endings and BOM; new files are LF without a BOM.
113
-
114
- **kiro** — reproduces, then extends, the hand-written `sync-steering.ps1` script it replaces:
115
- steering = `inclusion` frontmatter + `GENERATED` banner + rule body, with `.claude/rules/` rewritten to `.kiro/steering/`, UTF-8 without BOM, CRLF. On top of what the script did, it also generates `.kiro/agents/*.json` (tools mapped to Kiro names, `resources` bound to the agent's stack rule + `repo-discovery`, or `**/*.md` for generic agents), `.kiro/steering/commands/*.md`, `.kiro/skills/*/SKILL.md` and `.kiro/settings/mcp.json`. The banner text is a parameter (`kiro.banner`) so existing workspaces can adopt without a rewrite. Scripts and hooks have no Kiro equivalent: they are skipped with a warning.
116
-
117
- **agents-md** — one `AGENTS.md` with the always-on rules concatenated and the scoped rules listed, for tools that read the open standard (Codex, Cursor, Warp, Copilot, Kimi…).
118
-
119
- Conversion of hooks/subagents to other tools is out of scope here: the plan is to delegate that to [rulesync](https://github.com/dyoshikawa/rulesync) rather than reimplement it.
120
-
121
- ## Design rules learned from the previous generator
122
-
123
- These come straight from workspaces that removed an earlier generator, and the code enforces them:
124
-
125
- 1. **Only files in `craftar.lock` are ever written or removed.** A file that exists but was never generated is a *collision*: reported, never touched. A managed file that was hand-edited is *drift*: reported, never overwritten unless `--overwrite-drift`.
126
- 2. **Hashes are EOL- and BOM-normalized.** A CRLF checkout on Windows does not read as a hand edit. (`sha256` over LF/no-BOM text.)
127
- 3. **Orphans are removed.** When an ingredient leaves a recipe, its generated files disappear in every target — no stale steering loading into Kiro sessions.
128
- 4. **No hand-kept mirrors.** Kiro agents, commands and skills are generated from the same ingredients as their Claude counterparts.
129
- 5. **Reuse, don't clobber.** Importing a second workspace into the same Forge reuses identical ingredients and creates explicit `--<profile>` variants for the ones that differ, listing them so a human unifies or parameterizes.
130
-
131
- ## Tests
132
-
133
- `npm test` runs two layers that need nothing outside the repository, on any OS:
134
-
135
- - **Unit tests** build a Forge and a workspace in a temp dir (`test/helpers/forge.ts`) and cover
136
- resolution, every file state, apply, each emitter, the importer, the secret guard and the CLI
137
- exit codes.
138
- - **Golden workspaces** — `test/golden/acme-portal` and `test/golden/acme-web`, synthetic — run
139
- the oracle script end to end: import → every file `adopt`, sync byte-identical (a CRLF file and a
140
- BOM file included), second sync a no-op, Forge edits, drift, orphans, variants.
141
- `test/golden/**` is `-text` in `.gitattributes`, so line endings survive checkout. The golden
142
- `.kiro/` is a snapshot of the emitter's output: after an intended emitter change, regenerate it
143
- with `npx tsx test/helpers/regen-golden.ts` and review the diff.
144
-
145
- CI runs typecheck, build and tests on Linux and Windows with Node 22 and 24. The oracle below is
146
- skipped there — a green CI is not evidence against a real workspace.
147
-
148
- ## Oracle
149
-
150
- `test/oracle.test.ts` imports a real client workspace (a private fixture, never committed) and asserts that `craftar sync` reproduces its 13 generated steering files, 5 hand-written steering files, 3 Kiro agent JSONs and every `.claude/*` file **byte for byte**, that a second sync is a no-op, that a Forge edit flows to both targets, that a hand edit becomes drift and survives, that orphans are removed, and that unrelated files are left alone.
151
-
152
- The fixture is not in this repository. Point the suite at a workspace of your own:
153
- set `CRAFTAR_ORACLE_FIXTURE` to its path, or drop a single workspace directory into
154
- `fixtures/`. Without it the oracle suite is skipped and the remaining tests still run.
155
-
156
- ```bash
157
- npm test
158
- ```
159
-
160
- Copy a workspace with `.claude/` and `.kiro/` into `fixtures/` (keep `local-stack/` and `projects/` out).
161
-
162
- ## Roadmap (from the functional spec)
163
-
164
- Phase 0 (this): schema, import, sync/status/diff/explain, claude-code + kiro + agents-md targets, lock, drift, orphans.
165
- Next: `craftar init` from a profile; profile-driven integrations (PM tool → MCP, IDP → MCP); `service` ingredients with compose fragments (`craftar services up`); `dotnet new` template registration; rulesync bridge for Codex/Kimi/Cursor specifics; remote Forge (git URL + ref); `craftar docs validate`; GitHub Action and Azure Pipelines task around `sync --check`; `craftar ui`; `craftar mcp` + Claude Code / Agent Plugin packaging.
166
-
167
- ## License
168
-
169
- MIT
1
+ # Craftar
2
+
3
+ Craft, sync and convert AI-coding workspace harnesses — rules, agents, commands, skills, MCP servers — across every client workspace you maintain and every AI coder each team uses.
4
+
5
+ > Status: **phase 0 prototype**. `import`, `sync`, `status`, `diff`, `explain`, `ls` work end-to-end for the `claude-code` and `kiro` targets and are validated byte-for-byte against a real workspace (see *Oracle*). Everything else in the spec (profiles with IDP/PM-tool integrations, local services, templates, `craftar ui`, `craftar mcp`) is not built yet.
6
+
7
+ ## The idea in one paragraph
8
+
9
+ You write the harness **once**, in a central repository called the **Forge**, as small reusable **ingredients** (a rule, an agent, a command, a skill, an MCP server). **Recipes** bundle ingredients (`base`, `stack-backend-api`, `stack-frontend-angular`…). A **profile** describes a client: which recipes, which targets (Claude Code, Kiro, AGENTS.md…), and the parameters that differ per client. A workspace holds a tiny `craftar.yaml` pointing at the Forge and a profile; `craftar sync` generates `.claude/`, `.kiro/`, `AGENTS.md`… from it and records what it wrote in `craftar.lock`. Generated files are never edited by hand again — you edit the Forge and sync everywhere.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npx craftar --help # run without installing
15
+ npm install -g craftar # or install the craftar command
16
+ ```
17
+
18
+ Requires Node ≥ 22.
19
+
20
+ ### From source
21
+
22
+ ```bash
23
+ npm install
24
+ npm run build # → dist/
25
+ node bin/craftar.js --help
26
+ # or during development
27
+ npx tsx src/cli.ts --help
28
+ ```
29
+
30
+ ## Quick start: bring an existing workspace into a Forge
31
+
32
+ ```bash
33
+ # 1. Import the harness of a Claude Code workspace into a (new or existing) Forge
34
+ craftar import --from claude-code \
35
+ --workspace C:/Projects/acme-portal-workspace \
36
+ --forge C:/Projects/forge \
37
+ --profile acme-portal \
38
+ --write-config # writes craftar.yaml into the workspace
39
+
40
+ # 2. See what sync would do. On a freshly imported workspace everything is "adopt":
41
+ # the files already on disk are exactly what the Forge produces, so they just become managed.
42
+ craftar status --workspace C:/Projects/acme-portal-workspace
43
+
44
+ # 3. Generate + lock
45
+ craftar sync --workspace C:/Projects/acme-portal-workspace
46
+ ```
47
+
48
+ From then on, change a rule in `forge/ingredients/rules/<name>/rule.md`, run `craftar sync` in each workspace (or `craftar sync --check` in CI) and every target is regenerated.
49
+
50
+ ## Commands
51
+
52
+ | Command | What it does |
53
+ |---|---|
54
+ | `craftar import --from claude-code --forge <dir> --profile <name> [--workspace .] [--write-config]` | Reads `.claude/{rules,agents,commands,skills,scripts,hooks}`, `.mcp.json` and, when present, `.kiro/steering` (for inclusion modes and hand-written steering). Creates ingredients, recipes (`base`, one `stack-*` per scoped rule, `<profile>-steering`) and a profile. Identical ingredients already in the Forge are reused; differing ones become `<name>--<profile>` variants that emit under the original name, so the workspace still round-trips while you decide what to unify. Ingredients holding a secret-like value in UTF-8 text (tokens, private keys, high-entropy MCP `env`/`args` values) are rejected and listed by location — the value is never printed. UTF-16 files are not scanned yet. |
55
+ | `craftar status` | Classifies every file the Forge would produce: `new`, `update`, `unchanged`, `adopt`, `drift`, `collision`, `orphan`, `orphan-drift`. `--json` for tooling. |
56
+ | `craftar sync` | Writes the plan and `craftar.lock`. `--dry-run` shows without writing. `--check` exits 1 when anything is out of sync (CI). `--overwrite-drift` regenerates hand-edited files (explicit, never default). |
57
+ | `craftar diff [path]` | Line diff between disk and what the Forge would generate. |
58
+ | `craftar explain <path>` | Which ingredient, recipe chain, target and origin produced a file. |
59
+ | `craftar ls` | Recipes and ingredients resolved for this workspace. |
60
+
61
+ All commands take `--workspace <dir>` (default: current directory).
62
+
63
+ ## Forge layout
64
+
65
+ ```
66
+ forge/
67
+ ├── craftar.forge.yaml
68
+ ├── ingredients/
69
+ │ ├── rules/<name>/{ingredient.yaml, rule.md}
70
+ │ ├── agents/<name>/{ingredient.yaml, agent.md}
71
+ │ ├── commands/<name>/{ingredient.yaml, command.md}
72
+ │ ├── skills/<name>/{ingredient.yaml, SKILL.md, …}
73
+ │ ├── scripts/<name>/{ingredient.yaml, <file>}
74
+ │ ├── hooks/<name>/{ingredient.yaml, <file>}
75
+ │ ├── mcp/<name>/ingredient.yaml # server definition
76
+ │ └── steerings/<name>/{ingredient.yaml, steering.md} # Kiro-only, no Claude counterpart
77
+ ├── recipes/<name>.yaml
78
+ └── profiles/<name>/profile.yaml
79
+ ```
80
+
81
+ `ingredient.yaml` (rule):
82
+
83
+ ```yaml
84
+ type: rule
85
+ name: frontend-angular
86
+ inclusion: fileMatch # always | fileMatch | manual | auto (Kiro steering modes)
87
+ fileMatchPattern: projects/acme-portal-front/**
88
+ targets: "*" # or [claude-code, kiro]
89
+ tags: []
90
+ origin: { workspace: acme-portal-workspace, path: .claude/rules/frontend-angular.md }
91
+ ```
92
+
93
+ Recipe:
94
+
95
+ ```yaml
96
+ name: stack-frontend-angular
97
+ extends: []
98
+ slot: frontend # optional: two recipes on one slot cannot coexist
99
+ ingredients: [rule/frontend-angular, agent/frontend-reviewer]
100
+ params: { angularVersion: { default: "20" } }
101
+ ```
102
+
103
+ Workspace `craftar.yaml`:
104
+
105
+ ```yaml
106
+ forge: ../forge # path today; git URL later
107
+ profile: acme-portal
108
+ targets: [claude-code, kiro] # optional, overrides the profile
109
+ recipes: { add: [], remove: [] }
110
+ overrides:
111
+ params: { }
112
+ ingredients: { disable: [] }
113
+ ```
114
+
115
+ Layer precedence, weakest → strongest: recipe defaults → profile → `craftar.yaml` → `craftar.local.yaml` (personal, git-ignored). Bodies may use `{{param}}` placeholders; a placeholder with no value in any layer is left untouched and reported as a warning by `status` and `sync` (Angular's `{{ 'X' | localize }}` does not look like a placeholder and passes silently). Between layers, objects merge key by key while arrays and scalars from the stronger layer replace the weaker one — `targets: [kiro]` in `craftar.local.yaml` means exactly `[kiro]`. Omit a key in `craftar.local.yaml` to inherit it — an empty list there means empty.
116
+
117
+ ## Targets
118
+
119
+ **claude-code** — emits `.claude/rules|agents|commands|skills|scripts|hooks` and `.mcp.json` verbatim from the Forge (frontmatter kept byte-for-byte). Existing files keep their line endings and BOM; new files are LF without a BOM.
120
+
121
+ **kiro** — reproduces, then extends, the hand-written `sync-steering.ps1` script it replaces:
122
+ steering = `inclusion` frontmatter + `GENERATED` banner + rule body, with `.claude/rules/` rewritten to `.kiro/steering/`, UTF-8 without BOM, CRLF. On top of what the script did, it also generates `.kiro/agents/*.json` (tools mapped to Kiro names, `resources` bound to the agent's stack rule + `repo-discovery`, or `**/*.md` for generic agents), `.kiro/steering/commands/*.md`, `.kiro/skills/*/SKILL.md` and `.kiro/settings/mcp.json`. The banner text is a parameter (`kiro.banner`) so existing workspaces can adopt without a rewrite. Scripts and hooks have no Kiro equivalent: they are skipped with a warning.
123
+
124
+ **agents-md** — one `AGENTS.md` with the always-on rules concatenated and the scoped rules listed, for tools that read the open standard (Codex, Cursor, Warp, Copilot, Kimi…).
125
+
126
+ Conversion of hooks/subagents to other tools is out of scope here: the plan is to delegate that to [rulesync](https://github.com/dyoshikawa/rulesync) rather than reimplement it.
127
+
128
+ ## Design rules learned from the previous generator
129
+
130
+ These come straight from workspaces that removed an earlier generator, and the code enforces them:
131
+
132
+ 1. **Only files in `craftar.lock` are ever written or removed.** A file that exists but was never generated is a *collision*: reported, never touched. A managed file that was hand-edited is *drift*: reported, never overwritten unless `--overwrite-drift`.
133
+ 2. **Hashes are EOL- and BOM-normalized.** A CRLF checkout on Windows does not read as a hand edit. (`sha256` over LF/no-BOM text.)
134
+ 3. **Orphans are removed.** When an ingredient leaves a recipe, its generated files disappear in every target — no stale steering loading into Kiro sessions.
135
+ 4. **No hand-kept mirrors.** Kiro agents, commands and skills are generated from the same ingredients as their Claude counterparts.
136
+ 5. **Reuse, don't clobber.** Importing a second workspace into the same Forge reuses identical ingredients and creates explicit `--<profile>` variants for the ones that differ, listing them so a human unifies or parameterizes.
137
+
138
+ ## Tests
139
+
140
+ `npm test` runs two layers that need nothing outside the repository, on any OS:
141
+
142
+ - **Unit tests** build a Forge and a workspace in a temp dir (`test/helpers/forge.ts`) and cover
143
+ resolution, every file state, apply, each emitter, the importer, the secret guard and the CLI
144
+ exit codes.
145
+ - **Golden workspaces** — `test/golden/acme-portal` and `test/golden/acme-web`, synthetic — run
146
+ the oracle script end to end: import → every file `adopt`, sync byte-identical (a CRLF file and a
147
+ BOM file included), second sync a no-op, Forge edits, drift, orphans, variants.
148
+ `test/golden/**` is `-text` in `.gitattributes`, so line endings survive checkout. The golden
149
+ `.kiro/` is a snapshot of the emitter's output: after an intended emitter change, regenerate it
150
+ with `npx tsx test/helpers/regen-golden.ts` and review the diff.
151
+
152
+ CI runs typecheck, build and tests on Linux and Windows with Node 22 and 24. The oracle below is
153
+ skipped there — a green CI is not evidence against a real workspace.
154
+
155
+ ## Oracle
156
+
157
+ `test/oracle.test.ts` imports a real client workspace (a private fixture, never committed) and asserts that `craftar sync` reproduces its 13 generated steering files, 5 hand-written steering files, 3 Kiro agent JSONs and every `.claude/*` file **byte for byte**, that a second sync is a no-op, that a Forge edit flows to both targets, that a hand edit becomes drift and survives, that orphans are removed, and that unrelated files are left alone.
158
+
159
+ The fixture is not in this repository. Point the suite at a workspace of your own:
160
+ set `CRAFTAR_ORACLE_FIXTURE` to its path, or drop a single workspace directory into
161
+ `fixtures/`. Without it the oracle suite is skipped and the remaining tests still run.
162
+
163
+ ```bash
164
+ npm test
165
+ ```
166
+
167
+ Copy a workspace with `.claude/` and `.kiro/` into `fixtures/` (keep `local-stack/` and `projects/` out).
168
+
169
+ ## Roadmap (from the functional spec)
170
+
171
+ Phase 0 (this): schema, import, sync/status/diff/explain, claude-code + kiro + agents-md targets, lock, drift, orphans.
172
+ Next: `craftar init` from a profile; profile-driven integrations (PM tool → MCP, IDP → MCP); `service` ingredients with compose fragments (`craftar services up`); `dotnet new` template registration; rulesync bridge for Codex/Kimi/Cursor specifics; remote Forge (git URL + ref); `craftar docs validate`; GitHub Action and Azure Pipelines task around `sync --check`; `craftar ui`; `craftar mcp` + Claude Code / Agent Plugin packaging.
173
+
174
+ ## Releases
175
+
176
+ Merging a pull request that bumps the version in `package.json`, `package-lock.json` and
177
+ `src/cli.ts` starts a release: when that merge's CI run is green, `.github/workflows/release.yml`
178
+ checks that the three files agree and that the version is not on npm yet, dry-runs the package,
179
+ and waits for a maintainer to approve the `npm` environment. After approval it publishes
180
+ `craftar@<version>` with npm trusted publishing and provenance — no npm token is stored in the
181
+ repository — and creates the `v<version>` tag and a GitHub Release. A merge that does not change
182
+ the version publishes nothing.
183
+
184
+ ## License
185
+
186
+ MIT
package/bin/craftar.js CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- import "../dist/cli.js";
1
+ #!/usr/bin/env node
2
+ import "../dist/cli.js";
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import { hashNormalized, toLf, stripBom } from "./core/text.js";
8
8
  process.stdout.on("error", (e) => { if (e.code === "EPIPE")
9
9
  process.exit(0); });
10
10
  const program = new Command();
11
- program.name("craftar").description("Craft, sync and convert AI-coding workspace harnesses.").version("0.0.3");
11
+ program.name("craftar").description("Craft, sync and convert AI-coding workspace harnesses.").version("0.0.5");
12
12
  /* ---------------------------------------------------------------- import */
13
13
  program
14
14
  .command("import")
package/dist/core/sync.js CHANGED
@@ -16,7 +16,7 @@ export async function loadWorkspace(root) {
16
16
  root = path.resolve(root);
17
17
  const file = path.join(root, WORKSPACE_FILE);
18
18
  if (!(await exists(file)))
19
- throw new Error(`${WORKSPACE_FILE} not found in ${root} — run \`craftar init\` or \`craftar import\` first`);
19
+ throw new Error(`${WORKSPACE_FILE} not found in ${root} — run \`craftar import --workspace "${root}" --from claude-code --forge <dir> --profile <name> --write-config\` to create it`);
20
20
  const base = YAML.parse(await fs.readFile(file, "utf8")) ?? {};
21
21
  const localFile = path.join(root, LOCAL_FILE);
22
22
  const local = (await exists(localFile)) ? YAML.parse(await fs.readFile(localFile, "utf8")) ?? {} : {};
@@ -1 +1 @@
1
- {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/core/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM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E,CAAC,WAAW,EAAE;QACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KAC5D,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,MAAM,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED,SAAS,KAAK,CAAC,CAAc;IAC3B,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;AACvG,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,CAAc;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,28 +1,32 @@
1
- {
2
- "name": "craftar",
3
- "version": "0.0.3",
4
- "description": "Craft, sync and convert AI-coding workspace harnesses across clients and tools.",
5
- "license": "MIT",
6
- "type": "module",
7
- "bin": { "craftar": "./bin/craftar.js" },
8
- "files": ["dist", "bin", "README.md"],
9
- "engines": { "node": ">=22" },
10
- "scripts": {
11
- "dev": "tsx src/cli.ts",
12
- "build": "tsc -p tsconfig.json",
13
- "test": "vitest run",
14
- "typecheck": "tsc -p tsconfig.json --noEmit"
15
- },
16
- "dependencies": {
17
- "commander": "^13.1.0",
18
- "picocolors": "^1.1.1",
19
- "yaml": "^2.7.0",
20
- "zod": "^3.24.2"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^22.13.0",
24
- "tsx": "^4.19.3",
25
- "typescript": "^5.8.2",
26
- "vitest": "^3.1.1"
27
- }
28
- }
1
+ {
2
+ "name": "craftar",
3
+ "version": "0.0.5",
4
+ "description": "Craft, sync and convert AI-coding workspace harnesses across clients and tools.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": { "type": "git", "url": "git+https://github.com/llima/craftar-cli.git" },
8
+ "homepage": "https://craftar.dev",
9
+ "bugs": { "url": "https://github.com/llima/craftar-cli/issues" },
10
+ "bin": { "craftar": "bin/craftar.js" },
11
+ "files": ["dist", "bin", "README.md"],
12
+ "engines": { "node": ">=22" },
13
+ "scripts": {
14
+ "dev": "tsx src/cli.ts",
15
+ "build": "tsc -p tsconfig.json",
16
+ "test": "vitest run",
17
+ "typecheck": "tsc -p tsconfig.json --noEmit",
18
+ "prepublishOnly": "npm run build"
19
+ },
20
+ "dependencies": {
21
+ "commander": "^13.1.0",
22
+ "picocolors": "^1.1.1",
23
+ "yaml": "^2.7.0",
24
+ "zod": "^3.24.2"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^22.13.0",
28
+ "tsx": "^4.19.3",
29
+ "typescript": "^5.8.2",
30
+ "vitest": "^3.1.1"
31
+ }
32
+ }