@open-agent-toolkit/cli 0.2.79 → 0.3.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.
Files changed (57) hide show
  1. package/assets/agents/oat-phase-implementer.md +5 -5
  2. package/assets/agents/oat-reviewer.md +15 -15
  3. package/assets/bundle-metadata.json +1 -1
  4. package/assets/docs/cli-utilities/workflow-gates.md +1 -1
  5. package/assets/docs/workflows/projects/artifacts.md +2 -2
  6. package/assets/docs/workflows/projects/autonomy.md +1 -1
  7. package/assets/docs/workflows/projects/implementation-execution.md +4 -4
  8. package/assets/docs/workflows/projects/lifecycle.md +1 -1
  9. package/assets/docs/workflows/projects/reviews.md +11 -11
  10. package/assets/public-package-versions.json +4 -4
  11. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +3 -3
  12. package/assets/skills/oat-docs-analyze/SKILL.md +3 -3
  13. package/assets/skills/oat-project-autonomous/SKILL.md +2 -2
  14. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +14 -14
  15. package/assets/skills/oat-project-design/SKILL.md +2 -2
  16. package/assets/skills/oat-project-discover/SKILL.md +2 -2
  17. package/assets/skills/oat-project-document/SKILL.md +1 -1
  18. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +14 -14
  19. package/assets/skills/oat-project-implement/SKILL.md +2 -2
  20. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +1 -1
  21. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +14 -14
  22. package/assets/skills/oat-project-implement/references/phase-execution.md +3 -3
  23. package/assets/skills/oat-project-implement/references/plan-and-resume.md +2 -2
  24. package/assets/skills/oat-project-import-plan/SKILL.md +2 -2
  25. package/assets/skills/oat-project-lite/SKILL.md +1 -1
  26. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +14 -14
  27. package/assets/skills/oat-project-plan/SKILL.md +2 -2
  28. package/assets/skills/oat-project-plan-writing/SKILL.md +4 -4
  29. package/assets/skills/oat-project-pr-final/SKILL.md +1 -1
  30. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +14 -14
  31. package/assets/skills/oat-project-quick-start/SKILL.md +2 -2
  32. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +14 -14
  33. package/assets/skills/oat-project-review-provide/SKILL.md +14 -14
  34. package/assets/skills/oat-project-review-provide-remote/SKILL.md +10 -10
  35. package/assets/skills/oat-project-review-receive/SKILL.md +64 -45
  36. package/assets/skills/oat-project-review-receive-remote/SKILL.md +6 -6
  37. package/assets/skills/oat-project-revise/SKILL.md +2 -2
  38. package/assets/skills/oat-review-provide/SKILL.md +2 -2
  39. package/assets/skills/oat-review-provide/references/review-artifact-template.md +3 -3
  40. package/assets/skills/oat-review-provide-remote/SKILL.md +11 -11
  41. package/assets/skills/oat-review-receive/SKILL.md +18 -17
  42. package/assets/skills/oat-review-receive-remote/SKILL.md +13 -13
  43. package/assets/skills/oat-wave-execute/SKILL.md +2 -2
  44. package/assets/templates/plan.md +1 -1
  45. package/dist/commands/gate/__fixtures__/fake-runtime.mjs +4 -4
  46. package/dist/commands/gate/index.d.ts.map +1 -1
  47. package/dist/commands/gate/index.js +20 -11
  48. package/dist/commands/gate/review-verdict.d.ts +2 -2
  49. package/dist/commands/gate/review-verdict.d.ts.map +1 -1
  50. package/dist/commands/gate/review-verdict.js +223 -57
  51. package/dist/review-remote/body-builder.d.ts +3 -3
  52. package/dist/review-remote/body-builder.d.ts.map +1 -1
  53. package/dist/review-remote/body-builder.js +12 -12
  54. package/dist/review-remote/reviewer-dispatch.d.ts +2 -2
  55. package/dist/review-remote/reviewer-dispatch.d.ts.map +1 -1
  56. package/dist/review-remote/reviewer-dispatch.js +15 -7
  57. package/package.json +2 -2
@@ -5,12 +5,12 @@
5
5
  *
6
6
  * The body is the durable handoff to `*-receive-remote`: a leading
7
7
  * HTML-comment marker block (parsed back by {@link parseMarkerBlock}) followed
