your-cto-jev 0.9.3 → 0.9.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/README.md CHANGED
@@ -253,7 +253,8 @@ The skill gives the agent seven named jobs, so they cannot be confused with anot
253
253
  | `cto-jev init` | scans the repo, fills PRODUCT.md and ARCHITECTURE.md, asks you the rest a few questions at a time, walks you through the result until you say it is complete |
254
254
  | `cto-jev feature` | talks the request through first (who it is for, business rules, what is out of scope, the simpler option it rejected, data migration and rollback, what other features may call, how a production failure gets noticed, how it will be verified), writes CONCEPT and SPEC, has a zero-context reviewer check that a newcomer could build from them without making design decisions and that nothing unneeded or already in the code gets built, walks you through them, stops for your `Status: approved` |
255
255
  | `cto-jev tasks` | breaks an approved SPEC into parent/child tasks with files, dependencies and an acceptance command each |
256
- | `cto-jev work` | dispatches Ready tasks to sub-agents with the narrowest brief, runs each acceptance command itself before ticking, has a zero-context reviewer read the diff **before every commit**: P1 findings are fixed first (and the fixes reviewed once more), P2 findings become tasks, a finding is contested only with evidence the reviewer could read, then it commits to the review branch |
256
+ | `cto-jev work` | dispatches Ready tasks to sub-agents with the narrowest brief, runs each acceptance command itself before ticking, has a zero-context reviewer read the diff **before every commit**: P1 findings are fixed first (and the fixes reviewed once more), P2 findings become tasks, a finding is contested only with evidence the reviewer could read, then it commits that one wave to the review branch and stops |
257
+ | `cto-jev work all` | for a new project or a big batch: runs every wave in one go, fixes failing acceptance along the way, parks (does not stop for) tasks that need you, then one zero-context review of everything it did with P1s fixed; ends with one report of what is done and every question for you. Never releases |
257
258
  | `cto-jev release` | reviews the whole unreleased diff against the SPECs (looking hardest at waves marked `self-review`), files P1/P2/P3 tasks under the same findings rules, requires every P1 ticked and `cto check --base <release branch>` green, then prepares the merge, PR or tag for you to perform |
258
259
  | `cto-jev docs` | runs `cto docs` and brings you the list; acts only on what you decide |
259
260
  | `cto-jev decision` | writes an append-only decision record under `decisions/` |
@@ -411,8 +412,6 @@ node scripts/harvest-commands.mjs --rows 300 # real agent commands from a public
411
412
 
412
413
  `calibrate` uses exactly the questions and state builders that ship, prints every case's score, and reports how many cases the current threshold catches and wrongly blocks. Harvested candidates in `calibration/candidates/` (from nebius/SWE-rebench-openhands-trajectories, CC-BY-4.0) join the measurement once someone sets their `expect` label.
413
414
 
414
- The full design, including the measured results behind the defaults, is in [`your-cto-jev-spec.html`](./your-cto-jev-spec.html) (written in 繁體中文).
415
-
416
415
  ## License
417
416
 
418
417
  [MIT](./LICENSE)
package/dist/brief.js CHANGED
@@ -73,7 +73,7 @@ const unknownCount = (path) => {
73
73
  return 0;
74
74
  }
75
75
  };
