agentic-dev 0.2.2 → 0.2.4
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/.claude/CLAUDE.md +1 -1
- package/.claude/skills/sdd/SKILL.md +178 -7
- package/.claude/skills/sdd/agents/openai.yaml +4 -0
- package/.claude/skills/sdd/references/section-map.md +67 -0
- package/.env.example +2 -2
- package/README.md +5 -5
- package/client/{platform → web}/Dockerfile +3 -3
- package/client/web/Dockerfile.dev +18 -0
- package/client/{platform → web}/README.md +3 -3
- package/client/{platform → web}/index.html +1 -1
- package/client/{platform → web}/package.json +7 -7
- package/client/{platform/scripts/ui-parity-platform-adapter.mjs → web/scripts/ui-parity-web-adapter.mjs} +7 -7
- package/client/{platform → web}/src/auth/AuthProvider.tsx +1 -1
- package/compose.yml +6 -6
- package/infra/compose/.env.dev.example +3 -3
- package/infra/compose/.env.prod.example +3 -3
- package/infra/compose/README.md +1 -1
- package/infra/compose/dev.yml +5 -5
- package/infra/compose/prod.yml +6 -6
- package/infra/terraform/openstack/dev/terraform.tfvars.example +3 -3
- package/infra/terraform/openstack/prod/terraform.tfvars.example +3 -3
- package/lib/scaffold.mjs +7 -7
- package/package.json +2 -2
- package/scripts/dev/audit_sdd_build_ast.py +9 -9
- package/sdd/01_planning/01_feature/auth_feature_spec.md +2 -2
- package/sdd/01_planning/01_feature/catalog_feature_spec.md +3 -3
- package/sdd/01_planning/01_feature/order_feature_spec.md +11 -11
- package/sdd/01_planning/02_screen/INDEX.md +2 -2
- package/sdd/01_planning/02_screen/README.md +2 -2
- package/sdd/01_planning/03_architecture/templates_system_architecture.md +3 -3
- package/sdd/01_planning/05_api/templates_api_contract.md +3 -3
- package/sdd/01_planning/06_iac/templates_runtime_and_cicd_baseline.md +1 -1
- package/sdd/01_planning/07_integration/templates_frontend_api_integration.md +3 -3
- package/sdd/01_planning/10_test/templates_test_strategy.md +2 -2
- package/sdd/01_planning/INDEX.md +1 -1
- package/sdd/02_plan/02_screen/INDEX.md +1 -1
- package/sdd/02_plan/02_screen/README.md +1 -1
- package/sdd/02_plan/03_architecture/build_ast_runtime_tree_governance.md +1 -1
- package/sdd/02_plan/03_architecture/repository_governance.md +1 -1
- package/sdd/02_plan/07_integration/frontend_live_integration.md +3 -3
- package/sdd/02_plan/10_test/templates/{ui_parity_platform_contract.template.yaml → ui_parity_web_contract.template.yaml} +1 -1
- package/sdd/03_build/01_feature/domain/account_and_access.md +1 -1
- package/sdd/03_build/01_feature/domain/catalog_and_inventory.md +1 -1
- package/sdd/03_build/01_feature/domain/ordering_and_fulfillment.md +1 -1
- package/sdd/03_build/01_feature/service/README.md +1 -1
- package/sdd/03_build/01_feature/service/{platform_surface.md → web_surface.md} +3 -3
- package/sdd/03_build/02_screen/README.md +1 -1
- package/sdd/03_build/02_screen/web/README.md +5 -0
- package/sdd/03_build/06_iac/template_runtime_delivery.md +1 -1
- package/sdd/03_build/07_integration/frontend_live_integration.md +1 -1
- package/sdd/04_verify/01_feature/service_verification.md +2 -2
- package/sdd/04_verify/02_screen/web/README.md +4 -0
- package/sdd/04_verify/06_iac/template_runtime_delivery.md +3 -3
- package/sdd/99_toolchain/01_automation/agentic-dev/assets/repo-contract.template.json +11 -11
- package/sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json +13 -13
- package/sdd/99_toolchain/01_automation/agentic-parity-harness-design.md +5 -5
- package/sdd/99_toolchain/01_automation/capture_screen_assets.mjs +4 -4
- package/sdd/99_toolchain/01_automation/harness-layout.md +2 -2
- package/sdd/99_toolchain/01_automation/parity-execution-tooling-design.md +5 -5
- package/sdd/99_toolchain/01_automation/screen_spec_manifest.py +17 -17
- package/sdd/99_toolchain/01_automation/ui-parity/README.md +10 -10
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-artifact-layout.md +1 -1
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-route-gap-interface.md +2 -2
- package/sdd/99_toolchain/03_templates/playwright_exactness_manifest.example.py +1 -1
- package/server/data/README.md +1 -1
- package/.claude/skills/commit/SKILL.md +0 -37
- package/.claude/skills/dev-browser/SKILL.md +0 -30
- package/.claude/skills/otro/SKILL.md +0 -43
- package/.claude/skills/planning-with-files/SKILL.md +0 -37
- package/.claude/skills/prd/SKILL.md +0 -27
- package/.claude/skills/ralph-loop/SKILL.md +0 -42
- package/.claude/skills/sdd-dev/SKILL.md +0 -71
- package/.claude/skills/sdd-development/SKILL.md +0 -13
- package/.codex/skills/agents/openai.yaml +0 -4
- package/.codex/skills/commit/SKILL.md +0 -219
- package/.codex/skills/commit/references/commit_examples.md +0 -292
- package/.codex/skills/dev-browser/SKILL.md +0 -211
- package/.codex/skills/dev-browser/bun.lock +0 -443
- package/.codex/skills/dev-browser/package-lock.json +0 -2988
- package/.codex/skills/dev-browser/package.json +0 -31
- package/.codex/skills/dev-browser/references/scraping.md +0 -155
- package/.codex/skills/dev-browser/scripts/start-relay.ts +0 -32
- package/.codex/skills/dev-browser/scripts/start-server.ts +0 -117
- package/.codex/skills/dev-browser/server.sh +0 -24
- package/.codex/skills/dev-browser/src/client.ts +0 -474
- package/.codex/skills/dev-browser/src/index.ts +0 -287
- package/.codex/skills/dev-browser/src/relay.ts +0 -731
- package/.codex/skills/dev-browser/src/snapshot/__tests__/snapshot.test.ts +0 -223
- package/.codex/skills/dev-browser/src/snapshot/browser-script.ts +0 -877
- package/.codex/skills/dev-browser/src/snapshot/index.ts +0 -14
- package/.codex/skills/dev-browser/src/snapshot/inject.ts +0 -13
- package/.codex/skills/dev-browser/src/types.ts +0 -34
- package/.codex/skills/dev-browser/tsconfig.json +0 -36
- package/.codex/skills/dev-browser/vitest.config.ts +0 -12
- package/.codex/skills/otro/SKILL.md +0 -74
- package/.codex/skills/otro/agents/openai.yaml +0 -4
- package/.codex/skills/otro/references/agent-prompts.md +0 -61
- package/.codex/skills/otro/references/contracts.md +0 -146
- package/.codex/skills/otro/references/orchestration-loop.md +0 -51
- package/.codex/skills/otro/references/runtime.md +0 -79
- package/.codex/skills/otro/runs/README.md +0 -11
- package/.codex/skills/otro/schemas/step_plan.schema.json +0 -289
- package/.codex/skills/otro/schemas/task_result.schema.json +0 -142
- package/.codex/skills/otro/schemas/wave_plan.schema.json +0 -4
- package/.codex/skills/otro/scripts/README.md +0 -38
- package/.codex/skills/otro/scripts/bump_validation_header.py +0 -179
- package/.codex/skills/otro/scripts/check_validation_header.py +0 -84
- package/.codex/skills/otro/scripts/common.py +0 -303
- package/.codex/skills/otro/scripts/init_run.sh +0 -68
- package/.codex/skills/otro/scripts/plan_loop.py +0 -8
- package/.codex/skills/otro/scripts/plan_step.py +0 -367
- package/.codex/skills/otro/scripts/plan_wave.py +0 -8
- package/.codex/skills/otro/scripts/reconcile_loop.py +0 -8
- package/.codex/skills/otro/scripts/reconcile_step.py +0 -37
- package/.codex/skills/otro/scripts/reconcile_wave.py +0 -8
- package/.codex/skills/otro/scripts/run_loop.py +0 -300
- package/.codex/skills/otro/scripts/run_loop_step.py +0 -8
- package/.codex/skills/otro/scripts/run_step.py +0 -246
- package/.codex/skills/otro/scripts/run_wave.py +0 -8
- package/.codex/skills/otro/validation/validation.md +0 -15
- package/.codex/skills/planning-with-files/SKILL.md +0 -42
- package/.codex/skills/planning-with-files/agents/openai.yaml +0 -4
- package/.codex/skills/planning-with-files/assets/plan-template.md +0 -37
- package/.codex/skills/planning-with-files/references/plan-rules.md +0 -35
- package/.codex/skills/planning-with-files/scripts/new_plan.sh +0 -65
- package/.codex/skills/prd/SKILL.md +0 -235
- package/.codex/skills/ralph-loop/SKILL.md +0 -46
- package/.codex/skills/ralph-loop/agents/openai.yaml +0 -4
- package/.codex/skills/ralph-loop/references/failure-triage.md +0 -32
- package/.codex/skills/ralph-loop/scripts/loop_until_success.sh +0 -97
- package/client/platform/Dockerfile.dev +0 -18
- package/sdd/03_build/02_screen/platform/README.md +0 -5
- package/sdd/04_verify/02_screen/platform/README.md +0 -4
- package/sdd/99_toolchain/02_policies/otro-orchestration-policy.md +0 -30
- /package/client/{platform → web}/.dockerignore +0 -0
- /package/client/{platform → web}/.env.example +0 -0
- /package/client/{platform → web}/postcss.config.js +0 -0
- /package/client/{platform → web}/src/api/client.ts +0 -0
- /package/client/{platform → web}/src/api/orders.ts +0 -0
- /package/client/{platform → web}/src/app/App.tsx +0 -0
- /package/client/{platform → web}/src/auth/ProtectedRoute.tsx +0 -0
- /package/client/{platform → web}/src/auth/auth-client.ts +0 -0
- /package/client/{platform → web}/src/auth/types.ts +0 -0
- /package/client/{platform → web}/src/components/AppShell.tsx +0 -0
- /package/client/{platform → web}/src/components/ui/button.tsx +0 -0
- /package/client/{platform → web}/src/components/ui/card.tsx +0 -0
- /package/client/{platform → web}/src/components/ui/input.tsx +0 -0
- /package/client/{platform → web}/src/lib/cn.ts +0 -0
- /package/client/{platform → web}/src/lib/specRouteCatalog.json +0 -0
- /package/client/{platform → web}/src/lib/specScreens.json +0 -0
- /package/client/{platform → web}/src/main.tsx +0 -0
- /package/client/{platform → web}/src/pages/DashboardPage.tsx +0 -0
- /package/client/{platform → web}/src/pages/LoginPage.tsx +0 -0
- /package/client/{platform → web}/src/pages/OrdersPage.tsx +0 -0
- /package/client/{platform → web}/src/styles/globals.css +0 -0
- /package/client/{platform → web}/src/theme-vars.ts +0 -0
- /package/client/{platform → web}/src/theme.ts +0 -0
- /package/client/{platform → web}/src/vite-env.d.ts +0 -0
- /package/client/{platform → web}/tailwind.config.js +0 -0
- /package/client/{platform → web}/tsconfig.json +0 -0
- /package/client/{platform → web}/vite.config.ts +0 -0
- /package/sdd/01_planning/02_screen/{platform_screen_spec.pdf → web_screen_spec.pdf} +0 -0
- /package/sdd/99_toolchain/01_automation/assets/{platform_screen_capture → web_screen_capture}/dashboard.png +0 -0
- /package/sdd/99_toolchain/01_automation/assets/{platform_screen_capture → web_screen_capture}/login.png +0 -0
- /package/sdd/99_toolchain/01_automation/assets/{platform_screen_capture → web_screen_capture}/orders.png +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ARIA Snapshot module for dev-browser.
|
|
3
|
-
*
|
|
4
|
-
* Provides Playwright-compatible ARIA snapshots with cross-connection ref persistence.
|
|
5
|
-
* Refs are stored on window.__devBrowserRefs and survive across Playwright reconnections.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* import { getSnapshotScript } from './snapshot';
|
|
9
|
-
* const script = getSnapshotScript();
|
|
10
|
-
* await page.evaluate(script);
|
|
11
|
-
* // Now window.__devBrowser_getAISnapshot() and window.__devBrowser_selectSnapshotRef(ref) are available
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export { getSnapshotScript, clearSnapshotScriptCache } from "./browser-script";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Injectable snapshot script for browser context.
|
|
3
|
-
*
|
|
4
|
-
* This module provides the getSnapshotScript function that returns a
|
|
5
|
-
* self-contained JavaScript string for injection into browser contexts.
|
|
6
|
-
*
|
|
7
|
-
* The script is injected via page.evaluate() and exposes:
|
|
8
|
-
* - window.__devBrowser_getAISnapshot(): Returns ARIA snapshot YAML
|
|
9
|
-
* - window.__devBrowser_selectSnapshotRef(ref): Returns element for given ref
|
|
10
|
-
* - window.__devBrowserRefs: Map of ref -> Element (persists across connections)
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export { getSnapshotScript, clearSnapshotScriptCache } from "./browser-script";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// API request/response types - shared between client and server
|
|
2
|
-
|
|
3
|
-
export interface ServeOptions {
|
|
4
|
-
port?: number;
|
|
5
|
-
headless?: boolean;
|
|
6
|
-
cdpPort?: number;
|
|
7
|
-
/** Directory to store persistent browser profiles (cookies, localStorage, etc.) */
|
|
8
|
-
profileDir?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ViewportSize {
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface GetPageRequest {
|
|
17
|
-
name: string;
|
|
18
|
-
/** Optional viewport size for new pages */
|
|
19
|
-
viewport?: ViewportSize;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface GetPageResponse {
|
|
23
|
-
wsEndpoint: string;
|
|
24
|
-
name: string;
|
|
25
|
-
targetId: string; // CDP target ID for reliable page matching
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ListPagesResponse {
|
|
29
|
-
pages: string[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ServerInfoResponse {
|
|
33
|
-
wsEndpoint: string;
|
|
34
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// Environment setup & latest features
|
|
4
|
-
"lib": ["ESNext"],
|
|
5
|
-
"target": "ESNext",
|
|
6
|
-
"module": "Preserve",
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"jsx": "react-jsx",
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
|
|
11
|
-
// Bundler mode
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"verbatimModuleSyntax": true,
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
|
|
17
|
-
// Path aliases
|
|
18
|
-
"baseUrl": ".",
|
|
19
|
-
"paths": {
|
|
20
|
-
"@/*": ["./src/*"]
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
// Best practices
|
|
24
|
-
"strict": true,
|
|
25
|
-
"skipLibCheck": true,
|
|
26
|
-
"noFallthroughCasesInSwitch": true,
|
|
27
|
-
"noUncheckedIndexedAccess": true,
|
|
28
|
-
"noImplicitOverride": true,
|
|
29
|
-
|
|
30
|
-
// Some stricter flags (disabled by default)
|
|
31
|
-
"noUnusedLocals": false,
|
|
32
|
-
"noUnusedParameters": false,
|
|
33
|
-
"noPropertyAccessFromIndexSignature": false
|
|
34
|
-
},
|
|
35
|
-
"include": ["src/**/*", "scripts/**/*"]
|
|
36
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: "node",
|
|
7
|
-
include: ["src/**/*.test.ts"],
|
|
8
|
-
testTimeout: 60000, // Playwright tests can be slow
|
|
9
|
-
hookTimeout: 60000,
|
|
10
|
-
teardownTimeout: 60000,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: otro
|
|
3
|
-
description: OTRO (Overlap-Tolerant Residual Orchestration) builds and runs a loop-based Codex orchestration workflow that analyzes repository state and development artifacts globally, produces a TODO/task graph, dispatches parallel `codex exec` workers, tolerates overlap when useful, reconciles residual conflicts, and replans the next loop. Use when Codex needs an executable multi-agent skill for new development, feature changes, repository-wide refactors, batch task decomposition, overlap-tolerant parallel task dispatch, or residual-driven replanning.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# OTRO
|
|
7
|
-
|
|
8
|
-
## Objective
|
|
9
|
-
|
|
10
|
-
Run artifact-grounded software development tasks through OTRO, a central overlap-tolerant residual loop orchestrator:
|
|
11
|
-
|
|
12
|
-
1. Analyze the repo and available development artifacts globally
|
|
13
|
-
2. Emit a full TODO/task graph
|
|
14
|
-
3. Group work into loops that are either strictly partitioned or intentionally overlap-tolerant
|
|
15
|
-
4. Dispatch each task to a separate `codex exec` worker
|
|
16
|
-
5. Reconcile the results, conflicts, and residuals into the next loop plan
|
|
17
|
-
|
|
18
|
-
This skill is intentionally `loop-based`, not recursive depth-first delegation.
|
|
19
|
-
|
|
20
|
-
## Resources
|
|
21
|
-
|
|
22
|
-
Read [references/runtime.md](references/runtime.md) for the file layout and commands.
|
|
23
|
-
Read [references/contracts.md](references/contracts.md) for the planner and task contracts.
|
|
24
|
-
Read [references/agent-prompts.md](references/agent-prompts.md) when tuning worker or reconciler prompts.
|
|
25
|
-
|
|
26
|
-
Use these bundled files directly:
|
|
27
|
-
|
|
28
|
-
- `scripts/init_run.sh`
|
|
29
|
-
- `scripts/plan_loop.py`
|
|
30
|
-
- `scripts/plan_step.py`
|
|
31
|
-
- `scripts/run_loop_step.py`
|
|
32
|
-
- `scripts/run_step.py`
|
|
33
|
-
- `scripts/reconcile_loop.py`
|
|
34
|
-
- `scripts/reconcile_step.py`
|
|
35
|
-
- `scripts/run_loop.py`
|
|
36
|
-
- `schemas/step_plan.schema.json`
|
|
37
|
-
- `schemas/task_result.schema.json`
|
|
38
|
-
|
|
39
|
-
## Workflow
|
|
40
|
-
|
|
41
|
-
1. Initialize a run workspace under `.codex/skills/otro/runs/<run-name>/`.
|
|
42
|
-
2. Write the repository-wide objective in `goal.md`.
|
|
43
|
-
3. Generate the initial global plan with `plan_loop.py`; OTRO will preserve this first accepted plan as `<run-dir>/plans/anchor-plan.json`.
|
|
44
|
-
4. Inspect `<run-dir>/plans/current-plan.json` and keep the anchor plan as the teacher prior during later replans.
|
|
45
|
-
5. Execute one loop step with `run_loop_step.py`.
|
|
46
|
-
6. Reconcile the completed loop with `reconcile_loop.py`.
|
|
47
|
-
7. Repeat until the goal is satisfied or the run is explicitly blocked.
|
|
48
|
-
|
|
49
|
-
## Rules
|
|
50
|
-
|
|
51
|
-
- The planner must analyze the repository before emitting tasks.
|
|
52
|
-
- The initial plan should be as global and exhaustive as practical.
|
|
53
|
-
- Honor repository-specific artifact roots and delivery systems. If the repo uses `sdd/` or another canonical documentation tree, OTRO must treat that as the source of truth and must not create a parallel `docs/` tree.
|
|
54
|
-
- Use `strict` ownership only when clean partitioning matters more than exploration.
|
|
55
|
-
- Use `tolerant` overlap when broad parallel exploration is more valuable than conflict avoidance.
|
|
56
|
-
- Merge and integration work is explicit work, not an afterthought.
|
|
57
|
-
- Each worker must return structured JSON through `task_result.schema.json`.
|
|
58
|
-
- Replanning happens only at the loop boundary.
|
|
59
|
-
- Treat overlap, inconsistency, and stale edits as residual evidence for the next loop.
|
|
60
|
-
- Keep the first accepted plan as an anchor; later replans must correct against it instead of drifting with temporary intermediate state.
|
|
61
|
-
- Distinguish three completion levels:
|
|
62
|
-
- `loop_done`: the current plan has no pending tasks.
|
|
63
|
-
- `run_done`: a fresh repository-wide rescan after `loop_done` yields no materially new tasks.
|
|
64
|
-
- `repository_done`: `run_done` plus repository-level deployment and verification gates are satisfied.
|
|
65
|
-
- Do not claim repository completion just because one plan backlog was exhausted.
|
|
66
|
-
|
|
67
|
-
## Typical Uses
|
|
68
|
-
|
|
69
|
-
- New development grounded in sdd/spec/wireframe/contract artifacts
|
|
70
|
-
- Feature changes driven by updated requirements or verification evidence
|
|
71
|
-
- Large refactors spanning many files
|
|
72
|
-
- Repository-wide DDD or layering migrations
|
|
73
|
-
- Cross-cutting API or UI surface cleanups
|
|
74
|
-
- Long-running change programs where central task ownership matters more than autonomous recursion
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# OTRO Agent Prompts
|
|
2
|
-
|
|
3
|
-
Use short prompts with a single role and a single loop contract.
|
|
4
|
-
|
|
5
|
-
## Global Planner
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
Analyze the repository globally and emit one task graph.
|
|
9
|
-
|
|
10
|
-
Rules:
|
|
11
|
-
1. Build as much of the TODO graph up front as practical
|
|
12
|
-
2. Group tasks into loop steps
|
|
13
|
-
3. Choose `strict` or `tolerant` overlap policy explicitly
|
|
14
|
-
4. In tolerant steps, allow overlap when it increases useful exploration and make residual repair explicit
|
|
15
|
-
5. Push merge and integration checks into explicit later tasks
|
|
16
|
-
6. Return only the plan JSON
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Loop Worker
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
You own exactly one task.
|
|
23
|
-
|
|
24
|
-
Task:
|
|
25
|
-
<task contract>
|
|
26
|
-
|
|
27
|
-
Rules:
|
|
28
|
-
1. Touch only owned paths
|
|
29
|
-
2. Read other paths only when needed
|
|
30
|
-
3. Do not revert unrelated work
|
|
31
|
-
4. Run relevant verification commands when possible
|
|
32
|
-
5. Report overlap, inconsistency, or stale-context findings as residual signals
|
|
33
|
-
6. Return only the task result JSON
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Integrator
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
You own loop reconciliation.
|
|
40
|
-
|
|
41
|
-
Inputs:
|
|
42
|
-
1. Goal file
|
|
43
|
-
2. Current plan JSON
|
|
44
|
-
3. Completed loop results
|
|
45
|
-
4. Repository state after the loop
|
|
46
|
-
|
|
47
|
-
Rules:
|
|
48
|
-
1. Mark completed, blocked, and failed tasks accurately
|
|
49
|
-
2. In tolerant steps, extract residuals instead of treating all overlap as failure
|
|
50
|
-
3. Add repair or integration tasks only where evidence requires them
|
|
51
|
-
4. Emit the next plan version
|
|
52
|
-
5. Return only the plan JSON
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Prompting Rules
|
|
56
|
-
|
|
57
|
-
- Include the full task contract in every worker prompt.
|
|
58
|
-
- Include current plan JSON in the integrator prompt.
|
|
59
|
-
- Keep ownership boundaries explicit in planner output.
|
|
60
|
-
- Treat overlap policy as a first-class planning choice, not an implicit default.
|
|
61
|
-
- Prefer concrete verification commands over vague review instructions.
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# Contracts
|
|
2
|
-
|
|
3
|
-
Use these contracts to keep a repository-wide loop orchestration mechanically checkable.
|
|
4
|
-
|
|
5
|
-
## Run Contract
|
|
6
|
-
|
|
7
|
-
Create one run contract in `goal.md` before planning.
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
run_name: admin-console-development
|
|
11
|
-
objective: >
|
|
12
|
-
Repository-wide outcome to achieve
|
|
13
|
-
input_artifacts:
|
|
14
|
-
- sdd/
|
|
15
|
-
- server/
|
|
16
|
-
- client/
|
|
17
|
-
- test reports
|
|
18
|
-
- deployment manifests
|
|
19
|
-
constraints:
|
|
20
|
-
- overlap_policy is either strict or tolerant
|
|
21
|
-
- Replanning happens only after a loop completes
|
|
22
|
-
anchor_plan:
|
|
23
|
-
role: teacher prior for decomposition axes, scope, and invariants
|
|
24
|
-
mutability: append evidence-driven refinements, but do not silently discard it
|
|
25
|
-
done_when:
|
|
26
|
-
- Legacy summary of repository-level acceptance conditions
|
|
27
|
-
loop_done:
|
|
28
|
-
- Current plan backlog is exhausted (`pending == 0`)
|
|
29
|
-
run_done:
|
|
30
|
-
- A fresh repository-wide rescan after `loop_done` yields no materially new tasks
|
|
31
|
-
repository_done:
|
|
32
|
-
- `run_done` plus repository-level deployment and verification gates pass
|
|
33
|
-
blocked_when:
|
|
34
|
-
- Required context is missing
|
|
35
|
-
- Verification cannot be made meaningful
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Plan Contract
|
|
39
|
-
|
|
40
|
-
The planner emits one global task graph per plan version.
|
|
41
|
-
|
|
42
|
-
```yaml
|
|
43
|
-
run_name: admin-console-development
|
|
44
|
-
plan_version: 2
|
|
45
|
-
summary: >
|
|
46
|
-
Current global understanding of the repo and the plan
|
|
47
|
-
overlap_policy: strict | tolerant
|
|
48
|
-
anchor_alignment:
|
|
49
|
-
status: aligned | drifted
|
|
50
|
-
notes:
|
|
51
|
-
- why the live plan still matches or intentionally diverges from the anchor plan
|
|
52
|
-
relevant_files:
|
|
53
|
-
- path: server/api/app.py
|
|
54
|
-
reason: current composition root
|
|
55
|
-
completion_policy:
|
|
56
|
-
done_when:
|
|
57
|
-
- Legacy summary mirroring `repository_done`
|
|
58
|
-
loop_done:
|
|
59
|
-
- Current plan backlog is exhausted (`pending == 0`)
|
|
60
|
-
run_done:
|
|
61
|
-
- A fresh repository-wide rescan after `loop_done` yields no materially new tasks
|
|
62
|
-
repository_done:
|
|
63
|
-
- `run_done` plus repository-level deployment and verification gates pass
|
|
64
|
-
replan_when:
|
|
65
|
-
- overlap or verification residuals create materially new work
|
|
66
|
-
tasks:
|
|
67
|
-
- id: T000001
|
|
68
|
-
step: 1
|
|
69
|
-
kind: analysis
|
|
70
|
-
title: map router seams
|
|
71
|
-
objective: identify composition boundaries without editing
|
|
72
|
-
owned_paths:
|
|
73
|
-
- server/api/app.py
|
|
74
|
-
read_paths:
|
|
75
|
-
- server/api/http
|
|
76
|
-
depends_on: []
|
|
77
|
-
deliverables:
|
|
78
|
-
- concrete seam report
|
|
79
|
-
acceptance_criteria:
|
|
80
|
-
- ownership boundaries are explicit
|
|
81
|
-
verification_commands: []
|
|
82
|
-
status: pending
|
|
83
|
-
worker_prompt: inspect and write the local report
|
|
84
|
-
steps:
|
|
85
|
-
- step: 1
|
|
86
|
-
goal: generate low-conflict facts and edits
|
|
87
|
-
task_ids:
|
|
88
|
-
- T001
|
|
89
|
-
merge_checks:
|
|
90
|
-
- if strict: no overlapping ownership
|
|
91
|
-
- if tolerant: overlap conflicts are surfaced as residuals
|
|
92
|
-
- next-loop prerequisites are clearer
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Worker Result Contract
|
|
96
|
-
|
|
97
|
-
Every worker returns one structured result JSON.
|
|
98
|
-
|
|
99
|
-
```yaml
|
|
100
|
-
task_id: T001
|
|
101
|
-
status: completed | partial | blocked | failed
|
|
102
|
-
summary: >
|
|
103
|
-
What happened
|
|
104
|
-
changed_files:
|
|
105
|
-
- path strings
|
|
106
|
-
verification:
|
|
107
|
-
- command: pytest ...
|
|
108
|
-
status: passed | failed | not_run
|
|
109
|
-
details: short evidence
|
|
110
|
-
blockers:
|
|
111
|
-
- exact blockers
|
|
112
|
-
integration_notes:
|
|
113
|
-
- facts needed by the integrator
|
|
114
|
-
residual_signals:
|
|
115
|
-
- overlaps, stale assumptions, merge conflicts, or unmet invariants
|
|
116
|
-
proposed_follow_up_tasks:
|
|
117
|
-
- title: add integration task
|
|
118
|
-
kind: integration
|
|
119
|
-
objective: reconcile router seams
|
|
120
|
-
owned_paths:
|
|
121
|
-
- server/api
|
|
122
|
-
depends_on:
|
|
123
|
-
- T001
|
|
124
|
-
reason: interfaces diverged
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Evidence Ladder
|
|
128
|
-
|
|
129
|
-
Use the strongest verifier available:
|
|
130
|
-
|
|
131
|
-
1. Deterministic command or test
|
|
132
|
-
2. Static invariant or type check
|
|
133
|
-
3. Repository review with concrete file evidence
|
|
134
|
-
4. Heuristic confidence only
|
|
135
|
-
|
|
136
|
-
When a task cannot reach at least level 3 evidence, carry that uncertainty into the next plan.
|
|
137
|
-
|
|
138
|
-
In `tolerant` mode, do not try to fully prevent overlap. Record it precisely, then plan the next loop around the residual.
|
|
139
|
-
|
|
140
|
-
Anchor-plan drift is not silent metadata. When the live plan diverges from the first plan's decomposition or invariants, emit explicit residual or repair work.
|
|
141
|
-
|
|
142
|
-
Backlog exhaustion is not the same as repository completion. A plan can end with `loop_done` and still require a fresh repository-wide OTRO rescan before you can declare `run_done` or `repository_done`.
|
|
143
|
-
|
|
144
|
-
OTRO is not refactor-specific. The same contract applies to new development, feature extension, bug repair, refactor, and deployment repair as long as the available artifacts and the current repository state are explicit.
|
|
145
|
-
|
|
146
|
-
Task IDs are not capped at three digits. OTRO accepts `T001` through `T999999999`, and runtime-generated split tasks continue the numeric sequence automatically.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Orchestration Loop
|
|
2
|
-
|
|
3
|
-
Use this control loop to run a global-plan, loop-execution repository workflow.
|
|
4
|
-
|
|
5
|
-
## Lifecycle
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
goal -> initial global plan -> loop dispatch -> loop results -> integration -> next plan
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Scheduling Rule
|
|
12
|
-
|
|
13
|
-
Prefer tasks that are:
|
|
14
|
-
|
|
15
|
-
- low-conflict in owned paths
|
|
16
|
-
- high-impact on later loop steps
|
|
17
|
-
- likely to reduce uncertainty
|
|
18
|
-
- easy to verify locally
|
|
19
|
-
|
|
20
|
-
## Main Loop
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
initialize run workspace
|
|
24
|
-
write goal.md
|
|
25
|
-
plan globally
|
|
26
|
-
|
|
27
|
-
while not done:
|
|
28
|
-
pick next pending loop frontier
|
|
29
|
-
verify owned paths are disjoint
|
|
30
|
-
dispatch one codex exec worker per task
|
|
31
|
-
collect JSON results
|
|
32
|
-
integrate the loop
|
|
33
|
-
emit next plan version
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Replan Triggers
|
|
37
|
-
|
|
38
|
-
Replan after every loop step, and sooner only if:
|
|
39
|
-
|
|
40
|
-
- a worker fails to return valid JSON
|
|
41
|
-
- two tasks unexpectedly touch the same ownership boundary
|
|
42
|
-
- verification invalidates the current global assumptions
|
|
43
|
-
- integration exposes a missing cross-file task
|
|
44
|
-
|
|
45
|
-
## Stop Conditions
|
|
46
|
-
|
|
47
|
-
Close the run as:
|
|
48
|
-
|
|
49
|
-
- `solved` when repository-level done criteria are satisfied
|
|
50
|
-
- `blocked` when required inputs or capabilities are missing
|
|
51
|
-
- `exhausted` when further loops stop producing verified progress
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Runtime
|
|
2
|
-
|
|
3
|
-
Use the bundled scripts to run the workflow as a real `codex exec` process farm for artifact-grounded development loops.
|
|
4
|
-
|
|
5
|
-
## Run Layout
|
|
6
|
-
|
|
7
|
-
Each orchestration run lives under `.codex/skills/otro/runs/<run-name>/`.
|
|
8
|
-
|
|
9
|
-
- `goal.md`: repository-wide objective, input artifacts, constraints, and done criteria
|
|
10
|
-
- `config.json`: model, concurrency, and overlap policy settings
|
|
11
|
-
- `state.json`: current plan version and current loop pointer
|
|
12
|
-
- `plans/anchor-plan.json`: the first accepted global plan, kept as the teacher prior for later replanning
|
|
13
|
-
- `plans/current-plan.json`: latest global TODO/DAG
|
|
14
|
-
- `results/loop-<n>.json`: collected task results for a finished loop
|
|
15
|
-
- `loops/loop-<n>/<task-id>/`: per-task prompt, result, and Codex log
|
|
16
|
-
|
|
17
|
-
## Commands
|
|
18
|
-
|
|
19
|
-
Initialize a run:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
.codex/skills/otro/scripts/init_run.sh my-run
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Generate the initial global plan:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
python3 .codex/skills/otro/scripts/plan_loop.py .codex/skills/otro/runs/my-run
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Execute one loop step in parallel:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
python3 .codex/skills/otro/scripts/run_loop_step.py .codex/skills/otro/runs/my-run --loop 1
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Reconcile the completed loop into the next plan:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
python3 .codex/skills/otro/scripts/reconcile_loop.py .codex/skills/otro/runs/my-run --loop 1
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Run the loop end-to-end for a bounded number of loop steps:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
python3 .codex/skills/otro/scripts/run_loop.py .codex/skills/otro/runs/my-run --max-loops 2
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Protocol Notes
|
|
50
|
-
|
|
51
|
-
- The planner owns the global task graph and must consider both repository state and upstream development artifacts.
|
|
52
|
-
- When the repository defines canonical artifact roots such as `sdd/`, OTRO must use those roots for planning/build/verify evidence instead of inventing a parallel `docs/` tree.
|
|
53
|
-
- The first accepted plan is copied to `plans/anchor-plan.json` and remains the semantic anchor for later replans.
|
|
54
|
-
- Workers own only their `owned_paths`.
|
|
55
|
-
- The barrier is the loop boundary.
|
|
56
|
-
- Replanning happens only after a loop step completes and its results are integrated.
|
|
57
|
-
- Replanning must consider both the current repository state and the anchor plan so temporary overlap does not erase the original objective structure.
|
|
58
|
-
- Typical artifact inputs include `sdd/`, requirement docs, API contracts, wireframes, test reports, logs, deployment manifests, and the current codebase itself.
|
|
59
|
-
- `overlap_policy: strict` rejects overlapping `owned_paths` inside a loop.
|
|
60
|
-
- `overlap_policy: tolerant` allows overlap and treats conflicts as residual inputs for the next loop.
|
|
61
|
-
- `max_parallel: "all"` means "spawn every currently ready task in the loop at once".
|
|
62
|
-
- Task IDs are scalable: OTRO accepts `T001` through `T999999999`.
|
|
63
|
-
- OTRO completion is tiered:
|
|
64
|
-
- `loop_done`: the current plan backlog is exhausted (`pending == 0`).
|
|
65
|
-
- `run_done`: after `loop_done`, a fresh repository-wide rescan produces no materially new tasks.
|
|
66
|
-
- `repository_done`: `run_done` plus repository-level deployment and verification gates succeed.
|
|
67
|
-
- `run_loop.py --until-done` only drives the current plan until `loop_done`. It does not by itself prove `repository_done`.
|
|
68
|
-
- After `loop_done`, run a fresh global planning pass or open a new OTRO run to rescan the repository. If that rescan emits new work, continue OTRO with the new backlog instead of claiming completion.
|
|
69
|
-
- Default planning capacity is high:
|
|
70
|
-
- `max_tasks_per_step: 10000`
|
|
71
|
-
- `max_tasks_total: 50000`
|
|
72
|
-
- Large plans are allowed even when a given runtime cannot physically execute every ready task at once; execution fan-out is still bounded by the host process environment.
|
|
73
|
-
- Timeout should be model-aware and task-kind-aware. OTRO supports:
|
|
74
|
-
- `planner_timeout_seconds`
|
|
75
|
-
- `worker_timeout_seconds`
|
|
76
|
-
- `worker_timeout_seconds_by_kind`
|
|
77
|
-
- Current OTRO default is `300s` for planner and workers, including per-kind overrides. If that is too tight, increase it per run after observing timeout residuals.
|
|
78
|
-
- Run-local orchestration state must stay under `.codex/skills/otro/runs/<run-name>/`; do not reuse a shared repo-level plan file across runs.
|
|
79
|
-
- Canonical plan contracts use `step`/`steps`; `wave` remains a legacy compatibility alias for older runs and evidence snapshots.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# OTRO Run Workspace
|
|
2
|
-
|
|
3
|
-
This directory holds run-local OTRO orchestration state.
|
|
4
|
-
|
|
5
|
-
- Canonical path: `.codex/skills/otro/runs/`
|
|
6
|
-
- Scope: OTRO planner state, loop results, worker prompts, and run-local artifacts
|
|
7
|
-
|
|
8
|
-
Conventions:
|
|
9
|
-
- Keep each run under a named subfolder, e.g., `backend-ddd-refactor/`.
|
|
10
|
-
- Store `goal.md`, `config.json`, `state.json`, `plans/`, `results/`, and loop worker artifacts inside the run folder.
|
|
11
|
-
- Keep repository delivery artifacts in the repo's canonical system such as `sdd/`; OTRO run state does not replace project documentation.
|