@open-agent-toolkit/cli 0.1.6 → 0.1.8
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-phase-implementer.md +14 -3
- package/assets/agents/oat-reviewer.md +19 -3
- package/assets/docs/cli-utilities/configuration.md +33 -1
- package/assets/docs/provider-sync/config.md +1 -0
- package/assets/docs/reference/oat-directory-structure.md +2 -0
- package/assets/docs/workflows/projects/implementation-execution.md +60 -12
- package/assets/docs/workflows/projects/lifecycle.md +4 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +193 -94
- package/assets/skills/oat-project-plan/SKILL.md +57 -1
- package/assets/skills/oat-project-plan-writing/SKILL.md +6 -2
- package/assets/skills/oat-project-quick-start/SKILL.md +57 -1
- package/assets/skills/oat-project-review-provide/SKILL.md +9 -1
- package/assets/skills/oat-project-review-receive/SKILL.md +21 -1
- package/assets/skills/oat-project-summary/SKILL.md +15 -13
- package/assets/templates/implementation.md +5 -5
- package/assets/templates/plan.md +1 -1
- package/assets/templates/state.md +4 -0
- package/assets/templates/summary.md +2 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +36 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts +16 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -0
- package/dist/commands/project/dispatch-ceiling/index.js +288 -0
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/config/oat-config.d.ts +7 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +23 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +4 -0
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +16 -8
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-receive
|
|
3
|
-
version: 1.4.
|
|
3
|
+
version: 1.4.2
|
|
4
4
|
description: Use when review findings from oat-project-review-provide need closure. Converts review artifacts into actionable plan tasks.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -52,6 +52,7 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
52
52
|
- No re-reviewing
|
|
53
53
|
- For `artifact` reviews: no converting findings into plan tasks
|
|
54
54
|
- For `artifact` reviews: no deferring findings by default
|
|
55
|
+
- No treating accepted design/code drift as a no-op; accepted drift must be converted to an artifact-alignment task or explicitly deferred, with an `implementation.md` note
|
|
55
56
|
|
|
56
57
|
**ALLOWED Activities:**
|
|
57
58
|
|
|
@@ -167,6 +168,10 @@ For each finding, build a structured register entry:
|
|
|
167
168
|
- Agent analysis (agree/disagree + why)
|
|
168
169
|
- Recommendation (convert to task now vs defer with rationale)
|
|
169
170
|
- Task Scope (`Large` | `Moderate` | `Minor` | `Negligible`)
|
|
171
|
+
- Drift disposition, when applicable:
|
|
172
|
+
- `code_fix_required` — implementation should change
|
|
173
|
+
- `artifact_alignment_required` — shipped implementation is defensible; design/docs/plan should be aligned
|
|
174
|
+
- `explicit_deferral` — drift is accepted for now with a concrete rationale and follow-up trigger
|
|
170
175
|
- For `artifact` reviews, use dispositions:
|
|
171
176
|
- `resolve_in_artifact`
|
|
172
177
|
- `rejected_with_rationale` (invalid/not applicable)
|
|
@@ -386,6 +391,10 @@ Add a note to implementation.md:
|
|
|
386
391
|
|
|
387
392
|
**New tasks added:** {task_ids}
|
|
388
393
|
|
|
394
|
+
**Design drift / artifact alignment notes:**
|
|
395
|
+
|
|
396
|
+
- {finding_id}: {review found stale design/spec/plan relative to shipped implementation; why the implementation is accepted; source of truth; artifact-alignment task ID or explicit deferral}
|
|
397
|
+
|
|
389
398
|
**Next:** Execute fix tasks via the `oat-project-implement` skill.
|
|
390
399
|
|
|
391
400
|
After the fix tasks are complete:
|
|
@@ -399,6 +408,10 @@ After the fix tasks are complete:
|
|
|
399
408
|
- If `{PROJECT_PATH}/implementation.md` exists, ensure it will resume correctly after this skill:
|
|
400
409
|
- If `oat_current_task_id` is `null` (or points at already-completed work), set it to the **first newly-added review-fix task ID** (or the next incomplete task in plan order).
|
|
401
410
|
- Update the Progress Overview table totals (tasks + completed) if they are present and depend on task counts.
|
|
411
|
+
- If any finding is resolved by accepting the shipped implementation and aligning stale artifacts instead of changing code, add an explicit review note under the current "Review Received" section and update `## Deviations from Plan / Design` when that table exists.
|
|
412
|
+
- For existing project artifacts, treat any `## Deviations...` heading as the deviations section; migrate to the preferred `## Deviations from Plan / Design` heading and table shape when already touching the section.
|
|
413
|
+
- The note must say the review found design/spec/plan drift, why the shipped implementation is accepted, which source is now authoritative, and which artifact-alignment task will update the stale artifact.
|
|
414
|
+
- If the artifact update is intentionally deferred, record the deferral rationale and follow-up trigger in `implementation.md`.
|
|
402
415
|
- Update `{PROJECT_PATH}/state.md` frontmatter so routing/UI is accurate:
|
|
403
416
|
- `oat_phase: implement`
|
|
404
417
|
- `oat_phase_status: in_progress`
|
|
@@ -503,6 +516,13 @@ If any Medium is proposed for deferral:
|
|
|
503
516
|
- If user declines deferral, convert that Medium to a fix task now.
|
|
504
517
|
- If user approves deferral, record rationale in `implementation.md` under "Deferred Findings (Medium)".
|
|
505
518
|
|
|
519
|
+
Design drift handling applies before Medium/Minor convenience deferrals:
|
|
520
|
+
|
|
521
|
+
- If a review finding reveals that the design artifact is stale relative to a defensible implementation, do not treat this as a no-op.
|
|
522
|
+
- Either convert the finding to an artifact-alignment task or record an explicit deferral.
|
|
523
|
+
- In both cases, add an `implementation.md` review note so final summary generation can preserve the design delta.
|
|
524
|
+
- The note must include what drift was found, why the implementation is accepted, whether implementation or artifact is source of truth, and the artifact task or deferral that will align the lifecycle record.
|
|
525
|
+
|
|
506
526
|
Minor findings handling is scope-aware:
|
|
507
527
|
|
|
508
528
|
- If `scope != final`:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-summary
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.2
|
|
4
4
|
description: Use when the user requests or confirms summarizing an active OAT project — e.g. "summarize the project", "generate the summary", "run oat-project-summary", or confirms a previously offered summary run. Do NOT auto-invoke when implementation completes. Generates summary.md from project artifacts as institutional memory.
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
@@ -149,6 +149,8 @@ For each section, synthesize content from the relevant artifacts. Apply these ru
|
|
|
149
149
|
|
|
150
150
|
**Grounding rule:** Prefer implementation.md outcomes over design.md plans. If the implementation diverged from the design, reflect what actually happened.
|
|
151
151
|
|
|
152
|
+
**Design delta rule:** Populate `Design Deltas` from both direct implementation deviations and review-received design drift decisions recorded in `implementation.md`. A review finding may decide that shipped implementation is defensible and the artifact is stale; when `implementation.md` records that acceptance, carry it forward as a design delta with the rationale and follow-up artifact disposition.
|
|
153
|
+
|
|
152
154
|
**Section omission rule:** If a section would have no meaningful content, omit it entirely (remove the heading). Do not leave empty sections or "N/A" placeholders.
|
|
153
155
|
|
|
154
156
|
**Conciseness constraint (NFR3):** Target under 200 lines total. If a draft exceeds this, trim narrative sections (What Was Implemented, Notable Challenges) to essential points. Revision History entries: 2-3 sentences per round max.
|
|
@@ -157,18 +159,18 @@ For each section, synthesize content from the relevant artifacts. Apply these ru
|
|
|
157
159
|
|
|
158
160
|
**Section sources:**
|
|
159
161
|
|
|
160
|
-
| Section | Primary Sources
|
|
161
|
-
| -------------------- |
|
|
162
|
-
| Overview | discovery.md initial request, spec.md problem statement
|
|
163
|
-
| What Was Implemented | implementation.md task outcomes, plan.md phase structure
|
|
164
|
-
| Key Decisions | design.md decisions, implementation.md notes/decisions
|
|
165
|
-
| Design Deltas | implementation.md deviations table
|
|
166
|
-
| Notable Challenges | implementation.md issues/blockers in task notes
|
|
167
|
-
| Tradeoffs Made | implementation.md decisions, design.md tradeoff sections
|
|
168
|
-
| Integration Notes | implementation.md notes about cross-cutting concerns
|
|
169
|
-
| Revision History | plan.md p-revN phases, implementation.md revision notes
|
|
170
|
-
| Follow-up Items | implementation.md deferred findings, plan.md deferred items
|
|
171
|
-
| Associated Issues | state.md `associated_issues` field
|
|
162
|
+
| Section | Primary Sources |
|
|
163
|
+
| -------------------- | ---------------------------------------------------------------------- |
|
|
164
|
+
| Overview | discovery.md initial request, spec.md problem statement |
|
|
165
|
+
| What Was Implemented | implementation.md task outcomes, plan.md phase structure |
|
|
166
|
+
| Key Decisions | design.md decisions, implementation.md notes/decisions |
|
|
167
|
+
| Design Deltas | implementation.md deviations table; review-received design drift notes |
|
|
168
|
+
| Notable Challenges | implementation.md issues/blockers in task notes |
|
|
169
|
+
| Tradeoffs Made | implementation.md decisions, design.md tradeoff sections |
|
|
170
|
+
| Integration Notes | implementation.md notes about cross-cutting concerns |
|
|
171
|
+
| Revision History | plan.md p-revN phases, implementation.md revision notes |
|
|
172
|
+
| Follow-up Items | implementation.md deferred findings, plan.md deferred items |
|
|
173
|
+
| Associated Issues | state.md `associated_issues` field |
|
|
172
174
|
|
|
173
175
|
**For incremental updates (re-run):**
|
|
174
176
|
|
|
@@ -165,13 +165,13 @@ Chronological log of implementation progress.
|
|
|
165
165
|
|
|
166
166
|
---
|
|
167
167
|
|
|
168
|
-
## Deviations from Plan
|
|
168
|
+
## Deviations from Plan / Design
|
|
169
169
|
|
|
170
|
-
Document any deviations from the original plan.
|
|
170
|
+
Document any intentional deviations from the original plan, spec, or design. Include accepted review findings where the shipped implementation is source of truth and a lifecycle artifact needs alignment.
|
|
171
171
|
|
|
172
|
-
| Task | Planned | Actual | Reason |
|
|
173
|
-
|
|
|
174
|
-
| -
|
|
172
|
+
| Task / Review | Source Artifact | Planned / Documented | Actual / Accepted | Reason | Source of Truth | Follow-up |
|
|
173
|
+
| ------------- | --------------- | -------------------- | ----------------- | ------ | --------------- | --------- |
|
|
174
|
+
| - | - | - | - | - | - | - |
|
|
175
175
|
|
|
176
176
|
## Test Results
|
|
177
177
|
|
package/assets/templates/plan.md
CHANGED
|
@@ -61,7 +61,7 @@ Blank or `auto` means there is no explicit constraint for that provider. Do not
|
|
|
61
61
|
| ----- | ------------------------- | ------------------------------ | ----------------------------- |
|
|
62
62
|
| pNN | haiku\|sonnet\|opus\|auto | low\|medium\|high\|xhigh\|auto | why this constraint is needed |
|
|
63
63
|
|
|
64
|
-
Codex
|
|
64
|
+
Codex effort values are preferred controls. `oat-project-implement` caps them against the resolved OAT dispatch ceiling and maps selected efforts to pinned implementer variants. Codex provider default effort is informational for base/unpinned roles and is not an OAT ceiling.
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
@@ -14,6 +14,10 @@ oat_parallel_execution: false
|
|
|
14
14
|
oat_phase: { OAT_PHASE } # Current phase: discovery | spec | design | plan | implement | decomposition
|
|
15
15
|
oat_phase_status: in_progress # Status: in_progress | complete | pr_open
|
|
16
16
|
# oat_orchestration_retry_limit: 2 # optional; override fix-loop retry limit (range 0-5)
|
|
17
|
+
# oat_dispatch_ceiling: # optional project override for provider-aware dispatch ceilings
|
|
18
|
+
# provider: codex # codex | claude
|
|
19
|
+
# value: high # codex: low|medium|high|xhigh; claude: haiku|sonnet|opus
|
|
20
|
+
# source: project-state
|
|
17
21
|
oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import
|
|
18
22
|
oat_workflow_origin: native # native | imported
|
|
19
23
|
oat_docs_updated: null # null | skipped | complete — documentation sync status
|
|
@@ -37,7 +37,8 @@ where decisions were made or changed during implementation.}
|
|
|
37
37
|
<!-- Omit this section if there were no deviations from the original design. -->
|
|
38
38
|
|
|
39
39
|
{Where the final result diverged from the original design and why.
|
|
40
|
-
Pull from implementation.md deviations table.
|
|
40
|
+
Pull from implementation.md deviations table and review-received design drift notes.
|
|
41
|
+
Include accepted cases where shipped implementation became source of truth and a stale lifecycle artifact needs alignment or was explicitly deferred.}
|
|
41
42
|
|
|
42
43
|
## Notable Challenges
|
|
43
44
|
|
|
@@ -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;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAOhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
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;AAGhF,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAOhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2DpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,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;AA2pCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}
|
|
@@ -40,6 +40,8 @@ const KEY_ORDER = [
|
|
|
40
40
|
'workflow.autoReviewAtHillCheckpoints',
|
|
41
41
|
'workflow.autoNarrowReReviewScope',
|
|
42
42
|
'workflow.designMode',
|
|
43
|
+
'workflow.dispatchCeiling.codex',
|
|
44
|
+
'workflow.dispatchCeiling.claude',
|
|
43
45
|
'worktrees.root',
|
|
44
46
|
];
|
|
45
47
|
const CONFIG_CATALOG = [
|
|
@@ -417,6 +419,28 @@ const CONFIG_CATALOG = [
|
|
|
417
419
|
owningCommand: 'oat config set workflow.designMode <value>',
|
|
418
420
|
description: 'Persisted preference for oat-project-design: "collaborative" runs every section section-by-section, "selective" drafts routine sections silently and live-reviews high-risk sections, and "draft" drafts the full design up front for holistic review. Quick-start lightweight design supports collaborative/draft only and treats selective as collaborative when encountered. When unset, the skill prompts. Runtime signals (OAT_NON_INTERACTIVE=1, no TTY) always outrank this preference. Resolution: arg > env > non-interactive context > local > shared > user > default.',
|
|
419
421
|
},
|
|
422
|
+
{
|
|
423
|
+
key: 'workflow.dispatchCeiling.codex',
|
|
424
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
425
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
426
|
+
scope: 'workflow',
|
|
427
|
+
type: 'low | medium | high | xhigh',
|
|
428
|
+
defaultValue: 'unset',
|
|
429
|
+
mutability: 'read/write',
|
|
430
|
+
owningCommand: 'oat config set workflow.dispatchCeiling.codex <value>',
|
|
431
|
+
description: 'Maximum Codex reasoning effort OAT may select for deterministic implementation and review subagent variants. Provider defaults remain informational for base/unpinned roles and are not treated as this ceiling. Resolution: local > shared > user > default.',
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
key: 'workflow.dispatchCeiling.claude',
|
|
435
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
436
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
437
|
+
scope: 'workflow',
|
|
438
|
+
type: 'haiku | sonnet | opus',
|
|
439
|
+
defaultValue: 'unset',
|
|
440
|
+
mutability: 'read/write',
|
|
441
|
+
owningCommand: 'oat config set workflow.dispatchCeiling.claude <value>',
|
|
442
|
+
description: 'Maximum Claude model tier OAT may select for provider-native subagent dispatch. Claude has no separate per-dispatch effort axis, so the effort axis remains not-applicable. Resolution: local > shared > user > default.',
|
|
443
|
+
},
|
|
420
444
|
{
|
|
421
445
|
key: 'sync.defaultStrategy',
|
|
422
446
|
group: 'Sync/Provider (.oat/sync/config.json)',
|
|
@@ -479,6 +503,8 @@ const WORKFLOW_ENUM_VALUES = {
|
|
|
479
503
|
'workflow.postImplementSequence': ['wait', 'summary', 'pr', 'docs-pr'],
|
|
480
504
|
'workflow.reviewExecutionModel': ['subagent', 'inline', 'fresh-session'],
|
|
481
505
|
'workflow.designMode': ['collaborative', 'selective', 'draft'],
|
|
506
|
+
'workflow.dispatchCeiling.codex': ['low', 'medium', 'high', 'xhigh'],
|
|
507
|
+
'workflow.dispatchCeiling.claude': ['haiku', 'sonnet', 'opus'],
|
|
482
508
|
};
|
|
483
509
|
const WORKFLOW_BOOLEAN_KEYS = new Set([
|
|
484
510
|
'workflow.archiveOnComplete',
|
|
@@ -562,6 +588,16 @@ function parseWorkflowValue(key, rawValue) {
|
|
|
562
588
|
}
|
|
563
589
|
function applyWorkflowValue(workflow, key, value) {
|
|
564
590
|
const subKey = key.slice('workflow.'.length);
|
|
591
|
+
if (subKey.startsWith('dispatchCeiling.')) {
|
|
592
|
+
const providerKey = subKey.slice('dispatchCeiling.'.length);
|
|
593
|
+
return {
|
|
594
|
+
...workflow,
|
|
595
|
+
dispatchCeiling: {
|
|
596
|
+
...workflow.dispatchCeiling,
|
|
597
|
+
[providerKey]: value,
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
}
|
|
565
601
|
return {
|
|
566
602
|
...workflow,
|
|
567
603
|
[subKey]: value,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CommandContext, type GlobalOptions } from '../../../app/command-context.js';
|
|
2
|
+
import { type ActiveProjectResolution } from '../../../config/oat-config.js';
|
|
3
|
+
import { type ResolvedConfig } from '../../../config/resolve.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
interface DispatchCeilingDependencies {
|
|
6
|
+
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
7
|
+
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
8
|
+
resolveEffectiveConfig: (repoRoot: string, userConfigDir: string, env: NodeJS.ProcessEnv) => Promise<ResolvedConfig>;
|
|
9
|
+
resolveActiveProject: (repoRoot: string) => Promise<ActiveProjectResolution>;
|
|
10
|
+
readFile: (path: string) => Promise<string>;
|
|
11
|
+
pathExists: (path: string) => Promise<boolean>;
|
|
12
|
+
processEnv: NodeJS.ProcessEnv;
|
|
13
|
+
}
|
|
14
|
+
export declare function createProjectDispatchCeilingCommand(overrides?: Partial<DispatchCeilingDependencies>): Command;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,uBAAuB,EAG7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,UAAU,2BAA2B;IACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAiXD,wBAAgB,mCAAmC,CACjD,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CAsCT"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { access, readFile } from 'node:fs/promises';
|
|
2
|
+
import { isAbsolute, join } from 'node:path';
|
|
3
|
+
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
4
|
+
import { getFrontmatterBlock } from '../../shared/frontmatter.js';
|
|
5
|
+
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
6
|
+
import { resolveActiveProject, } from '../../../config/oat-config.js';
|
|
7
|
+
import { resolveEffectiveConfig, } from '../../../config/resolve.js';
|
|
8
|
+
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
9
|
+
import TOML from '@iarna/toml';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
import YAML from 'yaml';
|
|
12
|
+
const CODEX_VALUES = [
|
|
13
|
+
'low',
|
|
14
|
+
'medium',
|
|
15
|
+
'high',
|
|
16
|
+
'xhigh',
|
|
17
|
+
];
|
|
18
|
+
const CLAUDE_VALUES = [
|
|
19
|
+
'haiku',
|
|
20
|
+
'sonnet',
|
|
21
|
+
'opus',
|
|
22
|
+
];
|
|
23
|
+
const DEFAULT_DEPENDENCIES = {
|
|
24
|
+
buildCommandContext,
|
|
25
|
+
resolveProjectRoot,
|
|
26
|
+
resolveEffectiveConfig,
|
|
27
|
+
resolveActiveProject,
|
|
28
|
+
readFile: async (path) => readFile(path, 'utf8'),
|
|
29
|
+
pathExists: async (path) => {
|
|
30
|
+
try {
|
|
31
|
+
await access(path);
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
processEnv: process.env,
|
|
39
|
+
};
|
|
40
|
+
function normalizeProvider(value) {
|
|
41
|
+
if (value === 'codex' || value === 'claude') {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
throw new Error('Invalid provider. Expected one of: codex, claude.');
|
|
45
|
+
}
|
|
46
|
+
function isValidProviderValue(provider, value) {
|
|
47
|
+
if (provider === 'codex') {
|
|
48
|
+
return (typeof value === 'string' &&
|
|
49
|
+
CODEX_VALUES.includes(value));
|
|
50
|
+
}
|
|
51
|
+
return (typeof value === 'string' &&
|
|
52
|
+
CLAUDE_VALUES.includes(value));
|
|
53
|
+
}
|
|
54
|
+
function configSourceToCeilingSource(source) {
|
|
55
|
+
if (source === 'local') {
|
|
56
|
+
return 'local-config';
|
|
57
|
+
}
|
|
58
|
+
if (source === 'shared') {
|
|
59
|
+
return 'repo-config';
|
|
60
|
+
}
|
|
61
|
+
if (source === 'user') {
|
|
62
|
+
return 'user-config';
|
|
63
|
+
}
|
|
64
|
+
if (source === 'env') {
|
|
65
|
+
return 'env';
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function sourceLabel(source) {
|
|
70
|
+
switch (source) {
|
|
71
|
+
case 'local-config':
|
|
72
|
+
return 'local config';
|
|
73
|
+
case 'repo-config':
|
|
74
|
+
return 'repo config';
|
|
75
|
+
case 'user-config':
|
|
76
|
+
return 'user config';
|
|
77
|
+
case 'env':
|
|
78
|
+
return 'environment';
|
|
79
|
+
case 'project-state':
|
|
80
|
+
return 'project state';
|
|
81
|
+
default:
|
|
82
|
+
return 'none';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function providerLabel(provider) {
|
|
86
|
+
return provider === 'codex' ? 'Codex' : 'Claude';
|
|
87
|
+
}
|
|
88
|
+
function resolveTargetProjectPath(repoRoot, projectPath) {
|
|
89
|
+
return isAbsolute(projectPath) ? projectPath : join(repoRoot, projectPath);
|
|
90
|
+
}
|
|
91
|
+
function readProjectDispatchCeiling(provider, content) {
|
|
92
|
+
const frontmatter = getFrontmatterBlock(content);
|
|
93
|
+
if (!frontmatter) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
const parsed = YAML.parse(frontmatter);
|
|
97
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const ceiling = parsed['oat_dispatch_ceiling'];
|
|
101
|
+
if (!ceiling || typeof ceiling !== 'object' || Array.isArray(ceiling)) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
const ceilingRecord = ceiling;
|
|
105
|
+
if (ceilingRecord['provider'] !== provider) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const value = ceilingRecord['value'];
|
|
109
|
+
return isValidProviderValue(provider, value) ? value : null;
|
|
110
|
+
}
|
|
111
|
+
async function resolveProjectStateCeiling(provider, projectPath, dependencies) {
|
|
112
|
+
if (!projectPath) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
const content = await dependencies.readFile(join(projectPath, 'state.md'));
|
|
117
|
+
return readProjectDispatchCeiling(provider, content);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async function resolveProjectPath(repoRoot, dependencies, options) {
|
|
124
|
+
if (options.projectPath) {
|
|
125
|
+
return resolveTargetProjectPath(repoRoot, options.projectPath);
|
|
126
|
+
}
|
|
127
|
+
const activeProject = await dependencies.resolveActiveProject(repoRoot);
|
|
128
|
+
if (activeProject.status !== 'active' || !activeProject.path) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return join(repoRoot, activeProject.path);
|
|
132
|
+
}
|
|
133
|
+
function readResolvedConfigCeiling(provider, resolvedConfig) {
|
|
134
|
+
const entry = resolvedConfig.resolved[`workflow.dispatchCeiling.${provider}`];
|
|
135
|
+
const source = entry ? configSourceToCeilingSource(entry.source) : null;
|
|
136
|
+
if (!entry || !source || !isValidProviderValue(provider, entry.value)) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
value: entry.value,
|
|
141
|
+
source,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function readCodexDefaultFromToml(content) {
|
|
145
|
+
let parsed;
|
|
146
|
+
try {
|
|
147
|
+
parsed = TOML.parse(content);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
const value = parsed['model_reasoning_effort'];
|
|
153
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
154
|
+
}
|
|
155
|
+
async function resolveCodexProviderDefaultEffort(repoRoot, context, dependencies) {
|
|
156
|
+
const candidates = [
|
|
157
|
+
join(repoRoot, '.codex', 'config.toml'),
|
|
158
|
+
join(context.home, '.codex', 'config.toml'),
|
|
159
|
+
];
|
|
160
|
+
for (const candidate of candidates) {
|
|
161
|
+
if (!(await dependencies.pathExists(candidate))) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const value = readCodexDefaultFromToml(await dependencies.readFile(candidate));
|
|
165
|
+
if (value) {
|
|
166
|
+
return value;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return 'unknown';
|
|
170
|
+
}
|
|
171
|
+
function blockMessage(provider) {
|
|
172
|
+
const label = providerLabel(provider);
|
|
173
|
+
return `BLOCKED: ${label} dispatch ceiling is unresolved in non-interactive mode.\nSet workflow.dispatchCeiling.${provider} in .oat/config.json or oat_dispatch_ceiling in project state.`;
|
|
174
|
+
}
|
|
175
|
+
function isNonInteractiveEnv(env) {
|
|
176
|
+
return env['OAT_NON_INTERACTIVE'] === '1';
|
|
177
|
+
}
|
|
178
|
+
async function resolveDispatchCeiling(context, dependencies, options) {
|
|
179
|
+
const provider = normalizeProvider(options.provider);
|
|
180
|
+
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
181
|
+
const userConfigDir = join(context.home, '.oat');
|
|
182
|
+
const [resolvedConfig, projectPath] = await Promise.all([
|
|
183
|
+
dependencies.resolveEffectiveConfig(repoRoot, userConfigDir, dependencies.processEnv),
|
|
184
|
+
resolveProjectPath(repoRoot, dependencies, options),
|
|
185
|
+
]);
|
|
186
|
+
const providerDefaultEffort = provider === 'codex'
|
|
187
|
+
? await resolveCodexProviderDefaultEffort(repoRoot, context, dependencies)
|
|
188
|
+
: 'not-applicable';
|
|
189
|
+
const configCeiling = readResolvedConfigCeiling(provider, resolvedConfig);
|
|
190
|
+
if (configCeiling) {
|
|
191
|
+
return {
|
|
192
|
+
status: 'resolved',
|
|
193
|
+
provider,
|
|
194
|
+
value: configCeiling.value,
|
|
195
|
+
source: configCeiling.source,
|
|
196
|
+
unresolved: false,
|
|
197
|
+
projectPath,
|
|
198
|
+
providerDefaultEffort,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
const projectCeiling = await resolveProjectStateCeiling(provider, projectPath, dependencies);
|
|
202
|
+
if (projectCeiling) {
|
|
203
|
+
return {
|
|
204
|
+
status: 'resolved',
|
|
205
|
+
provider,
|
|
206
|
+
value: projectCeiling,
|
|
207
|
+
source: 'project-state',
|
|
208
|
+
unresolved: false,
|
|
209
|
+
projectPath,
|
|
210
|
+
providerDefaultEffort,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const shouldBlock = options.nonInteractive === true ||
|
|
214
|
+
isNonInteractiveEnv(dependencies.processEnv) ||
|
|
215
|
+
(options.preflight === true && !context.interactive && !context.json);
|
|
216
|
+
const message = shouldBlock ? blockMessage(provider) : undefined;
|
|
217
|
+
return {
|
|
218
|
+
status: shouldBlock ? 'blocked' : 'unresolved',
|
|
219
|
+
provider,
|
|
220
|
+
value: null,
|
|
221
|
+
source: null,
|
|
222
|
+
unresolved: true,
|
|
223
|
+
projectPath,
|
|
224
|
+
providerDefaultEffort,
|
|
225
|
+
message,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function writeHumanResolution(context, resolution) {
|
|
229
|
+
const label = providerLabel(resolution.provider);
|
|
230
|
+
if (resolution.status === 'blocked' && resolution.message) {
|
|
231
|
+
context.logger.error(resolution.message);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
context.logger.info(`${label} dispatch ceiling: ${resolution.value ?? 'unresolved'}`);
|
|
235
|
+
context.logger.info(`Source: ${sourceLabel(resolution.source)}`);
|
|
236
|
+
if (resolution.provider === 'codex') {
|
|
237
|
+
context.logger.info(`Codex provider default effort: ${resolution.providerDefaultEffort}`);
|
|
238
|
+
context.logger.info(`Note: OAT will use pinned subagent variants up to ${resolution.value ?? 'the resolved ceiling'}. Base/unpinned roles resolve through the provider default.`);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
context.logger.info('Effort axis: not-applicable');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
async function runDispatchCeilingResolve(context, dependencies, options) {
|
|
245
|
+
try {
|
|
246
|
+
const resolution = await resolveDispatchCeiling(context, dependencies, options);
|
|
247
|
+
if (context.json) {
|
|
248
|
+
context.logger.json(resolution);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
writeHumanResolution(context, resolution);
|
|
252
|
+
}
|
|
253
|
+
process.exitCode = resolution.status === 'blocked' ? 1 : 0;
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
257
|
+
if (context.json) {
|
|
258
|
+
context.logger.json({ status: 'error', message });
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
context.logger.error(message);
|
|
262
|
+
}
|
|
263
|
+
process.exitCode = 1;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
export function createProjectDispatchCeilingCommand(overrides = {}) {
|
|
267
|
+
const dependencies = {
|
|
268
|
+
...DEFAULT_DEPENDENCIES,
|
|
269
|
+
...overrides,
|
|
270
|
+
};
|
|
271
|
+
const command = new Command('dispatch-ceiling').description('Resolve OAT project dispatch ceiling metadata');
|
|
272
|
+
command.addCommand(new Command('resolve')
|
|
273
|
+
.description('Resolve dispatch ceiling for a provider')
|
|
274
|
+
.requiredOption('--provider <provider>', 'Provider: codex or claude')
|
|
275
|
+
.option('--project-path <path>', 'Read project-state ceiling from an explicit project path')
|
|
276
|
+
.option('--preflight', 'Treat unresolved non-interactive resolution as an implementation block')
|
|
277
|
+
.option('--non-interactive', 'Force non-interactive block behavior when the ceiling is unresolved')
|
|
278
|
+
.option('--json', 'Output machine-readable JSON')
|
|
279
|
+
.action(async (options, cmd) => {
|
|
280
|
+
const globalOptions = readGlobalOptions(cmd);
|
|
281
|
+
const context = dependencies.buildCommandContext({
|
|
282
|
+
...globalOptions,
|
|
283
|
+
json: globalOptions.json === true || options.json === true,
|
|
284
|
+
});
|
|
285
|
+
await runDispatchCeilingResolve(context, dependencies, options);
|
|
286
|
+
}));
|
|
287
|
+
return command;
|
|
288
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,wBAAgB,oBAAoB,IAAI,OAAO,CAe9C"}
|
|
@@ -2,6 +2,7 @@ import { Command } from 'commander';
|
|
|
2
2
|
import { createProjectArchiveCommand } from './archive/index.js';
|
|
3
3
|
import { createProjectCompleteDiscoveryCommand } from './complete-discovery/index.js';
|
|
4
4
|
import { createProjectCompleteStateCommand } from './complete-state/index.js';
|
|
5
|
+
import { createProjectDispatchCeilingCommand } from './dispatch-ceiling/index.js';
|
|
5
6
|
import { createProjectListCommand } from './list.js';
|
|
6
7
|
import { createProjectNewCommand } from './new/index.js';
|
|
7
8
|
import { createProjectOpenCommand } from './open/index.js';
|
|
@@ -16,6 +17,7 @@ export function createProjectCommand() {
|
|
|
16
17
|
.addCommand(createProjectArchiveCommand())
|
|
17
18
|
.addCommand(createProjectCompleteDiscoveryCommand())
|
|
18
19
|
.addCommand(createProjectCompleteStateCommand())
|
|
20
|
+
.addCommand(createProjectDispatchCeilingCommand())
|
|
19
21
|
.addCommand(createProjectListCommand())
|
|
20
22
|
.addCommand(createProjectNewCommand())
|
|
21
23
|
.addCommand(createProjectOpenCommand())
|
|
@@ -20,6 +20,12 @@ export type WorkflowHillCheckpointDefault = 'every' | 'final';
|
|
|
20
20
|
export type WorkflowPostImplementSequence = 'wait' | 'summary' | 'pr' | 'docs-pr';
|
|
21
21
|
export type WorkflowReviewExecutionModel = 'subagent' | 'inline' | 'fresh-session';
|
|
22
22
|
export type WorkflowDesignMode = 'collaborative' | 'selective' | 'draft';
|
|
23
|
+
export type WorkflowCodexDispatchCeiling = 'low' | 'medium' | 'high' | 'xhigh';
|
|
24
|
+
export type WorkflowClaudeDispatchCeiling = 'haiku' | 'sonnet' | 'opus';
|
|
25
|
+
export interface WorkflowDispatchCeiling {
|
|
26
|
+
codex?: WorkflowCodexDispatchCeiling;
|
|
27
|
+
claude?: WorkflowClaudeDispatchCeiling;
|
|
28
|
+
}
|
|
23
29
|
export interface OatWorkflowConfig {
|
|
24
30
|
hillCheckpointDefault?: WorkflowHillCheckpointDefault;
|
|
25
31
|
archiveOnComplete?: boolean;
|
|
@@ -29,6 +35,7 @@ export interface OatWorkflowConfig {
|
|
|
29
35
|
autoReviewAtHillCheckpoints?: boolean;
|
|
30
36
|
autoNarrowReReviewScope?: boolean;
|
|
31
37
|
designMode?: WorkflowDesignMode;
|
|
38
|
+
dispatchCeiling?: WorkflowDispatchCeiling;
|
|
32
39
|
}
|
|
33
40
|
export type OatToolsConfig = Partial<Record<'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research' | 'brainstorm', boolean>>;
|
|
34
41
|
export interface OatConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AAOA,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,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|
+
'xhigh',
|
|
23
|
+
];
|
|
24
|
+
const VALID_CLAUDE_DISPATCH_CEILINGS = ['haiku', 'sonnet', 'opus'];
|
|
18
25
|
function normalizeWorkflowConfig(parsed) {
|
|
19
26
|
if (!isRecord(parsed)) {
|
|
20
27
|
return undefined;
|
|
@@ -51,6 +58,22 @@ function normalizeWorkflowConfig(parsed) {
|
|
|
51
58
|
VALID_DESIGN_MODES.includes(parsed.designMode)) {
|
|
52
59
|
next.designMode = parsed.designMode;
|
|
53
60
|
}
|
|
61
|
+
if (isRecord(parsed.dispatchCeiling)) {
|
|
62
|
+
const dispatchCeiling = {};
|
|
63
|
+
if (typeof parsed.dispatchCeiling.codex === 'string' &&
|
|
64
|
+
VALID_CODEX_DISPATCH_CEILINGS.includes(parsed.dispatchCeiling.codex)) {
|
|
65
|
+
dispatchCeiling.codex = parsed.dispatchCeiling
|
|
66
|
+
.codex;
|
|
67
|
+
}
|
|
68
|
+
if (typeof parsed.dispatchCeiling.claude === 'string' &&
|
|
69
|
+
VALID_CLAUDE_DISPATCH_CEILINGS.includes(parsed.dispatchCeiling.claude)) {
|
|
70
|
+
dispatchCeiling.claude = parsed.dispatchCeiling
|
|
71
|
+
.claude;
|
|
72
|
+
}
|
|
73
|
+
if (Object.keys(dispatchCeiling).length > 0) {
|
|
74
|
+
next.dispatchCeiling = dispatchCeiling;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
54
77
|
return Object.keys(next).length > 0 ? next : undefined;
|
|
55
78
|
}
|
|
56
79
|
const DEFAULT_OAT_CONFIG = { version: 1 };
|