meto-cli 0.12.0 → 0.13.0

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
@@ -165,6 +165,13 @@ your-project/
165
165
  │ │ ├── product-vision.md
166
166
  │ │ ├── tech-stack.md
167
167
  │ │ └── test-log.md
168
+ │ ├── contracts/
169
+ │ │ └── slice-NNN-contract.md # sprint contract per slice
170
+ │ ├── handoff/
171
+ │ │ └── current.md # session handoff artifact
172
+ │ ├── rubric/
173
+ │ │ ├── tester-rubric.md # grading dimensions + thresholds
174
+ │ │ └── tester-calibration-log.md
168
175
  │ ├── tasks/
169
176
  │ │ ├── tasks-backlog.md
170
177
  │ │ ├── tasks-done.md
@@ -265,7 +272,7 @@ Meto is optimized for Claude Code's **1M token context window**. With 5x more ro
265
272
  - **Less frequent `/compact`** -- use it when responses slow down, not proactively
266
273
  - **Memory files still matter** -- they persist across sessions, not just within them
267
274
 
268
- Each agent has a memory file in `.claude/agent-memory/` that it reads at session start and updates at session end. Session checkpoints (`ai/workflows/session-checkpoint.md`) help hand off between sessions when needed.
275
+ Each agent has a memory file in `.claude/agent-memory/` that it reads at session start and updates at session end. Every session also ends by writing `ai/handoff/current.md` a structured snapshot of sprint state, completed steps, blockers, and the single next action. The next agent reads this before anything else. Git history preserves the full audit trail of handoffs.
269
276
 
270
277
  ---
271
278
 
@@ -315,6 +322,7 @@ Meto scaffolds projects ready for Agent Teams out of the box:
315
322
  | `meto-cli init --no-ai` | Scaffold using static prompts only, skip AI generation |
316
323
  | `meto-cli init --dry-run` | Preview the generated file tree without writing to disk |
317
324
  | `meto-cli audit` | Scan an existing project against the methodology blueprint and fix gaps interactively |
325
+ | `meto-cli audit --rubric` | Check the last 5 completed slices for sprint contracts, rubric scores, and passing tests |
318
326
  | `meto-cli doctor` | Check methodology health of the current project |
319
327
  | `meto-cli status` | Show swarm progress dashboard (reads SWARM_AWARENESS.md) |
320
328
  | `meto-cli --help` | Show available commands and options |
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQpD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AA8HD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAmI3D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AASpD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AA8LD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAoL3D"}
@@ -1,9 +1,12 @@
1
- import { readdir, stat } from "node:fs/promises";
1
+ import { readdir, stat, writeFile, mkdir } from "node:fs/promises";
2
+ import { join } from "node:path";
2
3
  import * as p from "@clack/prompts";
3
4
  import { AUDIT_BLUEPRINT } from "./blueprint.js";
4
5
  import { detectStack } from "./detect-stack.js";
5
6
  import { scanLayer, skipLayer, layerPassed, getFailedResults, } from "./scanner.js";
6
7
  import { fixLayer, fixLayerTwo, fixLayerThree } from "./fixer.js";
8
+ import { extractLastSlices, buildRubricChecks, } from "./rubric-check.js";
9
+ import { displayRubricResults, rubricHasFailed, } from "./rubric-display.js";
7
10
  import { getCodeGuidelines, getDefinitionOfDone } from "../stacks.js";
8
11
  // ---------------------------------------------------------------------------
9
12
  // Display helpers
@@ -54,6 +57,7 @@ function printAuditHelp() {
54
57
  "",
55
58
  "Options:",
56
59
  " --help, -h Show this help message",
60
+ " --rubric Also check the last 5 completed slices for contract and rubric score files",
57
61
  ].join("\n"), "Help");
58
62
  p.outro("Run 'meto-cli audit' from your project root.");
59
63
  }
@@ -104,6 +108,62 @@ async function isDirectory(dirPath) {
104
108
  }
105
109
  }
106
110
  // ---------------------------------------------------------------------------
111
+ // Migration prompt generator
112
+ // ---------------------------------------------------------------------------
113
+ /**
114
+ * Generates a Claude Code migration prompt and writes it to ai/migrate.md.
115
+ *
116
+ * Called after audit when new meto files were created in an existing project.
117
+ * The prompt tells @meto-pm exactly what to do: read existing project files,
118
+ * fill in the meto placeholders, and clean up superseded content.
119
+ */
120
+ async function writeMigrationPrompt(projectDir, createdFiles) {
121
+ const fileList = createdFiles.map((f) => `- \`${f}\``).join("\n");
122
+ const prompt = `# Meto Migration — Paste this into Claude Code and run with @meto-pm
123
+
124
+ Meto has added its methodology structure to this existing project.
125
+ The files below were created with placeholder content and need to be filled in
126
+ from the existing project. Your job is to do that merge.
127
+
128
+ ## Files created with placeholders
129
+
130
+ ${fileList}
131
+
132
+ ## What to do
133
+
134
+ 1. **Scan the existing project** — read README.md, package.json, any docs/ or
135
+ wiki/ folders, architecture docs, CONTRIBUTING.md, and any other files that
136
+ describe what this project is and how it works.
137
+
138
+ 2. **Fill in the meto files** — replace every "To be defined" placeholder with
139
+ real content extracted from the existing files:
140
+ - \`ai/context/product-vision.md\` ← README intro, any vision or pitch docs
141
+ - \`ai/context/tech-stack.md\` ← README stack section, package.json dependencies
142
+ - \`ai/context/decisions.md\` ← any ADRs, architecture decisions, or "why we chose X" docs
143
+ - \`CLAUDE.md\` ← project name, stack summary, coding conventions from existing linting/style configs
144
+ - \`ai/workflows/definition-of-done.md\` ← any existing QA checklists or PR templates
145
+ - Agent definitions in \`.claude/agents/\` ← adapt to the actual stack and domain
146
+
147
+ 3. **Do not delete anything** without confirming with the user first. If an
148
+ existing file is fully superseded by a new meto file, flag it with a note
149
+ rather than deleting it.
150
+
151
+ 4. **Populate the backlog** — once context files are filled in, create 3-5 epics
152
+ in \`ai/backlog/epics.md\` based on the project's current state and known
153
+ remaining work.
154
+
155
+ 5. **Delete this file** (\`ai/migrate.md\`) when the migration is complete.
156
+
157
+ ## Guiding principle
158
+
159
+ The goal is one coherent project — not old files next to new files.
160
+ Everything the project knows about itself should live in the meto structure.
161
+ `;
162
+ const aiDir = join(projectDir, "ai");
163
+ await mkdir(aiDir, { recursive: true });
164
+ await writeFile(join(aiDir, "migrate.md"), prompt, "utf-8");
165
+ }
166
+ // ---------------------------------------------------------------------------
107
167
  // Entry point
108
168
  // ---------------------------------------------------------------------------
