your-cto-jev 0.18.1 → 0.18.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/README.md +1 -1
- package/dist/brief.js +21 -7
- package/dist/skill.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -264,7 +264,7 @@ The skill gives the agent seven named jobs, so they cannot be confused with anot
|
|
|
264
264
|
| `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 |
|
|
265
265
|
| `cto-jev feature` | talks the CONCEPT through first (who it is for, business rules, what the user sees when it works, what is out of scope, the simpler option it rejected), writes CONCEPT, then writes the SPEC itself (data migration and rollback, what other features may call, how a production failure gets noticed, the acceptance scenarios), has a zero-context reviewer check that a newcomer could build from them without making design decisions, that nothing unneeded or already in the code gets built and that every acceptance scenario has a result a script can check and a CONCEPT rule behind it, walks you through the CONCEPT, hands it over with a [Review handoff](#sign-off) and stops for your sign-off |
|
|
266
266
|
| `cto-jev tasks` | breaks a feature with a signed-off CONCEPT into parent/child tasks with files, dependencies and an acceptance command each |
|
|
267
|
-
| `cto-jev work` | dispatches Ready tasks to sub-agents with the narrowest brief, runs each acceptance command itself before ticking (only the wave's own tasks and the `e2e/<slug>/` tests of the features it touches; the whole suites run once per feature cleanup and at release; until a repo's e2e tests are split into `e2e/<slug>/`, each wave runs the whole e2e suite; `cto brief` flags tests
|
|
267
|
+
| `cto-jev work` | dispatches Ready tasks to sub-agents with the narrowest brief, runs each acceptance command itself before ticking (only the wave's own tasks and the `e2e/<slug>/` tests of the features it touches; the whole suites run once per feature cleanup and at release; until a repo's e2e tests are split into `e2e/<slug>/`, each wave runs the whole e2e suite; `cto brief` flags tests outside every feature folder (the `e2e/` root or a flat `e2e/tests/`) and the final report asks whether to split them, `"e2e_folders": false` in `.cto.json` keeps them flat), never opens a question menu mid-run, has a zero-context reviewer read the diff **before every commit**: P1 findings are fixed first, then the whole change reviewed again by `cto-reviewer` (at most three rounds in all; P1s left after that go to you), P2 findings become tasks that wait until the feature has nothing else Ready and then run as one cleanup wave with one review (what that review finds below P1 is written into REVIEW.md and listed for you, not filed as tasks, so findings never chain), a finding is contested only with evidence the reviewer could read, then it commits the wave to the review branch and starts the next one, without asking, until nothing is Ready; tasks that need you (credentials, money, anything irreversible, a drop) are parked, not waited on; ends with one report of what is done and everything for you to look at. Never releases |
|
|
268
268
|
| `cto-jev work all` | for a new project or a big batch: the same run on a `work-all` branch, every wave reviewed by a zero-context `cto-reviewer` before its commit, then hands over to `cto-jev release`, never merges. Never releases |
|
|
269
269
|
| `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 |
|
|
270
270
|
| `cto-jev docs` | runs `cto docs` and brings you the list; acts only on what you decide |
|
package/dist/brief.js
CHANGED
|
@@ -119,14 +119,28 @@ export function flowIssues(root) {
|
|
|
119
119
|
else
|
|
120
120
|
for (const dir of orphans)
|
|
121
121
|
out.push(`${dir} belongs to no feature`);
|
|
122
|
-
// A wave runs only e2e/<slug>/ of the features it touches; a test
|
|
123
|
-
// Whole-app checks go to e2e/platform/, so a split leaves only helpers
|
|
124
|
-
// (e2e_folders false) or said yes and the split task is still open, so the question is
|
|
125
|
-
// known by its text: other open tasks (a
|
|
122
|
+
// A wave runs only e2e/<slug>/ of the features it touches; a test outside every feature folder (in the e2e/ root, or a
|
|
123
|
+
// flat e2e/tests/) is run by none of them. Whole-app checks go to e2e/platform/, so a split leaves only helpers outside.
|
|
124
|
+
// Quiet when the user chose flat (e2e_folders false) or said yes and the split task is still open, so the question is
|
|
125
|
+
// not asked twice. The task is known by its text (parseTasks has already dropped its (Pn)): other open tasks (a
|
|
126
|
+
// harness, a finding) also own e2e/.
|
|
126
127
|
// shortcut: only a top-level e2e/ is looked at, not a playwright testDir elsewhere; read the config if a repo needs it.
|
|
127
|
-
const splitOpen = tasks.some((t) => !t.done && /^
|
|
128
|
-
const
|
|
129
|
-
|
|
128
|
+
const splitOpen = tasks.some((t) => !t.done && /^split the end-to-end tests into feature folders/i.test(t.text.trim()));
|
|
129
|
+
const homes = new Set([...features, 'platform']);
|
|
130
|
+
// Walks by hand, one level down only (a flat e2e/tests/), so feature folders, dot folders (.output, .auth),
|
|
131
|
+
// node_modules and deep trees (a fixture app's own unit tests, reports) are never entered.
|
|
132
|
+
const list = (dir) => { try {
|
|
133
|
+
return readdirSync(join(root, dir), { withFileTypes: true });
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return [];
|
|
137
|
+
} }; // an unreadable folder (a root-owned volume) must not crash brief
|
|
138
|
+
const testsIn = (dir, rel) => list(dir).flatMap((d) => {
|
|
139
|
+
if (d.isDirectory())
|
|
140
|
+
return rel || d.name.startsWith('.') || d.name === 'node_modules' || homes.has(d.name) ? [] : testsIn(`${dir}/${d.name}`, `${d.name}/`);
|
|
141
|
+
return d.isFile() && /\.(spec|test|cy)\.[cm]?[jt]sx?$/.test(d.name) ? [`${rel}${d.name}`] : [];
|
|
142
|
+
});
|
|
143
|
+
const loose = splitOpen || !loadConfig(root).e2e_folders || !existsSync(join(root, 'e2e')) ? [] : testsIn('e2e', '').sort();
|
|
130
144
|
if (loose.length)
|
|
131
145
|
out.push(`e2e/: ${loose.length} test file${loose.length > 1 ? 's' : ''} not in a feature folder (${loose.slice(0, 3).join(', ')}${loose.length > 3 ? ', …' : ''}): ask in the run's final report menu, never mid-run, whether to split them into e2e/<feature slug>/`);
|
|
132
146
|
for (const slug of features) {
|
package/dist/skill.js
CHANGED
|
@@ -283,12 +283,12 @@ Branches: work on an integration branch (\`review\`, or whatever the repo calls
|
|
|
283
283
|
|
|
284
284
|
Every wave, one after another, until nothing is Ready. Do not ask before a wave and do not stop between waves; the steps below are one wave.
|
|
285
285
|
|
|
286
|
-
1. If the tree holds uncommitted code from ticked tasks (a wave left for a Claude Code session): a Claude Code session reviews it with \`cto-reviewer\` and commits it (steps 5 and 6) before dispatching anything new. Any other agent stops here, reports that the wave is still waiting for a Claude Code session, and dispatches nothing new. Otherwise \`cto brief\`. Dispatch only Ready tasks, skipping the ones you parked (see "Where you stop"); the "run together" set is safe to run at once. P1 tasks go first. Review-finding tasks below P1 wait while their feature has any other Ready task you would dispatch, then run as that feature's cleanup wave (see "Review findings"). A cleanup wave runs alone: no other feature's tasks and no non-finding tasks join it. Say in one line what this wave runs, then run it.
|
|
286
|
+
1. If the tree holds uncommitted code, from ticked tasks (a wave left for a Claude Code session) or from fixes made in conversation (add a task line for those, with an acceptance command like any task, and tick it once that passes, in the TASKS.md of the feature whose files they change, or \`platform\`'s when they span several features or none): a Claude Code session reviews it with \`cto-reviewer\` and commits it (steps 5 and 6) before dispatching anything new. Never dispatch a task of a new wave while a wave's code waits for its review or commit (that wave's own remaining tasks, its reviewer and the P1 fixes of step 5 still run): another agent's edit changes the tree that review covers, and the whole change has to be reviewed again. Any other agent stops here, reports that the wave is still waiting for a Claude Code session, and dispatches nothing new. Otherwise \`cto brief\`. Dispatch only Ready tasks, skipping the ones you parked (see "Where you stop"); the "run together" set is safe to run at once. P1 tasks go first. Review-finding tasks below P1 wait while their feature has any other Ready task you would dispatch, then run as that feature's cleanup wave (see "Review findings"). A cleanup wave runs alone: no other feature's tasks and no non-finding tasks join it. Say in one line what this wave runs, then run it.
|
|
287
287
|
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. A task accepted by an end-to-end test also gets the Acceptance lines it covers: the test is written from them first and seen failing, then the code.
|
|
288
288
|
3. When they return: \`git status\`; revert anything outside the union of their \`(files:)\`. Integrate the shared files yourself. Fix any existing test their change broke. A sub-agent's "the SPEC does not say" goes into the SPEC now, not into the code's comments.
|
|
289
|
-
4. Accept by running the task's acceptance command yourself; never trust the report. Tick only on a pass. A wave runs only its own tasks' acceptance commands plus the end-to-end tests of the features it touches (\`e2e/<slug>/\`); when it changes a \`platform\` file or a shared file you integrated (step 3), run the whole end-to-end suite instead. The whole unit and end-to-end suites run once in a feature's cleanup wave and once in the release, never in every wave.
|
|
289
|
+
4. Accept by running the task's acceptance command yourself; never trust the report. Tick only on a pass. A wave runs only its own tasks' acceptance commands plus the end-to-end tests of the features it touches (\`e2e/<slug>/\`); when it changes a \`platform\` file or a shared file you integrated (step 3), run the whole end-to-end suite instead. The whole unit and end-to-end suites run once in a feature's cleanup wave and once in the release, never in every wave. Like a wave that changes a \`platform\` or shared file, a wave that touches a feature whose end-to-end tests are not yet in \`e2e/<slug>/\` runs the whole end-to-end suite. When \`cto brief\` lists test files outside every feature folder (in the \`e2e/\` root or a flat folder such as \`e2e/tests/\`), do not move them on your own: put "split the end-to-end tests into feature folders?" in the run's final report menu, with how many files and how long the whole suite takes. If the user says yes, add a \`platform\` task for the split whose text starts exactly \`Split the end-to-end tests into feature folders\`, in English whatever language the rest of TASKS.md uses (brief knows it by that text and stops asking while it is open), tagged \`(seq)\`, whose \`(files:)\` hold \`e2e/\` plus each file that holds the test runner's file pattern (\`playwright.config.ts\`, \`package.json\`); it runs as a wave of its own, reviewed and committed alone. The split goes test by test, not file by file: a test goes into the folder of the feature whose task ids or Acceptance scenario it tests; a test that walks through several features goes to the feature whose SPEC holds its scenario; a check of the whole app (smoke, error page, layout of every page, the test harness) goes to \`e2e/platform/\`; shared helpers stay in the root. Update imports, the test runner's file pattern (a root-only glob such as \`e2e/*.test.ts\` finds nothing in subfolders) and open tasks' acceptance paths; the whole end-to-end suite must pass with as many tests as before. If the user says no, set \`"e2e_folders": false\` in \`.cto.json\`: brief stops listing them, and every wave keeps running the whole end-to-end suite. A failing end-to-end test means the code is wrong. If you think the expectation is wrong instead, the CONCEPT decides: where it backs the scenario, the code is wrong after all; where it says otherwise, fix the SPEC's Acceptance first, then the test, and note it in the wave's REVIEW.md entry; where it is silent, do the same and add an \`Assumed: ...\` line. Never change a test to match the code without changing the Acceptance line it came from. \`manual\` does not wait for the user: build it, run what can be run, take screenshots at each width the Acceptance names, and tick it. cto reminds the user with the text on its acceptance line, and your final report lists every manual task of the run with that text and the screenshot paths. A task the user decided not to do: add \`(dropped: <reason>)\` to its line, tick it, and say "<id> dropped" in your final message. Dropping is the user's call: a task you think is no longer needed (what it checks is gone) is parked and listed in your report with that reason, never dropped by you; never drop a task to get past a block. A dropped task counts as closed, so the tasks that wait on it (\`(after:)\`) become Ready: drop or re-plan them first. Tick the parent when its last child is ticked.
|
|
290
290
|
5. **Review before you commit.** Before dispatching, run the project's formatter, if any, so the review sees the final tree. Then dispatch \`subagent_type: "cto-reviewer"\` with no model parameter (it runs on Opus), with none of your context: it reads the feature's CONCEPT.md and SPEC.md and the whole uncommitted change of the wave, and returns findings each marked P1 (wrong, unsafe, breaks a Constraint or the Interface, does something the CONCEPT does not say or contradicts, or an acceptance test that would still pass with its scenario broken) or P2 (should improve, can wait). You wrote both the code and its tests, so the reviewer answers one question per acceptance test: if the scenario were not met, would this test fail. Handle them as under "Review findings": fix every P1 now and re-run acceptance; write every P2 as a \`(P2)\` task in TASKS.md whose text starts with exactly \`Review finding (wave <ids>):\`, in English whatever language the rest of TASKS.md uses. A cleanup wave's review is the exception: its P2s become no task and go under \`Left for the user:\` instead (see "Review findings"). Append one entry to REVIEW.md: date, scope (the task ids of the wave), how many P1/P2, which task ids they became, what was contested or escalated. The dispatch prompt names the wave's task ids, every changed path and the verify command from \`cto brief\`; it never dictates the verdict and never drops a changed path. After fixing P1s, run the formatter again before every re-dispatch; then dispatch again on the whole change, never on the fix alone. Where Claude Code is wired and the review gate is on, only a Claude Code session can satisfy the gate, so other agents (with or without sub-agents) hand the wave over as below.
|
|
291
|
-
6. \`cto check\`, then commit the wave to the review branch.
|
|
291
|
+
6. \`cto check\`, then commit the wave to the review branch. A review with no P1 is committed as it stands: change no code between it and the commit (REVIEW.md and TASKS.md are not code), since a change to any file the gate counts as code makes it ask for another whole review. A P2 or P3 is a task (in a cleanup wave, a line under \`Left for the user:\`), never a fix made now. Only when \`cto check\` or a git hook blocks the commit and its fix changes code is the whole change reviewed again. The same holds for fixes made in conversation (the user reports a bug and you fix it on the spot): review and commit them before the user moves on to other work, not at the next run.
|
|
292
292
|
|
|
293
293
|
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. Where Claude Code is wired and the review gate is on, a self-review cannot pass the commit gate (the gate needs a cto-reviewer review of the exact tree): keep the wave's tasks ticked, leave the tree uncommitted, stop the run, and say in the final report that the wave is waiting for a cto-reviewer review in a Claude Code session.
|
|
294
294
|
|
|
@@ -299,7 +299,7 @@ Without sub-agents: do the Ready tasks yourself in brief's order, one at a time,
|
|
|
299
299
|
**When:** the user says "cto-jev work all" (\`/cto-jev work all\`), typically on a new project: the same run as \`cto-jev work\` on a branch, every wave reviewed as it is in \`cto-jev work\`; at the end the run hands over to release. Only on request.
|
|
300
300
|
|
|
301
301
|
1. Branch: in a repo with only \`main\`, create a branch \`work-all\` from \`main\` and work there; every other repo uses its integration branch as usual. Note the commit you start from.
|
|
302
|
-
2. Loop until no task is left to run: first, if the tree holds uncommitted code from ticked tasks, a Claude Code session reviews it with \`cto-reviewer\` and commits it before dispatching anything new; any other agent stops there and reports that the wave is still waiting for a Claude Code session. Then re-read \`cto brief\` and the TASKS.md files each round, then run steps 1 to 6 of \`cto-jev work\` (dispatch, integrate, accept, review, commit) for the Ready tasks, skipping tasks you parked (below) and every task of a feature whose CONCEPT is not \`Status: approved\` (cto blocks those commits; list the feature instead). Every wave is reviewed before its commit: after the wave's tasks are accepted, the \`cto-reviewer\` review of step 5 runs, P1s are fixed, the whole change is re-reviewed, then the wave is committed and the run continues. \`cto check\` and the git hooks still run on every commit. Without sub-agents, do the tasks yourself in brief's order; each wave's review is then a \`self-review\`. Where Claude Code is wired and the review gate is on, a self-review cannot pass the commit gate (the gate needs a cto-reviewer review of the exact tree): keep the wave's tasks ticked, leave the tree uncommitted, stop the run, and say in the final report that the wave is waiting for a cto-reviewer review in a Claude Code session.
|
|
302
|
+
2. Loop until no task is left to run: first, if the tree holds uncommitted code from ticked tasks or from fixes made in conversation (step 1 of \`cto-jev work\`), a Claude Code session reviews it with \`cto-reviewer\` and commits it before dispatching anything new; any other agent stops there and reports that the wave is still waiting for a Claude Code session. Then re-read \`cto brief\` and the TASKS.md files each round, then run steps 1 to 6 of \`cto-jev work\` (dispatch, integrate, accept, review, commit) for the Ready tasks, skipping tasks you parked (below) and every task of a feature whose CONCEPT is not \`Status: approved\` (cto blocks those commits; list the feature instead). Every wave is reviewed before its commit: after the wave's tasks are accepted, the \`cto-reviewer\` review of step 5 runs, P1s are fixed, the whole change is re-reviewed, then the wave is committed and the run continues. \`cto check\` and the git hooks still run on every commit. Without sub-agents, do the tasks yourself in brief's order; each wave's review is then a \`self-review\`. Where Claude Code is wired and the review gate is on, a self-review cannot pass the commit gate (the gate needs a cto-reviewer review of the exact tree): keep the wave's tasks ticked, leave the tree uncommitted, stop the run, and say in the final report that the wave is waiting for a cto-reviewer review in a Claude Code session.
|
|
303
303
|
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.
|
|
304
304
|
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:
|
|
305
305
|
- it needs a decision that would contradict the signed CONCEPT. Do not edit the CONCEPT or its \`Status:\` line in this run. A gap the CONCEPT leaves open you decide yourself, in any SPEC section (\`## Interface\`, \`## Constraints\`, \`## Acceptance\`, \`## Internals\`): write it there as \`Assumed: ...\`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "your-cto-jev",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
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",
|