Skip to content

Align template with AgentFactory structure#2

Merged
alexanderholman merged 2 commits intomasterfrom
opencode/agentfactory-template
Feb 5, 2026
Merged

Align template with AgentFactory structure#2
alexanderholman merged 2 commits intomasterfrom
opencode/agentfactory-template

Conversation

@alexanderholman
Copy link
Owner

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:

  • An issue has been opened describing the purpose of this PR.
  • The issue referenced, either though the ZenHub tools or linked to below.
  • Units tests have been written, and all pass.
  • Code has been run through a linter and passes without warning or error.
  • Code has been sanitized and cleaned in-line with guideline set out by the standard required.

Checklist

Before submitting, please ensure the following actions have been taken:

  • You have followed the guidelines set out by the CONTRIBUTION document.
  • You have checked to ensure there aren't any other Pull Requests open for the same update.
  • All tests are passing, locally and on any CI tools in use.
  • If you know the whom should review this PR please assign it to them.

Copilot AI review requested due to automatic review settings February 5, 2026 20:04
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message that will be displayed on users' first pr

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +119 to +121
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)\" ]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -->
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
<!-- filename: project_context_schema.yaml -->
# filename: project_context_schema.yaml

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- Copilot respects the flat-file structure and append-only constraints
- Copilot respects the flexible directory structure and append-only file constraints

Copilot uses AI. Check for mistakes.
last_modified: "2026-01-28"
created_date: "2026-02-05"
last_modified: "2026-02-05"

Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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"

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +6
# Minimal repository manifest for the flat-file Agent Factory system.

repo:
name: "agent-factory"
hierarchy: "flat"
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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"

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,21 @@
# filename: repo.yaml
# Minimal repository manifest for the flat-file Agent Factory system.
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# Minimal repository manifest for the flat-file Agent Factory system.
# Minimal repository manifest for the Agent Factory system (flat hierarchy configuration).

Copilot uses AI. Check for mistakes.
@alexanderholman
Copy link
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 5, 2026

@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.

@alexanderholman
Copy link
Owner Author

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.

@alexanderholman
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +119 to +121
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)\" ]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@alexanderholman
Copy link
Owner Author

@copilot can you read and update the original comment in this PR with what has been done and not, fill in the checklist

Copy link
Contributor

Copilot AI commented Feb 5, 2026

@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.

@alexanderholman alexanderholman merged commit f9c8d05 into master Feb 5, 2026
1 check passed
@alexanderholman alexanderholman deleted the opencode/agentfactory-template branch February 5, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants