Repository navigation
docs(repo): complete research workflow templates (wave 2) - #486
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 593e62f63a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| | Template | Title | Created | Worked | Marker `kind` | | ||
| | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------- | ------ | --------------- | | ||
| | [issue-research.md](issue-research.md) | `Research: <concept> (<package>·C001)` | S1 | S2-S3 | `research` | |
There was a problem hiding this comment.
Add the templates linked from the index
At this commit, issue-research.md does not exist, and repo-wide search likewise finds no issue-plan.md, issue-implement.md, prompts/worker-brief.md, prompts/orchestrator-brief.md, prompts/merger.md, prompts/challenge-pass.md, or prompts/zero-context-reader.md. Consequently the newly required python3 scripts/research_workflow.py check --repo-root . validation stops immediately with missing link target: issue-research.md, and several documented stages have no usable template.
Useful? React with 👍 / 👎.
| - IDs come from the tool (`init`, `ids`, `item add`). Never invent `C001`, `C001.2`, `T001` or `D001`. | ||
| - Some files are written by a command: concept stubs (`init`), notes (`note`), receipts (`resolve-note`), item lines (`item add`, `item set-status`) and generated views (`render`). Their templates show the shape; use the command. | ||
| - Only `render` writes between `<!-- workflow:view <name> -->` and `<!-- /workflow:view <name> -->`. Generated markdown uses headings, `-` bullets, `**bold**`, backticks, links and blank lines; no tables, no `*emphasis*`. |
There was a problem hiding this comment.
Document only workflow commands that are available
The CLI help in this commit registers only init, check, status, ready, note, and resolve-note (scripts/research_workflow.py:1015); ids, item add, item set-status, and render all fail as invalid commands. Because these instructions also prohibit manually assigning IDs or editing items and generated views, following the template workflow leaves writers unable to perform the required updates.
Useful? React with 👍 / 👎.
| ```markdown | ||
| # <Request title> |
There was a problem hiding this comment.
Restore the required state block in the main template
When a package is created from this advertised S0 template, its main.md contains no <!-- workflow:state --> block. read_state() in scripts/research_workflow.py:669-677 requires exactly one such block in main.md, so every check, status, ready, note, and resolve-note invocation rejects the resulting package before it can progress.
Useful? React with 👍 / 👎.
| - Transcript: [transcript.txt](transcript.txt) (sha256 `<sha256>`, <bytes> bytes, <visibility>; source: <source>) | ||
| - Meta design: [design.md](design.md) (review order, waves, run table, research stages) | ||
| - Change log: [changes.md](changes.md) | ||
| - Human review: [human-review.md](human-review.md) (from S6) |
There was a problem hiding this comment.
Defer the human-review link until the file exists
At S0 this link is necessarily dangling: the new index says human-review.md is created by the S6 orchestrator, while this template is created at S0. The package checker validates every local Markdown link and rejects missing targets, so an otherwise valid freshly created package cannot pass the required S0 check --package validation; the same premature link also appears in design.md.
Useful? React with 👍 / 👎.
| | [issue-parent.md](issue-parent.md) | `Handoff: Investigate and plan <concept> (<package>·C001)` | S4 | S5 | `handoff` | | ||
| | [issue-child.md](issue-child.md) | `Design: <facet> (<package>·C001.3)` | S5 | S6 | `design` | | ||
| | [issue-orchestration.md](issue-orchestration.md) | `Handoff: Orchestrate <design or implementation> of <concept> (<package>·C001) as an orchestrator using subagents` | S5, S7 | S6, S8 | `orchestration` | |
There was a problem hiding this comment.
Align the issue rows with the linked templates
The three existing templates do not implement the contracts declared here: issue-parent.md is titled Research: and has an S1 marker without kind, issue-child.md is titled Research Facet: and uses facet rather than item, and issue-orchestration.md uses type rather than kind and omits the concept. Copying those linked templates therefore creates different issue types than the table promises, and the exact-marker lookup described below cannot recognize them on retry, allowing duplicate issues.
Useful? React with 👍 / 👎.
| | [changes.md](changes.md) | `changes.md` | every writer, one line per change | | ||
| | [concept.md](concept.md) | `concepts/C001-<slug>.md` | `init`, then only the concept's owner | | ||
| | [note.md](note.md) | `notes/C001__to__C002__<id>.md` | `note`, by the sender, once | | ||
| | [receipt.md](receipt.md) | `receipts/<note-id>.md` | `resolve-note`, by the receiver | |
There was a problem hiding this comment.
Make resolve-note create the documented receipt
The implemented resolve-note command never writes under receipts/; it appends a workflow:resolution block directly to the receiving concept document, and the checker only scans those concept blocks. Thus invoking the documented command produces no file at the path promised by this table, so consumers following the package layout cannot find the add-only receipt record.
AGENTS.md reference: AGENTS.md:L43-L44
Useful? React with 👍 / 👎.
| ``` | ||
|
|
||
| - A decision belongs here only when its options are genuinely balanced and choosing wrong would be costly to reverse. "None" is a valid list. | ||
| - Only a human moves a decision from `agent-preliminary` to `human-confirmed` or `reversed`. |
There was a problem hiding this comment.
Keep decision source and status transitions separate
The decision format defines agent-preliminary and human-confirmed as values of the Source field, while reversed is a value of the separate Status field. Describing all three as states that a decision is moved between leaves a human reversal ambiguous and can produce an invalid record; the instruction should state which field is updated for confirmation and which fields are updated for reversal.
Useful? React with 👍 / 👎.
|
|
||
| [Main reference](main.md) · [Meta design](design.md) · [Decision records](decisions/) | ||
|
|
||
| Work continues on every default below. To change one, comment on <issue URL> with the decision ID and your choice. A reversal starts rework scoped by `git grep -l <decision ID>`. |
There was a problem hiding this comment.
Scope reversal searches to the current package
Decision IDs are package-local and restart at D001, but this command searches the entire repository. With multiple research packages it returns files for unrelated D007 decisions, and it already matches the canonical template itself, so it cannot reliably identify the files affected by this choice and may initiate unrelated rework; use a package-qualified reference or restrict the search path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c8ea0396c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 1. Boot a fresh worktree and push the empty branch: | ||
| ```sh | ||
| source <git_env> |
There was a problem hiding this comment.
Execute the configured git environment command directly
When these issue instructions are filled from .agents/research-workflow.json, git_env is already the complete command source /home/user/.local/share/plaza-tools/git-env.sh; substituting it into source <git_env> produces source source /home/... and fails before the worktree is created. The same erroneous prefix appears in the parent, child, plan, implement, and orchestration templates, so use <git_env> directly.
AGENTS.md reference: AGENTS.md:L42-L42
Useful? React with 👍 / 👎.
| @@ -0,0 +1,69 @@ | |||
| # Research issue template | |||
|
|
|||
| S1 (`research-prepare`) opens one per concept, after writing the concept's repository map and research questions, to trigger S2 (`concept-research`). Title: `Research: <concept title> (<package>·C001)`. Run the marker search in the [README](README.md) first; afterwards add the issue to the concept's `issues` and run `render`. `<package path>` is `doc/<UTC>_research_<slug>`. | |||
There was a problem hiding this comment.
Route S1 workers to the research issue template
The active S1 procedure in .agents/skills/research-prepare/SKILL.md:21-22 still tells workers to use issue-parent.md, but this change repurposes that template as an S4 handoff issue. Following the normal S1 route therefore publishes the wrong title, marker, role, and completion contract instead of this new S1 research issue, so the new template must also be wired into the skill.
Useful? React with 👍 / 👎.
|
|
||
| ## Goal | ||
|
|
||
| [`concepts/C001-<slug>.md`](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md) is the definitive research record for **<concept title>**: feasibility, prior art and example projects, use cases, anecdotes, alternatives steelmanned, risks with mitigations, every source cited, and every note to or from other concepts resolved by a receipt. |
There was a problem hiding this comment.
Point single-concept issues at the scaffolded files
For the supported default or init --concept path, scaffold() stores the sole concept in main.md and creates neither concepts/C001-<slug>.md nor design.md, while this template always links those multi-concept paths. A research issue created for such a package therefore sends its zero-context worker to nonexistent inputs; derive these links from the concept path in workflow state or make init use the documented layout consistently.
Useful? React with 👍 / 👎.
|
|
||
| ```text | ||
| {{EXCERPT}} | ||
| ```workflow-excerpt T007-T009 |
There was a problem hiding this comment.
Preserve the checker’s exact excerpt representation
check_package() requires every source range to contain the exact representation emitted by excerpt(): an HTML workflow:excerpt marker, a line-anchored transcript link, and a text fence. The new canonical template instead shows a workflow-excerpt fence, so any concept created or normalized to this advertised shape fails check --package with exact source excerpt missing or changed; the template needs to retain the parser-compatible form.
Useful? React with 👍 / 👎.
| ## First steps | ||
|
|
||
| 1. Boot a read-only worktree on `origin/<trunk>` (`source <git_env>`, `git worktree add --detach <worktree_root>/<slug> origin/<trunk>`). | ||
| 2. Run `ready --package <package path>`, `status --live` and `lease list`; dispatch every ready issue with the worker brief. |
There was a problem hiding this comment.
Compute readiness from the orchestration issue graph
For both S6 and S8, this tells the orchestrator to dispatch work from ready --package, but frontier() in scripts/research_workflow.py only evaluates package concepts and their concept-level dependencies; it never reads facet issues, implementation steps, issue blockers, or the graph in this body. An already researched concept is excluded as complete at S6 even when its facet issues are ready, and S8 plan steps are invisible altogether, so the prescribed first action cannot discover the work this orchestration issue is meant to run.
Useful? React with 👍 / 👎.
| ## Prerequisites | ||
|
|
||
| - Blocked by: the research issue [#<n>](https://github.com/<issue_repository>/issues/<n>) (merged). | ||
| - Parallel-safe with: the parent issues of other concepts. |
There was a problem hiding this comment.
Serialize parent handoffs that share package views
In a multi-concept S5 fanout, this declares every concept's parent issue parallel-safe even though each one must edit the same design.md sectioned document and run render against the same main.md. Because the template neither serializes those operations nor acquires a wide-file lease, concurrent parent branches violate the repository's one-writer rule and can merge conflicting or stale package views; schedule the shared updates in separate waves or assign them to one owner.
AGENTS.md reference: AGENTS.md:L43-L43
Useful? React with 👍 / 👎.
| In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." | ||
|
|
||
| - You are the worker for this facet and the only writer of its outputs. Use parallel read-only subagents for separable research. | ||
| - When the evidence settles a choice, decide it and record it. When it does not, record your preliminary choice as `agent-preliminary` and keep going; a conflict with another facet goes to the orchestrator as a note, not into the other facet's files. |
There was a problem hiding this comment.
Provide a valid channel for facet disagreements
When two facets of the same concept disagree, this instruction cannot be followed: the note command requires two distinct known concept IDs, while both facets share the same concept ID and the orchestrator has no concept ID at all. The worker therefore cannot create the directed note that the conflict protocol requires; use an issue comment or introduce a communication record that can address an orchestrator.
Useful? React with 👍 / 👎.
| cd <worktree_root>/<branch-slug> && git push -u origin <branch> | ||
| ``` | ||
| 2. List the steps with their files; mark `requires`, `recommended-after` (with the rework) and parallel groups. | ||
| 3. Write the plan, open the PR, then fan out the implement issues. |
There was a problem hiding this comment.
Merge the plan before publishing runnable implementation issues
This sequence publishes the implement issues and their S8 orchestration issue immediately after merely opening the plan PR, even though every implement issue links to the plan on <trunk> and neither its prerequisites nor the orchestration graph blocks on that PR. The S8 orchestrator can therefore dispatch workers while the plan is absent from trunk or still changing in review; merge the plan first or explicitly block the entire implementation graph on its merge.
Useful? React with 👍 / 👎.
| In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." | ||
|
|
||
| {{CHILD_ISSUES_LIST}} | ||
| - You plan, dispatch, track and decide how work proceeds. Workers design, implement, review and validate. Your only writes are merge commits, state and receipt files, and issue and PR bookkeeping. |
There was a problem hiding this comment.
Assign an owner for the required human-review file
In the S6 variant, the goal requires human-review.md, and that file's own template assigns it to the S6 orchestrator, but this line limits the orchestrator's writes to merge commits, state and receipt files, and issue/PR bookkeeping; the later boundary also prohibits design writing, and no graph worker owns human-review.md. The orchestrator must either be authorized to maintain this required file through a PR or assign it to a worker.
Useful? React with 👍 / 👎.
| Every issue body ends with one marker line, for example `<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S1","kind":"research"} -->` (child issues add `"item"`, implement issues add `"step"`). Before creating an issue, look for its marker so a retry never makes a duplicate; this prints the URL of any issue that already carries it: | ||
|
|
||
| ```sh | ||
| gh issue list --repo <issue_repository> --state all --limit 1000 --json url,body | |
There was a problem hiding this comment.
Search beyond the first 1,000 issues for duplicate markers
In a repository with more than 1,000 issues, this lookup can omit an older issue carrying the same marker and falsely report that no match exists, allowing a retry to create a duplicate despite the stated guarantee. The checked gh issue list --help defines --limit as the maximum number of issues fetched, so use complete pagination or a marker-qualified search rather than a fixed 1,000-issue window.
Useful? React with 👍 / 👎.
What
Completes
planning/workflow/templates/**against BUILD-PLAN section 3 (wave 2, docs-templates owner).In progress. Landed so far:
templates/README.md: index of every template, filling-in rules, issue title table, theworkflow:issuemarker convention and a duplicate-check command.templates/main.md: main reference (intro, file list, reading of garbled input, per-concept sections withworkflow:viewmarkers and 3.7 item lines, G bucket, Issues and PRs grouped by concept).Remaining (will be pushed to this branch):
design.md,changes.md,concept.md(fencedworkflow-stateblock),human-review.md, updatednote.md/receipt.md/decision.md, issue bodies (issue-research,issue-parent,issue-child,issue-orchestration,issue-plan,issue-implement), and prompts (reviewer,critic,investigator,challenge-pass,zero-context-reader,worker-brief,orchestrator-brief,merger).Why
Review findings R33-R36, R52, R58 and gap 7 in
review-coverage.md: no issue, fan-out or orchestration templates, no reviewer/critic/investigator prompts, no "initial research stages" section.Evidence
Will be filled in when the remaining files land (prettier check, workflow tests,
check --repo-root .).Not verified
Everything in "Remaining".
Need help on this PR? Tag
@codesmith-botwith what you need.