devmethod-ai 0.3.1 → 0.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.
Files changed (65) hide show
  1. package/.agents/skills/devmethod-architecture/SKILL.md +14 -0
  2. package/.agents/skills/devmethod-correct-course/SKILL.md +12 -0
  3. package/.agents/skills/devmethod-design/SKILL.md +14 -0
  4. package/.agents/skills/devmethod-explore/SKILL.md +12 -0
  5. package/.agents/skills/devmethod-frame/SKILL.md +12 -0
  6. package/.agents/skills/devmethod-handoff/SKILL.md +14 -0
  7. package/.agents/skills/devmethod-implement/SKILL.md +14 -0
  8. package/.agents/skills/devmethod-integrate/SKILL.md +14 -0
  9. package/.agents/skills/devmethod-next/SKILL.md +14 -0
  10. package/.agents/skills/devmethod-plan/SKILL.md +14 -0
  11. package/.agents/skills/devmethod-ready/SKILL.md +14 -0
  12. package/.agents/skills/devmethod-review/SKILL.md +18 -0
  13. package/.agents/skills/devmethod-status/SKILL.md +12 -0
  14. package/.agents/skills/devmethod-verify/SKILL.md +14 -0
  15. package/.agents/skills/project-foundation/SKILL.md +1 -1
  16. package/.agents/skills/project-foundation/assets/START_HERE.md +3 -1
  17. package/.agents/skills/project-foundation/references/operating-commands.md +19 -15
  18. package/.agents/skills/scoped-delivery/assets/REVIEW.md +2 -2
  19. package/.agents/skills/scoped-delivery/references/review-format.md +26 -0
  20. package/.agents/skills/scoped-delivery/references/review-report.md +16 -0
  21. package/.agents/skills/scoped-delivery/references/review-workflow.md +10 -1
  22. package/.agents/skills/scoped-delivery/references/verification-and-cost.md +2 -0
  23. package/COMPATIBILITY.md +7 -3
  24. package/README.md +33 -27
  25. package/START_HERE.md +3 -1
  26. package/dist/cli.js +3 -1
  27. package/dist/commands.js +20 -0
  28. package/dist/doctor.js +7 -3
  29. package/dist/init.js +16 -2
  30. package/dist/review-agent.js +24 -0
  31. package/dist/review-runtime.js +9 -0
  32. package/docs/ADR-009-visible-workflow-commands.md +11 -0
  33. package/docs/ADR-010-installed-review-renderer.md +9 -0
  34. package/docs/COMMANDS-VALIDATION.md +13 -0
  35. package/docs/COMMANDS.md +36 -0
  36. package/docs/EVALUATION.md +4 -0
  37. package/docs/RELEASE-0.4.0.md +15 -0
  38. package/docs/RELEASE-0.4.1.md +13 -0
  39. package/docs/REVIEW-GUIDE.md +6 -0
  40. package/docs/REVIEWS.md +9 -23
  41. package/evaluation/review-detection/README.md +30 -0
  42. package/evaluation/review-detection/fixtures/compatibility.mjs +4 -0
  43. package/evaluation/review-detection/fixtures/consumer.mjs +3 -0
  44. package/evaluation/review-detection/fixtures/control.mjs +5 -0
  45. package/evaluation/review-detection/fixtures/sensitive.mjs +11 -0
  46. package/evaluation/review-detection/fixtures/submission.mjs +8 -0
  47. package/evaluation/review-detection/observed-0.4.1/README.md +16 -0
  48. package/evaluation/review-detection/observed-0.4.1/TASK.md +1 -0
  49. package/evaluation/review-detection/observed-0.4.1/adjudication.json +65 -0
  50. package/evaluation/review-detection/observed-0.4.1/case-a/sensitive.mjs +10 -0
  51. package/evaluation/review-detection/observed-0.4.1/case-b/submission.mjs +7 -0
  52. package/evaluation/review-detection/observed-0.4.1/case-c/compatibility.mjs +3 -0
  53. package/evaluation/review-detection/observed-0.4.1/case-c/consumer.mjs +2 -0
  54. package/evaluation/review-detection/observed-0.4.1/case-d/control.mjs +5 -0
  55. package/evaluation/review-detection/observed-0.4.1/input-hashes.json +7 -0
  56. package/evaluation/review-detection/observed-0.4.1/method-hashes.json +76 -0
  57. package/evaluation/review-detection/observed-0.4.1/probe-results.json +58 -0
  58. package/evaluation/review-detection/observed-0.4.1/raw-findings.md +75 -0
  59. package/evaluation/review-detection/observed-0.4.1/review-probes.mjs +41 -0
  60. package/evaluation/review-detection/observed-0.4.1/score.json +17 -0
  61. package/evaluation/review-detection/oracle.json +9 -0
  62. package/evaluation/review-detection/reproduce.test.mjs +53 -0
  63. package/evaluation/review-detection/score.mjs +26 -0
  64. package/package.json +1 -1
  65. package/scripts/package-smoke.mjs +13 -2
package/dist/cli.js CHANGED
@@ -32,7 +32,9 @@ Non-interactive init calls require --tool. Destination defaults to the current d
32
32
  All six modules are included by default; project-foundation is always included.
33
33
  Existing divergent files block installation; there is no overwrite option.
34
34
  The installer is offline. npx may download the package before it runs.
35
- Workflow stages are skill arguments: project-foundation explore|frame|design|architecture|plan.
35
+ After installation, select devmethod-review (or any documented devmethod-<stage>)
36
+ in your agent. No npx is needed to run a workflow. Full installs expose 14 stages;
37
+ subsets expose commands backed by installed modules. project-foundation <stage> still works.
36
38
  Use the host-native skill syntax; these are not executable CLI subcommands.
37
39
  The JSON plan inspector is read-only. Markdown PLAN/tickets and legacy missions
38
40
  are agent-readable guidance; init never creates or migrates mission records.
