create-atm 0.1.20 → 0.1.21

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/README.md CHANGED
@@ -1,17 +1,56 @@
1
1
  # create-atm
2
2
 
3
- `create-atm` creates an ATM governance framework starter project. ATM is a governance framework for AI-assisted engineering: it scopes work, locks edits, renders rule context, validates deterministic gates, and records evidence.
3
+ Create an ATM project and run the first governed write. Checked on npm 0.1.20.
4
4
 
5
- ## Usage
5
+ ## Install
6
+
7
+ Node 20+. This runs `git init` and the first commit (`chore: initialize ATM project`). Set Git `user.name` and `user.email` first:
8
+
9
+ ```bash
10
+ git config --global user.name "Your Name"
11
+ git config --global user.email "you@example.com"
12
+ npx --yes create-atm@latest my-app --agent cursor --json
13
+ ```
14
+
15
+ If the command fails at `initial commit` (`ATM_CREATE_FAILED`, files kept), finish it inside `my-app`:
16
+
17
+ ```bash
18
+ cd my-app
19
+ git config user.name "Your Name"
20
+ git config user.email "you@example.com"
21
+ git add -A
22
+ git commit -m "chore: initialize ATM project"
23
+ ```
24
+
25
+ Other `--agent` ids: `claude-code`, `codex`, `copilot`, `gemini`, `antigravity`. Omit `--agent` for a CLI-only project. The success JSON lists `steps` only. It does not include a next command.
26
+
27
+ An existing git repository uses `@ai-atomic-framework/cli` `setup`, not `create-atm`. Keep that CLI install at a stable path:
6
28
 
7
29
  ```bash
8
- npx create-atm test-app --agent claude-code
30
+ npm install --prefix ~/atm-runner @ai-atomic-framework/cli@latest
31
+ node ~/atm-runner/node_modules/@ai-atomic-framework/cli/dist/npm-runtime/atm.mjs setup --cwd /absolute/path/to/existing-repo --agents cursor --json
9
32
  ```
10
33
 
11
- The command creates `test-app`, runs `atm bootstrap`, renders `.atm/memory/atm-chart.md`, and installs the requested editor integration with `atm integration add <editor-id>`. Integrations are opt-in; running without `--agent` initializes the ATM project and rule chart only.
34
+ ## Version pin
35
+
36
+ After install, `node atm.mjs welcome --json` reports `evidence.versions.frameworkVersion`. Pin that npm version (0.1.20 when this was checked). `evidence.versions.releaseTrain.frameworkVersion` was `0.0.0`; do not pin to it. Git tags such as `v0.9.0-alpha.1` are paper snapshots, not this package.
37
+
38
+ ## First governed write
39
+
40
+ Day-1 commands are `welcome`, `next`, `taskflow`, `evidence`, and `doctor`. From `my-app`:
41
+
42
+ **Empty queue: skip `guide`, `orient`, and `start`.** **Trust the playbook over a conflicting `nextAction.command`.** **Replace every `<...>` placeholder; this block has none.** **Do not dump the JSON; use `jq`.**
12
43
 
13
44
  ```bash
14
- npx create-atm test-app
45
+ node atm.mjs taskflow open --write --actor newcomer-ai --title "Add hello.txt" --goal "Create hello.txt with one line of text." --scope-path hello.txt --validator "test -f hello.txt" --json > /tmp/atm-open.json
46
+ TASK=$(jq -r '.evidence.generation.taskId' /tmp/atm-open.json)
47
+ node atm.mjs next --claim --actor newcomer-ai --task "$TASK" --json > /tmp/atm-claim.json
48
+ printf 'hello\n' > hello.txt
49
+ EVIDENCE=$(jq -r '.evidence.nextAction.playbook.commandSequence[] | select(startswith("node atm.mjs evidence run"))' /tmp/atm-claim.json)
50
+ CLOSE=$(jq -r '.evidence.nextAction.playbook.commandSequence[] | select(startswith("node atm.mjs taskflow close") and contains(" --write "))' /tmp/atm-claim.json)
51
+ bash -c "$EVIDENCE" > /tmp/atm-evidence.json
52
+ bash -c "$CLOSE" > /tmp/atm-close.json
53
+ jq -r '.ok, .messages[0].code' /tmp/atm-close.json
15
54
  ```
16
55
 