109
169
  /**
@@ -152,6 +212,7 @@ export async function runAudit() {
152
212
  const stackDod = getDefinitionOfDone(detected.stack);
153
213
  const stackGuidelines = getCodeGuidelines(detected.stack);
154
214
  const allLayerResults = [];
215
+ const allCreatedFiles = [];
155
216
  let previousLayerPassed = true;
156
217
  for (const layer of AUDIT_BLUEPRINT) {
157
218
  // Gating: Layer 0 is informational only — never blocks.
@@ -183,6 +244,7 @@ export async function runAudit() {
183
244
  // Re-scan after fixes to get updated results
184
245
  const created = fixResult.fixes.filter((f) => f.outcome === "created");
185
246
  if (created.length > 0) {
247
+ allCreatedFiles.push(...created.map((f) => f.scanResult.expectation.path));
186
248
  p.log.info(`Fixed ${created.length} issue${created.length === 1 ? "" : "s"} in Layer ${layer.id}`);
187
249
  // Re-scan to reflect fixes
188
250
  const rescanResult = await scanLayer(projectDir, layer);
@@ -204,12 +266,49 @@ export async function runAudit() {
204
266
  const totalExpectations = allLayerResults.reduce((sum, lr) => sum + lr.results.length, 0);
205
267
  const totalPassed = allLayerResults.reduce((sum, lr) => sum + lr.results.filter((r) => r.status === "pass").length, 0);
206
268
  const totalFailed = allLayerResults.reduce((sum, lr) => sum + lr.results.filter((r) => r.status === "fail").length, 0);
207
- if (totalFailed > 0) {
208
- p.outro(`Audit complete: ${totalPassed}/${totalExpectations} passed, ${totalFailed} failed`);
269
+ if (allCreatedFiles.length > 0) {
270
+ await writeMigrationPrompt(projectDir, allCreatedFiles);
271
+ p.note([
272
+ "Meto created new methodology files alongside your existing project files.",
273
+ "To merge your existing content into the new structure:",
274
+ "",
275
+ "1. Open Claude Code in this project",
276
+ " claude",
277
+ "",
278
+ "2. Run @meto-pm and paste the contents of ai/migrate.md",
279
+ ' "@meto-pm — read ai/migrate.md and follow the instructions"',
280
+ "",
281
+ "The agent will fill in placeholders, consolidate old files,",
282
+ "and leave you with one coherent project.",
283
+ ].join("\n"), "Next step: migrate your existing content");
284
+ }
285
+ // --rubric flag: runs after existing layers (additive)
286
+ let rubricResults = [];
287
+ const hasRubricFlag = args.includes("--rubric");
288
+ if (hasRubricFlag) {
289
+ p.log.info("Running rubric compliance checks on last 5 completed slices...");
290
+ const sliceIds = await extractLastSlices(projectDir, 5);
291
+ if (sliceIds.length === 0) {
292
+ p.note("ai/tasks/tasks-done.md is missing or contains no completed slices.\nAdd completed slices to tasks-done.md before running --rubric.", "Rubric Compliance");
293
+ }
294
+ else {
295
+ rubricResults = await buildRubricChecks(projectDir, sliceIds);
296
+ displayRubricResults(rubricResults);
297
+ }
298
+ }
299
+ const rubricFailed = rubricHasFailed(rubricResults);
300
+ if (totalFailed > 0 || rubricFailed) {
301
+ p.outro(`Audit complete: ${totalPassed}/${totalExpectations} passed, ${totalFailed} failed` +
302
+ (hasRubricFlag
303
+ ? ` | Rubric: ${rubricResults.filter((r) => r.status === "fail").length} gap(s) found`
304
+ : ""));
209
305
  process.exit(1);
210
306
  }
211
307
  else {
212
- p.outro(`Audit complete: ${totalPassed}/${totalExpectations} checks passed`);
308
+ p.outro(`Audit complete: ${totalPassed}/${totalExpectations} checks passed` +
309
+ (hasRubricFlag && rubricResults.length > 0
310
+ ? ` | Rubric: ${rubricResults.length} checks passed`
311
+ : ""));
213
312
  }
214
313
  return allLayerResults;
215
314
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAmBtE,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;GAEG;AACH,SAAS,mBAAmB,CAAC,WAA4B;IACvD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC,CAAC,IAAI,CACJ,YAAY,WAAW,CAAC,UAAU,IAAI,2BAA2B,EAAE,EACnE,SAAS,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAC7D,CAAC;QACF,OAAO;IACT,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACzC,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC7B,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACxE,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACpC,CAAC,CAAC,GAAG,CAAC,KAAK,CA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AAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,eAAe;gBACtF,CAAC,CAAC,EAAE,CAAC,CACV,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,CAAC,CAAC,KAAK,CACL,mBAAmB,WAAW,IAAI,iBAAiB,gBAAgB;YACjE,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC;gBACxC,CAAC,CAAC,cAAc,aAAa,CAAC,MAAM,gBAAgB;gBACpD,CAAC,CAAC,EAAE,CAAC,CACV,CAAC;IACJ,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Rubric compliance checker for the `meto audit --rubric` flag.
3
+ *
4
+ * Reads the last N completed slices from tasks-done.md and checks each one for:
5
+ * 1. Sprint contract file at ai/contracts/slice-NNN-contract.md
6
+ * 2. Rubric score file at ai/rubric/slice-NNN-score.md
7
+ * 3. Verification commands listed in the rubric score file (run live)
8
+ */
9
+ /** The kind of check performed for a slice. */
10
+ export type RubricCheckType = "contract" | "score" | "verification";
11
+ /** Outcome of a single rubric check. */
12
+ export type RubricCheckStatus = "pass" | "fail";
13
+ /**
14
+ * Result of one rubric check for one slice.
15
+ */
16
+ export interface RubricSliceResult {
17
+ /** The slice ID (e.g. "slice-042") */
18
+ sliceId: string;
19
+ /** Which kind of check this result is for */
20
+ checkType: RubricCheckType;
21
+ /** Whether the check passed or failed */
22
+ status: RubricCheckStatus;
23
+ /** Human-readable explanation */
24
+ message: string;
25
+ /** Instruction for fixing the gap (only present on fail) */
26
+ fixInstruction: string | undefined;
27
+ }
28
+ /**
29
+ * Parses verification commands from a rubric score file.
30
+ *
31
+ * Looks for a "## Verification Commands Run" section and extracts commands
32
+ * from the first column of the markdown table rows below it.
33
+ * Table rows look like: | `npx vitest run` | 0 | |
34
+ */
35
+ export declare function parseVerificationCommands(content: string): string[];
36
+ /**
37
+ * Reads ai/tasks/tasks-done.md and extracts the top N slice IDs.
38
+ * Slices appear newest-first in the file (most recently added at the top).
39
+ *
40
+ * Returns an array of slice IDs like ["slice-091", "slice-090", ...].
41
+ * Returns an empty array if the file is missing or unreadable.
42
+ */
43
+ export declare function extractLastSlices(projectDir: string, count: number): Promise<string[]>;
44
+ /**
45
+ * Runs rubric compliance checks for the given slice IDs.
46
+ *
47
+ * For each slice:
48
+ * - Checks contract file exists at ai/contracts/slice-NNN-contract.md
49
+ * - Checks rubric score file exists at ai/rubric/slice-NNN-score.md
50
+ * - If score file exists, parses and runs verification commands live
51
+ *
52
+ * Returns a flat array of RubricSliceResult (multiple results per slice).
53
+ */
54
+ export declare function buildRubricChecks(projectDir: string, sliceIds: string[]): Promise<RubricSliceResult[]>;
55
+ //# sourceMappingURL=rubric-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubric-check.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/rubric-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;AAEpE,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,EAAE,eAAe,CAAC;IAC3B,yCAAyC;IACzC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AA6BD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBnE;AAyBD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAmF9B"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Rubric compliance checker for the `meto audit --rubric` flag.
3
+ *
4
+ * Reads the last N completed slices from tasks-done.md and checks each one for:
5
+ * 1. Sprint contract file at ai/contracts/slice-NNN-contract.md
6
+ * 2. Rubric score file at ai/rubric/slice-NNN-score.md
7
+ * 3. Verification commands listed in the rubric score file (run live)
8
+ */
9
+ import { readFile, stat } from "node:fs/promises";
10
+ import { join } from "node:path";
11
+ import { spawnSync } from "node:child_process";
12
+ // ---------------------------------------------------------------------------
13
+ // Helpers
14
+ // ---------------------------------------------------------------------------
15
+ /**
16
+ * Returns true if the path exists as a regular file.
17
+ */
18
+ async function fileExists(filePath) {
19
+ try {
20
+ const s = await stat(filePath);
21
+ return s.isFile();
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ }
27
+ /**
28
+ * Reads a file and returns its content, or null on error.
29
+ */
30
+ async function readFileOrNull(filePath) {
31
+ try {
32
+ return await readFile(filePath, "utf-8");
33
+ }
34
+ catch {
35
+ return null;
36
+ }
37
+ }
38
+ /**
39
+ * Parses verification commands from a rubric score file.
40
+ *
41
+ * Looks for a "## Verification Commands Run" section and extracts commands
42
+ * from the first column of the markdown table rows below it.
43
+ * Table rows look like: | `npx vitest run` | 0 | |
44
+ */
45
+ export function parseVerificationCommands(content) {
46
+ const sectionMatch = content.match(/## Verification Commands Run[\s\S]*?(?=\n## |\n---|\s*$)/);
47
+ if (!sectionMatch) {
48
+ return [];
49
+ }
50
+ const section = sectionMatch[0];
51
+ const commands = [];
52
+ for (const line of section.split("\n")) {
53
+ // Match table rows: | `command` | ... |
54
+ const rowMatch = line.match(/^\|\s*`([^`]+)`\s*\|/);
55
+ if (rowMatch) {
56
+ const cmd = rowMatch[1].trim();
57
+ // Skip placeholder lines like "(lint command if present)"
58
+ if (!cmd.startsWith("_") && !cmd.includes("if present")) {
59
+ commands.push(cmd);
60
+ }
61
+ }
62
+ }
63
+ return commands;
64
+ }
65
+ /**
66
+ * Runs a shell command synchronously and returns its exit code.
67
+ * The command is split on the first space: head = binary, rest = args.
68
+ */
69
+ function runCommand(command, cwd) {
70
+ const parts = command.split(/\s+/);
71
+ const bin = parts[0];
72
+ const args = parts.slice(1);
73
+ const result = spawnSync(bin, args, {
74
+ cwd,
75
+ stdio: "pipe",
76
+ encoding: "utf-8",
77
+ shell: false,
78
+ });
79
+ return result.status ?? 1;
80
+ }
81
+ // ---------------------------------------------------------------------------
82
+ // Public API
83
+ // ---------------------------------------------------------------------------
84
+ /**
85
+ * Reads ai/tasks/tasks-done.md and extracts the top N slice IDs.
86
+ * Slices appear newest-first in the file (most recently added at the top).
87
+ *
88
+ * Returns an array of slice IDs like ["slice-091", "slice-090", ...].
89
+ * Returns an empty array if the file is missing or unreadable.
90
+ */
91
+ export async function extractLastSlices(projectDir, count) {
92
+ const filePath = join(projectDir, "ai", "tasks", "tasks-done.md");
93
+ const content = await readFileOrNull(filePath);
94
+ if (content === null) {
95
+ return [];
96
+ }
97
+ const sliceIds = [];
98
+ for (const line of content.split("\n")) {
99
+ // Match: ## [slice-NNN] -- ...
100
+ const match = line.match(/^##\s+\[(slice-\d+)\]/);
101
+ if (match) {
102
+ sliceIds.push(match[1]);
103
+ }
104
+ }
105
+ return sliceIds.slice(0, count);
106
+ }
107
+ /**
108
+ * Runs rubric compliance checks for the given slice IDs.
109
+ *
110
+ * For each slice:
111
+ * - Checks contract file exists at ai/contracts/slice-NNN-contract.md
112
+ * - Checks rubric score file exists at ai/rubric/slice-NNN-score.md
113
+ * - If score file exists, parses and runs verification commands live
114
+ *
115
+ * Returns a flat array of RubricSliceResult (multiple results per slice).
116
+ */
117
+ export async function buildRubricChecks(projectDir, sliceIds) {
118
+ const results = [];
119
+ for (const sliceId of sliceIds) {
120
+ const sliceNum = sliceId.replace("slice-", "");
121
+ // Check 1: contract file
122
+ const contractPath = join(projectDir, "ai", "contracts", `slice-${sliceNum}-contract.md`);
123
+ const contractExists = await fileExists(contractPath);
124
+ results.push({
125
+ sliceId,
126
+ checkType: "contract",
127
+ status: contractExists ? "pass" : "fail",
128
+ message: contractExists
129
+ ? `Found ai/contracts/slice-${sliceNum}-contract.md`
130
+ : `Missing ai/contracts/slice-${sliceNum}-contract.md`,
131
+ fixInstruction: contractExists
132
+ ? undefined
133
+ : `Create ai/contracts/slice-${sliceNum}-contract.md from the sprint contract template before work begins`,
134
+ });
135
+ // Check 2: rubric score file
136
+ const scorePath = join(projectDir, "ai", "rubric", `slice-${sliceNum}-score.md`);
137
+ const scoreExists = await fileExists(scorePath);
138
+ results.push({
139
+ sliceId,
140
+ checkType: "score",
141
+ status: scoreExists ? "pass" : "fail",
142
+ message: scoreExists
143
+ ? `Found ai/rubric/slice-${sliceNum}-score.md`
144
+ : `Missing ai/rubric/slice-${sliceNum}-score.md`,
145
+ fixInstruction: scoreExists
146
+ ? undefined
147
+ : `@meto-tester must create ai/rubric/slice-${sliceNum}-score.md after evaluating slice-${sliceNum}`,
148
+ });
149
+ // Check 3: verification commands in score file (only if score file exists)
150
+ if (scoreExists) {
151
+ const scoreContent = await readFileOrNull(scorePath);
152
+ const commands = scoreContent
153
+ ? parseVerificationCommands(scoreContent)
154
+ : [];
155
+ if (commands.length === 0) {
156
+ results.push({
157
+ sliceId,
158
+ checkType: "verification",
159
+ status: "fail",
160
+ message: `No verification commands found in ai/rubric/slice-${sliceNum}-score.md`,
161
+ fixInstruction: `Add a 'Verification Commands Run' table to ai/rubric/slice-${sliceNum}-score.md listing commands and their exit codes`,
162
+ });
163
+ }
164
+ else {
165
+ for (const cmd of commands) {
166
+ const exitCode = runCommand(cmd, projectDir);
167
+ const passed = exitCode === 0;
168
+ results.push({
169
+ sliceId,
170
+ checkType: "verification",
171
+ status: passed ? "pass" : "fail",
172
+ message: passed
173
+ ? `\`${cmd}\` exited 0`
174
+ : `\`${cmd}\` exited ${exitCode} (expected 0)`,
175
+ fixInstruction: passed
176
+ ? undefined
177
+ : `Run \`${cmd}\` in the project root and fix all errors before closing slice-${sliceNum}`,
178
+ });
179
+ }
180
+ }
181
+ }
182
+ }
183
+ return results;
184
+ }
185
+ //# sourceMappingURL=rubric-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubric-check.js","sourceRoot":"","sources":["../../../src/cli/audit/rubric-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA4B/C,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;GAEG;AACH,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,cAAc,CAAC,QAAgB;IAC5C,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAe;IACvD,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAChC,0D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,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;oBAC3B,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;oBAC7C,MAAM,MAAM,GAAG,QAAQ,KAAK,CAAC,CAAC;oBAC9B,OAAO,CAAC,IAAI,CAAC;wBACX,OAAO;wBACP,SAAS,EAAE,cAAc;wBACzB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;wBAChC,OAAO,EAAE,MAAM;4BACb,CAAC,CAAC,KAAK,GAAG,aAAa;4BACvB,CAAC,CAAC,KAAK,GAAG,aAAa,QAAQ,eAAe;wBAChD,cAAc,EAAE,MAAM;4BACpB,CAAC,CAAC,SAAS;4BACX,CAAC,CAAC,SAAS,GAAG,kEAAkE,QAAQ,EAAE;qBAC7F,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Display helpers for the `meto audit --rubric` flag.
3
+ *
4
+ * Separated from rubric-check.ts (pure data) and index.ts (CLI entry point)
5
+ * so it can be unit-tested without stdin/process.exit mocking.
6
+ */
7
+ import type { RubricSliceResult } from "./rubric-check.js";
8
+ /**
9
+ * Summary counts returned by displayRubricResults.
10
+ * Used by the caller (index.ts) to drive the exit code and outro message.
11
+ */
12
+ export interface RubricSummary {
13
+ passed: number;
14
+ failed: number;
15
+ total: number;
16
+ /** All formatted lines emitted (for testing without mocking @clack/prompts). */
17
+ lines: string[];
18
+ }
19
+ /**
20
+ * Returns true if any result in the array has status "fail".
21
+ */
22
+ export declare function rubricHasFailed(results: RubricSliceResult[]): boolean;
23
+ /**
24
+ * Formats a single rubric check result into a human-readable label.
25
+ * Used internally and exposed for testing.
26
+ */
27
+ export declare function formatRubricLine(result: RubricSliceResult): string;
28
+ /**
29
+ * Renders rubric check results using the same @clack/prompts styling as the
30
+ * existing audit layers, then returns a RubricSummary for exit-code decisions.
31
+ *
32
+ * This function calls p.log.success / p.log.error so it must only be called
33
+ * from the CLI entry point, not from unit tests.
34
+ */
35
+ export declare function displayRubricResults(results: RubricSliceResult[]): RubricSummary;
36
+ //# sourceMappingURL=rubric-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubric-display.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/rubric-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAM3D;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAErE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAgBlE;AAMD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,iBAAiB,EAAE,GAC3B,aAAa,CA0Bf"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Display helpers for the `meto audit --rubric` flag.
3
+ *
4
+ * Separated from rubric-check.ts (pure data) and index.ts (CLI entry point)
5
+ * so it can be unit-tested without stdin/process.exit mocking.
6
+ */
7
+ import * as p from "@clack/prompts";
8
+ // ---------------------------------------------------------------------------
9
+ // Pure helpers
10
+ // ---------------------------------------------------------------------------
11
+ /**
12
+ * Returns true if any result in the array has status "fail".
13
+ */
14
+ export function rubricHasFailed(results) {
15
+ return results.some((r) => r.status === "fail");
16
+ }
17
+ /**
18
+ * Formats a single rubric check result into a human-readable label.
19
+ * Used internally and exposed for testing.
20
+ */
21
+ export function formatRubricLine(result) {
22
+ const typeLabel = result.checkType === "contract"
23
+ ? "contract"
24
+ : result.checkType === "score"
25
+ ? "rubric score"
26
+ : "verification";
27
+ const status = result.status === "pass" ? "pass" : "FAIL";
28
+ let line = `[${result.sliceId}] ${typeLabel}: ${status} — ${result.message}`;
29
+ if (result.status === "fail" && result.fixInstruction !== undefined) {
30
+ line += `\n Fix: ${result.fixInstruction}`;
31
+ }
32
+ return line;
33
+ }
34
+ // ---------------------------------------------------------------------------
35
+ // Display (calls @clack/prompts — not unit-tested directly)
36
+ // ---------------------------------------------------------------------------
37
+ /**
38
+ * Renders rubric check results using the same @clack/prompts styling as the
39
+ * existing audit layers, then returns a RubricSummary for exit-code decisions.
40
+ *
41
+ * This function calls p.log.success / p.log.error so it must only be called
42
+ * from the CLI entry point, not from unit tests.
43
+ */
44
+ export function displayRubricResults(results) {
45
+ const lines = [];
46
+ let passed = 0;
47
+ let failed = 0;
48
+ for (const result of results) {
49
+ const line = formatRubricLine(result);
50
+ lines.push(line);
51
+ if (result.status === "pass") {
52
+ p.log.success(line);
53
+ passed++;
54
+ }
55
+ else {
56
+ p.log.error(line);
57
+ failed++;
58
+ }
59
+ }
60
+ const total = results.length;
61
+ p.note(`${passed}/${total} passed, ${failed} failed`, "Rubric Compliance");
62
+ return { passed, failed, total, lines };
63
+ }
64
+ //# sourceMappingURL=rubric-display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubric-display.js","sourceRoot":"","sources":["../../../src/cli/audit/rubric-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAmBpC,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAA4B;IAC1D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC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C,IAAI,CAAC,CAAC;YAClB,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAE7B,CAAC,CAAC,IAAI,CACJ,GAAG,MAAM,IAAI,KAAK,YAAY,MAAM,SAAS,EAC7C,mBAAmB,CACpB,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meto-cli",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Scaffold structured software projects with built-in methodology",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,6 +2,10 @@
2
2
 
3
3
  *Read at session start. Update at session end.*
4
4
 
5
+ **Session start checklist:**
6
+ - [ ] Read `ai/handoff/current.md` — understand current sprint state before doing anything else
7
+ - [ ] Read this MEMORY.md file
8
+
5
9
  ---
6
10
 
7
11
  ## Product Understanding
@@ -2,6 +2,11 @@
2
2
 
3
3
  *Read at session start. Update at session end.*
4
4
 
5
+ **Session start checklist:**
6
+ - [ ] Read `ai/handoff/current.md` — understand current sprint state before doing anything else
7
+ - [ ] Read this MEMORY.md file
8
+ - [ ] Read `ai/tasks/tasks-in-progress.md` — confirm what to work on
9
+
5
10
  ---
6
11
 
7
12
  ## Red Flags — Stop Before Acting
@@ -2,6 +2,11 @@
2
2
 
3
3
  *Read at session start. Update at session end.*
4
4
 
5
+ **Session start checklist:**
6
+ - [ ] Read `ai/handoff/current.md` — understand current sprint state before doing anything else
7
+ - [ ] Read this MEMORY.md file
8
+ - [ ] Read `ai/tasks/tasks-todo.md` and `ai/tasks/tasks-backlog.md` — understand what needs planning
9
+
5
10
  ---
6
11
 
7
12
  ## Red Flags — Stop Before Acting