bearings 0.5.2 → 0.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bearings",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Give your AI agents their bearings — scaffold an agent-friendly setup in any repository.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,17 +1,21 @@
1
1
  ---
2
- description: One-time (re-runnable) project tailoring after `bearings init`. Interviews the developer, explores the repo, and completes the agent-friendly setup.
2
+ description: First-time project tailoring after `bearings init`, and post-update reconciliation when `setupPending`. Not for map refresh.
3
3
  ---
4
4
 
5
5
  # /setup-repo
6
6
 
7
- You are completing the agent-friendly setup that `bearings init` scaffolded.
8
- The scaffold is generic; your job is everything project-specific. Interview
9
- the developer relentlessly one question at a time, with a recommended
10
- answer per question and explore the code before asking anything the code
11
- can answer.
7
+ Pick one mode and stop when that mode finishes.
8
+
9
+ - Manifest has `setupPending` **Post-update reconciliation**, then stop.
10
+ - `AGENTS.md` still has `## Setup Required` **Required workflow**, then stop.
11
+ - Neither → already done. Map drift is `/refresh-repo-map`.
12
12
 
13
13
  This is the only operation the temporary `## Setup Required` gate in
14
- `AGENTS.md` permits. Do not remove the gate until step 12 below.
14
+ `AGENTS.md` permits. Do not remove the gate until the Required workflow's
15
+ verify step reports zero failures and zero warnings.
16
+
17
+ Explore the repo before asking. Ask one question at a time, with a
18
+ recommended answer, only for facts the code cannot answer.
15
19
 
16
20
  ## Post-update reconciliation
17
21
 
@@ -21,19 +25,20 @@ When `.agents/bearings.json` is manifest v2 and has `setupPending`:
21
25
  `migrationReconciliations` record.
22
26
  2. Resolve every `migrationReconciliations` record through **Migrated checklist
23
27
  repairs** below.
24
- 3. For each non-`skill-update` reconciliation, read its Backup File and current target, summarize
28
+ 3. For each `skill-update` reconciliation, follow **Starter skill updates**
29
+ below.
30
+ 4. For each remaining reconciliation, read its Backup File and current target, summarize
25
31
  the differences, and ask which backed-up changes to apply to the target.
26
- 4. Apply the developer's choice directly to the target regardless of owner,
32
+ 5. Apply the developer's choice directly to the target regardless of owner,
27
33
  delete the resolved Backup File, and remove its reconciliation record.
28
- 5. A `skippedTemplate` records a declined template revision.
34
+ 6. A `skippedTemplate` records a declined template revision.
29
35
  Do not apply the declined template — normal project maintenance may
30
36
  still update that file.
31
- 6. Run only setup steps supported by current drift; do not reset completed
32
- project tailoring.
33
37
  7. Run `bearings verify`. Resolve every failure and warning except the
34
38
  expected `setup-pending` warning, then remove `setupPending` from the
35
39
  manifest.
36
40
  8. Run `bearings verify` again and finish only at zero failures and warnings.
41
+ Stop here. Do not continue into first-time setup. Do not run `/refresh-repo-map`.
37
42
 
38
43
  ### Starter skill updates (`skill-update`)
39
44
 
@@ -87,28 +92,10 @@ follows `.agents/skills/checklist/SKILL.md`.
87
92
 
88
93
  ## Checklist opener
89
94
 