@@ -0,0 +1,20 @@
1
+ /** Native stage entry points; module selection remains the six-module contract. */
2
+ export const stageOwners = {
3
+ 'devmethod-explore': 'project-foundation',
4
+ 'devmethod-frame': 'project-foundation',
5
+ 'devmethod-design': 'design-to-code',
6
+ 'devmethod-architecture': 'decision-architecture',
7
+ 'devmethod-plan': 'scoped-delivery',
8
+ 'devmethod-ready': 'scoped-delivery',
9
+ 'devmethod-implement': 'scoped-delivery',
10
+ 'devmethod-review': 'scoped-delivery',
11
+ 'devmethod-verify': 'scoped-delivery',
12
+ 'devmethod-integrate': 'scoped-delivery',
13
+ 'devmethod-correct-course': 'project-foundation',
14
+ 'devmethod-next': 'scoped-delivery',
15
+ 'devmethod-status': 'project-foundation',
16
+ 'devmethod-handoff': 'scoped-delivery',
17
+ };
18
+ export function commandSkills(selected) {
19
+ return Object.entries(stageOwners).filter(([, owner]) => selected.includes('project-foundation') && selected.includes(owner)).map(([name]) => name);
20
+ }
package/dist/doctor.js CHANGED
@@ -2,6 +2,8 @@ import * as fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { createHash } from 'node:crypto';
4
4
  import { tools, modules, templates } from './init.js';
5
+ import { commandSkills } from './commands.js';
6
+ import { isReviewRuntimePath } from './review-runtime.js';
5
7
  import { parseJson, checkPath, stat } from './filesystem.js';
