Skip to content

Commit 373c5ab

Browse files
committed
Create templates.js
1 parent 35badd0 commit 373c5ab

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

tests/p0/templates.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
'use strict';
2+
3+
/**
4+
* P0 template classification for agents.
5+
*
6+
* Infrastructure agents (Emma, Wade) have JavaScript components in scripts/
7+
* that perform installation, validation, and update operations. Their P0 tests
8+
* include activation + workflow structure + infrastructure integration checks.
9+
*
10+
* Content-only agents (Isla, Mila, Liam, Noah, Max) are pure markdown
11+
* definitions. Their P0 tests cover activation + workflow structure only.
12+
*
13+
* Stories 2.2 and 2.3 implement full infrastructure tests for Emma and Wade.
14+
* Story 3.1 implements content-only tests for the remaining 5 agents.
15+
*/
16+
17+
const { AGENTS } = require('../../scripts/update/lib/agent-registry');
18+
19+
// Infrastructure agents have JS components in scripts/ (config loading,
20+
// menu handler routing, file existence verification)
21+
const INFRASTRUCTURE_AGENT_IDS = new Set([
22+
'contextualization-expert', // Emma
23+
'lean-experiments-specialist', // Wade
24+
]);
25+
26+
const INFRASTRUCTURE_AGENTS = AGENTS.filter(a => INFRASTRUCTURE_AGENT_IDS.has(a.id));
27+
const CONTENT_ONLY_AGENTS = AGENTS.filter(a => !INFRASTRUCTURE_AGENT_IDS.has(a.id));
28+
29+
/**
30+
* Determine the P0 template type for an agent.
31+
*
32+
* @param {string} agentId - Agent ID from registry
33+
* @returns {'infrastructure' | 'content-only'} Template type
34+
*/
35+
function getAgentTemplate(agentId) {
36+
return INFRASTRUCTURE_AGENT_IDS.has(agentId) ? 'infrastructure' : 'content-only';
37+
}
38+
39+
module.exports = {
40+
INFRASTRUCTURE_AGENT_IDS,
41+
INFRASTRUCTURE_AGENTS,
42+
CONTENT_ONLY_AGENTS,
43+
getAgentTemplate,
44+
};

0 commit comments

Comments
 (0)