90
- Add or reuse one project-native command that runs `npx bearings checklist` (or
91
- the repository's established local bearings invocation). This command builds
92
- the checklist payload and opens the static previewer.
93
-
94
- 1. Search existing automation and documentation for an existing equivalent
95
- runner command that already builds and opens the checklist previewer. Reuse
96
- it and report its exact invocation without editing its runner.
97
- 2. Otherwise, select the first existing safe automation home in this exact
98
- priority: `justfile`, `Makefile`, `Taskfile.yml`, `mise.toml`, then
99
- `package.json`.
100
- 3. Before editing an existing automation file, show the proposed command and
101
- ask the developer for approval. Edit it only after approval. If approval is
102
- declined, leave it unchanged and continue through the priority order.
103
- 4. If no existing home is safe and approved, ask the developer to choose
104
- between creating one missing automation file from the list above and using
105
- the direct fallback. Create a missing file only after the developer selects
106
- that strategy and file.
107
- 5. When no automation file is selected, make no automation edit and report the
108
- stack-agnostic direct build-and-open fallback: `npx bearings checklist`.
109
- 6. Run the selected command, or the direct fallback, and confirm that it builds
110
- successfully and opens the static previewer. Report its exact invocation for
111
- future use.
95
+ Reuse an existing equivalent runner command that already invokes
96
+ `npx bearings checklist` (or the repository's established local bearings
97
+ invocation). If none exists, report `npx bearings checklist`. Do not create
98
+ or edit automation files. Do not open the previewer during setup.
112
99
 
113
100
  ## Required workflow
114
101
 
@@ -117,25 +104,18 @@ the checklist payload and opens the static previewer.
117
104
  summarise what it contained, and ask per file whether to merge into the
118
105
  new scaffold, keep parts, or discard. Apply their choice, then remove
119
106
  the resolved backup.
120
- 3. Explore the repo: stack, package manager, canonical install/run/build/
121
- test/lint commands, CI, generated paths, secret/config paths, deployment
122
- surfaces, project purpose, users/operators, and hard domain/technical
123
- constraints. Interview the developer one question at a time for anything
124
- the code cannot answer.
125
- 4. Fill only the `AGENTS.md` project-purpose and primary-stack placeholders.
126
- Keep `AGENTS.md` a thin router — do not add a skill table, invariants
127
- section, or always-on rules block.
128
- 5. Adapt every starter skill:
107
+ 3. Fill only the `AGENTS.md` project-purpose and primary-stack placeholders
108
+ from the repo. Keep `AGENTS.md` a thin router — do not add a skill table,
109
+ invariants section, or always-on rules block.
110
+ 4. Adapt every starter skill:
129
111
  - `.agents/skills/commit-convention/SKILL.md`
130
112
  - `.agents/skills/defer-work/SKILL.md`
131
113
  - `.agents/skills/resurface-deferred-work/SKILL.md`
132
114
  - `.agents/skills/recording-decisions/SKILL.md`
133
- - Explore the repo for format, lint-fix, lint, typecheck, test, build,
134
- and docs verification commands.
135
115
  - Replace every `<agent: fill during handoff — …>` marker with a real
136
116
  command or explicit `not configured`.
137
117
  - Light project tailoring only — do not remove the skill's safety workflow.
138
- 6. Claim starter skills in `.agents/bearings.json` (allowed manifest edit):
118
+ 5. Claim starter skills in `.agents/bearings.json` (allowed manifest edit):
139
119
  - Set each starter skill `owner` to `agent`.
140
120
  - Set `hash` to the sha256 of the file contents (use the same algorithm as
141
121
  bearings: UTF-8 body, `sha256:` + hex).
@@ -145,19 +125,14 @@ the checklist payload and opens the static previewer.
145
125
  `lastTemplateHash` equals `hash`).
146
126
  - Write `.agents/.bearings-baseline/skills/<name>/SKILL.md` equal to the
147
127
  live file bytes.
148
- 7. Complete the **Checklist opener** workflow above.
149
- 8. Run the `/refresh-repo-map` workflow to initialize `docs/DOMAIN.md`,
150
- `docs/ARCHITECTURE.md`, `docs/CODEBASE_MAP.md`, and
151
- `docs/diagrams/c4-component.puml`.
152
- 9. Expose any newly created skills into each configured harness using the
153
- manifest's existing symlink/copy mode.
154
- 10. Run `bearings verify`. Fix every failure and every warning.
155
- 11. Confirm the run reports zero failures and zero warnings before
156
- proceeding.
157
- 12. Remove the `## Setup Required` section from `AGENTS.md` — only after
158
- step 11 confirms zero failures and zero warnings.
159
- 13. Run `bearings verify` again and report the completed setup to the
160
- developer.
128
+ 6. Complete the **Checklist opener** workflow above.
129
+ 7. If `docs/DOMAIN.md`, `docs/ARCHITECTURE.md`, or `docs/CODEBASE_MAP.md`
130
+ still contains a `<agent:` placeholder, run the `/refresh-repo-map` workflow
131
+ to initialize those files and `docs/diagrams/c4-component.puml`.
132
+ 8. Run `bearings verify`. Fix every failure and every warning. Confirm
133
+ zero failures and zero warnings. Remove the `## Setup Required` section
134
+ from `AGENTS.md` only after that confirmation. Run `bearings verify`
135
+ again and report the completed setup to the developer.
161
136
 
162
137
  ## Rules
163
138
 
@@ -178,5 +153,3 @@ the checklist payload and opens the static previewer.
178
153
  the path).
179
154
  - Do not remove the `## Setup Required` section before `bearings verify`
180
155
  reports zero failures and zero warnings.
181
- - Re-running this command later is allowed: skip completed steps and focus
182
- on drift between the maps and reality.