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,35 +0,0 @@
|
|
|
1
|
-
# Planning File Rules
|
|
2
|
-
|
|
3
|
-
## File Location
|
|
4
|
-
|
|
5
|
-
- Default fallback path: `docs/plans/<YYYY-MM-DD>-<topic>.md`
|
|
6
|
-
- If the repository defines `sdd/02_plan/<section>/` as the canonical plan root, store the plan under that section instead.
|
|
7
|
-
- Prefer one active plan file per user request.
|
|
8
|
-
|
|
9
|
-
## Required Sections
|
|
10
|
-
|
|
11
|
-
1. Scope
|
|
12
|
-
2. Assumptions
|
|
13
|
-
3. Acceptance Criteria
|
|
14
|
-
4. Execution Checklist
|
|
15
|
-
5. Work Log
|
|
16
|
-
6. Validation
|
|
17
|
-
7. Risks / Follow-ups
|
|
18
|
-
|
|
19
|
-
## Checklist Rules
|
|
20
|
-
|
|
21
|
-
- Keep each item action-oriented and testable.
|
|
22
|
-
- Keep one item in progress at a time.
|
|
23
|
-
- Replace obsolete items instead of leaving stale tasks.
|
|
24
|
-
|
|
25
|
-
## Work Log Rules
|
|
26
|
-
|
|
27
|
-
- Keep entries short.
|
|
28
|
-
- Include command + outcome + next decision when relevant.
|
|
29
|
-
- Record concrete deployment validation notes when the task includes rollout checks.
|
|
30
|
-
|
|
31
|
-
## Validation Rules
|
|
32
|
-
|
|
33
|
-
- State what command was run.
|
|
34
|
-
- State whether it passed or failed.
|
|
35
|
-
- State what remains unverified.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'EOF'
|
|
6
|
-
Usage: new_plan.sh "title" [repo_root] [section]
|
|
7
|
-
|
|
8
|
-
Create <planning_root>/<YYYY-MM-DD>-<slug>.md from assets/plan-template.md.
|
|
9
|
-
If the repo uses sdd/02_plan/<section>/, pass the section explicitly or via PLAN_SECTION.
|
|
10
|
-
Print the created file path.
|
|
11
|
-
EOF
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if [[ $# -lt 1 ]]; then
|
|
15
|
-
usage >&2
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
title="$1"
|
|
20
|
-
repo_root="${2:-$(pwd)}"
|
|
21
|
-
section="${3:-${PLAN_SECTION:-}}"
|
|
22
|
-
|
|
23
|
-
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
24
|
-
template_path="${script_dir}/../assets/plan-template.md"
|
|
25
|
-
|
|
26
|
-
if [[ ! -f "$template_path" ]]; then
|
|
27
|
-
echo "Template not found: $template_path" >&2
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
slug="$(printf '%s' "$title" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//; s/-{2,}/-/g')"
|
|
32
|
-
if [[ -z "$slug" ]]; then
|
|
33
|
-
slug="plan"
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
today="$(date +%F)"
|
|
37
|
-
if [[ -d "${repo_root}/sdd/02_plan" ]]; then
|
|
38
|
-
if [[ -z "$section" ]]; then
|
|
39
|
-
echo "Repository uses sdd/02_plan/<section>. Provide section as the third argument or PLAN_SECTION." >&2
|
|
40
|
-
echo "Available sections:" >&2
|
|
41
|
-
find "${repo_root}/sdd/02_plan" -mindepth 1 -maxdepth 1 -type d -printf ' %f\n' | sort >&2
|
|
42
|
-
exit 2
|
|
43
|
-
fi
|
|
44
|
-
plans_dir="${repo_root}/sdd/02_plan/${section}"
|
|
45
|
-
else
|
|
46
|
-
plans_dir="${repo_root}/docs/plans"
|
|
47
|
-
fi
|
|
48
|
-
plan_path="${plans_dir}/${today}-${slug}.md"
|
|
49
|
-
|
|
50
|
-
mkdir -p "$plans_dir"
|
|
51
|
-
|
|
52
|
-
if [[ -e "$plan_path" ]]; then
|
|
53
|
-
echo "Plan file already exists: $plan_path" >&2
|
|
54
|
-
exit 1
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
escaped_title="$(printf '%s' "$title" | sed 's/[\/&]/\\&/g')"
|
|
58
|
-
escaped_date="$(printf '%s' "$today" | sed 's/[\/&]/\\&/g')"
|
|
59
|
-
|
|
60
|
-
sed \
|
|
61
|
-
-e "s/{{TITLE}}/${escaped_title}/g" \
|
|
62
|
-
-e "s/{{DATE}}/${escaped_date}/g" \
|
|
63
|
-
"$template_path" > "$plan_path"
|
|
64
|
-
|
|
65
|
-
echo "$plan_path"
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prd
|
|
3
|
-
description: "Generate a Product Requirements Document (PRD) as JSON for Ralph. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# PRD Generator (JSON Only)
|
|
7
|
-
|
|
8
|
-
Create a structured JSON PRD that Ralph can execute deterministically. This PRD is the **single source of truth** for stories, gates, and status.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## The Job
|
|
13
|
-
|
|
14
|
-
1. Receive a feature description from the user
|
|
15
|
-
2. Ask **5–10** clarifying questions (with lettered options), in batches of up to 5 at a time (ask 5, wait for answers, then ask the next batch if needed).
|
|
16
|
-
3. **Always ask about quality gates** (commands that must pass)
|
|
17
|
-
4. Generate a **detailed** JSON PRD and save it to the provided path
|
|
18
|
-
|
|
19
|
-
**Important:** Do NOT implement anything. Only generate JSON.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Step 1: Clarifying Questions
|
|
24
|
-
|
|
25
|
-
Ask questions even if the prompt seems clear. The goal is to capture missing product details, stack choices, and UI/route structure so the PRD is implementable without guesswork. Focus on:
|
|
26
|
-
|
|
27
|
-
- **Problem/Goal:** What problem does this solve?
|
|
28
|
-
- **Core Functionality:** What are the key actions?
|
|
29
|
-
- **Scope/Boundaries:** What should it NOT do?
|
|
30
|
-
- **Success Criteria:** How do we know it's done?
|
|
31
|
-
- **Stack + Environment:** frameworks, hosting, runtime, database, auth approach
|
|
32
|
-
- **UI + Routes:** key screens, navigation, route map, layout constraints
|
|
33
|
-
- **Data Model + Import Format:** entities, relationships, external data shape
|
|
34
|
-
- **Rules/Calculations:** business logic, progression rules, edge cases
|
|
35
|
-
- **Quality Gates:** tests, lint, typecheck, build/dev verification (REQUIRED)
|
|
36
|
-
|
|
37
|
-
Always ask explicitly:
|
|
38
|
-
- **Is this a new project or an existing repo?**
|
|
39
|
-
|
|
40
|
-
### Format Questions Like This:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
1. What is the primary goal of this feature?
|
|
44
|
-
A. Improve user onboarding experience
|
|
45
|
-
B. Increase user retention
|
|
46
|
-
C. Reduce support burden
|
|
47
|
-
D. Other: [please specify]
|
|
48
|
-
|
|
49
|
-
2. Who is the target user?
|
|
50
|
-
A. New users only
|
|
51
|
-
B. Existing users only
|
|
52
|
-
C. All users
|
|
53
|
-
D. Admin users only
|
|
54
|
-
|
|
55
|
-
3. What quality commands must pass for each story?
|
|
56
|
-
A. npm test
|
|
57
|
-
B. npm run lint
|
|
58
|
-
C. npm run typecheck
|
|
59
|
-
D. Other: [specify]
|
|
60
|
-
|
|
61
|
-
Note: All example questions and options in this section are illustrative only. Do not copy them verbatim into the PRD unless the user explicitly chooses them. Derive the final quality gates and requirements from the user's answers and the feature context.
|
|
62
|
-
|
|
63
|
-
4. What stack + hosting are we using (and any constraints)?
|
|
64
|
-
A. React + Vite (static hosting)
|
|
65
|
-
B. Next.js (Node/Edge)
|
|
66
|
-
C. TanStack Start (Cloudflare)
|
|
67
|
-
D. Other: [specify]
|
|
68
|
-
|
|
69
|
-
5. What UI screens/routes are required?
|
|
70
|
-
A. Minimal (1–2 pages)
|
|
71
|
-
B. Basic app shell (dashboard + detail pages)
|
|
72
|
-
C. Full routing map (list all routes)
|
|
73
|
-
D. Other: [specify]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Step 2: JSON Structure
|
|
79
|
-
|
|
80
|
-
Output a JSON file with this shape (include detailed top-level fields so the PRD is fully self-contained):
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"version": 1,
|
|
85
|
-
"project": "Feature Name",
|
|
86
|
-
"overview": "Short problem + solution summary",
|
|
87
|
-
"goals": [
|
|
88
|
-
"Goal 1",
|
|
89
|
-
"Goal 2"
|
|
90
|
-
],
|
|
91
|
-
"nonGoals": [
|
|
92
|
-
"Explicitly out of scope items"
|
|
93
|
-
],
|
|
94
|
-
"successMetrics": [
|
|
95
|
-
"How success is measured"
|
|
96
|
-
],
|
|
97
|
-
"openQuestions": [
|
|
98
|
-
"Remaining unknowns"
|
|
99
|
-
],
|
|
100
|
-
"stack": {
|
|
101
|
-
"framework": "TanStack Start",
|
|
102
|
-
"hosting": "Cloudflare",
|
|
103
|
-
"database": "D1",
|
|
104
|
-
"auth": "describe approach"
|
|
105
|
-
},
|
|
106
|
-
"routes": [
|
|
107
|
-
{ "path": "/", "name": "Home", "purpose": "..." }
|
|
108
|
-
],
|
|
109
|
-
"uiNotes": [
|
|
110
|
-
"Layout or component requirements"
|
|
111
|
-
],
|
|
112
|
-
"dataModel": [
|
|
113
|
-
{ "entity": "Workout", "fields": ["id", "userId", "date", "notes"] }
|
|
114
|
-
],
|
|
115
|
-
"importFormat": {
|
|
116
|
-
"description": "Expected JSON shape",
|
|
117
|
-
"example": { "programName": "..." }
|
|
118
|
-
},
|
|
119
|
-
"rules": [
|
|
120
|
-
"Key business rules / calculations"
|
|
121
|
-
],
|
|
122
|
-
"qualityGates": ["npm run test:ping"],
|
|
123
|
-
"stories": [
|
|
124
|
-
{
|
|
125
|
-
"id": "US-001",
|
|
126
|
-
"title": "Short story title",
|
|
127
|
-
"status": "open",
|
|
128
|
-
"dependsOn": [],
|
|
129
|
-
"description": "As a [user], I want [feature] so that [benefit].",
|
|
130
|
-
"acceptanceCriteria": [
|
|
131
|
-
"Specific verifiable criterion",
|
|
132
|
-
"Another criterion"
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Rules
|
|
140
|
-
- **IDs**: Sequential (`US-001`, `US-002`, ...)
|
|
141
|
-
- **Status**: Always `"open"` for new stories
|
|
142
|
-
- **DependsOn**: Use IDs only; empty array if none
|
|
143
|
-
- **Quality Gates**: Only at the top-level `qualityGates`
|
|
144
|
-
- **Acceptance Criteria**: Verifiable, specific, testable
|
|
145
|
-
- **Every story must include**: at least 1 example + 1 negative case
|
|
146
|
-
- **UI stories**: include explicit routes, components, and UI states
|
|
147
|
-
- **New projects**: include initial setup stories (scaffold, env/config, local dev, deploy basics, **package installs**)
|
|
148
|
-
- **Dependencies**: any new package/library introduced must be called out with install commands in acceptance criteria (e.g., `npm install <pkg>`), plus any required config or scripts.
|
|
149
|
-
- **Ordering**: if this is a new project, the **first story must be setup** (scaffold + installs + scripts + env/config). Migrations or data model work come after setup.
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Output Requirements
|
|
154
|
-
|
|
155
|
-
- Save the JSON to the exact path provided in the prompt (e.g., `.agents/tasks/prd-<slug>.json`)
|
|
156
|
-
- Output **only** the JSON file content (no Markdown PRD)
|
|
157
|
-
- Do not include extra commentary in the file
|
|
158
|
-
|
|
159
|
-
After saving, tell the user:
|
|
160
|
-
`PRD JSON saved to <path>. Close this chat and run \`ralph build\`.`
|
|
161
|
-
|
|
162
|
-
If the prompt provides a **directory** (not a filename), choose a short filename:
|
|
163
|
-
- `prd-<short-slug>.json` where `<short-slug>` is 1–3 meaningful words (avoid filler like “i want to”).
|
|
164
|
-
- Examples: `prd-workout-tracker.json`, `prd-usage-billing.json`
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Story Size (Critical)
|
|
169
|
-
|
|
170
|
-
Each story must be completable in a **single Ralph iteration**.
|
|
171
|
-
If a story feels too large, split it into multiple smaller stories with dependencies.
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Example Output (JSON)
|
|
176
|
-
|
|
177
|
-
```json
|
|
178
|
-
{
|
|
179
|
-
"version": 1,
|
|
180
|
-
"project": "Task Priority System",
|
|
181
|
-
"overview": "Add priority levels to tasks so users can focus on what matters most.",
|
|
182
|
-
"goals": [
|
|
183
|
-
"Allow assigning priority (high/medium/low) to any task",
|
|
184
|
-
"Enable filtering by priority"
|
|
185
|
-
],
|
|
186
|
-
"nonGoals": [
|
|
187
|
-
"No automatic priority assignment"
|
|
188
|
-
],
|
|
189
|
-
"successMetrics": [
|
|
190
|
-
"Users can change priority in under 2 clicks"
|
|
191
|
-
],
|
|
192
|
-
"openQuestions": [
|
|
193
|
-
"Should priority affect ordering within a column?"
|
|
194
|
-
],
|
|
195
|
-
"stack": {
|
|
196
|
-
"framework": "React",
|
|
197
|
-
"hosting": "Cloudflare Pages",
|
|
198
|
-
"database": "D1",
|
|
199
|
-
"auth": "single shared login"
|
|
200
|
-
},
|
|
201
|
-
"routes": [
|
|
202
|
-
{ "path": "/tasks", "name": "Task List", "purpose": "View and filter tasks" },
|
|
203
|
-
{ "path": "/tasks/:id", "name": "Task Detail", "purpose": "Edit task priority" }
|
|
204
|
-
],
|
|
205
|
-
"uiNotes": [
|
|
206
|
-
"Priority badge colors: high=red, medium=yellow, low=gray"
|
|
207
|
-
],
|
|
208
|
-
"dataModel": [
|
|
209
|
-
{ "entity": "Task", "fields": ["id", "title", "priority"] }
|
|
210
|
-
],
|
|
211
|
-
"importFormat": {
|
|
212
|
-
"description": "Not applicable",
|
|
213
|
-
"example": {}
|
|
214
|
-
},
|
|
215
|
-
"rules": [
|
|
216
|
-
"Priority defaults to medium when not set"
|
|
217
|
-
],
|
|
218
|
-
"qualityGates": ["npm run test:ping"],
|
|
219
|
-
"stories": [
|
|
220
|
-
{
|
|
221
|
-
"id": "US-001",
|
|
222
|
-
"title": "Add priority field to database",
|
|
223
|
-
"status": "open",
|
|
224
|
-
"dependsOn": [],
|
|
225
|
-
"description": "As a developer, I want to store task priority so it persists across sessions.",
|
|
226
|
-
"acceptanceCriteria": [
|
|
227
|
-
"Add priority column with default 'medium'",
|
|
228
|
-
"Example: creating a task without priority -> defaults to 'medium'",
|
|
229
|
-
"Negative case: invalid priority 'urgent' -> validation error",
|
|
230
|
-
"Migration runs successfully"
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ralph-loop
|
|
3
|
-
description: Run a bounded implement-test-fix loop with explicit stop conditions. Use when the user asks for "Ralph Loop", "랄프루프", iterative bug fixing, or any task that needs repeated edits and verification until stable success.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Ralph Loop
|
|
7
|
-
|
|
8
|
-
## Objective
|
|
9
|
-
|
|
10
|
-
Run short cycles of reproduce -> edit -> validate -> decide until a clear stop condition is met.
|
|
11
|
-
|
|
12
|
-
## Loop Contract
|
|
13
|
-
|
|
14
|
-
1. Lock a failing reproduction or target validation command.
|
|
15
|
-
2. Make one focused change per iteration.
|
|
16
|
-
3. Run validation immediately.
|
|
17
|
-
4. Classify outcome as pass, fail-same, fail-new, flaky, or no-signal.
|
|
18
|
-
5. Decide next action before editing again.
|
|
19
|
-
|
|
20
|
-
## Stop Conditions
|
|
21
|
-
|
|
22
|
-
- Validation passes.
|
|
23
|
-
- Maximum iterations reached.
|
|
24
|
-
- Same failure repeats 3 times with no new signal.
|
|
25
|
-
- Work is blocked by missing dependency or external decision.
|
|
26
|
-
|
|
27
|
-
## Automation
|
|
28
|
-
|
|
29
|
-
Use `scripts/loop_until_success.sh` for command-level loops.
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
scripts/loop_until_success.sh --cmd "pytest -q tests/foo_test.py" --max 6
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Reporting
|
|
36
|
-
|
|
37
|
-
After stopping, report:
|
|
38
|
-
|
|
39
|
-
- Iterations used
|
|
40
|
-
- Final command status
|
|
41
|
-
- Files changed
|
|
42
|
-
- Remaining risk or follow-up
|
|
43
|
-
|
|
44
|
-
## Reference
|
|
45
|
-
|
|
46
|
-
- Failure handling playbook: `references/failure-triage.md`
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Failure Triage
|
|
2
|
-
|
|
3
|
-
## Outcome Labels
|
|
4
|
-
|
|
5
|
-
- `pass`: validation succeeded
|
|
6
|
-
- `fail-same`: same primary failure signature
|
|
7
|
-
- `fail-new`: new failure appears
|
|
8
|
-
- `flaky`: pass/fail alternates without code change
|
|
9
|
-
- `no-signal`: command could not run meaningfully
|
|
10
|
-
|
|
11
|
-
## Action Rules
|
|
12
|
-
|
|
13
|
-
1. For `fail-same`:
|
|
14
|
-
- reduce scope of the previous change
|
|
15
|
-
- inspect the exact failing assertion or stack line
|
|
16
|
-
|
|
17
|
-
2. For `fail-new`:
|
|
18
|
-
- decide if regression is acceptable
|
|
19
|
-
- if not, revert or patch regression first
|
|
20
|
-
|
|
21
|
-
3. For `flaky`:
|
|
22
|
-
- rerun once without edits
|
|
23
|
-
- if still unstable, record nondeterminism risk explicitly
|
|
24
|
-
|
|
25
|
-
4. For `no-signal`:
|
|
26
|
-
- fix environment or command setup first
|
|
27
|
-
- do not continue feature edits until signal exists
|
|
28
|
-
|
|
29
|
-
## Escalation
|
|
30
|
-
|
|
31
|
-
- Stop after 3 repeated `fail-same` outcomes with no new evidence.
|
|
32
|
-
- Ask for user decision when tradeoffs are product-facing or destructive.
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'EOF'
|
|
6
|
-
Usage:
|
|
7
|
-
loop_until_success.sh --cmd "<command>" [--max N] [--sleep seconds] [--workdir path]
|
|
8
|
-
|
|
9
|
-
Options:
|
|
10
|
-
--cmd Command to run in a shell (required)
|
|
11
|
-
--max Maximum iterations (default: 5)
|
|
12
|
-
--sleep Delay between iterations in seconds (default: 0)
|
|
13
|
-
--workdir Directory to run command in (default: current directory)
|
|
14
|
-
EOF
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
cmd=""
|
|
18
|
-
max_iterations=5
|
|
19
|
-
sleep_seconds=0
|
|
20
|
-
workdir="$(pwd)"
|
|
21
|
-
|
|
22
|
-
while [[ $# -gt 0 ]]; do
|
|
23
|
-
case "$1" in
|
|
24
|
-
--cmd)
|
|
25
|
-
cmd="${2:-}"
|
|
26
|
-
shift 2
|
|
27
|
-
;;
|
|
28
|
-
--max)
|
|
29
|
-
max_iterations="${2:-}"
|
|
30
|
-
shift 2
|
|
31
|
-
;;
|
|
32
|
-
--sleep)
|
|
33
|
-
sleep_seconds="${2:-}"
|
|
34
|
-
shift 2
|
|
35
|
-
;;
|
|
36
|
-
--workdir)
|
|
37
|
-
workdir="${2:-}"
|
|
38
|
-
shift 2
|
|
39
|
-
;;
|
|
40
|
-
--help|-h)
|
|
41
|
-
usage
|
|
42
|
-
exit 0
|
|
43
|
-
;;
|
|
44
|
-
*)
|
|
45
|
-
echo "Unknown option: $1" >&2
|
|
46
|
-
usage >&2
|
|
47
|
-
exit 1
|
|
48
|
-
;;
|
|
49
|
-
esac
|
|
50
|
-
done
|
|
51
|
-
|
|
52
|
-
if [[ -z "$cmd" ]]; then
|
|
53
|
-
echo "--cmd is required" >&2
|
|
54
|
-
usage >&2
|
|
55
|
-
exit 1
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
if ! [[ "$max_iterations" =~ ^[0-9]+$ ]] || [[ "$max_iterations" -lt 1 ]]; then
|
|
59
|
-
echo "--max must be a positive integer" >&2
|
|
60
|
-
exit 1
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
if ! [[ "$sleep_seconds" =~ ^[0-9]+$ ]]; then
|
|
64
|
-
echo "--sleep must be a non-negative integer" >&2
|
|
65
|
-
exit 1
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
if [[ ! -d "$workdir" ]]; then
|
|
69
|
-
echo "Workdir not found: $workdir" >&2
|
|
70
|
-
exit 1
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
for ((i = 1; i <= max_iterations; i++)); do
|
|
74
|
-
echo "[loop] iteration $i/$max_iterations"
|
|
75
|
-
set +e
|
|
76
|
-
output="$(
|
|
77
|
-
cd "$workdir"
|
|
78
|
-
bash -lc "$cmd" 2>&1
|
|
79
|
-
)"
|
|
80
|
-
code=$?
|
|
81
|
-
set -e
|
|
82
|
-
|
|
83
|
-
printf '%s\n' "$output"
|
|
84
|
-
|
|
85
|
-
if [[ $code -eq 0 ]]; then
|
|
86
|
-
echo "[loop] success on iteration $i"
|
|
87
|
-
exit 0
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
echo "[loop] failed with exit code $code"
|
|
91
|
-
if [[ $i -lt $max_iterations && $sleep_seconds -gt 0 ]]; then
|
|
92
|
-
sleep "$sleep_seconds"
|
|
93
|
-
fi
|
|
94
|
-
done
|
|
95
|
-
|
|
96
|
-
echo "[loop] exhausted after $max_iterations iterations"
|
|
97
|
-
exit 1
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
FROM node:20-slim
|
|
2
|
-
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
|
|
5
|
-
RUN npm install -g pnpm@10.32.0
|
|
6
|
-
|
|
7
|
-
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
8
|
-
COPY client/platform/package.json ./client/platform/package.json
|
|
9
|
-
|
|
10
|
-
RUN pnpm install --frozen-lockfile --filter @do4ai/client-platform-template...
|
|
11
|
-
|
|
12
|
-
COPY client/platform ./client/platform
|
|
13
|
-
|
|
14
|
-
WORKDIR /app/client/platform
|
|
15
|
-
|
|
16
|
-
EXPOSE 3001
|
|
17
|
-
|
|
18
|
-
CMD ["sh", "-lc", "pnpm exec vite --host 0.0.0.0 --port ${PORT:-3001}"]
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# OTRO Orchestration Policy
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This repository treats OTRO (Overlap-Tolerant Residual Orchestration) as a reusable toolchain runtime for repository-wide artifact-grounded development.
|
|
6
|
-
|
|
7
|
-
## Canonical Terms
|
|
8
|
-
|
|
9
|
-
- `loop`: the top-level OTRO control cycle
|
|
10
|
-
- `step`: the execution slice grouped inside a plan for one loop frontier
|
|
11
|
-
- `loop_done`: the current plan backlog is exhausted
|
|
12
|
-
- `run_done`: a fresh repository-wide rescan after `loop_done` yields no materially new tasks
|
|
13
|
-
- `scope_done`: `run_done` plus scope-level deployment and verification gates pass
|
|
14
|
-
- task IDs: `T{step}{ordinal}` canonical numbering, rewritten per step before a plan is persisted
|
|
15
|
-
|
|
16
|
-
Obsolete alternate field names must not appear in runtime contracts, prompts, plans, or docs. Use `step`, `steps`, and `scope_done` only.
|
|
17
|
-
|
|
18
|
-
## Runtime Rules
|
|
19
|
-
|
|
20
|
-
- OTRO plans must keep run-local state under `.codex/skills/otro/runs/<run-name>/`.
|
|
21
|
-
- The canonical plan schema is `.codex/skills/otro/schemas/step_plan.schema.json`.
|
|
22
|
-
- OTRO runtime must resolve the target repository from run-local configuration or run ancestry, not from a skill directory hard-binding.
|
|
23
|
-
- New OTRO plans must emit `step` on tasks and `steps` on grouped frontier entries.
|
|
24
|
-
- No compatibility adapter is allowed for obsolete field names. Existing historical evidence may stay as history, but the live runtime must not read or write those fields.
|
|
25
|
-
|
|
26
|
-
## Template Ownership
|
|
27
|
-
|
|
28
|
-
- The canonical OTRO skill assets for downstream repositories live under `.codex/skills/otro/`.
|
|
29
|
-
- Downstream repositories should copy or vendor the OTRO skill from this template surface instead of inventing repo-local variants.
|
|
30
|
-
- When OTRO terminology or contracts change, update this policy and the template skill together.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|