76
- // Fixed headings, as the SPEC's 欄位 tables name them (docs/cto_jev/features/cto-flow/SPEC.md).
76
+ // Fixed headings, as the flow skill (FLOW_SKILL_TEXT in skill.ts) names them.
77
77
  const HEADINGS = [
78
78
  ['PRODUCT.md', ['一句話', '使用者角色', '怎麼賺錢', '方案與限制', '不做的事', '設計約束']],
79
79
  ['ARCHITECTURE.md', ['技術棧', '目錄地圖', '外部服務與資料', '驗證指令', '不變的原則']],
package/dist/flow.js CHANGED
@@ -2,7 +2,7 @@ import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { BOX } from './turn.js';
4
4
  // docs/cto_jev/features/<slug>/TASKS.md: the one place the development flow keeps state. Everything else (INDEX,
5
- // ready list, feature dependencies, code ownership) is computed from it. Spec: docs/cto_jev/features/cto-flow/SPEC.md.
5
+ // ready list, feature dependencies, code ownership) is computed from it. Format: FLOW_SKILL_TEXT in skill.ts.
6
6
  export const FLOW_DIR = 'docs/cto_jev';
7
7
  export const FEATURE_FILES = ['CONCEPT.md', 'SPEC.md', 'TASKS.md', 'REVIEW.md'];
8
8
  const ID = /^([A-Z][A-Z0-9]*-\d+(?:\.\d+)*)\b\s*/;
package/dist/setup.js CHANGED
@@ -122,7 +122,7 @@ function uninstallHooks(settings) {
122
122
  return touched;
123
123
  }
124
124
  // docs/cto_jev/ skeleton, created only for files that do not exist. Headings are the fixed field names the flow checks
125
- // read (docs/cto_jev/features/cto-flow/SPEC.md); `unknown` is what the agent's first run fills in.
125
+ // read (FLOW_SKILL_TEXT in skill.ts); `unknown` is what the agent's first run fills in.
126
126
  const fields = (names) => names.map((n) => `## ${n}\n\nunknown\n`).join('\n');
127
127
  export const FLOW_SKELETON = {
128
128
  'docs/cto_jev/PRODUCT.md': `# PRODUCT\n\nStatus: draft\n\n${fields(['一句話', '使用者角色', '怎麼賺錢', '方案與限制', '不做的事', '設計約束'])}`,
@@ -142,7 +142,7 @@ export function planSetup(root, chosenAgents, flow, goal) {
142
142
  const out = [];
143
143
  const at = (p, change, abs = join(root, p)) => out.push({ path: p, change: change === 'remove' ? 'remove' : existsSync(abs) ? 'update' : 'new' });
144
144
  const chosen = new Set(chosenAgents);
145
- // git reports the hooks dir with long names; a Windows temp root may be 8.3 (ERICHS~1). Compare real paths.
145
+ // git reports the hooks dir with long names; a Windows temp root may be 8.3 (C:\Users\JOHNDO~1). Compare real paths.
146
146
  const real = (p) => { try {
147
147
  return realpathSync.native(p);
148
148
  }
package/dist/skill.js CHANGED
@@ -24,7 +24,7 @@ const LEGACY_FLOW_SKILL = '.agents/skills/cto-flow/SKILL.md'; // 0.9.x name, rem
24
24
  export const FLOW_COMMAND_PATH = '.claude/commands/cto-jev.md';
25
25
  export const FLOW_COMMAND_TEXT = `---
26
26
  description: The cto development flow - init, feature, tasks, work, release, docs, decision
27
- argument-hint: "[init | feature <request> | tasks | work | release | docs | decision]"
27
+ argument-hint: "[init | feature <request> | tasks | work | work all | release | docs | decision]"
28
28
  ---
29
29
  ${SKILL_MARK}
30
30
 
@@ -102,10 +102,10 @@ turns it into a calibration case; you do not run that yourself.
102
102
  - \`cto docs\`: list stale planning markdown outside \`docs/cto_jev/\` with a suggestion per file; changes nothing.
103
103
  `;
104
104
  // The flow skill: how the host agent plans, dispatches and accepts work under docs/cto_jev/. Written only when
105
- // `cto setup` chose the flow; the body mirrors docs/cto_jev/features/cto-flow/SPEC.md.
105
+ // `cto setup` chose the flow.
106
106
  export const FLOW_SKILL_TEXT = `---
107
107
  name: cto-jev
108
- description: The development flow of this repo, kept in docs/cto_jev/. Invoked by saying the job's name (in Claude Code: /cto-jev <job>; in Codex: $cto-jev). Its jobs are named so they cannot be confused with another skill's steps - "cto-jev init" (first-time setup, also "set up PRODUCT.md and ARCHITECTURE.md"), "cto-jev feature" (a request bigger than one edit), "cto-jev tasks" (break an approved spec down), "cto-jev work" (dispatch, accept, review, commit), "cto-jev release" (review everything unreleased, then merge to main), "cto-jev docs" (clean up old documents), "cto-jev decision" (record an architecture decision). Load it when the user names one of them, and whenever you are about to plan, dispatch, tick a task or commit.
108
+ description: The development flow of this repo, kept in docs/cto_jev/. Invoked by saying the job's name (in Claude Code: /cto-jev <job>; in Codex: $cto-jev). Its jobs are named so they cannot be confused with another skill's steps - "cto-jev init" (first-time setup, also "set up PRODUCT.md and ARCHITECTURE.md"), "cto-jev feature" (a request bigger than one edit), "cto-jev tasks" (break an approved spec down), "cto-jev work" (dispatch, accept, review, commit one wave), "cto-jev work all" (every wave in one go, one review at the end), "cto-jev release" (review everything unreleased, then merge to main), "cto-jev docs" (clean up old documents), "cto-jev decision" (record an architecture decision). Load it when the user names one of them, and whenever you are about to plan, dispatch, tick a task or commit.
109
109
  ---
110
110
  ${SKILL_MARK}
111
111
 
@@ -191,7 +191,7 @@ Two more tags, on any task:
191
191
 
192
192
  **When:** the user says "cto-jev work" or "continue", or \`cto brief\` shows Ready tasks.
193
193
 
194
- Branches: work on an integration branch (\`review\`, or whatever the repo calls it; see the table under \`cto-jev release\`). The release branch only receives \`cto-jev release\`. Never commit to it directly; ask the user to add it to \`protected_branches\` in \`.cto.json\` if it is not there. The one exception is a repo with only \`main\` and one developer (the first row of that table): there you commit each reviewed wave to \`main\`, and \`main\` stays out of \`protected_branches\`, or every commit would be blocked.
194
+ Branches: work on an integration branch (\`review\`, or whatever the repo calls it; see the table under \`cto-jev release\`). The release branch only receives \`cto-jev release\`. Never commit to it directly; ask the user to add it to \`protected_branches\` in \`.cto.json\` if it is not there. The one exception is a repo with only \`main\` and one developer (the first row of that table): there you commit each reviewed wave to \`main\` (\`cto-jev work all\` uses a branch instead, below), and \`main\` stays out of \`protected_branches\`, or every commit would be blocked.
195
195
 
196
196
  1. \`cto brief\`. Dispatch only Ready tasks; the "run together" set is safe to run at once. P1 tasks go first.
197
197
  2. One sub-agent per task. Give it only: the task line, the feature's SPEC.md, the \`## Interface\` of each feature it depends on, the list of files it may touch, and "do not edit anything else, write nothing outside this repo (no notes, no lesson logs), no git commands; report what you changed and what you found ambiguous". Each sub-agent writes its own new test file; nobody appends to a shared one.
@@ -202,6 +202,25 @@ Branches: work on an integration branch (\`review\`, or whatever the repo calls
202
202
 
203
203
  Without sub-agents: do the Ready tasks yourself in brief's order, one at a time, accepting each before the next; review your own diff against the SPEC before each commit. That is not a review by a fresh reader: write \`self-review\` in its REVIEW.md entry, so the release review looks harder at those waves.
204
204
 
205
+ **Stop:** after one wave is committed. Say what was done and what \`cto brief\` shows Ready next.
206
+
207
+ ### cto-jev work all
208
+
209
+ **When:** the user says "cto-jev work all" (\`/cto-jev work all\`), typically on a new project: run every wave in one go, fix along the way, review once at the end. Only on request; plain \`cto-jev work\` stays one wave.
210
+
211
+ 1. Branch: in a repo with only \`main\`, create a branch \`work-all\` from \`main\` and work there, since these waves are not reviewed one by one; every other repo uses its integration branch as usual. Note the commit you start from.
212
+ 2. Loop until no task is left to run: re-read \`cto brief\` and the TASKS.md files each round, then run steps 1 to 4 and step 6 of \`cto-jev work\` (dispatch, integrate, accept, commit) for the Ready tasks, skipping tasks you parked (below) and every task of a feature whose SPEC is not \`Status: approved\` (cto blocks those commits; list the feature instead). There is no per-wave review: each wave's REVIEW.md entry says "work all, reviewed at the end". \`cto check\` and the git hooks still run on every commit. Without sub-agents, do the tasks yourself in brief's order; the end review is then a \`self-review\`.
213
+ 3. Fix along the way: a failing acceptance or a broken test is yours to fix before moving on. The same failure twice means a different approach, not a third try.
214
+ 4. Never stop for the user mid-run: park the task instead. Parked means unticked, never dispatched again in this run, and its dependants wait too (they are not Ready while it is unticked). The parked ids live only in this conversation; the final report lists them, and the next run starts without them. Park a task when:
215
+ - it needs a decision that would change a SPEC's \`## Interface\` or \`## Constraints\`. Do not edit those sections or the \`Status:\` line. A gap that only touches \`## Internals\` you decide yourself: add it under \`## Internals\` as \`Assumed: ...\` and leave \`Status:\` as it is;
216
+ - it is \`manual\`: build it, run what can be run, and list it for the user to accept (do not tick it);
217
+ - it needs credentials, money, an outside account, or anything irreversible;
218
+ - it still fails after a second approach.
219
+ 5. When no task is left to run, the review: a reviewer with none of your context reads \`git diff <start>..HEAD\` and the SPECs of every feature touched, findings P1/P2/P3, handled as under "Review findings" except that escalations and undecided contests go to the final report instead of stopping the run (a contested finding stays unfixed until the user decides). Fix every P1 (then the one re-review of the fixes), write P2 and P3 as tasks, commit, and append one REVIEW.md entry: date, "work all", the task ids, counts.
220
+ 6. In a repo with only \`main\`: once every P1 of the review is fixed, merge \`work-all\` into \`main\` (that is the reviewed commit) and delete the branch. If any P1 is contested or escalated, do not merge: leave \`work-all\` for the user and say so in the report.
221
+
222
+ **Stop:** after step 5 (and 6), never before the review. One report: tasks done (with commits); then everything waiting on the user, each as one question with your best guess: parked tasks and why, \`manual\` tasks to accept, features skipped for a draft SPEC, every \`Assumed:\` added, escalated findings and undecided contests. Never release; the next step is the user's answers, then \`cto-jev work\` or \`cto-jev release\`.
223
+
205
224
  ## Review findings
206
225
 
207
226
  Every review (docs, wave, release) ends here. You wrote what was reviewed, so wanting to disagree is not evidence.
@@ -210,7 +229,7 @@ Every review (docs, wave, release) ends here. You wrote what was reviewed, so wa
210
229
  - **Escalate** to the user when the evidence is outside anything the reviewer could read (a verbal decision, a team convention). Do not dismiss it yourself; if the user confirms, write the fact into the docs.
211
230
  - A reviewer who could not follow the docs found missing context. Never contest that.
212
231
  - Never change a severity yourself. A P1 that looks like a P2 is contested like any finding, with evidence, and the user decides.
213
- - An escalated finding, or a contest the user has not decided, stops the job there: do not commit, tick or ask for sign-off over it.
232
+ - An escalated finding, or a contest the user has not decided, stops the job there: do not commit, tick or ask for sign-off over it. (\`cto-jev work all\` lists them in its final report instead and leaves those findings unfixed.)
214
233
  - After fixing P1s, one more reviewer with none of your context reads only the fixes, once. A P1 it finds is fixed now without a further review; anything else becomes a task with its severity (in a docs review, where no tasks may exist yet: fixed in the docs or raised in the walk-through). Do not loop.
215
234
  - Without sub-agents every review here, the re-review included, is your own: say \`self-review\` in its REVIEW.md entry.
216
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "your-cto-jev",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "A sharp-tongued CTO gatekeeper for AI coding agents: blocks leaked secrets in git commits and destructive shell commands in Claude Code, Cursor, Gemini CLI and Codex, using TypeSafe Jev.",
5
5
  "keywords": [
6
6
  "claude-code",