@open-agent-toolkit/cli 0.1.20 → 0.1.22
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/assets/agents/oat-reviewer.md +48 -10
- package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
- package/assets/docs/cli-utilities/configuration.md +19 -1
- package/assets/docs/contributing/documentation.md +6 -2
- package/assets/docs/docs-tooling/add-docs-to-a-repo.md +24 -14
- package/assets/docs/docs-tooling/commands.md +16 -14
- package/assets/docs/docs-tooling/workflows.md +22 -9
- package/assets/docs/reference/cli-reference.md +6 -2
- package/assets/docs/reference/docs-index-contract.md +28 -6
- package/assets/docs/reference/index.md +1 -1
- package/assets/docs/workflows/projects/implementation-execution.md +1 -1
- package/assets/docs/workflows/projects/reviews.md +41 -0
- package/assets/docs/workflows/skills/index.md +3 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/authoring-docs/SKILL.md +135 -0
- package/assets/skills/authoring-docs/references/categories.md +251 -0
- package/assets/skills/authoring-docs/references/information-architecture.md +156 -0
- package/assets/skills/authoring-docs/references/page-types.md +119 -0
- package/assets/skills/authoring-docs/references/principles.md +98 -0
- package/assets/skills/authoring-docs/references/review-rubric.md +169 -0
- package/assets/skills/authoring-docs/references/templates.md +549 -0
- package/assets/skills/authoring-docs/references/workflow.md +133 -0
- package/assets/skills/authoring-docs/references/writing-style.md +128 -0
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +43 -13
- package/assets/skills/oat-docs-analyze/SKILL.md +183 -28
- package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +101 -1
- package/assets/skills/oat-docs-analyze/references/directory-assessment-criteria.md +16 -0
- package/assets/skills/oat-docs-analyze/references/quality-checklist.md +83 -3
- package/assets/skills/oat-docs-authoring/SKILL.md +193 -0
- package/assets/skills/oat-docs-authoring/references/docs-root-resolution.md +64 -0
- package/assets/skills/oat-docs-authoring/references/lifecycle-boundaries.md +51 -0
- package/assets/skills/oat-docs-authoring/references/oat-fumadocs-contract.md +77 -0
- package/assets/skills/oat-docs-authoring/references/targeted-authoring-workflow.md +61 -0
- package/assets/skills/oat-docs-authoring/references/validation.md +61 -0
- package/assets/skills/oat-docs-bootstrap/SKILL.md +15 -11
- package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +5 -5
- package/assets/skills/oat-project-discover/SKILL.md +22 -4
- package/assets/skills/oat-project-import-plan/SKILL.md +38 -9
- package/assets/skills/oat-project-plan/SKILL.md +30 -7
- package/assets/skills/oat-project-plan-writing/SKILL.md +45 -2
- package/assets/skills/oat-project-progress/SKILL.md +9 -3
- package/assets/skills/oat-project-quick-start/SKILL.md +40 -8
- package/assets/skills/oat-project-review-provide/SKILL.md +24 -11
- package/assets/skills/oat-project-review-receive/SKILL.md +37 -17
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +36 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +2 -0
- package/dist/commands/review/index.d.ts +3 -0
- package/dist/commands/review/index.d.ts.map +1 -0
- package/dist/commands/review/index.js +7 -0
- package/dist/commands/review/latest.d.ts +23 -0
- package/dist/commands/review/latest.d.ts.map +1 -0
- package/dist/commands/review/latest.js +182 -0
- package/dist/config/oat-config.d.ts +5 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +12 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +4 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-quick-start
|
|
3
|
-
version: 2.1.
|
|
3
|
+
version: 2.1.6
|
|
4
4
|
description: Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.
|
|
5
5
|
argument-hint: '<project-name> ["project description"]'
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -57,13 +57,14 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
57
57
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
58
58
|
|
|
59
59
|
- Before multi-step work, print step indicators, e.g.:
|
|
60
|
-
- `[0/
|
|
61
|
-
- `[1/
|
|
62
|
-
- `[2/
|
|
63
|
-
- `[3/
|
|
64
|
-
- `[4/
|
|
65
|
-
- `[5/
|
|
66
|
-
- `[6/
|
|
60
|
+
- `[0/7] Checking inherited git state...`
|
|
61
|
+
- `[1/7] Scaffolding quick-mode project…`
|
|
62
|
+
- `[2/7] Exploring solution space + capturing discovery…`
|
|
63
|
+
- `[3/7] Decision point: design depth…`
|
|
64
|
+
- `[4/7] Generating execution plan…`
|
|
65
|
+
- `[5/7] Running plan artifact review…`
|
|
66
|
+
- `[6/7] Initializing implementation tracker…`
|
|
67
|
+
- `[7/7] Refreshing dashboard…`
|
|
67
68
|
- _(If lightweight design is chosen, insert design steps between 3 and 4)_
|
|
68
69
|
|
|
69
70
|
## Artifact Persistence (Required)
|
|
@@ -423,6 +424,14 @@ git add "$PROJECT_PATH/design.md" "$PROJECT_PATH/state.md"
|
|
|
423
424
|
git diff --cached --quiet || git commit -m "chore(oat): capture quick-start design for {project-name}"
|
|
424
425
|
```
|
|
425
426
|
|
|
427
|
+
Complete discovery through the CLI validation boundary before proceeding to plan generation:
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
oat project complete-discovery "$PROJECT_PATH" --ready-for oat-project-quick-start
|
|
431
|
+
git add "$PROJECT_PATH/discovery.md" "$PROJECT_PATH/state.md"
|
|
432
|
+
git diff --cached --quiet || git commit -m "chore(oat): complete quick-start discovery for {project-name}"
|
|
433
|
+
```
|
|
434
|
+
|
|
426
435
|
### Step 3: Generate Plan Directly
|
|
427
436
|
|
|
428
437
|
Create/update `"$PROJECT_PATH/plan.md"` from `.oat/templates/plan.md`.
|
|
@@ -513,6 +522,27 @@ must block before work starts if it still cannot resolve a ceiling.
|
|
|
513
522
|
Do not treat provider default effort as the OAT dispatch ceiling. Provider
|
|
514
523
|
default is informational for base/unpinned roles only.
|
|
515
524
|
|
|
525
|
+
### Step 3.6: Run Plan Artifact Review Loop
|
|
526
|
+
|
|
527
|
+
Invoke the shared `Auto Artifact-Review Loop` from `oat-project-plan-writing` with target `plan` before syncing project state or handing off to implementation.
|
|
528
|
+
|
|
529
|
+
Required payload:
|
|
530
|
+
|
|
531
|
+
- `target: plan`
|
|
532
|
+
- `type: artifact`
|
|
533
|
+
- `scope: plan`
|
|
534
|
+
- `artifact_path: "$PROJECT_PATH/plan.md"`
|
|
535
|
+
- `oat_output_mode: structured`
|
|
536
|
+
|
|
537
|
+
Apply the shared loop exactly:
|
|
538
|
+
|
|
539
|
+
- Resolve `workflow.autoArtifactReview.plan`; only an explicit `false` skips the loop.
|
|
540
|
+
- Resolve `oat_orchestration_retry_limit` from project state, defaulting to `2`.
|
|
541
|
+
- Dispatch `oat-reviewer` in structured mode using Tier 1 subagent when available and Tier 2 inline fallback otherwise.
|
|
542
|
+
- Apply Critical and Important artifact-local fixes when unambiguous; offer Medium and Minor fixes instead of silently applying them.
|
|
543
|
+
- Re-dispatch after rewrites until clean or the retry bound is exhausted.
|
|
544
|
+
- Update the `plan` artifact row in the `## Reviews` table to `passed` when clean. If residual findings remain, preserve the row and surface the residual findings before downstream handoff.
|
|
545
|
+
|
|
516
546
|
### Step 4: Sync Project State
|
|
517
547
|
|
|
518
548
|
Update `"$PROJECT_PATH/state.md"`:
|
|
@@ -527,6 +557,7 @@ Recommended quick-mode gate defaults:
|
|
|
527
557
|
|
|
528
558
|
- keep implementation phase checkpoints via `oat_plan_hill_phases`
|
|
529
559
|
- do not require discovery/spec/design artifact review rows to be passed before implementation
|
|
560
|
+
- record the `plan` artifact review row from Step 3.6 unless `workflow.autoArtifactReview.plan` was explicitly disabled
|
|
530
561
|
|
|
531
562
|
### Step 5: Initialize Implementation Tracking
|
|
532
563
|
|
|
@@ -577,5 +608,6 @@ Report:
|
|
|
577
608
|
- ✅ `state.md` marks `oat_workflow_mode: quick`.
|
|
578
609
|
- ✅ `discovery.md` contains synthesized or backfilled quick discovery decisions from the session context.
|
|
579
610
|
- ✅ `plan.md` is complete and executable (`oat_ready_for: oat-project-implement`).
|
|
611
|
+
- ✅ `plan.md` records the plan artifact review row unless `workflow.autoArtifactReview.plan` was explicitly disabled.
|
|
580
612
|
- ✅ `implementation.md` is initialized for resumable execution.
|
|
581
613
|
- ✅ Changed quick-start artifacts are committed before handoff or pause; `.oat/state.md` is refreshed locally when available.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-provide
|
|
3
|
-
version: 1.3.
|
|
4
|
-
description: Use when
|
|
5
|
-
disable-model-invocation:
|
|
3
|
+
version: 1.3.7
|
|
4
|
+
description: Use when the user explicitly asks to review an OAT project — e.g. "review project", "review the project", "run project review", or confirms a previously offered review. Do NOT auto-invoke on completed work alone. Resolves a project review scope and offers before running.
|
|
5
|
+
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
7
7
|
allowed-tools: Read, Glob, Grep, Bash(git:*), AskUserQuestion
|
|
8
8
|
---
|
|
@@ -19,10 +19,18 @@ Reviewers should distinguish implementation defects from artifact drift. If code
|
|
|
19
19
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
22
|
-
**Required:** Active project with at least one completed task.
|
|
22
|
+
**Required:** Active project or explicit user-provided project/review target that resolves to project state, with at least one completed task.
|
|
23
23
|
|
|
24
24
|
**Required:** Core project artifacts are already committed before the review begins. Review should not be the first step that notices an untracked project tree or pending bookkeeping-only artifact edits.
|
|
25
25
|
|
|
26
|
+
## Model Invocation Gate
|
|
27
|
+
|
|
28
|
+
This skill is model-invokable only for explicit review asks such as "review project" or "review the project", or when the user confirms a previously offered project-review step. Do NOT auto-invoke merely because a task, phase, or implementation appears complete.
|
|
29
|
+
|
|
30
|
+
Before acting, verify that there is an active OAT project or a user-provided review target that can be resolved to project state. If neither exists, do not run this skill; offer `oat-project-open` / `oat-project-quick-start` for project workflow setup, or `oat-review-provide` for a non-project ad-hoc review.
|
|
31
|
+
|
|
32
|
+
When the gate passes, summarize the inferred review type and scope, then ask before running the review.
|
|
33
|
+
|
|
26
34
|
## Mode Assertion
|
|
27
35
|
|
|
28
36
|
**OAT MODE: Review Request**
|
|
@@ -84,7 +92,7 @@ Run the `oat-project-review-provide` skill and it will:
|
|
|
84
92
|
|
|
85
93
|
## Process
|
|
86
94
|
|
|
87
|
-
### Step 0: Resolve
|
|
95
|
+
### Step 0: Resolve Project or Explicit Review Target
|
|
88
96
|
|
|
89
97
|
OAT stores active project context in `.oat/config.local.json` (`activeProject`, local-only).
|
|
90
98
|
|
|
@@ -96,21 +104,26 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
|
|
|
96
104
|
|
|
97
105
|
Validation rules:
|
|
98
106
|
|
|
99
|
-
- `PROJECT_PATH`
|
|
100
|
-
- `
|
|
107
|
+
- Prefer `PROJECT_PATH` from `activeProject` when it is set and points to an existing directory.
|
|
108
|
+
- If `activeProject` is missing or invalid, allow an explicit user-provided project/review target to resolve `PROJECT_PATH`:
|
|
109
|
+
- project path, e.g. `.oat/projects/shared/{project-name}`
|
|
110
|
+
- project name, resolved as `${PROJECTS_ROOT}/{project-name}`
|
|
111
|
+
- review target phrasing that includes a project name or project path
|
|
112
|
+
- A resolved `PROJECT_PATH` must point to an existing directory.
|
|
113
|
+
- `"$PROJECT_PATH/state.md"` must exist for mode-aware project review validation.
|
|
101
114
|
|
|
102
|
-
If
|
|
115
|
+
If neither an active project nor an explicit target resolves to a valid `PROJECT_PATH` with `state.md`, **stop and route**. Do not create or guess project pointers in this skill.
|
|
103
116
|
|
|
104
117
|
Tell user:
|
|
105
118
|
|
|
106
|
-
- This is a project-scoped skill and needs an initialized OAT project
|
|
107
|
-
- Without project state, review can still proceed via non-project skill: `oat-review-provide`.
|
|
119
|
+
- This is a project-scoped skill and needs an initialized OAT project, either from `activeProject` or from a project/review target the user explicitly provided.
|
|
120
|
+
- Without resolvable project state, review can still proceed via non-project skill: `oat-review-provide`.
|
|
108
121
|
- To continue with project workflow instead, run one of:
|
|
109
122
|
- `oat-project-open` (existing project)
|
|
110
123
|
- `oat-project-quick-start` (new quick project)
|
|
111
124
|
- `oat-project-import-plan` (external plan import)
|
|
112
125
|
|
|
113
|
-
If validation passes, derive `{project-name}` as basename of `PROJECT_PATH`.
|
|
126
|
+
If validation passes, derive `{project-name}` as basename of `PROJECT_PATH`. Summarize the resolved project/review target and ask before continuing to Step 1.
|
|
114
127
|
|
|
115
128
|
### Step 1: Parse Arguments or Ask
|
|
116
129
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-receive
|
|
3
|
-
version: 1.5.
|
|
4
|
-
description: Use when review findings
|
|
5
|
-
disable-model-invocation:
|
|
3
|
+
version: 1.5.2
|
|
4
|
+
description: Use when the user explicitly asks to receive review findings for an OAT project — e.g. "receive review", "process review", "process the project review", or confirms a previously offered review-receive step. Do NOT auto-invoke merely because a review file exists. Resolves the latest review and offers before acting.
|
|
5
|
+
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
7
|
-
allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
|
|
7
|
+
allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Glob, Grep, AskUserQuestion
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Receive Review
|
|
@@ -17,10 +17,18 @@ Turn review output into plan changes and a clear next action. This closes the fe
|
|
|
17
17
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
|
-
**Required:** An active review artifact
|
|
20
|
+
**Required:** An active project review artifact can be resolved, usually from the top level of `{PROJECT_PATH}/reviews/`. Conversational entry may first discover the latest project or ad-hoc review with `oat review latest`; ad-hoc reviews should be routed to `oat-review-receive`.
|
|
21
21
|
|
|
22
22
|
This skill assumes the reviewed project artifacts were already committed before the review ran. If you discover untracked core project artifacts here, treat that as earlier workflow drift and include them in the bookkeeping fix instead of leaving the project partially tracked.
|
|
23
23
|
|
|
24
|
+
## Model Invocation Gate
|
|
25
|
+
|
|
26
|
+
This skill is model-invokable only for explicit review-receive asks such as "receive review" or "process review", or when the user confirms a previously offered review-receive step. Do NOT auto-invoke just because a review artifact exists.
|
|
27
|
+
|
|
28
|
+
Before acting, resolve either an active project review or a latest ad-hoc review target. If the latest target is ad-hoc, offer to route to `oat-review-receive` instead of processing it with this project lifecycle skill. If no target is resolvable, offer `oat-project-review-provide` for project reviews or `oat-review-provide` for ad-hoc reviews.
|
|
29
|
+
|
|
30
|
+
When a project review target is resolvable, summarize the selected review path, scope, and generated date, then ask before updating artifacts.
|
|
31
|
+
|
|
24
32
|
## Mode Assertion
|
|
25
33
|
|
|
26
34
|
**OAT MODE: Receive Review**
|
|
@@ -76,27 +84,39 @@ PROJECTS_ROOT="${PROJECTS_ROOT%/}"
|
|
|
76
84
|
|
|
77
85
|
**If `PROJECT_PATH` is missing/invalid:**
|
|
78
86
|
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
```bash
|
|
83
|
-
mkdir -p .oat
|
|
84
|
-
oat config set activeProject "$PROJECT_PATH"
|
|
85
|
-
```
|
|
87
|
+
- Continue to Step 1 without a project path so `oat review latest` can still discover ad-hoc review targets.
|
|
88
|
+
- Do not guess or write `activeProject` during model-invoked target discovery.
|
|
89
|
+
- If the user explicitly names a project, set `PROJECT_PATH` to `${PROJECTS_ROOT}/{project-name}` and validate it before Step 1.
|
|
86
90
|
|
|
87
91
|
**If `PROJECT_PATH` is valid:** derive `{project-name}` as the directory name (basename of the path).
|
|
88
92
|
|
|
89
|
-
### Step 1: Locate
|
|
93
|
+
### Step 1: Locate Latest Review Artifact
|
|
90
94
|
|
|
91
95
|
```bash
|
|
92
|
-
|
|
96
|
+
if [ -n "${PROJECT_PATH:-}" ] && [ -d "$PROJECT_PATH" ]; then
|
|
97
|
+
oat review latest --project "$PROJECT_PATH" --json
|
|
98
|
+
else
|
|
99
|
+
oat review latest --json
|
|
100
|
+
fi
|
|
93
101
|
```
|
|
94
102
|
|
|
95
103
|
Selection rules:
|
|
96
104
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
105
|
+
- Use `oat review latest` as the first-choice resolver. It scans project reviews (`reviews/` and `reviews/archived/`) plus ad-hoc review locations and orders candidates by `oat_generated_at` frontmatter rather than filesystem mtime.
|
|
106
|
+
- Read the JSON result:
|
|
107
|
+
- `path: null` means no review target was found.
|
|
108
|
+
- `kind: "project"` means this skill can process the target when the path is an active top-level project review.
|
|
109
|
+
- `kind: "adhoc"` means route to `oat-review-receive` after offering that handoff to the user.
|
|
110
|
+
- Only process active project review artifacts in the top level of `"$PROJECT_PATH/reviews/"`.
|
|
111
|
+
- Treat archived project artifacts as history only; do not receive them automatically. If `oat review latest` returns an archived project review, tell the user no active project review is waiting and offer to run `oat-project-review-provide`.
|
|
112
|
+
|
|
113
|
+
Fallback when the CLI is unavailable:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
ls -t "$PROJECT_PATH/reviews/"*.md 2>/dev/null | head -10
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Use this fallback only for active project reviews. It cannot discover ad-hoc reviews and its filesystem ordering is less reliable than `oat_generated_at`, so state that limitation if fallback is used.
|
|
100
120
|
|
|
101
121
|
**If no active review files:** Block and ask user to run the `oat-project-review-provide` skill first.
|
|
102
122
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIhF,O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C,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAkvCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}
|
|
@@ -40,6 +40,8 @@ const KEY_ORDER = [
|
|
|
40
40
|
'workflow.reviewExecutionModel',
|
|
41
41
|
'workflow.autoReviewAtHillCheckpoints',
|
|
42
42
|
'workflow.autoNarrowReReviewScope',
|
|
43
|
+
'workflow.autoArtifactReview.plan',
|
|
44
|
+
'workflow.autoArtifactReview.analysis',
|
|
43
45
|
'workflow.designMode',
|
|
44
46
|
'workflow.dispatchCeiling.preset',
|
|
45
47
|
'workflow.dispatchCeiling.providers.codex',
|
|
@@ -410,6 +412,28 @@ const CONFIG_CATALOG = [
|
|
|
410
412
|
owningCommand: 'oat config set workflow.autoNarrowReReviewScope <true|false>',
|
|
411
413
|
description: 'Auto-narrow re-review scope to fix-task commits in oat-project-review-provide when re-reviewing completed fix tasks. Has no effect on initial reviews (there is nothing to narrow to). When unset, the skill prompts. Resolution: env > local > shared > user > default.',
|
|
412
414
|
},
|
|
415
|
+
{
|
|
416
|
+
key: 'workflow.autoArtifactReview.plan',
|
|
417
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
418
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
419
|
+
scope: 'workflow',
|
|
420
|
+
type: 'boolean',
|
|
421
|
+
defaultValue: 'true',
|
|
422
|
+
mutability: 'read/write',
|
|
423
|
+
owningCommand: 'oat config set workflow.autoArtifactReview.plan <true|false>',
|
|
424
|
+
description: 'Automatically run the bounded artifact-review loop for generated plan artifacts before implementation handoff. Resolution: local > shared > user > default.',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
key: 'workflow.autoArtifactReview.analysis',
|
|
428
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
429
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
430
|
+
scope: 'workflow',
|
|
431
|
+
type: 'boolean',
|
|
432
|
+
defaultValue: 'true',
|
|
433
|
+
mutability: 'read/write',
|
|
434
|
+
owningCommand: 'oat config set workflow.autoArtifactReview.analysis <true|false>',
|
|
435
|
+
description: 'Automatically run the bounded accuracy-review loop for generated analysis artifacts before apply workflows consume them. Resolution: local > shared > user > default.',
|
|
436
|
+
},
|
|
413
437
|
{
|
|
414
438
|
key: 'workflow.designMode',
|
|
415
439
|
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
@@ -530,6 +554,8 @@ const WORKFLOW_BOOLEAN_KEYS = new Set([
|
|
|
530
554
|
'workflow.createPrOnComplete',
|
|
531
555
|
'workflow.autoReviewAtHillCheckpoints',
|
|
532
556
|
'workflow.autoNarrowReReviewScope',
|
|
557
|
+
'workflow.autoArtifactReview.plan',
|
|
558
|
+
'workflow.autoArtifactReview.analysis',
|
|
533
559
|
]);
|
|
534
560
|
function isWorkflowKey(key) {
|
|
535
561
|
return key.startsWith('workflow.');
|
|
@@ -638,6 +664,16 @@ function applyWorkflowValue(workflow, key, value) {
|
|
|
638
664
|
},
|
|
639
665
|
};
|
|
640
666
|
}
|
|
667
|
+
if (subKey.startsWith('autoArtifactReview.')) {
|
|
668
|
+
const reviewKey = subKey.slice('autoArtifactReview.'.length);
|
|
669
|
+
return {
|
|
670
|
+
...workflow,
|
|
671
|
+
autoArtifactReview: {
|
|
672
|
+
...workflow.autoArtifactReview,
|
|
673
|
+
[reviewKey]: value,
|
|
674
|
+
},
|
|
675
|
+
};
|
|
676
|
+
}
|
|
641
677
|
return {
|
|
642
678
|
...workflow,
|
|
643
679
|
[subKey]: value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBvD"}
|
package/dist/commands/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { createProjectCommand } from './project/index.js';
|
|
|
13
13
|
import { createProvidersCommand } from './providers/index.js';
|
|
14
14
|
import { createRemoveCommand } from './remove/index.js';
|
|
15
15
|
import { createRepoCommand } from './repo/index.js';
|
|
16
|
+
import { createReviewCommand } from './review/index.js';
|
|
16
17
|
import { createStateCommand } from './state/index.js';
|
|
17
18
|
import { createStatusCommand } from './status/index.js';
|
|
18
19
|
import { createSyncCommand } from './sync/index.js';
|
|
@@ -27,6 +28,7 @@ export function registerCommands(program) {
|
|
|
27
28
|
program.addCommand(createProvidersCommand());
|
|
28
29
|
program.addCommand(createRemoveCommand());
|
|
29
30
|
program.addCommand(createRepoCommand());
|
|
31
|
+
program.addCommand(createReviewCommand());
|
|
30
32
|
program.addCommand(createDoctorCommand());
|
|
31
33
|
program.addCommand(createCleanupCommand());
|
|
32
34
|
program.addCommand(createDocsCommand());
|
|
@@ -17,7 +17,7 @@ export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "
|
|
|
17
17
|
export declare const WORKFLOW_SCRIPTS: readonly ["generate-oat-state.sh", "generate-thin-index.sh", "resolve-tracking.sh"];
|
|
18
18
|
export declare const IDEA_SKILLS: readonly ["oat-idea-new", "oat-idea-ideate", "oat-idea-summarize", "oat-idea-scratchpad"];
|
|
19
19
|
export declare const CORE_SKILLS: readonly ["oat-docs", "oat-doctor"];
|
|
20
|
-
export declare const DOCS_SKILLS: readonly ["oat-agent-instructions-analyze", "oat-agent-instructions-apply", "oat-docs-analyze", "oat-docs-apply", "oat-docs-bootstrap"];
|
|
20
|
+
export declare const DOCS_SKILLS: readonly ["authoring-docs", "oat-agent-instructions-analyze", "oat-agent-instructions-apply", "oat-docs-analyze", "oat-docs-apply", "oat-docs-authoring", "oat-docs-bootstrap"];
|
|
21
21
|
export declare const DOCS_SCRIPTS: readonly ["resolve-tracking.sh"];
|
|
22
22
|
export declare const UTILITY_SKILLS: readonly ["create-agnostic-skill", "oat-repo-maintainability-review", "oat-review-provide", "oat-review-provide-remote", "oat-review-receive", "oat-review-receive-remote"];
|
|
23
23
|
export declare const PROJECT_MANAGEMENT_SKILLS: readonly ["oat-pjm-add-backlog-item", "oat-pjm-update-repo-reference", "oat-pjm-review-backlog"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAKtD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAID,eAAO,MAAM,eAAe,6xBAgClB,CAAC;AAEX,eAAO,MAAM,eAAe,oFAIlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,6GAQrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAKtD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAID,eAAO,MAAM,eAAe,6xBAgClB,CAAC;AAEX,eAAO,MAAM,eAAe,oFAIlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,6GAQrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,iLAQd,CAAC;AAEX,eAAO,MAAM,YAAY,kCAAmC,CAAC;AAI7D,eAAO,MAAM,cAAc,6KAOjB,CAAC;AAIX,eAAO,MAAM,yBAAyB,kGAI5B,CAAC;AAEX,eAAO,MAAM,4BAA4B,sFAK/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,aAAc,CAAC;AAItD,eAAO,MAAM,iBAAiB,6BAA8B,CAAC;AAI7D,eAAO,MAAM,eAAe,2EAMlB,CAAC;AAEX,eAAO,MAAM,eAAe,qCAAsC,CAAC"}
|
|
@@ -78,10 +78,12 @@ export const IDEA_SKILLS = [
|
|
|
78
78
|
export const CORE_SKILLS = ['oat-docs', 'oat-doctor'];
|
|
79
79
|
// ── Docs pack ─────────────────────────────────────────────────────
|
|
80
80
|
export const DOCS_SKILLS = [
|
|
81
|
+
'authoring-docs',
|
|
81
82
|
'oat-agent-instructions-analyze',
|
|
82
83
|
'oat-agent-instructions-apply',
|
|
83
84
|
'oat-docs-analyze',
|
|
84
85
|
'oat-docs-apply',
|
|
86
|
+
'oat-docs-authoring',
|
|
85
87
|
'oat-docs-bootstrap',
|
|
86
88
|
];
|
|
87
89
|
export const DOCS_SCRIPTS = ['resolve-tracking.sh'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,mBAAmB,IAAI,OAAO,CAI7C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
|
|
2
|
+
import { type OatLocalConfig } from '../../config/oat-config.js';
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
export type ReviewLatestKind = 'project' | 'adhoc';
|
|
5
|
+
export interface LatestReview {
|
|
6
|
+
path: string;
|
|
7
|
+
scope: string;
|
|
8
|
+
generatedAt: string;
|
|
9
|
+
kind: ReviewLatestKind;
|
|
10
|
+
}
|
|
11
|
+
export interface FindLatestReviewOptions {
|
|
12
|
+
repoRoot: string;
|
|
13
|
+
projectPath?: string | null;
|
|
14
|
+
}
|
|
15
|
+
interface ReviewLatestDependencies {
|
|
16
|
+
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
17
|
+
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
18
|
+
readOatLocalConfig: (repoRoot: string) => Promise<OatLocalConfig>;
|
|
19
|
+
}
|
|
20
|
+
export declare function findLatestReview(options: FindLatestReviewOptions): Promise<LatestReview | null>;
|
|
21
|
+
export declare function createReviewLatestCommand(overrides?: Partial<ReviewLatestDependencies>): Command;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=latest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latest.d.ts","sourceRoot":"","sources":["../../../src/commands/review/latest.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAQD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,UAAU,wBAAwB;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACnE;AA6HD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmE9B;AA+CD,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAChD,OAAO,CAkBT"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
+
import { isAbsolute, join, relative } from 'node:path';
|
|
3
|
+
import { buildCommandContext, } from '../../app/command-context.js';
|
|
4
|
+
import { getFrontmatterBlock, getFrontmatterField, } from '../shared/frontmatter.js';
|
|
5
|
+
import { readGlobalOptions } from '../shared/shared.utils.js';
|
|
6
|
+
import { readOatLocalConfig } from '../../config/oat-config.js';
|
|
7
|
+
import { normalizeToPosixPath, resolveProjectRoot } from '../../fs/paths.js';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
const DEFAULT_DEPENDENCIES = {
|
|
10
|
+
buildCommandContext,
|
|
11
|
+
resolveProjectRoot,
|
|
12
|
+
readOatLocalConfig,
|
|
13
|
+
};
|
|
14
|
+
const EMPTY_RESULT = {
|
|
15
|
+
path: null,
|
|
16
|
+
scope: null,
|
|
17
|
+
generatedAt: null,
|
|
18
|
+
kind: null,
|
|
19
|
+
};
|
|
20
|
+
function normalizeRepoRelativePath(repoRoot, pathValue) {
|
|
21
|
+
const rawPath = pathValue.trim();
|
|
22
|
+
if (!rawPath) {
|
|
23
|
+
return rawPath;
|
|
24
|
+
}
|
|
25
|
+
if (!isAbsolute(rawPath)) {
|
|
26
|
+
return normalizeToPosixPath(rawPath).replace(/^\.\//, '');
|
|
27
|
+
}
|
|
28
|
+
return normalizeToPosixPath(relative(repoRoot, rawPath));
|
|
29
|
+
}
|
|
30
|
+
function reviewLifecycleRank(scope) {
|
|
31
|
+
const normalizedScope = scope.trim().toLowerCase();
|
|
32
|
+
if (normalizedScope === 'final') {
|
|
33
|
+
return Number.MAX_SAFE_INTEGER;
|
|
34
|
+
}
|
|
35
|
+
const phases = [...normalizedScope.matchAll(/p(\d+)/g)].map((match) => Number.parseInt(match[1] ?? '0', 10));
|
|
36
|
+
if (phases.length === 0) {
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
const tasks = [...normalizedScope.matchAll(/(?:^|[-_])t(\d+)/g)].map((match) => Number.parseInt(match[1] ?? '0', 10));
|
|
40
|
+
const latestPhase = Math.max(...phases);
|
|
41
|
+
const latestTask = tasks.length > 0 ? Math.max(...tasks) : 9999;
|
|
42
|
+
return latestPhase * 10_000 + latestTask;
|
|
43
|
+
}
|
|
44
|
+
async function listMarkdownFiles(repoRoot, relativeDir) {
|
|
45
|
+
try {
|
|
46
|
+
const entries = await readdir(join(repoRoot, relativeDir), {
|
|
47
|
+
withFileTypes: true,
|
|
48
|
+
});
|
|
49
|
+
return entries
|
|
50
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith('.md'))
|
|
51
|
+
.map((entry) => normalizeToPosixPath(join(relativeDir, entry.name)));
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (typeof error === 'object' &&
|
|
55
|
+
error !== null &&
|
|
56
|
+
'code' in error &&
|
|
57
|
+
error.code === 'ENOENT') {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function readReviewCandidate(repoRoot, relativePath, kind, priority) {
|
|
64
|
+
const content = await readFile(join(repoRoot, relativePath), 'utf8');
|
|
65
|
+
const frontmatter = getFrontmatterBlock(content);
|
|
66
|
+
if (!frontmatter) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const generatedAt = getFrontmatterField(frontmatter, 'oat_generated_at');
|
|
70
|
+
if (!generatedAt) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const generatedTime = Date.parse(generatedAt);
|
|
74
|
+
if (Number.isNaN(generatedTime)) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const scope = getFrontmatterField(frontmatter, 'oat_review_scope') ?? '';
|
|
78
|
+
return {
|
|
79
|
+
path: relativePath,
|
|
80
|
+
scope,
|
|
81
|
+
generatedAt,
|
|
82
|
+
kind,
|
|
83
|
+
generatedTime,
|
|
84
|
+
lifecycleRank: reviewLifecycleRank(scope),
|
|
85
|
+
priority,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function sortReviewCandidates(a, b) {
|
|
89
|
+
if (a.generatedTime !== b.generatedTime) {
|
|
90
|
+
return b.generatedTime - a.generatedTime;
|
|
91
|
+
}
|
|
92
|
+
if (a.priority !== b.priority) {
|
|
93
|
+
return a.priority - b.priority;
|
|
94
|
+
}
|
|
95
|
+
if (a.lifecycleRank !== b.lifecycleRank) {
|
|
96
|
+
return b.lifecycleRank - a.lifecycleRank;
|
|
97
|
+
}
|
|
98
|
+
return a.path.localeCompare(b.path);
|
|
99
|
+
}
|
|
100
|
+
export async function findLatestReview(options) {
|
|
101
|
+
const projectPath = options.projectPath
|
|
102
|
+
? normalizeRepoRelativePath(options.repoRoot, options.projectPath)
|
|
103
|
+
: null;
|
|
104
|
+
const scanTargets = [];
|
|
105
|
+
if (projectPath) {
|
|
106
|
+
scanTargets.push({
|
|
107
|
+
dir: `${projectPath}/reviews`,
|
|
108
|
+
kind: 'project',
|
|
109
|
+
priority: 0,
|
|
110
|
+
}, {
|
|
111
|
+
dir: `${projectPath}/reviews/archived`,
|
|
112
|
+
kind: 'project',
|
|
113
|
+
priority: 1,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
scanTargets.push({ dir: '.oat/repo/reviews', kind: 'adhoc', priority: 2 }, {
|
|
117
|
+
dir: '.oat/projects/local/orphan-reviews',
|
|
118
|
+
kind: 'adhoc',
|
|
119
|
+
priority: 3,
|
|
120
|
+
});
|
|
121
|
+
const candidates = (await Promise.all(scanTargets.map(async (target) => {
|
|
122
|
+
const files = await listMarkdownFiles(options.repoRoot, target.dir);
|
|
123
|
+
return Promise.all(files.map((file) => readReviewCandidate(options.repoRoot, file, target.kind, target.priority)));
|
|
124
|
+
})))
|
|
125
|
+
.flat()
|
|
126
|
+
.filter((candidate) => candidate !== null)
|
|
127
|
+
.sort(sortReviewCandidates);
|
|
128
|
+
const latest = candidates[0];
|
|
129
|
+
if (!latest) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
path: latest.path,
|
|
134
|
+
scope: latest.scope,
|
|
135
|
+
generatedAt: latest.generatedAt,
|
|
136
|
+
kind: latest.kind,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
async function resolveProjectPath(repoRoot, explicitProject, dependencies) {
|
|
140
|
+
if (explicitProject) {
|
|
141
|
+
return explicitProject;
|
|
142
|
+
}
|
|
143
|
+
const localConfig = await dependencies.readOatLocalConfig(repoRoot);
|
|
144
|
+
return localConfig.activeProject ?? null;
|
|
145
|
+
}
|
|
146
|
+
async function runReviewLatest(context, options, dependencies) {
|
|
147
|
+
try {
|
|
148
|
+
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
149
|
+
const projectPath = await resolveProjectPath(repoRoot, options.project, dependencies);
|
|
150
|
+
const result = await findLatestReview({ repoRoot, projectPath });
|
|
151
|
+
if (context.json) {
|
|
152
|
+
context.logger.json(result ?? EMPTY_RESULT);
|
|
153
|
+
}
|
|
154
|
+
else if (result) {
|
|
155
|
+
context.logger.info(result.path);
|
|
156
|
+
}
|
|
157
|
+
process.exitCode = 0;
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
161
|
+
if (context.json) {
|
|
162
|
+
context.logger.json({ status: 'error', message });
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
context.logger.error(message);
|
|
166
|
+
}
|
|
167
|
+
process.exitCode = 1;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export function createReviewLatestCommand(overrides = {}) {
|
|
171
|
+
const dependencies = {
|
|
172
|
+
...DEFAULT_DEPENDENCIES,
|
|
173
|
+
...overrides,
|
|
174
|
+
};
|
|
175
|
+
return new Command('latest')
|
|
176
|
+
.description('Find the most recent OAT review artifact')
|
|
177
|
+
.option('--project <path>', 'Project path to scan in addition to ad-hoc review locations')
|
|
178
|
+
.action(async (options, command) => {
|
|
179
|
+
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
180
|
+
await runReviewLatest(context, options, dependencies);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
@@ -30,6 +30,10 @@ export interface WorkflowDispatchCeiling {
|
|
|
30
30
|
claude?: WorkflowClaudeDispatchCeiling;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
export interface WorkflowAutoArtifactReview {
|
|
34
|
+
plan?: boolean;
|
|
35
|
+
analysis?: boolean;
|
|
36
|
+
}
|
|
33
37
|
export interface OatWorkflowConfig {
|
|
34
38
|
hillCheckpointDefault?: WorkflowHillCheckpointDefault;
|
|
35
39
|
archiveOnComplete?: boolean;
|
|
@@ -38,6 +42,7 @@ export interface OatWorkflowConfig {
|
|
|
38
42
|
reviewExecutionModel?: WorkflowReviewExecutionModel;
|
|
39
43
|
autoReviewAtHillCheckpoints?: boolean;
|
|
40
44
|
autoNarrowReReviewScope?: boolean;
|
|
45
|
+
autoArtifactReview?: WorkflowAutoArtifactReview;
|
|
41
46
|
designMode?: WorkflowDesignMode;
|
|
42
47
|
dispatchCeiling?: WorkflowDispatchCeiling;
|
|
43
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CAC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