Align template with AgentFactory structure#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a723ab943
ℹ️ 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".
| run_test "TEST-003-1" \ | ||
| "Verify each agent has at least one tag" \ | ||
| "[ -z \"\$(awk '/ - id:/{flag=1; next} flag && /tags:/{flag=2; next} flag==2 && /^[[:space:]]*-/{flag=0; next} flag==2 && /^ - id:/{print \"no_tags\"; flag=0}' agents.yaml | grep no_tags)\" ]" |
There was a problem hiding this comment.
Fix tag check so missing tags fail validation
This awk pipeline never emits no_tags when an agent definition omits the tags: block, because the state only transitions to flag=2 if a tags: line is present. If tags: is missing, the next - id: line resets flag=1 and the flag==2 && /^ - id:/ branch never runs, so the test passes even for agents with no tags. That means the validation suite can incorrectly green‑light agents.yaml entries that violate the “at least one tag” requirement.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This pull request implements a comprehensive AgentFactory template structure, transforming a GitHub Copilot-specific agent system into a platform-agnostic framework compatible with OpenAI ChatGPT, Google Gemini, OpenCode.ai, and other AI platforms. The PR introduces validation tooling, append-only log files, specialism definitions, and a flexible directory structure that supersedes the previous flat-file requirement.
Changes:
- Added comprehensive AgentFactory infrastructure including validation script (validate_agents.sh), specifications (specs.md), decisions log (decisions.md), and agent runs log (agent_runs.md)
- Restructured agent file format to use 5 required headings (Purpose, Inputs, Outputs, Behavior, Constraints) instead of previous format
- Added new agents (Tester, SecurityReviewer, OpenCodeManager, example-documentation-agent) and 5 specialisms (Testing, Security, Researcher, Coder, CitationManager)
- Introduced flexible directory structure supporting nested subdirectories (SPEC-007, DEC-011)
- Created platform-agnostic documentation (AGENTS.md) and GitHub Copilot-specific instructions
- Added CI/CD workflow for automated agent validation
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| validate_agents.sh | Validation script implementing all MUST requirement tests from specifications |
| specs.md | Append-only technical specifications file with 7 specs including flexible directory structure |
| decisions.md | Append-only architectural decisions log with 13 decision entries |
| agent_runs.md | Append-only execution log tracking agent runs and system changes |
| repo.yaml | Repository manifest (has inconsistency with "flat" hierarchy designation) |
| project_context_template.yaml | Template for project-specific context files |
| project_context_schema.yaml | Schema definition (has HTML comment syntax issue in YAML file) |
| agents.yaml | Agent registry (CRITICAL: incomplete - missing 6+ agent definitions) |
| agents.md | Updated agent documentation guidelines for new heading structure |
| agents/*.md | Modified 7 existing agents and added 4 new agents to match new structure |
| specialisms/*.md | Added 5 specialism files defining standards for testing, security, research, coding, and citations |
| AGENTS.md | New platform-agnostic quick reference for AI agents |
| .github/copilot-instructions.md | New comprehensive instructions for GitHub Copilot |
| .github/workflows/validate-agents.yml | CI/CD workflow for automated validation |
| .github/PULL_REQUEST_TEMPLATE.md | Minor addition for Copilot review request |
| README.md | Updated to reflect AgentFactory structure and list all agents |
Comments suppressed due to low confidence (1)
agents/Architect.md:78
- The Architect.md file contains a "## Success Criteria" section (lines 72-78), but according to the updated agents.yaml configuration, the required headings are now "Purpose", "Inputs", "Outputs", "Behavior", and "Constraints". The "Success Criteria" section is no longer a required heading. While having additional sections beyond the required ones is allowed (per SPEC-002 "MAY include additional headings for supplementary information"), this should be verified as intentional. If "Success Criteria" content should be preserved, consider moving it under the "Constraints" section or into a subsection of "Behavior".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,63 @@ | |||
| <!-- filename: project_context_schema.yaml --> | |||
There was a problem hiding this comment.
HTML comment syntax is used in a YAML file. The first line uses HTML comment syntax <!-- filename: project_context_schema.yaml --> which is not valid YAML syntax. While some YAML parsers may ignore this, it should use YAML comment syntax instead: # filename: project_context_schema.yaml
| <!-- filename: project_context_schema.yaml --> | |
| # filename: project_context_schema.yaml |
| - Copilot can read agent definitions to understand the agent factory pattern | ||
| - Copilot can help create new agent definitions following the established format | ||
| - Copilot can validate changes against the specifications | ||
| - Copilot respects the flat-file structure and append-only constraints |
There was a problem hiding this comment.
The text "Copilot respects the flat-file structure and append-only constraints" is misleading. The repository has transitioned from a flat-file structure to a flexible directory structure that allows nested subdirectories (as documented in SPEC-007 and DEC-011). This line should be updated to clarify that Copilot respects the flexible directory structure and append-only file constraints.
| - Copilot respects the flat-file structure and append-only constraints | |
| - Copilot respects the flexible directory structure and append-only file constraints |
| last_modified: "2026-01-28" | ||
| created_date: "2026-02-05" | ||
| last_modified: "2026-02-05" | ||
|
|
There was a problem hiding this comment.
Critical issue: The agents.yaml configuration file only defines 4 agents (example-agent-001, tester-001, security-reviewer-001, opencode-manager-001), but the agents/ directory contains at least 10 agent files including Architect.md, Builder.md, Skeptic.md, Editor.md, ProjectManager.md, CitationOfficer.md, ChatGPT.md, Tester.md, SecurityReviewer.md, and OpenCodeManager.md. According to SPEC-002 and the validation rules, all agents MUST be registered in agents.yaml. The missing agents need to be added to the agents.yaml configuration file.
| - id: "architect-001" | |
| name: "Architect" | |
| description: "System and solution architect - Designs overall system structure, ensures alignment with requirements and constraints" | |
| version: "1.0.0" | |
| tags: | |
| - analysis | |
| - documentation | |
| - quality | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/Architect.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "builder-001" | |
| name: "Builder" | |
| description: "Implementation-focused agent - Translates designs and plans into concrete code and artifacts" | |
| version: "1.0.0" | |
| tags: | |
| - automation | |
| - integration | |
| - utility | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/Builder.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "skeptic-001" | |
| name: "Skeptic" | |
| description: "Critical reviewer - Challenges assumptions, identifies risks, and highlights weaknesses in plans and implementations" | |
| version: "1.0.0" | |
| tags: | |
| - analysis | |
| - quality | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/Skeptic.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "editor-001" | |
| name: "Editor" | |
| description: "Documentation and clarity editor - Improves organization, clarity, and style of written outputs" | |
| version: "1.0.0" | |
| tags: | |
| - documentation | |
| - quality | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/Editor.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "project-manager-001" | |
| name: "ProjectManager" | |
| description: "Planning and coordination agent - Manages tasks, scope, and progress across agents and work items" | |
| version: "1.0.0" | |
| tags: | |
| - automation | |
| - integration | |
| - documentation | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/ProjectManager.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "citation-officer-001" | |
| name: "CitationOfficer" | |
| description: "Citation and sourcing officer - Ensures outputs are properly cited and sources are clearly referenced" | |
| version: "1.0.0" | |
| tags: | |
| - documentation | |
| - quality | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/CitationOfficer.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" | |
| - id: "chatgpt-001" | |
| name: "ChatGPT" | |
| description: "General-purpose language model interface - Provides flexible natural language reasoning and assistance" | |
| version: "1.0.0" | |
| tags: | |
| - automation | |
| - utility | |
| required_headings: | |
| - "Purpose" | |
| - "Inputs" | |
| - "Outputs" | |
| - "Behavior" | |
| - "Constraints" | |
| file_path: "agents/ChatGPT.md" | |
| status: "active" | |
| created_date: "2026-02-05" | |
| last_modified: "2026-02-05" |
| # Minimal repository manifest for the flat-file Agent Factory system. | ||
|
|
||
| repo: | ||
| name: "agent-factory" | ||
| hierarchy: "flat" |
There was a problem hiding this comment.
Inconsistency: The repo.yaml file states that the hierarchy is "flat" (line 6), but SPEC-007 in specs.md and DEC-011 in decisions.md establish that the repository now uses a "flexible directory structure" that allows nested subdirectories. The hierarchy field should be updated to reflect this change, perhaps to "flexible" or the description should clarify that "flat" refers to the append-only file structure rather than directory nesting.
| # Minimal repository manifest for the flat-file Agent Factory system. | |
| repo: | |
| name: "agent-factory" | |
| hierarchy: "flat" | |
| # Minimal repository manifest for the Agent Factory system (flat, append-only files; flexible directory hierarchy). | |
| repo: | |
| name: "agent-factory" | |
| hierarchy: "flexible" |
| @@ -0,0 +1,21 @@ | |||
| # filename: repo.yaml | |||
| # Minimal repository manifest for the flat-file Agent Factory system. | |||
There was a problem hiding this comment.
The comment describes this as a "flat-file Agent Factory system" which is inconsistent with the flexible directory structure introduced in SPEC-007 and DEC-011. This comment should be updated to reflect that the system now supports both flat and nested directory structures.
| # Minimal repository manifest for the flat-file Agent Factory system. | |
| # Minimal repository manifest for the Agent Factory system (flat hierarchy configuration). |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@alexanderholman I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
Added traits/workflows/tasks scaffolding to support PR authorship clarity, automated review requests, and recurring cadence/WIP/triage tracking. This improves plug-and-play task governance for template users. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54a8401155
ℹ️ 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".
| run_test "TEST-003-1" \ | ||
| "Verify each agent has at least one tag" \ | ||
| "[ -z \"\$(awk '/ - id:/{flag=1; next} flag && /tags:/{flag=2; next} flag==2 && /^[[:space:]]*-/{flag=0; next} flag==2 && /^ - id:/{print \"no_tags\"; flag=0}' agents.yaml | grep no_tags)\" ]" |
There was a problem hiding this comment.
Detect missing tags for final agent
The TEST-003-1 awk check only emits no_tags when it encounters the next - id: entry, so if the last agent in agents.yaml omits the tags list (or has an empty tags: block), the script will reach EOF with flag==2 and still pass. This means the validation can silently accept an invalid agents.yaml whenever the missing tags are on the final agent entry. Consider adding an END block or explicit EOF check so the last agent is validated too.
Useful? React with 👍 / 👎.
|
@copilot can you read and update the original comment in this PR with what has been done and not, fill in the checklist |
|
@alexanderholman I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you. |
Description
Describe your changes Please describe your changes in as much detail as possible.
Prerequisites
The following has been completed or a reason should be given:
Checklist
Before submitting, please ensure the following actions have been taken: