codex-orchestrator 0.1.26 → 0.1.27
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/CHANGELOG.md +12 -0
- package/README.md +19 -7
- package/dist/src/cli.js +0 -8
- package/dist/src/cli.js.map +1 -1
- package/dist/src/config/constants.d.ts +1 -1
- package/dist/src/config/constants.d.ts.map +1 -1
- package/dist/src/config/constants.js +6 -1
- package/dist/src/config/constants.js.map +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/runner/issue-state-machine.d.ts +1 -1
- package/dist/src/runner/issue-state-machine.d.ts.map +1 -1
- package/dist/src/runner/issue-state-machine.js +5 -0
- package/dist/src/runner/issue-state-machine.js.map +1 -1
- package/dist/src/runner/issue-tree.d.ts.map +1 -1
- package/dist/src/runner/issue-tree.js +0 -12
- package/dist/src/runner/issue-tree.js.map +1 -1
- package/dist/src/setup/project-config.d.ts.map +1 -1
- package/dist/src/setup/project-config.js +19 -4
- package/dist/src/setup/project-config.js.map +1 -1
- package/dist/src/setup/setup-command.d.ts +0 -1
- package/dist/src/setup/setup-command.d.ts.map +1 -1
- package/dist/src/setup/setup-command.js +34 -2
- package/dist/src/setup/setup-command.js.map +1 -1
- package/dist/src/setup/workflows.d.ts +1 -2
- package/dist/src/setup/workflows.d.ts.map +1 -1
- package/dist/src/setup/workflows.js +8 -32
- package/dist/src/setup/workflows.js.map +1 -1
- package/docs/deep-dive.md +6 -3
- package/package.json +8 -1
- package/prompts/workflows/breakdown-review.md +46 -3
- package/prompts/workflows/issue-breakdown.md +116 -3
- package/prompts/workflows/issue-tree-orchestration.md +156 -3
- package/prompts/workflows/prd.md +68 -3
- package/prompts/workflows/scoped-implementation.md +81 -22
- package/prompts/workflows/triage.md +137 -3
package/prompts/workflows/prd.md
CHANGED
|
@@ -1,4 +1,69 @@
|
|
|
1
|
-
# PRD Workflow
|
|
1
|
+
# PRD Workflow
|
|
2
2
|
|
|
3
|
-
Turn the parent issue and repository context into a
|
|
4
|
-
|
|
3
|
+
Turn the current parent issue, conversation context, and repository context into a Product Requirements Document. Do not interview the user by default; synthesize what is already known, and record open questions instead of inventing product or technical decisions.
|
|
4
|
+
|
|
5
|
+
Use the repository's issue tracker and triage label vocabulary from repo instructions when available. Use the project's domain glossary vocabulary throughout the PRD, and respect ADRs in the area being changed.
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
1. Explore the repository enough to understand the current product and codebase state.
|
|
10
|
+
2. Identify the major modules, interfaces, contracts, or flows likely to change.
|
|
11
|
+
3. Actively look for opportunities to define deep modules: small, testable interfaces that encapsulate meaningful behavior.
|
|
12
|
+
4. Capture unresolved product, contract, external dependency, or validation questions explicitly.
|
|
13
|
+
5. Write the PRD using the template below.
|
|
14
|
+
6. If the execution environment has issue-tracker access and the caller requested publication, publish the PRD to the configured tracker and apply the triage entry label.
|
|
15
|
+
|
|
16
|
+
## PRD Template
|
|
17
|
+
|
|
18
|
+
### Problem Statement
|
|
19
|
+
|
|
20
|
+
Describe the problem from the user's perspective. Name the pain, missing capability, or operational risk without assuming an implementation.
|
|
21
|
+
|
|
22
|
+
### Solution
|
|
23
|
+
|
|
24
|
+
Describe the desired solution from the user's perspective. Focus on outcomes and observable behavior.
|
|
25
|
+
|
|
26
|
+
### User Stories
|
|
27
|
+
|
|
28
|
+
Provide a numbered list of user stories in this format:
|
|
29
|
+
|
|
30
|
+
1. As an `<actor>`, I want `<feature>`, so that `<benefit>`.
|
|
31
|
+
|
|
32
|
+
Cover the important actors, workflows, edge cases, and operational scenarios.
|
|
33
|
+
|
|
34
|
+
### Implementation Decisions
|
|
35
|
+
|
|
36
|
+
List implementation decisions already known or confirmed. Include:
|
|
37
|
+
|
|
38
|
+
- modules, contracts, or interfaces expected to change;
|
|
39
|
+
- schema, DTO, API, or persistence decisions;
|
|
40
|
+
- state machine, background job, auth, permission, caching, or integration decisions;
|
|
41
|
+
- specific interactions between systems;
|
|
42
|
+
- rejected approaches and why they are rejected.
|
|
43
|
+
|
|
44
|
+
Do not include brittle file paths or line numbers. If a prototype produced a snippet that captures a decision more precisely than prose, include only the decision-rich part and note that it came from a prototype.
|
|
45
|
+
|
|
46
|
+
### Testing Decisions
|
|
47
|
+
|
|
48
|
+
List testing decisions. Include:
|
|
49
|
+
|
|
50
|
+
- what behavior must be proven through public interfaces;
|
|
51
|
+
- which modules or flows need tests;
|
|
52
|
+
- existing prior art in the repository;
|
|
53
|
+
- required smoke, browser, mobile, API, or live validation;
|
|
54
|
+
- cases where a deterministic test seam is missing and must be created or explicitly accepted as risk.
|
|
55
|
+
|
|
56
|
+
### Out of Scope
|
|
57
|
+
|
|
58
|
+
List adjacent behavior that should not be included in this PRD.
|
|
59
|
+
|
|
60
|
+
### Further Notes
|
|
61
|
+
|
|
62
|
+
Record open questions, migration notes, rollout notes, compatibility concerns, and follow-up ideas.
|
|
63
|
+
|
|
64
|
+
## Quality Bar
|
|
65
|
+
|
|
66
|
+
- The PRD must be durable: useful even if files move.
|
|
67
|
+
- The PRD must be specific enough to break into vertical implementation issues.
|
|
68
|
+
- Do not hide unresolved decisions inside implementation work.
|
|
69
|
+
- Do not mark work as agent-ready when the PRD still depends on unconfirmed external contracts, credentials, manual design decisions, or ambiguous acceptance criteria.
|
|
@@ -1,22 +1,81 @@
|
|
|
1
|
-
# Scoped Implementation Workflow
|
|
2
|
-
|
|
3
|
-
Implement one scoped issue
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
# Scoped Implementation Workflow / Spec Implementer
|
|
2
|
+
|
|
3
|
+
Implement one scoped issue or approved implementation spec. Follow the issue, repo policy, and runner completion contract exactly. Do not redesign the work unless repo reality proves a blocker.
|
|
4
|
+
|
|
5
|
+
## Core Rules
|
|
6
|
+
|
|
7
|
+
1. Keep scope narrow. Do not broaden the issue, add unrelated cleanup, or invent adjacent features.
|
|
8
|
+
2. Treat protected paths, rejected approaches, out-of-scope items, and repo instructions as hard constraints.
|
|
9
|
+
3. Confirm required services, env vars, fixtures, commands, and repo state before editing.
|
|
10
|
+
4. Stop if exact execution would require guessing about contracts, state, ownership, credentials, or validation.
|
|
11
|
+
5. Prefer existing local patterns and deep module boundaries over new abstractions.
|
|
12
|
+
6. Do not add pass-through modules, one-adapter seams, or test-only helpers unless they improve real locality or leverage.
|
|
13
|
+
7. Add comments only where they clarify non-obvious behavior.
|
|
14
|
+
|
|
15
|
+
## TDD And Behavior Proof
|
|
16
|
+
|
|
17
|
+
For runtime behavior changes, use strict TDD red-to-green:
|
|
18
|
+
|
|
19
|
+
1. Choose one observable behavior.
|
|
20
|
+
2. Write one focused behavior test first.
|
|
21
|
+
3. Prove the test fails before implementation.
|
|
22
|
+
4. Implement the smallest correct change.
|
|
23
|
+
5. Prove the test passes after implementation.
|
|
24
|
+
6. Repeat vertically for the next behavior.
|
|
25
|
+
7. Refactor only while green.
|
|
26
|
+
|
|
27
|
+
Report the failing/red and passing/green evidence in validation. Do not batch many imagined tests before implementing. If no correct test seam exists, report why the available seams would give false confidence and provide the strongest alternate proof.
|
|
28
|
+
|
|
29
|
+
## Execution Flow
|
|
30
|
+
|
|
31
|
+
1. Read the issue, comments, repo instructions, and relevant docs.
|
|
32
|
+
2. Identify acceptance criteria, blockers, out-of-scope items, validation expectations, and likely source-of-truth owners.
|
|
33
|
+
3. Inspect current git status and avoid reverting user changes.
|
|
34
|
+
4. Implement the smallest complete solution.
|
|
35
|
+
5. Keep validation proportional to risk and blast radius.
|
|
36
|
+
6. Preserve runner-owned publication boundaries: do not push, open PRs, merge, publish, deploy, or mutate GitHub labels/comments.
|
|
37
|
+
7. Produce the structured completion report required by the runner.
|
|
38
|
+
|
|
39
|
+
## Review Gates
|
|
40
|
+
|
|
41
|
+
Run cleanup-review before code-review for medium or large runtime changes, or when repo policy requires it. Fix high-confidence cleanup findings and rerun relevant validation.
|
|
42
|
+
|
|
43
|
+
Run code-review before completion when the issue or repo policy requires it, or when the change touches shared behavior, APIs, persistence, auth, permissions, caching, concurrency, background jobs, navigation, middleware, or multiple runtime files. Fix grounded findings or report blockers with evidence.
|
|
44
|
+
|
|
45
|
+
For compact low-risk changes, focused validation plus a clear completion report is enough unless repo policy says otherwise.
|
|
46
|
+
|
|
47
|
+
## UI And Visual Proof
|
|
48
|
+
|
|
49
|
+
For browser UI work, prepare runner-owned visual proof artifacts when configured. Prefer Playwright for web UI proof, but let the runner execute configured proof commands when the prompt says so.
|
|
50
|
+
|
|
51
|
+
For Android mobile app UI work, use device-backed proof instead of Playwright:
|
|
52
|
+
|
|
53
|
+
1. Run `adb devices -l`.
|
|
54
|
+
2. Prefer a connected non-emulator device serial and set `export ANDROID_SERIAL=<serial>`.
|
|
55
|
+
3. If no device exists, run `emulator -list-avds`, start an AVD in a separate shell with `emulator -avd <avd-name>`, and wait with `adb wait-for-device`.
|
|
56
|
+
4. After selecting the adb target, use Test Android Apps skills when available.
|
|
57
|
+
5. Do not use Playwright as the primary proof path for Android mobile app verification.
|
|
58
|
+
6. If Test Android Apps cannot be enabled, or no usable Android device or emulator is available, report a warning/skipped check with the concrete plugin or adb/emulator reason and proceed only if repo policy allows it.
|
|
59
|
+
|
|
60
|
+
## Stop Conditions
|
|
61
|
+
|
|
62
|
+
Stop and report a blocker if:
|
|
63
|
+
|
|
64
|
+
- a required file, symbol, command, dependency, or interface differs from the issue/spec;
|
|
65
|
+
- a required precondition cannot be satisfied;
|
|
66
|
+
- validation cannot prove the intended behavior with available repo context;
|
|
67
|
+
- completing the work requires touching protected paths or using rejected approaches;
|
|
68
|
+
- the change would require unapproved migration, compatibility logic, external access, or product decisions;
|
|
69
|
+
- review exposes ambiguity that cannot be resolved from code, docs, or the issue;
|
|
70
|
+
- the runner completion contract cannot be satisfied safely.
|
|
71
|
+
|
|
72
|
+
## Completion Standard
|
|
73
|
+
|
|
74
|
+
Do not mark the issue complete until:
|
|
75
|
+
|
|
76
|
+
- every acceptance criterion is implemented, blocked with evidence, or explicitly out of scope;
|
|
77
|
+
- validation commands and behavior proof have run, or skipped checks have concrete reasons;
|
|
78
|
+
- applicable cleanup-review and code-review gates have run;
|
|
79
|
+
- protected paths stayed untouched and rejected approaches were avoided;
|
|
80
|
+
- changed files, validation, skipped checks, residual risks, and blockers are reported;
|
|
81
|
+
- the structured completion report is written exactly where the runner requested it.
|
|
@@ -1,4 +1,138 @@
|
|
|
1
|
-
# Triage Workflow
|
|
1
|
+
# Triage Workflow
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Move issues through a small issue-tracker triage state machine. Every comment or issue posted during triage must start with:
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
> *This was generated by AI during triage.*
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Use the repository's configured label vocabulary. The canonical roles are below; actual labels may differ by repo policy.
|
|
10
|
+
|
|
11
|
+
## Roles
|
|
12
|
+
|
|
13
|
+
Category roles:
|
|
14
|
+
|
|
15
|
+
- `bug`: something is broken.
|
|
16
|
+
- `enhancement`: new feature or improvement.
|
|
17
|
+
|
|
18
|
+
State roles:
|
|
19
|
+
|
|
20
|
+
- `needs-triage`: maintainer needs to evaluate.
|
|
21
|
+
- `needs-info`: waiting on reporter information.
|
|
22
|
+
- `ready-for-agent`: fully specified, ready for AFK agent work.
|
|
23
|
+
- `ready-for-human`: needs human implementation or decision.
|
|
24
|
+
- `wontfix`: will not be actioned.
|
|
25
|
+
|
|
26
|
+
Every triaged issue should carry exactly one category role and one state role. If state roles conflict, stop and ask the maintainer before changing the issue.
|
|
27
|
+
|
|
28
|
+
## Needs Attention View
|
|
29
|
+
|
|
30
|
+
When asked what needs attention, show three buckets, oldest first:
|
|
31
|
+
|
|
32
|
+
1. Unlabeled issues.
|
|
33
|
+
2. Issues in `needs-triage`.
|
|
34
|
+
3. Issues in `needs-info` with reporter activity since the last triage note.
|
|
35
|
+
|
|
36
|
+
Show counts and one-line summaries, then let the maintainer choose.
|
|
37
|
+
|
|
38
|
+
## Triage A Specific Issue
|
|
39
|
+
|
|
40
|
+
1. Gather context: read the full issue body, comments, labels, reporter, and dates.
|
|
41
|
+
2. Parse prior triage notes to avoid re-asking answered questions.
|
|
42
|
+
3. Explore relevant repo context using domain glossary terms and ADRs.
|
|
43
|
+
4. Read `.out-of-scope/*.md` if present and surface matching prior rejections.
|
|
44
|
+
5. Recommend a category and state with reasoning and a short codebase summary.
|
|
45
|
+
6. For bugs, attempt reproduction before final recommendation: trace code, run focused tests or commands, and report successful repro, failed repro, or insufficient detail.
|
|
46
|
+
7. If the issue needs fleshing out, run a grilling or clarification pass before marking it ready.
|
|
47
|
+
8. Apply the outcome only after the requested action is clear.
|
|
48
|
+
|
|
49
|
+
## Outcomes
|
|
50
|
+
|
|
51
|
+
- `ready-for-agent`: post an Agent Brief comment and apply the mapped role.
|
|
52
|
+
- `ready-for-human`: post an Agent Brief-style comment that explains why human work is required.
|
|
53
|
+
- `needs-info`: post triage notes with established facts and specific reporter questions.
|
|
54
|
+
- `wontfix` bug: post a polite explanation and close.
|
|
55
|
+
- `wontfix` enhancement: create or update `.out-of-scope/<concept>.md`, link it from a comment, then close.
|
|
56
|
+
- `needs-triage`: apply the role; comment only if useful.
|
|
57
|
+
|
|
58
|
+
## Agent Brief
|
|
59
|
+
|
|
60
|
+
An Agent Brief is the durable contract an AFK agent will work from. The original issue and discussion are context; the brief is the current specification.
|
|
61
|
+
|
|
62
|
+
Write briefs that are durable, behavioral, complete, and scoped. Avoid file paths and line numbers. Name interfaces, types, commands, contracts, config shapes, and observable behavior when useful.
|
|
63
|
+
|
|
64
|
+
Template:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Agent Brief
|
|
68
|
+
|
|
69
|
+
**Category:** bug / enhancement
|
|
70
|
+
**Summary:** one-line description
|
|
71
|
+
|
|
72
|
+
**Current behavior:**
|
|
73
|
+
Describe what happens now.
|
|
74
|
+
|
|
75
|
+
**Desired behavior:**
|
|
76
|
+
Describe what should happen, including edge cases and error conditions.
|
|
77
|
+
|
|
78
|
+
**Key interfaces:**
|
|
79
|
+
- Interface or contract name - what needs to change and why
|
|
80
|
+
- Config shape or command - expected behavior
|
|
81
|
+
|
|
82
|
+
**Acceptance criteria:**
|
|
83
|
+
- [ ] Specific, testable criterion
|
|
84
|
+
- [ ] Specific, testable criterion
|
|
85
|
+
- [ ] Specific, testable criterion
|
|
86
|
+
|
|
87
|
+
**Out of scope:**
|
|
88
|
+
- Adjacent thing not included
|
|
89
|
+
- Risky interpretation not allowed
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Needs-Info Template
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
## Triage Notes
|
|
96
|
+
|
|
97
|
+
**What we've established so far:**
|
|
98
|
+
|
|
99
|
+
- fact 1
|
|
100
|
+
- fact 2
|
|
101
|
+
|
|
102
|
+
**What we still need from you (@reporter):**
|
|
103
|
+
|
|
104
|
+
- specific question 1
|
|
105
|
+
- specific question 2
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Capture resolved facts under "established so far" so the work is not lost. Questions must be specific and actionable.
|
|
109
|
+
|
|
110
|
+
## Out-Of-Scope Knowledge Base
|
|
111
|
+
|
|
112
|
+
The `.out-of-scope/` directory stores durable records of rejected enhancement requests. One file should represent one concept, not one issue.
|
|
113
|
+
|
|
114
|
+
File shape:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
# Concept Name
|
|
118
|
+
|
|
119
|
+
## Why this is out of scope
|
|
120
|
+
|
|
121
|
+
Durable reason, including project scope, architectural constraints, or strategic decision.
|
|
122
|
+
|
|
123
|
+
## Prior requests
|
|
124
|
+
|
|
125
|
+
- #123 - Request title
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
During triage, check existing out-of-scope records by concept similarity. If a new issue matches a prior rejection, surface it and ask whether the maintainer wants to confirm, reconsider, or proceed as distinct.
|
|
129
|
+
|
|
130
|
+
Only write `.out-of-scope/` records for rejected enhancements, not bugs.
|
|
131
|
+
|
|
132
|
+
## Quick State Override
|
|
133
|
+
|
|
134
|
+
If the maintainer explicitly says to move an issue to a state, trust them. Confirm the exact label/comment/close action, then apply it. If moving to `ready-for-agent` without a grilling session, ask whether they want an Agent Brief written.
|
|
135
|
+
|
|
136
|
+
## Spec Gate Policy
|
|
137
|
+
|
|
138
|
+
Triage does not create implementation specs. When an issue has a `Spec gate` section, preserve it in the Agent Brief and do not expand it into a file-by-file implementation plan.
|