17
- This package is intentionally a thin onboarding wrapper around the official ATM CLI. It does not replace root-drop, onefile, or source-tree ATM routing.
56
+ `close --write` needs Git `user.name` / `user.email` and the playbook's `--lane-session`. A missing Git author is `ATM_CLI_UNHANDLED` and does not suggest `identity set`. ATM actor identity and the Git author are different. Captain, dispatch, and wave flows are day 2+.
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaId": "atm.runtimeBuildIdentity.v1",
3
- "sourceCommit": "cc1f362ed3ebc3730996d4d80b08df2f200bcfd2",
4
- "sourceDigest": "f23868ff71192b9c11c0368419d58a3a37f73ee2c41cbb5fa9e9cc4ac7befd7d",
3
+ "sourceCommit": "3faf627b25219cbb72c00bd300777796cdae040f",
4
+ "sourceDigest": "a9b60b1d661d449b7d8e05980a3d78a6a6ed91c56b4766e6bb16f24288d2656d",
5
5
  "packageName": "create-atm",
6
- "version": "0.1.20",
6
+ "version": "0.1.21",
7
7
  "files": [
8
8
  {
9
9
  "path": "index.d.ts",
@@ -11,8 +11,8 @@
11
11
  },
12
12
  {
13
13
  "path": "index.js",
14
- "sha256": "b0634ece9b92387781954bcadf837cc068ce894ce0bc3d84a03cd180ed326615"
14
+ "sha256": "52a405b41834fa8c8ee376e9c22665f40c8d6f87202ac07c5b4ac2ec90c25278"
15
15
  }
16
16
  ],
17
- "buildId": "46998e36455575280ba8cd2252d672465294fa09005be6f44d47c12b010eb0ca"
17
+ "buildId": "51cf0ae10da660ea5ad98a49787db666bc0e3e274c378c0f492315b23a9ab68d"
18
18
  }
package/dist/index.js CHANGED
@@ -50,13 +50,22 @@ export function runCreateAtm(argv = process.argv.slice(2)) {
50
50
  if (steps.every((step) => step.exitCode === 0))
51
51
  steps.push(createInitialCommit(targetRoot));
52
52
  const failedStep = steps.find((step) => step.exitCode !== 0);
53
+ const gitAuthorMissing = failedStep?.name === 'initial commit' && /user\.name/.test(failedStep.stderr);
54
+ const gitAuthorCommands = [
55
+ 'git config user.name "Your Name"',
56
+ 'git config user.email "you@example.com"',
57
+ 'git add -A',
58
+ 'git commit -m "chore: initialize ATM project"'
59
+ ];
53
60
  const payload = {
54
61
  ok: failedStep === undefined,
55
62
  command: 'create-atm',
56
63
  cwd: options.cwd,
57
64
  messages: [
58
65
  failedStep
59
- ? { level: 'error', code: 'ATM_CREATE_FAILED', text: `create-atm failed at step: ${failedStep.name}${failedStep.name === 'initial commit' ? `. ${failedStep.stderr.trim()}` : ''}` }
66
+ ? gitAuthorMissing
67
+ ? { level: 'warning', code: 'ATM_CREATE_GIT_AUTHOR_MISSING', text: 'create-atm kept the generated files, but the initial commit needs a Git author. Run evidence.requiredFollowUp inside the new project.' }
68
+ : { level: 'error', code: 'ATM_CREATE_FAILED', text: `create-atm failed at step: ${failedStep.name}${failedStep.name === 'initial commit' ? `. ${failedStep.stderr.trim()}` : ''}` }
60
69
  : { level: 'info', code: 'ATM_CREATE_READY', text: `ATM governance project created at ${targetRoot}` }
61
70
  ],
62
71
  evidence: {
@@ -71,7 +80,14 @@ export function runCreateAtm(argv = process.argv.slice(2)) {
71
80
  name: step.name,
72
81
  exitCode: step.exitCode,
73
82
  durationMs: step.durationMs
74
- }))
83
+ })),
84
+ ...(gitAuthorMissing ? {
85
+ requiredFollowUp: gitAuthorCommands,
86
+ nextAction: {
87
+ command: gitAuthorCommands.join(' && '),
88
+ reason: 'Generated files are preserved. Set a repo-local Git author, then create the initial commit.'
89
+ }
90
+ } : {})
75
91
  }
76
92
  };
77
93
  writePayload(payload, options.json);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-atm",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "description": "Create an ATM governance framework starter project with optional agent pack onboarding.",
6
6
  "license": "Apache-2.0",
@@ -29,7 +29,7 @@
29
29
  "lint": "eslint ."
30
30
  },
31
31
  "dependencies": {
32
- "@ai-atomic-framework/cli": "0.1.20"
32
+ "@ai-atomic-framework/cli": "0.1.21"
33
33
  },
34
34
  "types": "./dist/index.d.ts"
35
35
  }