agent-discussion
Skill2 starsChanged 4 months agoApache-2.0View on GitHub
Use when Codex needs read-only external feedback for planning, architecture review, code discussion, strategy review, or decision support.
In this repository4 other files it gives its agents.
- agent-bugSkill
- agent-compareSkill
- agent-reviewSkill
- agent-taskSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 4 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when Codex needs structured external feedback for planning, architecture review, code discussion, or decision support before …
- Distinctive: line 22
If Claude returns a malformed fragment, a file list, or feedback rejected by the format gate, stay in the same discussion folder and use:
- Very specific: line 28
Do not switch to an unrelated chat or a hand-written direct claude.exe command for this workflow.
- Very specific: line 42
Use -Protocol adversarial-discussion when Codex needs debate, synthesis, and a second-round response.
- Very specific: line 43
Use -ExpectedSections when the user needs named custom sections.
- Very specific: line 44
Use -ExpectedOutputFormat only for a complete Markdown template.
- Very specific: line 45
Use -ReferencePaths when the external agent needs to inspect article drafts, source files, notes, or bounded folders.
- Very specific: line 46
Treat ReferencePaths as frozen evidence copied at discussion creation time.
- Very specific: line 49
If a major disagreement remains unresolved after two rounds, Codex writes user-decision-needed.md, pauses, and asks the user to decide or …
- Very specific: line 51
Use -AuditProfile scientific for consequential code-review and strategy-review work.
- Very specific: line 58
Run New-AgentDiscussion.ps1 with a focused topic, question, context, and optional agent names.
- Very specific: line 79
Do not place original repository paths only inside -Context.
- Distinctive: line 135
Create the discussion brief.
- Distinctive: line 136
Ask external agents to write round 1 feedback files.
- Very specific: line 139
When references/manifest.md exists, the runner instructs Claude Code to read it and the listed snapshots.
- Very specific: line 141
Write codex-synthesis.md with consensus, disagreements, suspected misreadings, and round 2 questions.
- Very specific: line 147
If the collector reports needs_codex_decision, Codex must write the final moderator decision into decision.md, or write …
- Very specific: line 148
If a major disagreement remains unresolved, write user-decision-needed.md and pause for the user.
- Very specific: line 149
After user direction, write decision.md and collect again until state is decision_ready.
- Very specific: line 175
If invalid feedback is an implausibly short fragment, a file list, or useful content rejected by the format gate, do not hand-write a …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Discussion
Use this skill when Codex needs structured external feedback for planning, architecture review, code discussion, or decision support before making a final call.
Current Path
For read-only external feedback, the current path is:
New-AgentDiscussion.ps1
-> Invoke-ClaudeFeedback.ps1 -Round <1-or-2> -Collect
-> Invoke-ReasonixFeedback.ps1 -Round <1-or-2> -Collect when Reasonix is a reviewer
-> Collect-AgentDiscussion.ps1
-> Codex writes codex-synthesis.md, decision.md, or user-decision-needed.mdIf Claude returns a malformed fragment, a file list, or feedback rejected by the format gate, stay in the same discussion folder and use:
Invoke-ClaudeFeedback.ps1 -Round <1-or-2> -RawReadOnlyRecovery -CollectDo not switch to an unrelated chat or a hand-written direct claude.exe command for this workflow.
Rules
- Codex remains the moderator, evidence evaluator, and final decision maker.
- Discussion mode is read-oriented and file-based.
- Discussion mode does not edit repository files.
- Discussion creation does not launch external agents automatically; use
Invoke-ClaudeFeedback.ps1only when the user wants Claude Code feedback now. - Discussion mode does not create worktrees, merge branches, apply patches, or accept code changes.
- External agents write Markdown feedback files only.
- Reasonix CLI is the automatic review path.
Open-ReasonixDiscussion.ps1remains manual compatibility only and never counts as completion by itself. - Codex writes synthesis, user escalation, and final decision files.
- The default limit is two rounds.
- Pick
-Modefor the task type so the generatedbrief.mdcarries the right output structure. Usearticle-reviewfor article analysis,strategy-reviewfor strategy/planning,code-reviewfor code review,decisionfor option selection, andgeneralotherwise. - Use
-Protocol adversarial-discussionwhen Codex needs debate, synthesis, and a second-round response. Use-Protocol feedbackfor one-way structured feedback. - Use
-ExpectedSectionswhen the user needs named custom sections. This is preferred over prose format instructions. - Use
-ExpectedOutputFormatonly for a complete Markdown template. Prose instructions likeMarkdown with sections: ...are normalized into a strict template and recorded ascustom_normalized. - Use
-ReferencePathswhen the external agent needs to inspect article drafts, source files, notes, or bounded folders. Discussion mode copies read-only snapshots intoreferences/files/and writesreferences/manifest.md; external agents should read those snapshots rather than original absolute paths. - Treat
ReferencePathsas frozen evidence copied at discussion creation time. Round 2 and-RawReadOnlyRecoverystay on the same frozen snapshots. If the original source files changed and the user wants a re-review of current files, create a fresh discussion with new-ReferencePaths. - Reference packaging fails on file-count or size truncation, and both CLI reviewers verify manifest inventory, byte counts, hashes, and evidence bundle identity before review.
- The evidence bundle ID is stored in
status.jsonand derived as SHA-256 over ordered snapshot hashes joined by newlines. - If a major disagreement remains unresolved after two rounds, Codex writes
user-decision-needed.md, pauses, and asks the user to decide or redirect. Agentsare required reviewers.OptionalAgentsare attempted and reported but do not block collection. Do not describe a one-reviewer result as a dual audit.- Use
-AuditProfile scientificfor consequentialcode-reviewandstrategy-reviewwork. Round 1 is blind and independent; Round 2 is limited to disputed, blocking, or weak-evidence findings. - Scientific dual review is complete only when every expected canonical
roundN/<agent>.mdfile exists. Instruction, retry, recovery, and arbitrary Markdown files never count. - Reviewer-local finding IDs must be unique within each canonical file. Duplicate IDs are rejected rather than silently producing ambiguous calibration records.
- Consensus is not proof. Codex adjudicates evidence and records verified outcomes; it does not majority-vote.
Create A Discussion
Run New-AgentDiscussion.ps1 with a focused topic, question, context, and optional agent names.
$WorkbenchRoot = $env:AGENT_WORKBENCH_HOME
& (Join-Path $WorkbenchRoot "scripts\New-AgentDiscussion.ps1") `
-WorkbenchRoot $WorkbenchRoot `
-Slug "short-discussion-slug" `
-Topic "Architecture review" `
-Question "Which implementation direction best fits the current constraints?" `
-Context "Summarize the relevant files, requirements, risks, and forbidden actions." `
-Mode strategy-review `
-Protocol adversarial-discussion `
-AuditProfile scientific `
-ReferencePaths "C:\Path\To\Your\Repository\docs\design.md" `
-ExpectedSections "Summary","HIGH findings","MEDIUM findings","LOW findings","Scope verdict","Required remediation" `
-Agents claude-code `
-OptionalAgents reasonixThe script creates a discussion folder under discussions with brief.md, status.json, run.log, round1, round2, codex-synthesis.md, user-decision-needed.md, and decision.md. When references are provided, it also creates references/manifest.md and copied snapshots under references/files/.
Do not place original repository paths only inside -Context; local absolute paths are redacted for safety. Use -ReferencePaths for material Claude should read.
For multiple reference paths, prefer hashtable splatting so PowerShell preserves the array:
$params = @{
WorkbenchRoot = $env:AGENT_WORKBENCH_HOME
Slug = "short-discussion-slug"
Topic = "Architecture review"
Question = "Which implementation direction best fits the current constraints?"
Context = "Summarize the relevant files, requirements, risks, and forbidden actions."
Mode = "strategy-review"
Protocol = "adversarial-discussion"
ReferencePaths = @(
"C:\Path\To\Your\Repository\docs\design.md",
"C:\Path\To\Your\Repository\src\module.py"
)
AuditProfile = "scientific"
Agents = @("claude-code")
OptionalAgents = @("reasonix")
ReviewerLenses = @{
"claude-code" = "route and doctrine fidelity"
"reasonix" = "evidence and falsification"
}
}
$DiscussionScript = Join-Path $params.WorkbenchRoot "scripts\New-AgentDiscussion.ps1"
$DiscussionFolder = & $DiscussionScript @paramsExternal Feedback Format
External agents receive brief.md and write feedback into:
round1/<agent>.mdfor first independent feedbackround2/<agent>.mdfor response to Codex synthesis and disagreements
Feedback should use the format embedded in brief.md. The default format is:
# Agent Discussion Feedback
## Recommendation
## Reasoning
## Risks
## Disagreements Or Unknowns
## Questions For Codex Or UserScientific code/strategy audit briefs instead require repeated ### Finding <reviewer-local-id> blocks. Each finding records area, falsifiable claim, severity, evidence, confidence, counter-evidence, recommended action, and blocking status. Strategy findings additionally record claim type, falsifier, and minimum validation.
Codex Moderator Workflow
- Create the discussion brief.
- Ask external agents to write round 1 feedback files.
- Optional Claude Code runner:
Invoke-ClaudeFeedback.ps1 -DiscussionFolder <folder> -Round 1 -Collect - Optional Reasonix CLI reviewer:
Invoke-ReasonixFeedback.ps1 -DiscussionFolder <folder> -Round 1 -Collect - When
references/manifest.mdexists, the runner instructs Claude Code to read it and the listed snapshots.
- Optional Claude Code runner:
- Run
Collect-AgentDiscussion.ps1. - Write
codex-synthesis.mdwith consensus, disagreements, suspected misreadings, and round 2 questions. - Ask external agents to write round 2 feedback files.
- Optional Claude Code runner:
Invoke-ClaudeFeedback.ps1 -DiscussionFolder <folder> -Round 2 -Collect - Optional Reasonix CLI reviewer:
Invoke-ReasonixFeedback.ps1 -DiscussionFolder <folder> -Round 2 -Collect - Round 2 requires
codex-synthesis.md; Claude Code is instructed to respond to it instead of repeating one-way feedback.
- Optional Claude Code runner:
- Run
Collect-AgentDiscussion.ps1again. - If the collector reports
needs_codex_decision, Codex must write the final moderator decision intodecision.md, or writeuser-decision-needed.mdif a material disagreement still requires user judgment. - If a major disagreement remains unresolved, write
user-decision-needed.mdand pause for the user. - After user direction, write
decision.mdand collect again until state isdecision_ready.
Codex should evaluate evidence, constraints, and project fit. Do not decide by majority vote.
Collection Contract
Collect-AgentDiscussion.ps1 reads canonical expected feedback files, prints sanitized excerpts, detects disagreement/risk/blocker signals, and updates status.json. Scientific collection also writes findings.json and disagreement-matrix.md; all matrix rows begin as pending_codex.
The collector updates:
statecurrent_roundround1_countround2_countround1_completed_agents/round1_missing_agentsround2_completed_agents/round2_missing_agentsround1_missing_optional_agents/round2_missing_optional_agentssignalsupdated_at
It does not modify feedback files, write decision.md, launch agents, edit source files, create worktrees, merge, or apply patches. Invoke-ClaudeFeedback.ps1 and Invoke-ReasonixFeedback.ps1 are explicit CLI invocation paths and write only their requested canonical round file after validation.
Claude Code is auto-discovered from an explicit path, CLAUDE_CODE_EXE, npm, or PATH. Both CLI discussion runners use PID-backed invocation leases: after caller timeout, rerun the same command to adopt the existing result instead of creating a duplicate reviewer. Use -RetryFailedInvocation only after inspecting a completed failed call; the old evidence is archived before retry. Reasonix Round 2 requires codex-synthesis.md; malformed Reasonix output is preserved under invalid-feedback/ and retried through the same CLI route.
Invoke-ClaudeFeedback.ps1 validates that Claude's response starts with the expected heading and includes the required ## sections from brief.md. Invalid output is preserved under invalid-feedback/, retry-brief.md is generated, and the runner fails so Codex can retry or inspect the bad output.
If invalid feedback is an implausibly short fragment, a file list, or useful content rejected by the format gate, do not hand-write a direct claude.exe bypass. Re-run the same discussion through:
$WorkbenchRoot = $env:AGENT_WORKBENCH_HOME
& (Join-Path $WorkbenchRoot "scripts\Invoke-ClaudeFeedback.ps1") `
-DiscussionFolder <folder> `
-Round <1-or-2> `
-RawReadOnlyRecovery `
-CollectRaw read-only recovery still uses only Read access, validates the same expected heading and sections, writes evidence under recovery-feedback/, writes the accepted canonical feedback under roundN/<agent>.md, and records recovery metadata in status.json. It is the governed replacement for manual raw CLI旁路.
For two-round adversarial-discussion, state meanings are:
awaiting_round1_reviewers: at least one expected canonical Round 1 file is missing.feedback_collected: feedback exists, but final moderation may not yet be required.awaiting_round2_reviewers: Round 2 started but at least one expected canonical Round 2 file is missing.awaiting_codex_synthesis: all expected Round 2 files exist butcodex-synthesis.mdis still empty.needs_codex_decision: round 2 feedback exists anddecision.mdis still empty.needs_user_decision: Codex wroteuser-decision-needed.mdbecause the dispute should not be forced closed.decision_ready:decision.mdis non-empty and can be treated as the final moderator output.invalid_feedback_empty_or_fragment: Claude returned a too-short fragment such as a code snippet; inspectinvalid-feedback/and retry withretry-brief.md.invalid_feedback_format: Claude included expected sections but missed the required first heading.invalid_feedback_incomplete: Claude started correctly but missed required sections.invalid_feedback_offtask: Claude missed both heading and expected sections.
Output Contract
Tell the user:
- discussion folder path
- expected round feedback files
- whether Claude feedback was generated manually or with
Invoke-ClaudeFeedback.ps1 - whether Codex synthesis or user escalation is needed
- current
status.jsonstate - final decision file path when a decision is written
- scientific
findings.jsonanddisagreement-matrix.mdpaths when present - calibration paths after
Record-AgentAuditOutcome.ps1records verified outcomes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

