Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
8edd2b6
chore: fix critical issues before implementation
claude Sep 17, 2026
a87256b
fix: Implement automatic rollback mechanism for specs directory migra…
claude Sep 17, 2026
9bc29a4
fix: specs-directory-structure - Add changelog entries for PR #3360
claude Sep 17, 2026
9ed1aa8
docs: Append Phase 7 Convergence validation tasks (T037-T044)
claude Sep 18, 2026
b50819a
docs: Add changelog entry for Phase 7 Convergence Validation tasks (T…
claude Sep 18, 2026
03f5aee
docs: Update spec.md status to reflect Phase 7 Convergence Validation…
claude Sep 18, 2026
aa7215b
fix: Address CodeRabbit review feedback on migrate-specs.sh and CHANG…
claude Sep 18, 2026
fb47991
Fix CodeRabbit issues in PR #3360
coderabbitai[bot] Sep 18, 2026
35e4da4
docs: Document specs migration functions, parameters and side effects
coderabbitai[bot] Sep 18, 2026
2e98ad2
fix: Update spec status to reflect Phase 6 complete, Phase 7 deferred
claude Sep 18, 2026
d85d7fe
spec(014): Phase 4 (US2) standardize folder structure — templates, do…
ashleyshaw Sep 18, 2026
a2e2ff0
spec(014): Phase 4 complete (T036-T038, T043) - structure audit and r…
ashleyshaw Sep 18, 2026
f96e0ea
spec(014): Phase 5 complete (T045-T057) - skills consolidation and de…
ashleyshaw Sep 18, 2026
44f02ee
spec(014): Phase 6 complete (T058-T069) - create skills registry
ashleyshaw Sep 18, 2026
9ca5faa
fix: add draft spec.md stub for 015-changelog-agent-quality (audit re…
eleshar Sep 21, 2026
666c7a0
Move 015 spec folder to correct location
ashleyshaw Sep 22, 2026
cf84ca8
spec: renumber changelog-agent-quality from 015 to 016 to resolve num…
eleshar Sep 22, 2026
340aecd
chore: stop committing generated skills registry output
eleshar Sep 22, 2026
4bfad43
chore: stop committing generated agent audit reports
eleshar Sep 22, 2026
51b546b
fix: correctness bugs in skills validation library
eleshar Sep 22, 2026
4550b85
fix: restore executable bit on phase-5/6 scripts
eleshar Sep 22, 2026
d126033
fix: self-ingestion, dropped warnings, silent exit-0, dead code in sk…
eleshar Sep 22, 2026
303d427
fix: Set-to-JSON serialisation loss and Windows-invalid filenames
eleshar Sep 22, 2026
91b2299
fix: category summary path used unslugged name, pointing at a nonexis…
eleshar Sep 22, 2026
e709f69
fix: drop unused checkAllAgents() return-value capture
eleshar Sep 22, 2026
ef6f650
fix: address CodeRabbit quick-win findings
eleshar Sep 22, 2026
5c429c7
fix: subdir skill traversal and structural compliance check
eleshar Sep 22, 2026
334c1d1
fix: enforce package and skill registry validation
coderabbitai[bot] Sep 23, 2026
d305933
Merge develop into refactor/changelog-agent-quality (#3465)
eleshar Sep 23, 2026
4c2dc3c
fix: phase-6 registry doc template contradicted the compliance rule (…
eleshar Sep 23, 2026
e32bd04
Merge 334c1d1 into the #3465 resolution
eleshar Sep 23, 2026
a0d8695
docs: reword token example so the spec secret heuristic does not matc…
eleshar Sep 23, 2026
be1a9d5
fix: correct functional-requirement count 10 to 11 (FR-001–FR-011)
eleshar Sep 23, 2026
89addbe
docs: fix changelog tense and point entries at #3434 (#3465)
eleshar Sep 23, 2026
1fcc462
Merge remote-tracking branch 'origin/develop' into refactor/changelog…
eleshar Sep 23, 2026
447ed24
docs: address remaining CodeRabbit review comments on #3434 (#3465)
eleshar Sep 23, 2026
b29c26b
docs: define changelog_path and changelog_content in the REST contrac…
eleshar Sep 23, 2026
ac4cd69
docs(specs): fix four consistency findings in spec 016
eleshar Sep 23, 2026
53e05cd
Merge branch 'develop' into refactor/changelog-agent-quality
eleshar Sep 23, 2026
ccfe7cd
docs(specs): address the second CodeRabbit review on #3500 (mirrored …
eleshar Sep 23, 2026
f8672fa
docs(specs): mirror the third CodeRabbit review on #3500 (014, 016)
eleshar Sep 24, 2026
31f4f10
Merge branch 'develop' into refactor/changelog-agent-quality
ashleyshaw Sep 24, 2026
5b8f4d8
Merge branch 'develop' into refactor/changelog-agent-quality
eleshar Sep 24, 2026
095e41e
docs(specs): mirror the fourth CodeRabbit review on #3500
eleshar Sep 24, 2026
e367f8d
Merge branch 'develop' into refactor/changelog-agent-quality
eleshar Sep 24, 2026
6bf0c63
Merge branch 'develop' into refactor/changelog-agent-quality
eleshar Sep 24, 2026
dd80fa2
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 25, 2026
67a3fe2
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 25, 2026
835ce7d
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 25, 2026
c0ab3b8
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
d3a2cd8
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
8d4d069
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
8aea955
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
0efce9f
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
0a41991
Merge remote-tracking branch 'origin/develop' into HEAD
eleshar Sep 26, 2026
ead543d
Migrate plugin-provided skills to provider-as-directory and align ski…
eleshar Sep 26, 2026
bcb315c
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
7293b3d
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
b7b37c4
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 26, 2026
b775b95
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
039ba5f
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
875ae24
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
3ad5cff
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
14e989a
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
0fb9bc7
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
5a1fcaa
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
869ac3a
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
0718197
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
9e3de36
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
3fa02b6
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
2cd591e
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
2b21f17
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
b370dac
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
e75e9a5
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
96ce99f
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
9632128
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
03729d5
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
2a90dcc
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 27, 2026
56a96cf
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 28, 2026
61137a9
Merge remote-tracking branch 'origin/develop' into HEAD
Sep 29, 2026
69bde76
Merge remote-tracking branch 'origin/develop' into HEAD
Sep 29, 2026
c603ec1
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 29, 2026
bb6adb5
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 30, 2026
56ac747
fix(validation): stop counting the audit output directory as an agent
Sep 30, 2026
a46f973
perf(validation): read and tokenize each skill once in the dedup audit
Sep 30, 2026
5b66fe3
docs(validation): state what the validators actually enforce
Sep 30, 2026
8ef01d9
Merge branch 'develop' into refactor/changelog-agent-quality
mergify[bot] Sep 30, 2026
7db6507
Merge branch 'develop' into refactor/changelog-agent-quality
lightspeed-docs-bot[bot] Sep 30, 2026
ccd6c12
Merge branch 'develop' into refactor/changelog-agent-quality
lightspeed-docs-bot[bot] Oct 1, 2026
7c73682
Merge branch 'develop' of github.com:lightspeedwp/.github into refact…
eleshar Oct 3, 2026
b437a06
Align agent and skill scanners, validator and guides with the #3464 s…
eleshar Oct 3, 2026
264c29e
Only recognised definitions make a skill, read frontmatter descriptio…
eleshar Oct 3, 2026
264320c
Fix markdown lint in the spec 014 quickstart
eleshar Oct 3, 2026
f2e3421
Merge branch 'develop' of github.com:lightspeedwp/.github into refact…
eleshar Oct 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
301 changes: 301 additions & 0 deletions .github/docs/AGENT_FOLDER_STRUCTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
# Agent Folder Structure: Standardized Template

**Purpose**: Define the 7-component folder structure for all agents in the repository, and
record which parts of it a validator checks.

**Applies to**: All agents in `agents/` folder

**Status**: Mandatory by convention only. `StructureChecker` is reached solely by
running `node scripts/validation/phase-4-structure-audit.js` directly. No npm
script, workflow or other script invokes it, so nothing here blocks a merge. See
[Validation Rules](#validation-rules) for what is actually checked.

---

## Folder Structure Template

An org-wide agent is defined by one root `agents/{agent-name}.agent.md` file whose frontmatter
carries `name` and `description` (plus optional `tools` and `model`); Copilot and Claude Code both
read that format. The agent's folder holds its working instructions, tests, skills and
configuration, laid out like this ([#3464](https://github.com/lightspeedwp/.github/issues/3464)
adopted the open `AGENTS.md` format in place of the bespoke `AGENT.md`):

```
agents/{agent-name}/
├── AGENTS.md # (1) Working instructions (legacy name AGENT.md still accepted)
├── CHANGELOG.md # (2) Version history and changes
├── package.json # (3) Dependencies and scripts
├── README.md # (4) Documentation and usage
├── skills/ # (5) Agent-specific skills
│ └── {skill-name}/
├── tests/ # (6) Unit and integration tests│ └── {test-name}.test.js
└── config/ # (7) Configuration files
├── default.json
├── .env.example
└── README.md
```

---

## Component Requirements

### 1. AGENTS.md (Working Instructions)

**Purpose**: What an AI coding agent or contributor needs to work in this agent's folder, in the
open [AGENTS.md](https://agents.md/) format. The nearest `AGENTS.md` to a file applies. It is not
the agent's definition; that is the root `agents/{agent-name}.agent.md`.

**Content**: free-form Markdown. Typical content is an overview, setup and test commands,
conventions, and what must not be touched. The format sets no required sections.

**Legacy**: `AGENT.md` is the retired name. `StructureChecker` still accepts it, with a warning, so
an agent folder can be migrated by renaming the file. The old `AGENT.md` section recommendations
(Description, Capabilities, Skills) are still checked, as warnings, for that legacy name only.

**Template**: See [agent-structure-template/AGENTS.md](../templates/agent-structure-template/AGENTS.md)

---

### 2. CHANGELOG.md (Version History)

**Purpose**: Track all changes to the agent over time

**Required format**: [Keep a Changelog](https://keepachangelog.com/) format

**Required sections per version**:

- Version number (semver)
- Release date (ISO 8601)
- Categories: Added, Changed, Fixed, Removed, Security
- Link to PR/issue for each entry

**Minimum content**: At least one entry documenting initial release

**Validation**: Each version MUST have a corresponding git tag `agents/{agent-name}/v{version}`

**Template**: See [agent-structure-template/CHANGELOG.md](../templates/agent-structure-template/CHANGELOG.md)

---

### 3. package.json (Dependencies)

**Purpose**: Node.js dependencies, scripts, and metadata

**Required fields**:

- `name`: Must be `@lightspeedwp/{agent-name}` (scope from the root `package.json`; kebab-case)
- `version`: Must match latest CHANGELOG.md version
- `description`: Brief description
- `main`: Entry point (typically `index.js` or `src/index.js`)
- `type`: Must be `"module"` (ES modules)
- `scripts`: At minimum `test` and `lint`
- `engines.node`: Minimum Node.js version (>=18.0.0)

**Validation**: Must parse as valid JSON and satisfy npm schema

**Template**: See [agent-structure-template/package.json](../templates/agent-structure-template/package.json)

---

### 4. README.md (Documentation)

**Purpose**: Usage documentation, installation, configuration

**Required sections**:

- One-line summary at top
- Table of Contents
- Installation instructions (npm and GitHub Action)
- Usage examples (at least 2: Node.js module and GitHub Action)
- Configuration options
- Skills dependencies (with links)
- Testing instructions
- Contributing guidelines
- Related links (to registry, other agents)

**Size**: 200-500 lines typically

**Template**: See [agent-structure-template/README.md](../templates/agent-structure-template/README.md)

---

### 5. skills/ (Agent Skills)

**Purpose**: Skills specific to this agent

**Structure**:

```
skills/
├── skill-one/
│ ├── SKILL.md # required entry point
│ ├── scripts/ # optional
│ ├── references/ # optional
│ └── assets/ # optional
├── skill-two/
│ └── SKILL.md
```

**Requirements** (the [Agent Skills specification](https://agentskills.io/specification), adopted by
[#3464](https://github.com/lightspeedwp/.github/issues/3464)):

- Each skill is a subdirectory whose name equals the skill's `name`
- `SKILL.md` is the required entry point, with `name` and `description` frontmatter
- `scripts/`, `references/` and `assets/` are optional; a skill needs no `index.js` or `package.json`
- Skills are agent-private unless moved to the root `skills/` folder
- No circular dependencies between skills

**Can be empty** if agent uses only root-level shared skills

---

### 6. tests/ (Test Suite)

**Purpose**: Unit and integration tests for the agent

**Structure**:

```
tests/
├── unit/
│ └── {component}.test.js
├── integration/
│ └── {workflow}.test.js
└── fixtures/
└── {test-data}.json
```

**Requirements**:

- Minimum test file: `{agent-name}.test.js`
- Framework: Jest
- Coverage: Minimum 70%. Not currently measured by any validator, so this is a
convention rather than an enforced threshold.
- No skipped tests (`.skip` or `.only`)

**Can be empty initially** but MUST be populated before release

---

### 7. config/ (Configuration)

**Purpose**: Default configuration and environment templates

**Required files**:

- `default.json`: Default configuration values
- `.env.example`: Environment variable template
- `README.md`: Configuration guide

**Example default.json**:

```json
{
"timeout": 30000,
"retries": 3,
"logLevel": "info"
}
```

**Example .env.example**:

```
AGENT_LOG_LEVEL=info
AGENT_TIMEOUT=30000
# Copy to .env and fill in real values
```

---

## Validation Rules

These rules are checked by `StructureChecker`, which runs only when you invoke
`node scripts/validation/phase-4-structure-audit.js` directly. Nothing else calls
it: there is no npm script for it, and no workflow runs it. The `audit:structure`
script runs a different program, `scripts/validation/audit-agents.js`, which does
not use `StructureChecker`.

`StructureChecker` reports an `error` for these:

1. ✅ The 7 required components exist with the correct type: `AGENTS.md` (or the legacy
`AGENT.md`, which warns), `CHANGELOG.md`, `package.json` and `README.md` as files, and `skills/`, `tests/` and `config/` as
directories. A directory is accepted whether or not it is empty.
2. ✅ `CHANGELOG.md` is readable (an unreadable file is an error).
3. ✅ `package.json` is present, parses, and its required fields are set
4. ✅ `package.json` `name` matches the agent folder name
5. ✅ `package.json` `version` is valid semver
6. ✅ `package.json` `main` file exists
7. ✅ `package.json` `type` is `"module"`
8. ✅ `package.json` `license` matches the organisation licence from the root `package.json`
9. ✅ `package.json` declares `test` and `lint` scripts. Presence only: the validator
never executes them, so a script that exists but fails is not caught here.
10. ✅ `package.json` `dependencies` do not reference another agent

Reported as a `warning`, so they do not fail the run:

- `config/default.json` exists. Its **contents are not parsed**, so an invalid
JSON file is not detected.
- `config/.env.example` exists.
- `engines.node` is a valid range that resolves to 18 or later.

**Not implemented.** Nothing in the validator checks any of the following, so
they are conventions rather than validated rules:

- `AGENTS.md` Markdown validity (the format sets no required sections).
- `README.md` table of contents or usage examples.
- That `tests/` contains at least one test file, or that the file is named
`{agent-name}.test.js`.
- That `config/default.json` is valid JSON.
- That the agent root contains no unexpected files.
- Any test coverage threshold.
- That the `test` or `lint` scripts pass.

If any of these should gate a pull request, they need implementing in
`StructureChecker` or `PackageJsonValidator` first; today a conformant result
does not prove the agent meets the conventions above.

---

## Migration Guide

**For agents that don't conform:**

1. Run structure audit: `npm run audit:structure`
2. Review report: `.github/reports/agents/structure-audit.json`
3. Follow remediation recommendations in `.github/reports/agents/structure-remediation-recommendations.json`
4. Create feature branch per agent
5. Add missing components from templates
6. Update existing components to match requirements
7. Run validation: `npm run validate:structure -- agents/{agent-name}`
8. Open PR for review

---

## Rationale

**Why 7 components?**

- **AGENTS.md**: Working instructions for tools and contributors (the agent itself is defined by the root `agents/{agent-name}.agent.md`)
- **CHANGELOG.md**: Track version history (required for CI/release automation)
- **package.json**: Dependency management and npm scripts
- **README.md**: User-facing documentation (discoverable)
- **skills/**: Encapsulation of agent-specific capabilities
- **tests/**: Quality assurance and regression prevention
- **config/**: Environment flexibility and defaults

This structure balances:

- ✅ Consistency across 50+ agents
- ✅ Discoverability (README, AGENTS.md in standard locations)
- ✅ Automation (registry generation, CI validation)
- ✅ Maintainability (clear expectations)
- ✅ Flexibility (config, skill isolation)

---

## Related

- [Standardized Template](../templates/agent-structure-template/)
- [CHANGELOG Format](CHANGELOG_FORMAT.md)
- [package.json Requirements](PACKAGE_JSON_REQUIREMENTS.md)
- [Structure audit script](../../scripts/validation/phase-4-structure-audit.js)
12 changes: 6 additions & 6 deletions .github/docs/BROKEN_REFERENCE_REMEDIATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This document describes the process for identifying, auditing, and fixing all br
npm run audit:broken-refs
```

**Output**: `agents/reports/broken-references-audit.json`
**Output**: `.github/reports/agents/broken-references-audit.json`

**What it does**:

Expand Down Expand Up @@ -57,10 +57,10 @@ npm run audit:broken-refs

```bash
# View audit results
cat agents/reports/broken-references-audit.json | jq '.byFile[] | select(.severity=="CRITICAL")'
cat .github/reports/agents/broken-references-audit.json | jq '.byFile[] | select(.severity=="CRITICAL")'

# Group by severity
cat agents/reports/broken-references-audit.json | jq 'group_by(.severity) | map({severity: .[0].severity, count: length})'
cat .github/reports/agents/broken-references-audit.json | jq 'group_by(.severity) | map({severity: .[0].severity, count: length})'
```

**Key Questions**:
Expand All @@ -77,10 +77,10 @@ cat agents/reports/broken-references-audit.json | jq 'group_by(.severity) | map(

```bash
# Dry-run to preview changes
node scripts/validation/auto-fixer.js --dry-run --input agents/reports/broken-references-audit.json
node scripts/validation/auto-fixer.js --dry-run --input .github/reports/agents/broken-references-audit.json

# Apply fixes
node scripts/validation/auto-fixer.js --input agents/reports/broken-references-audit.json
node scripts/validation/auto-fixer.js --input .github/reports/agents/broken-references-audit.json
```

**What it does**:
Expand Down Expand Up @@ -149,7 +149,7 @@ act -j test

```bash
# Generate final audit report
npm run audit:broken-refs -- --output agents/reports/broken-references-audit-final.json
npm run audit:broken-refs -- --output .github/reports/agents/broken-references-audit-final.json

# Generate summary statistics
node scripts/validation/generate-broken-ref-summary.js
Expand Down
Loading
Loading