8
- * by human-readable prose (summary, severity counts, optional minor-fix nudge,
8
+ * by human-readable prose (summary, severity counts, optional low-fix nudge,
9
9
  * optional verification commands).
10
10
  */
11
11
  import { type ReviewInvocation } from './marker-parser.js';
12
12
  export type ReviewVerdict = 'REQUEST_CHANGES' | 'COMMENT';
13
- export type FindingSeverity = 'critical' | 'important' | 'medium' | 'minor';
13
+ export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low';
14
14
  /** Minimal finding shape the builder needs — only severity is required. */
15
15
  export interface BuilderFinding {
16
16
  severity: FindingSeverity;
@@ -73,7 +73,7 @@ interface GateBuildInput {
73
73
  export type BuildInput = BuildInputBase & (LifecycleBuildInput | GateBuildInput);
74
74
  /**
75
75
  * Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
76
- * critical or important finding is present, otherwise `COMMENT` (including the
76
+ * critical or high finding is present, otherwise `COMMENT` (including the
77
77
  * zero-findings clean-review case). Never auto-`APPROVE`.
78
78
  */
79
79
  export declare function mapVerdict(findings: BuilderFinding[]): ReviewVerdict;
@@ -1 +1 @@
1
- {"version":3,"file":"body-builder.d.ts","sourceRoot":"","sources":["../../src/review-remote/body-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5E,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2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O,EAAE,aAAa,CAAC;CACxB,CAkCA"}
@@ -5,25 +5,25 @@
5
5
  *
6
6
  * The body is the durable handoff to `*-receive-remote`: a leading
7
7
  * HTML-comment marker block (parsed back by {@link parseMarkerBlock}) followed
8
- * by human-readable prose (summary, severity counts, optional minor-fix nudge,
8
+ * by human-readable prose (summary, severity counts, optional low-fix nudge,
9
9
  * optional verification commands).
10
10
  */
11
11
  import { MARKER_BLOCK_OPEN } from './marker-parser.js';
12
12
  /**
13
13
  * Map a finding set to the GitHub review verdict: `REQUEST_CHANGES` when any
14
- * critical or important finding is present, otherwise `COMMENT` (including the
14
+ * critical or high finding is present, otherwise `COMMENT` (including the
15
15
  * zero-findings clean-review case). Never auto-`APPROVE`.
16
16
  */
17
17
  export function mapVerdict(findings) {
18
- const hasBlocking = findings.some((f) => f.severity === 'critical' || f.severity === 'important');
18
+ const hasBlocking = findings.some((f) => f.severity === 'critical' || f.severity === 'high');
19
19
  return hasBlocking ? 'REQUEST_CHANGES' : 'COMMENT';
20
20
  }
21
21
  function countSeverities(findings) {
22
22
  const counts = {
23
23
  critical: 0,
24
- important: 0,
24
+ high: 0,
25
25
  medium: 0,
26
- minor: 0,
26
+ low: 0,
27
27
  };
28
28
  for (const f of findings) {
29
29
  counts[f.severity] += 1;
@@ -76,9 +76,9 @@ function buildOutOfDiffSection(findings) {
76
76
  });
77
77
  return ['## Findings outside the PR diff', '', ...entries].join('\n');
78
78
  }
79
- const MINOR_FIX_NUDGE = 'Minor findings are included inline. We recommend fixing minors during ' +
80
- 'this cycle rather than tracking them as backlog items — they are usually ' +
81
- 'faster to just resolve than to manage.';
79
+ const LOW_FIX_NUDGE = 'Low findings are included inline. We recommend fixing low-severity ' +
80
+ 'findings during this cycle rather than tracking them as backlog items — ' +
81
+ 'they are usually faster to just resolve than to manage.';
82
82
  /**
83
83
  * Build the posted-review body and compute its verdict.
84
84
  */
@@ -92,17 +92,17 @@ export function buildReviewBody(input) {
92
92
  '## Severity Counts',
93
93
  '',
94
94
  `- Critical: ${counts.critical}`,
95
- `- Important: ${counts.important}`,
95
+ `- High: ${counts.high}`,
96
96
  `- Medium: ${counts.medium}`,
97
- `- Minor: ${counts.minor}`,
97
+ `- Low: ${counts.low}`,
98
98
  ].join('\n'),
99
99
  ];
100
100
  const outOfDiffSection = buildOutOfDiffSection(input.outOfDiffFindings);
101
101
  if (outOfDiffSection !== null) {
102
102
  sections.push(outOfDiffSection);
103
103
  }
104
- if (counts.minor > 0) {
105
- sections.push(`## Notes\n\n${MINOR_FIX_NUDGE}`);
104
+ if (counts.low > 0) {
105
+ sections.push(`## Notes\n\n${LOW_FIX_NUDGE}`);
106
106
  }
107
107
  if (input.verificationCommands && input.verificationCommands.length > 0) {
108
108
  const commands = input.verificationCommands
@@ -33,10 +33,10 @@ import type { NarrowingResult } from './narrowing.js';
33
33
  export declare const STRUCTURED_OUTPUT_MODE_FLAG: 'oat_output_mode';
34
34
  /** The single accepted value of {@link STRUCTURED_OUTPUT_MODE_FLAG}. */
35
35
  export declare const STRUCTURED_OUTPUT_MODE_VALUE: 'structured';
36
- export type FindingSeverity = 'critical' | 'important' | 'medium' | 'minor';
36
+ export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low';
37
37
  /** A single structured finding (see design.md → Data Models). */
38
38
  export interface StructuredFinding {
39
- /** Stable per-dispatch ID with a C/I/M/m prefix. */
39
+ /** Stable per-dispatch ID with a C/H/M/L prefix. */
40
40
  id: string;
41
41
  severity: FindingSeverity;
42
42
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"reviewer-dispatch.d.ts","sourceRoot":"","sources":["../../src/review-remote/reviewer-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAG,iBAA0B,CAAC;AAEtE,wEAAwE;AACxE,eAAO,MAAM,4BAA4B,EA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,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACpE;AAED,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED,iFAAiF;AACjF,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAezB;AAsED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CA2B7E;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,qBAAqB,EAC9B,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAK7B"}
@@ -34,10 +34,16 @@ export const STRUCTURED_OUTPUT_MODE_FLAG = 'oat_output_mode';
34
34
  export const STRUCTURED_OUTPUT_MODE_VALUE = 'structured';
35
35
  const SEVERITIES = new Set([
36
36
  'critical',
37
- 'important',
37
+ 'high',
38
38
  'medium',
39
- 'minor',
39
+ 'low',
40
40
  ]);
41
+ const SEVERITY_ID_PREFIX = {
42
+ critical: 'C',
43
+ high: 'H',
44
+ medium: 'M',
45
+ low: 'L',
46
+ };
41
47
  /** Typed error raised when the reviewer returns a malformed structured shape. */
42
48
  export class StructuredFindingsError extends Error {
43
49
  constructor(message) {
@@ -72,12 +78,14 @@ function validateFinding(value, index) {
72
78
  if (!isObject(value)) {
73
79
  throw new StructuredFindingsError(`${at} must be an object.`);
74
80
  }
75
- if (typeof value['id'] !== 'string' || value['id'] === '') {
76
- throw new StructuredFindingsError(`${at}.id must be a non-empty string.`);
77
- }
78
81
  if (typeof value['severity'] !== 'string' ||
79
82
  !SEVERITIES.has(value['severity'])) {
80
- throw new StructuredFindingsError(`${at}.severity must be one of critical|important|medium|minor.`);
83
+ throw new StructuredFindingsError(`${at}.severity must be one of critical|high|medium|low.`);
84
+ }
85
+ const severity = value['severity'];
86
+ const expectedIdPattern = new RegExp(`^${SEVERITY_ID_PREFIX[severity]}[1-9]\\d*$`);
87
+ if (typeof value['id'] !== 'string' || !expectedIdPattern.test(value['id'])) {
88
+ throw new StructuredFindingsError(`${at}.id must use the ${SEVERITY_ID_PREFIX[severity]} prefix for ${severity} severity followed by a positive integer.`);
81
89
  }
82
90
  if (typeof value['title'] !== 'string') {
83
91
  throw new StructuredFindingsError(`${at}.title must be a string.`);
@@ -104,7 +112,7 @@ function validateFinding(value, index) {
104
112
  }
105
113
  return {
106
114
  id: value['id'],
107
- severity: value['severity'],
115
+ severity,
108
116
  title: value['title'],
109
117
  file: fileSet ? file : null,
110
118
  line: lineSet ? line : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.2.79",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "Open Agent Toolkit CLI",
6
6
  "homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
@@ -34,7 +34,7 @@
34
34
  "ora": "^9.0.0",
35
35
  "yaml": "2.8.2",
36
36
  "zod": "^3.25.76",
37
- "@open-agent-toolkit/control-plane": "0.2.79"
37
+ "@open-agent-toolkit/control-plane": "0.3.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.10.0",