development-companion 1.4.0 → 1.4.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/README.md CHANGED
@@ -148,6 +148,44 @@ routine slice. Its own binding denies edits outside local design notes and denie
148
148
  review local customizations, update the binding explicitly, remove that default (or select
149
149
  `build`), and start a new session. The CLI will not overwrite existing config or bindings.
150
150
 
151
+ ### Working modes
152
+
153
+ | Mode | Primary agent | Use |
154
+ |---|---|---|
155
+ | **Solo (default)** | native Build | One agent implements, tests, and commits. Specialists are optional reviews. |
156
+ | **Orchestrated** | native Build + callable `team-lead` | The lead coordinates several specialists and verifies their evidence. |
157
+ | **Legacy (do not use)** | `team-lead` as primary | A read-only lead blocks direct implementation and confuses the workflow. |
158
+
159
+ **Migrating a legacy install (1.3.0 or earlier):**
160
+
161
+ 1. Review local customizations and make a private backup outside the repository of
162
+ `AGENTS.md`, `CLAUDE.md`, `.companion/core/`, `.companion/roles/`, `.agents/skills/`,
163
+ `.opencode/agents/` and existing OpenCode configuration. Do not publish the backup
164
+ or read/copy `.env` files.
165
+ 2. `npx development-companion@1.4.1 update <project>` (without `--force`). This refreshes
166
+ the managed rules block while keeping existing skills, core documents, roles and
167
+ bindings. Review the rules diff; merge any customized managed-block instructions
168
+ from the backup. Compare preserved content with 1.4.1 and merge needed updates
169
+ manually rather than replacing all customizations.
170
+ 3. In the existing `opencode.json`/`opencode.jsonc` at the project root or in `.opencode/`,
171
+ remove `"default_agent": "team-lead"` or set it to `"build"`, preserving other settings.
172
+ 4. If `.opencode/agents/team-lead.md` still says `mode: primary`, review its backup and
173
+ regenerate **only** that binding and role:
174
+ `npx development-companion@1.4.1 add role team-lead --target <project> --force`.
175
+ Reapply compatible customizations from the backup; keep `mode: subagent` and the
176
+ coordination permissions. This targeted command overwrites both files without backup.
177
+ 5. Start a new OpenCode session (the current one keeps the old agent).
178
+ 6. `npx development-companion@1.4.1 doctor <project>` must show
179
+ `PASS default agent` and `PASS delivery mode`.
180
+
181
+ Do not use a blanket `update --force` as a migration shortcut: it deletes installed
182
+ skill directories and replaces roles, core documents and bindings, including local
183
+ customizations. `doctor` checks the managed process block; separately review any
184
+ project-specific instructions outside it for conflicts.
185
+
186
+ Why: a primary `team-lead` cannot edit code or run shell, so every change must be delegated.
187
+ That is correct for orchestration and wrong for solo implementation.
188
+
151
189
  ## Skills and profiles
152
190
 
153
191
  Process skills are installed always:
package/RELEASE.md CHANGED
@@ -43,7 +43,7 @@ npm pack --pack-destination "$packdir"
43
43
  app=$(mktemp -d)
44
44
  cd "$app"
45
45
  npm init -y
46
- npm install "$packdir"/development-companion-1.4.0.tgz
46
+ npm install "$packdir"/development-companion-1.4.1.tgz
47
47
  ./node_modules/.bin/devcomp --version
48
48
  ./node_modules/.bin/devcomp init . --yes --harness opencode --profile web
49
49
  ./node_modules/.bin/devcomp doctor .
@@ -71,7 +71,7 @@ republish immediately. Wait a few minutes and verify:
71
71
  npm view development-companion version dist-tags
72
72
  ```
73
73
 
74
- The `latest` tag must point to `1.4.0`, not `0.0.0-stage`. If it still points to the
74
+ The `latest` tag must point to `1.4.1`, not `0.0.0-stage`. If it still points to the
75
75
  placeholder after several minutes, check the npmjs.com package page and the Staged
76
76
  Packages tab before retrying.
77
77
 
@@ -79,9 +79,9 @@ Packages tab before retrying.
79
79
 
80
80
  ```bash
81
81
  cd "$(mktemp -d)"
82
- npx development-companion@1.4.0 --version
83
- npx development-companion@1.4.0 init . --yes --harness opencode --profile web
84
- npx development-companion@1.4.0 doctor .
82
+ npx development-companion@1.4.1 --version
83
+ npx development-companion@1.4.1 init . --yes --harness opencode --profile web
84
+ npx development-companion@1.4.1 doctor .
85
85
  ```
86
86
 
87
87
  Also verify the package page:
@@ -93,14 +93,14 @@ https://www.npmjs.com/package/development-companion
93
93
  ## 6. Tag and publish the source release
94
94
 
95
95
  ```bash