6
8
  function object(value) {
7
9
  return value !== null && typeof value === 'object' && !Array.isArray(value);
@@ -15,6 +17,7 @@ export function validateManifest(value) {
15
17
  !object(value.files))
16
18
  throw new Error('Expected a DevMethod format 2 manifest with a supported host and unique modules including project-foundation.');
17
19
  const root = tools[value.tool];
20
+ const supportedSkills = [...value.skills, ...commandSkills(value.skills)];
18
21
  const required = [...templates, 'DEVMETHOD-LICENSE', ...value.skills.map(name => `${root}/${name}/SKILL.md`)];
19
22
  for (const name of required) {
20
23
  if (!Object.hasOwn(value.files, name))
@@ -25,9 +28,10 @@ export function validateManifest(value) {
25
28
  const parts = name.split('/');
26
29
  const safe = parts.every(part => /^[a-zA-Z0-9._-]+$/.test(part) && part !== '.' && part !== '..');
27
30
  const rootFile = templates.includes(name) || name === 'DEVMETHOD-LICENSE';
28
- const skillFile = parts.slice(0, 2).join('/') === root && value.skills.includes(parts[2]) &&
31
+ const skillFile = parts.slice(0, 2).join('/') === root && supportedSkills.includes(parts[2]) &&
29
32
  ((parts.length === 4 && parts[3] === 'SKILL.md') ||
30
- (parts.length >= 5 && ['assets', 'references'].includes(parts[3] ?? '') && name.endsWith('.md')));
33
+ (parts.length >= 5 && ['assets', 'references'].includes(parts[3] ?? '') && name.endsWith('.md')) ||
34
+ isReviewRuntimePath(parts));
31
35
  if (!safe || (!rootFile && !skillFile))
32
36
  throw new Error(`Manifest contains an unsupported path: ${name}`);
33
37
  if (typeof hash !== 'string' || !/^[a-f0-9]{64}$/i.test(hash))
@@ -93,7 +97,7 @@ export function diagnose(destination) {
93
97
  add('error', 'file-unreadable', error instanceof Error ? error.message : String(error), relative);
94
98
  }
95
99
  }
96
- for (const name of manifest.skills) {
100
+ for (const name of [...manifest.skills, ...commandSkills(manifest.skills)]) {
97
101
  for (const root of Object.values(tools)) {
98
102
  if (root === tools[manifest.tool])
99
103
  continue;
package/dist/init.js CHANGED
@@ -2,6 +2,8 @@ import * as fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { createHash } from 'node:crypto';
4
4
  import { fileURLToPath } from 'node:url';
5
+ import { commandSkills } from './commands.js';
6
+ import { reviewRuntimeFiles } from './review-runtime.js';
5
7
  import { parseJson, checkPath, stat } from './filesystem.js';
6
8
  export const tools = { codex: '.agents/skills', claude: '.claude/skills', cursor: '.cursor/skills' };
7
9
  export const modules = ['project-foundation', 'decision-architecture', 'design-to-code', 'react-feature-engineering', 'reliable-ai-integration', 'scoped-delivery'];
@@ -35,7 +37,7 @@ export function initialize(options) {
35
37
  throw new Error('Install outside the distribution directory');
36
38
  if (stat(destination) && !stat(destination)?.isDirectory())
37
39
  throw new Error('Destination must be a directory');
38
- for (const name of selected) {
40
+ for (const name of [...selected, ...commandSkills(selected)]) {
39
41
  for (const otherRoot of Object.values(tools)) {
40
42
  if (otherRoot !== tools[options.tool] && stat(path.join(destination, otherRoot, name)))
41
43
  throw new Error(`Duplicate skill in another host directory: ${otherRoot}/${name}`);
@@ -104,7 +106,7 @@ export function initialize(options) {
104
106
  /** The exact host-profiled payload shipped with this CLI. */
105
107
  export function bundledFiles(tool, selected) {
106
108
  const files = new Map();
107
- for (const name of selected) {
109
+ for (const name of [...selected, ...commandSkills(selected)]) {
108
110
  const source = path.join(packageRoot, '.agents/skills', name);
109
111
  checkPath(source);
110
112
  for (const relative of walk(source)) {
@@ -113,6 +115,18 @@ export function bundledFiles(tool, selected) {
113
115
  files.set(`${tools[tool]}/${name}/${relative}`, profile(fs.readFileSync(path.join(source, relative)), tool));
114
116
  }
115
117
  }
118
+ if (selected.includes('scoped-delivery')) {
119
+ for (const name of reviewRuntimeFiles) {
120
+ const compiled = name.endsWith('.mjs') ? name.replace(/\.mjs$/, '.js') : name;
121
+ const source = path.join(packageRoot, 'dist', compiled);
122
+ checkPath(source);
123
+ let data = fs.readFileSync(source);
124
+ // Explicit .mjs modules work inside CommonJS, ESM and package-less projects.
125
+ if (name.endsWith('.mjs'))
126
+ data = Buffer.from(data.toString().replace(/(from ['"]\.\/[^'"]+)\.js(['"])/g, '$1.mjs$2'));
127
+ files.set(`${tools[tool]}/scoped-delivery/scripts/${name}`, data);
128
+ }
129
+ }
116
130
  for (const template of templates)
117
131
  files.set(template, profile(fs.readFileSync(path.join(packageRoot, '.agents/skills/project-foundation/assets', template)), tool));
118
132
  files.set('DEVMETHOD-LICENSE', fs.readFileSync(path.join(packageRoot, 'LICENSE')));
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import { prepareReview } from './review-cli.js';
4
+ import { openReview } from './review-open.js';
5
+ // Installed with scoped-delivery. The agent supplies its real review record;
6
+ // no demo mode, package download or repository command is available here.
7
+ try {
8
+ const { values, positionals } = parseArgs({ options: {
9
+ dest: { type: 'string' }, review: { type: 'string' },
10
+ output: { type: 'string' }, markdown: { type: 'string' }, open: { type: 'boolean' },
11
+ }, allowPositionals: false });
12
+ if (positionals.length || !values.review || !values.output || !values.markdown) {
13
+ throw new Error('Expected --review REAL_JSON --output FRESH_HTML --markdown FRESH_MD [--dest PROJECT] [--open].');
14
+ }
15
+ const result = prepareReview({ destination: values.dest ?? process.cwd(), review: values.review,
16
+ output: values.output, markdown: values.markdown });
17
+ console.log(JSON.stringify(result, null, 2));
18
+ if (values.open)
19
+ openReview(result.outputs[0]);
20
+ }
21
+ catch (error) {
22
+ console.error(error instanceof Error ? error.message : String(error));
23
+ process.exitCode = 2;
24
+ }
@@ -0,0 +1,9 @@
1
+ /** Exact installed runtime allowlist; never permit arbitrary scripts in manifests. */
2
+ export const reviewRuntimeFiles = [
3
+ 'review-agent.mjs', 'review-cli.mjs', 'review-open.mjs', 'review-model.mjs',
4
+ 'review.mjs', 'records.mjs', 'filesystem.mjs', 'review-browser.js', 'review-ui.css',
5
+ ];
6
+ export function isReviewRuntimePath(parts) {
7
+ return parts.length === 5 && parts[2] === 'scoped-delivery' && parts[3] === 'scripts' &&
8
+ reviewRuntimeFiles.some(name => name === parts[4]);
9
+ }
@@ -0,0 +1,11 @@
1
+ # ADR 009: Discoverable workflow commands
2
+
3
+ Status: accepted for implementation under the user's explicit request, 2026-09-13.
4
+
5
+ The user requested that documented workflow commands, especially review, be exposed and execute in the agent without npx. Keeping only stage arguments meets neither discoverability nor the selected interaction. Registering bare review/plan commands could collide with host commands. Expose fourteen namespaced devmethod-* skills as short adapters to the existing stage contract and procedure modules. Preserve project-foundation invocations and the six-module selection contract. This amends ADR 001's entry-point restriction without changing its filesystem or permission boundaries.
6
+
7
+ A full installation ships all entry points; subsets include only entries backed by selected procedures. Manifest file hashes include adapters, while skills continues to identify selected procedure modules. Validation permits only the known applicable adapter paths and continues to accept old manifests without them. Initialization checks cross-host duplicates and preflights conflicts before writing. Update preview reports additions without overwriting existing installations.
8
+
9
+ The agent performs a review with installed instructions and resources; the optional presentation CLI does not perform checks. Install the structured format reference to remove the former dependence on package documentation. This release does not change the design workflow, browser UI, mission schemas or permission model.
10
+
11
+ Revisit if native-host testing shows ambiguous automatic routing, discovery limits or real demand for a different grouping. More commands do not establish superiority over another method. Automated packaging/integrity tests and manual instruction inspection are not native model execution evidence.
@@ -0,0 +1,9 @@
1
+ # ADR 010: Complete review delivery with an installed renderer
2
+
3
+ Status: accepted under the user's request to fix review generation/opening and update GitHub/npm documentation, 2026-09-13.
4
+
5
+ The previous adapter stopped at findings when the separate CLI was unavailable. Install a narrow report entry point and its existing renderer dependencies with scoped-delivery. This directly completes the requested interaction using the accepted offline HTML design. Asking the user to launch npx is no longer the primary workflow. A runtime download on every review would retain a network dependency; duplicating the rendering implementation would create competing behavior. Instead derive installed modules from the same compiled sources and preserve exact browser bytes.
6
+
7
+ Use explicit .mjs module filenames to work regardless of the adopting project's package type. The manifest permits only the enumerated runtime files in scoped-delivery/scripts, never arbitrary scripts. Installation preflight, hashes and update preview apply to these files. The helper accepts a real result JSON and fresh HTML/Markdown paths, optionally opening through the existing fixed OS adapter. It performs no review itself and has no demo mode. The agent owns inspection and evidence before calling it.
8
+
9
+ Keep quick reviews light and respect explicit report-only/headless requests. When opening is requested, execute generation and local opening under that authorization. Preserve files on opening failure and report the precise limit. Revisit only for demonstrated runtime portability problems or an actual need for live reports; no server, unrelated design change or extra command is introduced.
@@ -0,0 +1,13 @@
1
+ # Command validation
2
+
3
+ Candidate: 0.4.0, based on main 18e003f. Date: 2026-09-13.
4
+
5
+ Local checks on the candidate worktree: `npm ci --ignore-scripts`, `npm test` (95 passed), `npm run test:greenfield` (24 passed), `npm run check:docs`, skill-creator quick validation (14 adapters), `npm pack --dry-run`, and packed smoke tests passed. HTTP fixture tests required permission to bind localhost outside the filesystem/network sandbox; no assertion was bypassed.
6
+
7
+ Packed smoke used the actual npm 0.3.1 archive as its migration baseline. Full Codex/Claude/Cursor installations include all 14 adapters and the review format reference; hashes, subset installation, read-only diagnostics and local-customization conflicts passed. The legacy profile and customized foundation bytes remained intact. The public CLI still presents results rather than performing review.
8
+
9
+ Release CI and registry results are attached to the corresponding PR/GitHub release after execution. This file records local candidate evidence, not a prior assertion of remote success.
10
+
11
+ Manual instruction inspection: each adapter executes its named stage using the existing contract, preserves arguments and authorization, and does not automatically run the suggested next stage. Review points to the installed procedure and format; it distinguishes actual inspection from optional CLI rendering. Existing architecture dialogue, conditional plans, exploration and design rules remain in their owners.
12
+
13
+ Limits: no fresh authenticated Codex, Claude Code or Cursor invocation or menu-discovery check has been run for these adapters. File links, frontmatter and install checks alone do not establish conversational behavior. Existing comparative studies do not measure this release.
@@ -0,0 +1,36 @@
1
+ # Run DevMethod in your agent
2
+
3
+ Version 0.4.0 exposes every documented workflow stage as a discoverable skill. Install the skills once using the existing installer. Afterwards select a command in the agent and supply its target; no npx invocation or running DevMethod service is needed.
4
+
5
+ | Workflow | Codex | Claude Code / Cursor |
6
+ |---|---|---|
7
+ | Explore | `$devmethod-explore` | `/devmethod-explore` |
8
+ | Frame | `$devmethod-frame` | `/devmethod-frame` |
9
+ | Design | `$devmethod-design` | `/devmethod-design` |
10
+ | Architecture | `$devmethod-architecture` | `/devmethod-architecture` |
11
+ | Plan | `$devmethod-plan` | `/devmethod-plan` |
12
+ | Ready | `$devmethod-ready TASK-1` | `/devmethod-ready TASK-1` |
13
+ | Implement | `$devmethod-implement TASK-1` | `/devmethod-implement TASK-1` |
14
+ | Review | `$devmethod-review TASK-1` | `/devmethod-review TASK-1` |
15
+ | Verify | `$devmethod-verify TASK-1` | `/devmethod-verify TASK-1` |
16
+ | Integrate | `$devmethod-integrate TASK-1` | `/devmethod-integrate TASK-1` |
17
+ | Correct course | `$devmethod-correct-course` | `/devmethod-correct-course` |
18
+ | Next | `$devmethod-next` | `/devmethod-next` |
19
+ | Status | `$devmethod-status` | `/devmethod-status` |
20
+ | Handoff | `$devmethod-handoff` | `/devmethod-handoff` |
21
+
22
+ The entry points load the existing [stage contract](../.agents/skills/project-foundation/references/operating-commands.md) and relevant procedure. They are not separate copies of the method. The old `project-foundation <stage>` syntax remains supported. No bare `/review` is registered over the host's own command.
23
+
24
+ A full installation exposes all fourteen commands. Foundation-only installs expose explore, frame, correct-course and status. Design requires design-to-code; architecture requires decision-architecture; plan, ready, implement, review, verify, integrate, next and handoff require scoped-delivery. Module selection and the manifest's six module names are unchanged. Other technical modules remain available when selected.
25
+
26
+ ## Review actual work
27
+
28
+ For example, select `$devmethod-review` and add `the current uncommitted diff against HEAD`. The agent reads actual changes and relevant contracts, executes applicable checks and reports located findings, evidence and limits. A clear ticket, PR, revision or path selection can replace that target. An ambiguous scope is clarified only when it affects the review.
29
+
30
+ A review does not silently fix product code. Small reviews can stay in the conversation; substantial reviews use the existing tracker or the installed structured review format. Checks that were not run remain explicitly unverified. To inspect and view results in one request, use `$devmethod-review the current changes, then open the report`. The agent generates Markdown/HTML from its real JSON and opens the report using the installed offline renderer. It does not ask you to run npx. A small review may stay in the conversation unless a report is requested. The separate shell viewer only presents existing records and remains available for manual use; fictional demo results never replace your review.
31
+
32
+ ## Adopt into an existing project
33
+
34
+ Install the candidate into a fresh staging directory with the same host and selected modules. Compare it with your existing installation. Copy the new `devmethod-*` folders and merge the relevant foundation/delivery resources, including scoped-delivery/scripts for offline report generation, preserving local customizations. Do not overwrite the filled project profile, instructions, mission records or a divergent skill. Keep the previous manifest until you have intentionally reconciled all adopted baseline files; never replace hashes merely to hide modifications. `update-preview` can classify changes read-only; it does not apply them.
35
+
36
+ Do not run `init` over a customized installation expecting it to upgrade: conflicts block all writes. Both legacy single-file missions and PLAN/tickets missions remain readable, with no automatic migration. If the host does not discover the added skills, reload/reopen its session and inspect its configured skill directory. As a fallback ask it to read the installed `devmethod-review/SKILL.md` directly. Discovery and model behavior need host-specific verification; file installation tests alone do not prove autocomplete behavior.
@@ -37,3 +37,7 @@ Publish a result only with its pinned input, actual evidence and limitations. Pr
37
37
  See [the native evaluation workspace](../evaluation/README.md) for pinned B1/B3/B4/B5 fixtures, preparation, before/after file evidence, immutable acceptance checks and host evidence requirements. B2 still needs a pinned React project and approved screen. Host observations and raw transcripts remain local until explicitly approved for publication.
38
38
 
39
39
  Matched batch records are checked by [the comparison validator](../evaluation/COMPARISONS.md). This validates consistency and preserves unavailable/failure denominators; it does not execute models or prove comparative outcomes.
40
+
41
+ ## Evidence-backed review detection
42
+
43
+ The [review detection cases](../evaluation/review-detection/README.md) add sensitive-data sinks, concurrent/partial/timeout effects, unchanged consumers/old data and a correct control. Reproduce the seeds separately from running reviews, retain original findings before oracle adjudication, and report detected/missed defects and false positives. Fixture tests and report schema checks do not demonstrate model detection; no new model performance claim is made without observed runs.
@@ -0,0 +1,15 @@
1
+ # DevMethod 0.4.0
2
+
3
+ ## Direct workflow commands
4
+
5
+ All fourteen documented stages now have discoverable devmethod-* skill entries. Select `$devmethod-review` in Codex or `/devmethod-review` in Claude Code/Cursor and add the review target. The agent inspects the work and executes relevant checks without requiring the user to launch npx. The optional CLI remains a renderer/validator for recorded review results.
6
+
7
+ This additive pre-1.0 minor release preserves project-foundation invocations, the six procedure modules, approved design behavior, legacy missions and installation conflict protection. Module subsets install only entry points backed by available procedures. Manifest integrity and read-only update previews cover the added files. Review record documentation is installed with scoped-delivery.
8
+
9
+ ## Migration
10
+
11
+ Follow [command adoption](COMMANDS.md#adopt-into-an-existing-project): stage a fresh installation and intentionally merge adapters/resources. Do not overwrite divergent skills or filled project context. No mission or instruction migration runs automatically. Old manifests remain readable by the new CLI; older CLI versions may reject manifests containing new adapter paths, so use the matching or newer CLI for diagnostics.
12
+
13
+ ## Verification
14
+
15
+ Candidate checks and publication evidence are recorded in [command validation](COMMANDS-VALIDATION.md). Automated checks cover installation, hashes, links, module subsets, conflicts, legacy preview and the packed CLI. Manual instruction inspection is distinct from a native model run. Host autocomplete and fresh native execution remain unverified unless explicitly recorded there. No new BMAD superiority claim is made.
@@ -0,0 +1,13 @@
1
+ # DevMethod 0.4.1
2
+
3
+ Fix the incomplete review-to-report flow introduced in 0.4.0. Ask `devmethod-review` to review changes and open the report: the agent performs the review, generates real JSON/Markdown/HTML results and opens the HTML itself. README and review guides now lead with this agent workflow; terminal demos are secondary.
4
+
5
+ The scoped-delivery installation now includes a narrowly allowlisted offline renderer. It needs Node.js 22+ but no npm, network, global CLI or application package dependency. Explicit .mjs modules work in CommonJS, ESM and package-less projects. The existing trusted renderer and OS opening adapter are reused; the installed entry point accepts only an explicit real record and fresh report paths, with no demo mode. Invalid records and existing outputs remain protected. Opening failure retains the generated files.
6
+
7
+ Adopt through a fresh staging installation and intentional merging, including scoped-delivery/scripts and the updated review instructions. Preserve customized files and old manifests; new diagnostics support older installations. The legacy shell viewer remains compatible. Product code and design behavior are unchanged.
8
+
9
+ Automated verification covers all three host layouts and all three package modes, report content from a supplied fixture, schema rejection, overwrite protection, OS-opening dispatch and runtime path allowlisting. OS-opening dispatch is intercepted in tests and is not proof of a graphical browser opening. Full native agent behavior is separate from these runtime checks. Executed counts, CI and npm verification are recorded in the GitHub release.
10
+
11
+ Review instructions now trace relevant sensitive data to logs/errors/API/telemetry, probe failure and recovery scenarios, inspect affected consumers and old data beyond the diff, and require concrete impact for architecture criticism. Application leak detection remains distinct from report redaction. Controls stay proportionate to risk. The existing evaluation protocol gains four review cases with five reproducible seeded defects, a correct control and explicit missed/false-positive accounting. Fixture/scorer validation is not a measured model detection improvement.
12
+
13
+ A [bounded independent review](../evaluation/review-detection/observed-0.4.1/README.md) confirmed 4 of 5 expected defects with no observed false positive. The timeout scenario was mentioned as a risk but not reproduced and remains unconfirmed. One small run without a matched baseline does not establish improved general detection.
@@ -2,6 +2,12 @@
2
2
 
3
3
  DevMethod 0.3 adds a review workflow and an offline browser interface. Version 0.3.1 expands the documentation and the existing narrated film with this journey. The CLI presents recorded results; it does not inspect code or run tests on your behalf.
4
4
 
5
+ ## Review and open your real results
6
+
7
+ Use `$devmethod-review the current changes, then open the report` in Codex, or `/devmethod-review` with the same request in Claude Code/Cursor. The agent inspects the work and executes relevant checks, records actual findings and limits, generates JSON/Markdown/HTML, and opens the report. The renderer ships with scoped-delivery: no user-run npx command or server is needed. Browser opening failures retain the files and are reported separately from review findings. See [the complete flow](REVIEWS.md).
8
+
9
+ The following terminal example is only a manual tour of fictional data, not the main workflow.
10
+
5
11
  ## Try the packaged example
6
12
 
7
13
  Use Node.js 22+ from a normal project directory, with a fresh output filename:
package/docs/REVIEWS.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # Review results, reports and browser consultation
2
2
 
3
- The agent's `project-foundation review` stage performs project-aware inspection under [the review workflow](../.agents/skills/scoped-delivery/references/review-workflow.md). The CLI `devmethod review` only validates and presents recorded results. It never runs repository commands, discovers evidence on disk, or performs the review itself.
3
+ The agent's `devmethod-review` command (also `project-foundation review`) performs project-aware inspection under [the review workflow](../.agents/skills/scoped-delivery/references/review-workflow.md). The CLI `devmethod review` only validates and presents recorded results. It never runs repository commands, discovers evidence on disk, or performs the review itself.
4
4
 
5
- ## Use the installed package
5
+ ## From review to open report
6
+
7
+ After installation, invoke `$devmethod-review the current changes, then open the report` in Codex, or `/devmethod-review` with that request in Claude Code/Cursor. The agent performs the inspection and checks, writes the real result JSON, then generates Markdown and HTML and opens the report. No terminal command is required from the user. The installed scoped-delivery renderer works offline with Node.js 22+ and does not require npm or a global CLI.
8
+
9
+ The agent follows [report delivery](../.agents/skills/scoped-delivery/references/review-report.md). Generation preserves earlier snapshots; failed opening preserves the files and produces an explicit limitation. A report-only request omits browser opening. Small reviews can remain in the conversation unless a report is requested.
10
+
11
+ ## Manual viewer and fictional demo (optional)
6
12
 
7
13
  After 0.3.0 publication, from a temporary or project directory:
8
14
 
@@ -26,27 +32,7 @@ Existing outputs are never overwritten. Choose a fresh path for a newer snapshot
26
32
 
27
33
  ## One versioned source
28
34
 
29
- Use existing conventions, or `docs/missions/<mission-id>/reviews/<review-id>/review.json`, with generated `REVIEW.md` and deliberately included `preuves/`. Tickets link stable finding IDs; the report and UI derive results from the JSON. Do not maintain another independent score or status table.
30
-
31
- Format 1 is validated by the same pure model in the CLI and browser. See the [complete fictional example](../examples/review/review.json) and [compiled validator](../dist/review-model.js). Unknown formats, unknown/missing fields, duplicate IDs, invalid destinations and dangling references are rejected with errors that omit source contents. Arrays are bounded to 256 items, text fields to 16,384 characters, and input to 4 MiB. Image data has a separate limit of approximately 1 MiB per PNG/JPEG.
32
-
33
- | Object | Required fields and ownership |
34
- |---|---|
35
- | Review | format, id, title, project, mission, tickets, date, scope, exclusions, revision, technologies, sources, checks, findings, evidence, limits, policy, summary |
36
- | revision | commit (recorded revision label), dirty (explicit uncommitted changes); no automatic Git execution |
37
- | technologies | name, version, detectedFrom (actual manifest/lockfile/source evidence) |
38
- | ticket | id, title, url (HTTPS or null; local/unpublished destinations remain unavailable) |
39
- | source | id, title, kind (documentation/skill/project), publisher, technology, version, url, consultedAt, access (consulted/unavailable/unverified), usage, compatibility, provenance; consulted requires a date |
40
- | check | id, title, domain, kind (automated/manual), status (passed/failed/not-run/blocked/out-of-scope), result, reason, evidenceIds, revision, targets; unexecuted/excluded checks need a reason |
41
- | finding | id, title, domain, severity (critical/major/moderate/minor), severityReason, confidence (confirmed/suspected), resolution (open/in-progress/resolved/accepted-risk), location, trigger, expected, observed, impact, reproduction, evidenceIds, correction, tradeoffs, sourceIds, ticketIds, verification, resolutionEvidenceIds, targets |
42
- | location | path or component description, line (positive integer or null), component (text or null); display metadata, never arbitrary file access |
43
- | evidence | id, title, kind (text/log/screenshot/diagram), content (text alternative or excerpt), url (HTTPS or null), image (null or explicit PNG/JPEG object) |
44
- | image | mime=image/png or image/jpeg, base64, alt, origin=captured/explanatory, privacyReviewed=true; only deliberately included reviewed images, not filesystem paths or remote images |
45
- | policy | blockingSeverities, requireAllChecks, rationale; project-owned explicit policy, no numeric risk score |
46
-
47
- A confirmed finding still needs evidence or reproduction. A resolved finding requires resolution evidence IDs; schema validation checks the references, **not the truth of execution or whether the fix really works**. Authors must retain the original evidence and supply fresh verification. Closing a panel never changes resolution. Finding counts include all resolution states and stay independent from filtered results; uncertain unresolved findings have a separate count. Failed-check counts are separate from finding counts.
48
-
49
- A blocking confirmed open finding or a failed check requires corrections. Otherwise a blocked check yields blocked; no passed checks, an unresolved suspected finding, or required unrun checks yields incomplete. Otherwise the conclusion is ready **on the verified scope**, with exclusions and limits still visible. This conclusion does not authorize integration/deployment or replace repository policy.
35
+ The [installed review format reference](../.agents/skills/scoped-delivery/references/review-format.md) owns fields, statuses and conclusion rules. It is shipped with scoped-delivery so authoring does not require a package download. The [complete fictional example](../examples/review/review.json) and [compiled validator](../dist/review-model.js) support optional browser export. Use one result owner and derive reports from it.
50
36
 
51
37
  ## Browser journey
52
38
 
@@ -0,0 +1,30 @@
1
+ # Review detection cases
2
+
3
+ This extends the existing [workflow evaluation protocol](../../docs/EVALUATION.md) for review quality. It is not another delivery workflow. Four small cases contain five known defects and a correct control. All credentials and personal data in these fixtures are synthetic.
4
+
5
+ ## Cases and expected findings
6
+
7
+ The evaluator-owned [oracle](oracle.json) records expected findings and their scope. The [reproduction tests](reproduce.test.mjs) demonstrate application behavior directly, before any report masking:
8
+
9
+ | Case | Expected | Evidence |
10
+ |---|---|---|
11
+ | SENSITIVE | LEAK: token/email and provider error reach logs, telemetry and API output | Captured synthetic outputs contain the sentinel values |
12
+ | SUBMISSION | RACE, PARTIAL, TIMEOUT: duplicate effects under interleaving, interrupted notification, or effect-before-timeout | Controlled gates and injected failures observe two effects for one key |
13
+ | COMPATIBILITY | CONTRACT: changed response breaks existing stored data and an unchanged consumer | Missing total and NaN invoice result |
14
+ | CONTROL | No defect under its stated trim/reject contract | Contract tests pass; adding an architecture layer is a preference, not a blocking defect |
15
+
16
+ Run `node --test evaluation/review-detection/reproduce.test.mjs`. These tests deliberately assert the presence of seeded defects: a green result means the evaluation input is reproducible, not that the application is correct or a model detected anything. They are included in npm test through tests/review-detection.test.mjs.
17
+
18
+ ## Conduct a detection evaluation
19
+
20
+ Use fresh isolated projects and the existing protocol's pinned method/host/model, equal budgets, permissions and transcript requirements. Give the reviewer only the case's fixture files, the relevant project contract and this neutral task: “Review these changes and affected interactions. Report evidence-backed defects, impact and unverified risks; do not fix code.” For COMPATIBILITY identify compatibility.mjs as changed and keep consumer.mjs available as unchanged context. For CONTROL preserve the comment's accepted contract. Do not provide oracle.json, reproduction tests, expected IDs or this case table to the reviewer. Keep the oracle outside the review workspace; editing seed files invalidates the run.
21
+
22
+ Save the original findings before consulting the oracle. A separate evaluator compares scenarios, locations, evidence and impact, not keywords. Link each confirmed finding to one or more expected defect IDs only when the reproduction and impact support the match. A risk still awaiting verification is not a confirmed detection. Treat a duplicate description of the same defect as one detected defect. Classify unsupported blockers (including personal architecture/style preferences on the control) as false positives. Do not automatically call a new, unmatched finding false: investigate and mark unresolved until adjudicated; update the oracle only with independent evidence and version the change.
23
+
24
+ Use [scoreDetection](score.mjs) with expected IDs, the original findings' IDs/confidence and separate evidence-based adjudications. Record per-case detected/missed IDs, false positives, unresolved and unadjudicated findings, plus elapsed time and scope. Attach the actual reviewed evidence and impact justification; booleans in a scoring input are attestations, not proof. Report the control separately (zero expected defects means recall is unavailable, not 100%). Preserve failed, interrupted and empty runs in denominators. Test calibration deliberately includes misses and a false positive to check accounting, not to claim model performance.
25
+
26
+ ## Evidence and limits for 0.4.1
27
+
28
+ Fixture development and oracle-aware inspection establish five reproducible defects and the bounded control contract. Scorer calibration verifies that three misses and one false positive remain visible in a constructed input; duplicate matches cannot inflate detected counts. This is runtime/oracle verification, not a blind review campaign. A [single independent review run](observed-0.4.1/README.md) confirmed 4/5 expected defects with no observed false positive; the timeout case remained unverified. No improvement over 0.4.0/BMAD or general detection rate is established. Written review guidance, valid JSON, report redaction and report opening prove none of those claims.
29
+
30
+ Coverage is deliberately bounded: synthetic local functions with injected collaborators; no real providers, production telemetry settings, process-kill crash recovery, database isolation or complete contract migration matrix. Add relevant cases when actual changes expose those risks; do not require this entire suite for every small project edit.
@@ -0,0 +1,4 @@
1
+ // Candidate change: renamed response field without adapting stored records/consumer.
2
+ export function orderResponse(stored) {
3
+ return { id: stored.id, totalCents: stored.totalCents };
4
+ }
@@ -0,0 +1,3 @@
1
+ // Unchanged existing consumer. Existing rows use amountCents, too.
2
+ export function invoiceTotal(response) { return response.amountCents / 100; }
3
+ export const existingOrder = { id: 'order-fixture', amountCents: 1250 };
@@ -0,0 +1,5 @@
1
+ // Accepted project contract: trim text; reject non-string values. No layering mandate.
2
+ export function normalizeLabel(value) {
3
+ if (typeof value !== 'string') throw new TypeError('Expected text');
4
+ return value.trim();
5
+ }
@@ -0,0 +1,11 @@
1
+ // Deliberately defective evaluation input. Only synthetic values are used in tests.
2
+ export async function connectAccount(input, provider, outputs) {
3
+ try {
4
+ return await provider(input.token);
5
+ } catch (error) {
6
+ const detail = { token: input.token, email: input.email, message: error.message };
7
+ outputs.log(detail);
8
+ outputs.telemetry({ event: 'connect-failed', detail });
9
+ return { status: 502, body: detail };
10
+ }
11
+ }
@@ -0,0 +1,8 @@
1
+ // Deliberately defective evaluation input: completion is recorded after all effects.
2
+ export async function submit(key, state, charge, notify) {
3
+ if (state.has(key)) return state.get(key);
4
+ const receipt = await charge(key);
5
+ await notify(receipt);
6
+ state.set(key, receipt);
7
+ return receipt;
8
+ }
@@ -0,0 +1,16 @@
1
+ # Observed bounded review, 0.4.1 candidate
2
+
3
+ Date: 2026-09-13. One independent delegated Codex agent reviewed four isolated cases using the candidate installed skills. Its supplied context contained TASK.md, the five source modules and installed method resources, not the oracle, expected defect IDs or author reproduction tests. Deliberately-defective comments were removed from the supplied cases; the control's accepted contract was retained. The exact source bytes are included and hashed. All source hashes were unchanged after review.
4
+
5
+ The evaluator produced [raw findings](raw-findings.md), [executable probes](review-probes.mjs) and [captured results](probe-results.json). Run `node review-probes.mjs` from this directory to reproduce those probes. The root agent subsequently inspected the artifacts against the oracle and recorded [adjudication](adjudication.json); [score.json](score.json) is derived with scoreDetection, not a keyword matcher. The adjudicator authored the oracle; this is disclosed, not an independent human judgment.
6
+
7
+ | Case | Expected confirmed defects | Detected | Missed/unconfirmed | False positives |
8
+ |---|---:|---:|---|---:|
9
+ | Sensitive outputs | 1 | 1 | none | 0 |
10
+ | Submission/recovery | 3 | 2 | TIMEOUT | 0 |
11
+ | Compatibility | 1 | 1 | none | 0 |
12
+ | Correct control | 0 | 0 | not applicable | 0 |
13
+
14
+ Observed: 4/5 expected defects confirmed (80% on this tiny set); no false positive among the four confirmed findings. Charge-success-then-timeout was named as an unknown risk but not exercised, so TIMEOUT remains missed/unconfirmed rather than credited as a confirmed detection. The correct control received no invented architectural blocker. Application sink exposure was tested before any report masking.
15
+
16
+ Limits: one run, five simple known defects, no matched earlier-version or BMAD baseline, no production systems, no human blind adjudication. This demonstrates bounded actual review behavior, not a general detection rate or an improvement over another version/method. Native autocomplete, graphical report opening, process-kill recovery and real provider/database behavior are not tested. The review was explicitly given a skill path; discovery was not measured. The raw narrative/probes are retained, not a complete host transport transcript. Model identifier, metered usage/cost and elapsed time were not independently captured and remain unavailable. Reviewer Node version was v23.10.0.
@@ -0,0 +1 @@
1
+ Review each case independently, without changing code. All files in case-a and case-b are the proposed implementation. In case-c, only compatibility.mjs changed; consumer.mjs is existing context. In case-d, control.mjs is the proposed implementation and its comment states the accepted contract. Report evidence-backed defects, impact and unverified risks. No report opening or product fixes are requested. Use only this directory and its installed skills. Do not inspect other temporary folders or repositories.
@@ -0,0 +1,65 @@
1
+ {
2
+ "expected": [
3
+ "LEAK",
4
+ "RACE",
5
+ "PARTIAL",
6
+ "TIMEOUT",
7
+ "CONTRACT"
8
+ ],
9
+ "findings": [
10
+ {
11
+ "id": "DET-A-001",
12
+ "confidence": "confirmed"
13
+ },
14
+ {
15
+ "id": "DET-B-001",
16
+ "confidence": "confirmed"
17
+ },
18
+ {
19
+ "id": "DET-B-002",
20
+ "confidence": "confirmed"
21
+ },
22
+ {
23
+ "id": "DET-C-001",
24
+ "confidence": "confirmed"
25
+ }
26
+ ],
27
+ "adjudications": [
28
+ {
29
+ "findingId": "DET-A-001",
30
+ "verdict": "matched",
31
+ "defectIds": [
32
+ "LEAK"
33
+ ],
34
+ "evidenceReviewed": true,
35
+ "impactJustified": true
36
+ },
37
+ {
38
+ "findingId": "DET-B-001",
39
+ "verdict": "matched",
40
+ "defectIds": [
41
+ "RACE"
42
+ ],
43
+ "evidenceReviewed": true,
44
+ "impactJustified": true
45
+ },
46
+ {
47
+ "findingId": "DET-B-002",
48
+ "verdict": "matched",
49
+ "defectIds": [
50
+ "PARTIAL"
51
+ ],
52
+ "evidenceReviewed": true,
53
+ "impactJustified": true
54
+ },
55
+ {
56
+ "findingId": "DET-C-001",
57
+ "verdict": "matched",
58
+ "defectIds": [
59
+ "CONTRACT"
60
+ ],
61
+ "evidenceReviewed": true,
62
+ "impactJustified": true
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,10 @@
1
+ export async function connectAccount(input, provider, outputs) {
2
+ try {
3
+ return await provider(input.token);
4
+ } catch (error) {
5
+ const detail = { token: input.token, email: input.email, message: error.message };
6
+ outputs.log(detail);
7
+ outputs.telemetry({ event: 'connect-failed', detail });
8
+ return { status: 502, body: detail };
9
+ }
10
+ }
@@ -0,0 +1,7 @@
1
+ export async function submit(key, state, charge, notify) {
2
+ if (state.has(key)) return state.get(key);
3
+ const receipt = await charge(key);
4
+ await notify(receipt);
5
+ state.set(key, receipt);
6
+ return receipt;
7
+ }
@@ -0,0 +1,3 @@
1
+ export function orderResponse(stored) {
2
+ return { id: stored.id, totalCents: stored.totalCents };
3
+ }
@@ -0,0 +1,2 @@
1
+ export function invoiceTotal(response) { return response.amountCents / 100; }
2
+ export const existingOrder = { id: 'order-fixture', amountCents: 1250 };
@@ -0,0 +1,5 @@
1
+ // Accepted project contract: trim text; reject non-string values. No layering mandate.
2
+ export function normalizeLabel(value) {
3
+ if (typeof value !== 'string') throw new TypeError('Expected text');
4
+ return value.trim();
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "case-d/control.mjs": "4e853b97ef8ca8976417d415c73954cf8d28d287fe933045fb4d4be787d2e607",
3
+ "case-c/compatibility.mjs": "b5ddd4fae3cae50b273c44311a2d238018def2f13019bc46f9098832d48ed08f",
4
+ "case-c/consumer.mjs": "fdd545577dcdd27331ed7cad4705ebdc916b59a429f46f1050e67d6fde4266ed",
5
+ "case-b/submission.mjs": "bae2ae0aee50ae04bd12ba7296b7f9ec86119a48dfd5b2ade1b7aa486ba6eb98",
6
+ "case-a/sensitive.mjs": "436f69d20aff30205560910622d0bfeac66de54aac6f4c2b519ccc69ed4a0420"
7
+ }