96
- git tag -a v1.4.0 -m "v1.4.0"
96
+ git tag -a v1.4.1 -m "v1.4.1"
97
97
  git push origin main --tags
98
98
  ```
99
99
 
100
100
  Create the release on Codeberg:
101
101
 
102
102
  ```text
103
- https://codeberg.org/rockmadehome/development-companion/releases/new?tag=v1.4.0
103
+ https://codeberg.org/rockmadehome/development-companion/releases/new?tag=v1.4.1
104
104
  ```
105
105
 
106
106
  Include the install command, supported harness tiers and migration from 1.3.0:
@@ -109,6 +109,28 @@ update their old binding and `default_agent` explicitly. `--rules handoff` creat
109
109
  local backup and blocks `doctor` until a human-reviewed merge. Do not commit pending
110
110
  rules while their backup exists only on the installing machine.
111
111
 
112
+ Migration steps:
113
+
114
+ 1. Follow the review and private backup checklist in
115
+ [Migrating a legacy install](README.md#working-modes). Keep backups outside the
116
+ repository; never read/copy `.env` files.
117
+ 2. `npx development-companion@1.4.1 update <project>` **without `--force`**. Review the
118
+ managed-block diff and merge customized rules from the backup. Compare preserved
119
+ skills, core documents, roles and bindings with the release; merge needed updates.
120
+ 3. Remove `"default_agent": "team-lead"` or set it to `"build"` in the existing
121
+ root or `.opencode/` `opencode.json(c)`, preserving other settings.
122
+ 4. Only after backing up and reviewing the lead role and binding, regenerate them
123
+ if the binding still says `mode: primary`:
124
+ `npx development-companion@1.4.1 add role team-lead --target <project> --force`.
125
+ This overwrites both files without backup; merge compatible customizations afterward.
126
+ 5. Start a new OpenCode session.
127
+ 6. `npx development-companion@1.4.1 doctor <project>` must pass `default agent` and
128
+ `delivery mode`.
129
+
130
+ Do not recommend blanket `update --force`: it deletes skill directories and overwrites
131
+ customized content. `doctor` checks the managed block, not all project-specific rules;
132
+ review those separately for conflicts.
133
+
112
134
  ## 7. If something is wrong
113
135
 
114
136
  - **Bad metadata or README:** publish a patch release (`1.0.1`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "development-companion",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Harness-neutral development process, roles, and skills for AI coding agents.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/cli.mjs CHANGED
@@ -4,7 +4,7 @@ import { homedir } from "node:os";
4
4
  import { parseArgs, flag, bool, list } from "./args.mjs";
5
5
  import { ask, choose, confirm } from "./prompt.mjs";
6
6
  import { detectRepo, detectBranching } from "./detect.mjs";
7
- import { applyRules, ensureGitignore, hasManagedBlock, renderTemplate } from "./rules.mjs";
7
+ import { applyRules, ensureGitignore, hasManagedBlock, renderTemplate, START, END } from "./rules.mjs";
8
8
  import {
9
9
  CANONICAL_FILES,
10
10
  ensureDir,
@@ -443,6 +443,24 @@ async function cmdDoctor(args) {
443
443
  pending
444
444
  ? "merge the original from .companion/local/rules-backup/ into AGENTS.md and remove pending notice after review"
445
445
  : "framework rules missing or outdated; ask the harness agent to merge the rules, or use devcomp init --rules handoff");
446
+
447
+ // Check the installed process block, not project notes or migration history.
448
+ // Published legacy rules use inline code and may wrap sentences across lines.
449
+ const start = content.indexOf(START);
450
+ const end = content.indexOf(END, start + START.length);
451
+ const block = start !== -1 && end > start ? content.slice(start + START.length, end) : "";
452
+ const normalized = block.replace(/[`*_]/g, "").replace(/\s+/g, " ");
453
+ const staleLeadPrimary = /\bteam-lead is the default primary agent\b/i.test(normalized);
454
+ const nativeBuild = /\bnative Build\b/i.test(normalized);
455
+ add(
456
+ "delivery mode",
457
+ staleLeadPrimary ? "fail" : nativeBuild ? "pass" : "warn",
458
+ staleLeadPrimary
459
+ ? "stale team-lead-primary rules; run devcomp init --rules append or merge the new block"
460
+ : nativeBuild
461
+ ? "native Build is the default; team-lead is a callable subagent"
462
+ : "managed block does not state the default agent; review it"
463
+ );
446
464
  }
447
465
 
448
466
  const claudePath = join(target, "CLAUDE.md");