@abarcenas/ai-workflow-template 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/config/README.md +2 -2
- package/.agents/instructions/agent.instructions.md +16 -16
- package/.agents/instructions/context7.instructions.md +40 -0
- package/.agents/instructions/learned-knowledge.instructions.md +18 -0
- package/.agents/instructions/memory-bank.instructions.md +3 -3
- package/.opencode/agents/{architect.agent.md → architect.md} +5 -6
- package/.opencode/agents/{coder.agent.md → coder.md} +4 -8
- package/.opencode/agents/{deployer.agent.md → deployer.md} +4 -9
- package/.opencode/agents/{designer.agent.md → designer.md} +5 -6
- package/.opencode/agents/{e2e-tester.agent.md → e2e-tester.md} +4 -7
- package/.opencode/agents/{implementer.agent.md → implementer.md} +4 -8
- package/.opencode/agents/orchestrator/{feature-pipeline.agent.md → feature-pipeline.md} +16 -19
- package/.opencode/agents/orchestrator/{orchestrator.agent.md → orchestrator.md} +26 -34
- package/.opencode/agents/orchestrator/{tdd-orchestrator.agent.md → tdd-orchestrator.md} +26 -29
- package/.opencode/agents/{plan.agent.md → planner.md} +4 -9
- package/.opencode/agents/{researcher.agent.md → researcher.md} +5 -9
- package/.opencode/agents/{reviewer.agent.md → reviewer.md} +5 -8
- package/.opencode/agents/{scope.agent.md → scope.md} +5 -9
- package/.opencode/agents/{tracker.agent.md → tracker.md} +5 -9
- package/.opencode/agents/{unit-tester.agent.md → unit-tester.md} +4 -8
- package/.prettierignore +26 -0
- package/AGENTS.md +10 -6
- package/README.md +36 -12
- package/opencode.mcp.example.json +13 -12
- package/package.json +3 -1
- package/scripts/sync-unit.test.js +551 -12
- package/scripts/sync.js +296 -13
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Test-Driven Development orchestrator that enforces a RED-GREEN-REFACTOR pipeline. Writes tests first via unit-tester, then implements code via coder, verifies coverage ≥90%, and returns to test-writing if thresholds are not met. Tracks all test suites in memory-bank."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
todo: allow
|
|
9
|
-
"memory-bank/*": allow
|
|
10
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: primary
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: deny }
|
|
6
|
+
- { action: edit, resource: "*.md", effect: allow }
|
|
7
|
+
- { action: shell, resource: "*", effect: allow }
|
|
11
8
|
---
|
|
12
9
|
|
|
13
10
|
# TDD Orchestrator - Test-Driven Development
|
|
@@ -28,11 +25,11 @@ You are a Test-Driven Development orchestration agent that enforces a strict RED
|
|
|
28
25
|
|
|
29
26
|
| Role | Agent File | subagent_type | Typical Tools | When to Deploy |
|
|
30
27
|
|---|---|---|---|---|---|
|
|
31
|
-
| implementer | `implementer.
|
|
32
|
-
| unit-tester | `unit-tester.
|
|
33
|
-
| coder | `coder.
|
|
34
|
-
| reviewer | `reviewer.
|
|
35
|
-
| tracker | `tracker.
|
|
28
|
+
| implementer | `implementer.md` | `implementer` | read, search, edit, execute | Translating requirements into implementation plans with test/code batch tables |
|
|
29
|
+
| unit-tester | `unit-tester.md` | `unit-tester` | read, search, edit (test files only), execute | RED phase: write failing tests. VERIFY phase: run tests + check coverage |
|
|
30
|
+
| coder | `coder.md` | `coder` | read, search, edit, execute | GREEN phase: write minimal production code to pass tests |
|
|
31
|
+
| reviewer | `reviewer.md` | `reviewer` | read, search, github/* | Code review, security audit, quality gates on both tests and implementation |
|
|
32
|
+
| tracker | `tracker.md` | `tracker` | read, search | Doc recording — runs after pipeline to log finished work |
|
|
36
33
|
|
|
37
34
|
## TDD Pipeline Overview
|
|
38
35
|
|
|
@@ -63,12 +60,12 @@ Delegate bootstrap checks to a sub-agent. Do NOT read or check any files yoursel
|
|
|
63
60
|
Invoke a sub-agent (use `subagent_type "implementer"`) to check and bootstrap the project:
|
|
64
61
|
|
|
65
62
|
```
|
|
66
|
-
This phase must be performed as the agent "Implementer - Implementation Planning" defined in ".opencode/agents/implementer.
|
|
63
|
+
This phase must be performed as the agent "Implementer - Implementation Planning" defined in ".opencode/agents/implementer.md".
|
|
67
64
|
|
|
68
65
|
BOOTSTRAP CONTEXT - Check and initialize project scaffolding:
|
|
69
66
|
|
|
70
67
|
IMPORTANT:
|
|
71
|
-
- Read and apply the entire
|
|
68
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
72
69
|
- Base path: "{basePath}".
|
|
73
70
|
- Check if `docs/.architecture-context.md` exists with real content.
|
|
74
71
|
- If missing or template-only, run the architecture-blueprint-generator skill by reading ".agents/skills/architecture-blueprint-generator/SKILL.md" and following its instructions to analyze the codebase and generate architecture context.
|
|
@@ -120,10 +117,10 @@ The implementer creates the plan document with **two separate batch tables** for
|
|
|
120
117
|
3. Invoke the sub-agent using the Task tool with `subagent_type "implementer"`:
|
|
121
118
|
|
|
122
119
|
```
|
|
123
|
-
This phase must be performed as the agent "Implementation Plan Generation" defined in ".opencode/agents/implementer.
|
|
120
|
+
This phase must be performed as the agent "Implementation Plan Generation" defined in ".opencode/agents/implementer.md".
|
|
124
121
|
|
|
125
122
|
IMPORTANT:
|
|
126
|
-
- Read and apply the entire
|
|
123
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
127
124
|
- Work on "{work_unit}" with base path: "{basePath}".
|
|
128
125
|
- Produce a plan file in /plan/ with TWO separate batch execution tables:
|
|
129
126
|
1. **Test Batch Summary** — tasks for writing tests (unit-tester work). Each test task must specify: the test file to create, the component/function under test, expected behaviors to cover, and dependencies on other test tasks.
|
|
@@ -153,10 +150,10 @@ IMPORTANT:
|
|
|
153
150
|
b. Log: `"Test Batch {letter}: launching {N} parallel unit-tester tasks — {task_ids}"`
|
|
154
151
|
c. Launch **one Task tool invocation per test task**, all concurrently, using `subagent_type "unit-tester"`:
|
|
155
152
|
```
|
|
156
|
-
This phase must be performed as the agent "Unit Tester - Test Coverage" defined in ".opencode/agents/unit-tester.
|
|
153
|
+
This phase must be performed as the agent "Unit Tester - Test Coverage" defined in ".opencode/agents/unit-tester.md".
|
|
157
154
|
|
|
158
155
|
IMPORTANT:
|
|
159
|
-
- Read and apply the entire
|
|
156
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
160
157
|
- TDD CONTEXT: This is the RED phase. You are writing tests that define expected behavior BEFORE any implementation code exists. These tests SHOULD fail when run — that is correct and expected in TDD.
|
|
161
158
|
- Knowledge retrieval: read `.agents/instructions/knowledge-retrieval.instructions.md` for the mandatory 3-layer protocol (memory-bank + learned-knowledge + knowledgebase_search with graceful failure). Report whether knowledgebase_search was executed or skipped in your final summary.
|
|
162
159
|
- Work on "Write tests for task {TASK_ID}: {Description} from plan /plan/{filename}" with base path: "{basePath}".
|
|
@@ -197,10 +194,10 @@ IMPORTANT:
|
|
|
197
194
|
b. Log: `"Impl Batch {letter}: launching {N} parallel coder tasks — {task_ids}"`
|
|
198
195
|
c. Launch **one Task tool invocation per implementation task**, all concurrently, using `subagent_type "coder"`:
|
|
199
196
|
```
|
|
200
|
-
This phase must be performed as the agent "Coder - Implementation" defined in ".opencode/agents/coder.
|
|
197
|
+
This phase must be performed as the agent "Coder - Implementation" defined in ".opencode/agents/coder.md".
|
|
201
198
|
|
|
202
199
|
IMPORTANT:
|
|
203
|
-
- Read and apply the entire
|
|
200
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
204
201
|
- TDD CONTEXT: This is the GREEN phase. Write the MINIMAL production code necessary to pass all existing tests. Do NOT add features beyond what the tests specify. The tests were written first and define the contract you must fulfill.
|
|
205
202
|
- Knowledge retrieval: read `.agents/instructions/knowledge-retrieval.instructions.md` for the mandatory 3-layer protocol (memory-bank + learned-knowledge + knowledgebase_search with graceful failure). Report whether knowledgebase_search was executed or skipped in your final summary.
|
|
206
203
|
- Work on "Implement task {TASK_ID}: {Description} from plan /plan/{filename}" with base path: "{basePath}".
|
|
@@ -236,10 +233,10 @@ IMPORTANT:
|
|
|
236
233
|
3. Invoke the sub-agent using the Task tool with `subagent_type "unit-tester"`:
|
|
237
234
|
|
|
238
235
|
```
|
|
239
|
-
This phase must be performed as the agent "Unit Tester - Test Coverage" defined in ".opencode/agents/unit-tester.
|
|
236
|
+
This phase must be performed as the agent "Unit Tester - Test Coverage" defined in ".opencode/agents/unit-tester.md".
|
|
240
237
|
|
|
241
238
|
IMPORTANT:
|
|
242
|
-
- Read and apply the entire
|
|
239
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
243
240
|
- TDD CONTEXT: This is the VERIFY phase. Run ALL test files in the project. Report:
|
|
244
241
|
- Total tests: {count}
|
|
245
242
|
- Passed: {count}
|
|
@@ -276,10 +273,10 @@ Review both test code and implementation code for quality, correctness, and adhe
|
|
|
276
273
|
3. Invoke the sub-agent using the Task tool with `subagent_type "reviewer"`:
|
|
277
274
|
|
|
278
275
|
```
|
|
279
|
-
This phase must be performed as the agent "Reviewer - Code Quality" defined in ".opencode/agents/reviewer.
|
|
276
|
+
This phase must be performed as the agent "Reviewer - Code Quality" defined in ".opencode/agents/reviewer.md".
|
|
280
277
|
|
|
281
278
|
IMPORTANT:
|
|
282
|
-
- Read and apply the entire
|
|
279
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
283
280
|
- TDD CONTEXT: Review BOTH the test files and the implementation files. Verify that:
|
|
284
281
|
- Tests are comprehensive and meaningful (not just mocks returning canned values).
|
|
285
282
|
- Implementation is minimal and does not contain untested code paths.
|
|
@@ -304,10 +301,10 @@ After the pipeline finishes executing, delegate to the tracker agent to document
|
|
|
304
301
|
1. Invoke the tracker using the Task tool with subagent_type "tracker":
|
|
305
302
|
|
|
306
303
|
```
|
|
307
|
-
This phase must be performed as the agent "Tracker - Documentation Recorder" defined in ".opencode/agents/tracker.
|
|
304
|
+
This phase must be performed as the agent "Tracker - Documentation Recorder" defined in ".opencode/agents/tracker.md".
|
|
308
305
|
|
|
309
306
|
IMPORTANT:
|
|
310
|
-
- Read and apply the entire
|
|
307
|
+
- Read and apply the entire agent spec file (tools, constraints, quality standards).
|
|
311
308
|
- Base path: "{basePath}".
|
|
312
309
|
- Read the orchestrator log at "docs/.orchestrator-log.md" for the full pipeline record.
|
|
313
310
|
- Read any artifact files referenced in the log.
|
|
@@ -338,12 +335,12 @@ After every pipeline (or at the user's request), delegate to a sub-agent to pers
|
|
|
338
335
|
Invoke the tracker (use `subagent_type "tracker"`) with the pipeline context:
|
|
339
336
|
|
|
340
337
|
```
|
|
341
|
-
This phase must be performed as the agent "Tracker - Documentation Recorder" defined in ".opencode/agents/tracker.
|
|
338
|
+
This phase must be performed as the agent "Tracker - Documentation Recorder" defined in ".opencode/agents/tracker.md".
|
|
342
339
|
|
|
343
340
|
PERSIST LESSONS - Record pipeline knowledge:
|
|
344
341
|
|
|
345
342
|
IMPORTANT:
|
|
346
|
-
- Read and apply the entire
|
|
343
|
+
- Read and apply the entire agent spec file.
|
|
347
344
|
- Base path: "{basePath}".
|
|
348
345
|
- Read the orchestrator log at "docs/.orchestrator-log.md" for the full pipeline record.
|
|
349
346
|
- Append a new "Session" entry to ".agents/instructions/learned-knowledge.instructions.md" with:
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
edit: allow
|
|
8
|
-
skill: allow
|
|
9
|
-
question: allow
|
|
10
|
-
webfetch: allow
|
|
11
|
-
websearch: allow
|
|
3
|
+
mode: primary
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: allow }
|
|
6
|
+
- { action: shell, resource: "*", effect: allow }
|
|
12
7
|
---
|
|
13
8
|
|
|
14
9
|
# Plan Mode - Strategic Planning & Architecture Assistant
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Deep-dive research and investigation specialist. Handles technical unknowns, library evaluation, spike validation, and information gathering from documentation, codebases, and web sources."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"ddg-search/*": allow
|
|
9
|
-
"context7/*": allow
|
|
10
|
-
"memory-bank/*": allow
|
|
11
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: all
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: deny }
|
|
6
|
+
- { action: edit, resource: "*.md", effect: allow }
|
|
7
|
+
- { action: shell, resource: "*", effect: deny }
|
|
12
8
|
---
|
|
13
9
|
|
|
14
10
|
# Technical spike research mode
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Code review and quality assurance specialist. Reviews code for correctness, security vulnerabilities, performance issues, maintainability, and adherence to project standards."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"github/*": allow
|
|
9
|
-
"memory-bank/*": allow
|
|
10
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: all
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: deny }
|
|
6
|
+
- { action: edit, resource: "*.md", effect: allow }
|
|
7
|
+
- { action: shell, resource: "*", effect: deny }
|
|
11
8
|
---
|
|
12
9
|
|
|
13
10
|
# Reviewer - Code Quality
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Feature scoping specialist. Narrows underspecified feature requests through rounds of numbered questions with recommended answers, then writes a spike document that researcher and implementer can consume."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
skill: allow
|
|
9
|
-
question: allow
|
|
10
|
-
"memory-bank/*": allow
|
|
11
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: all
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: deny }
|
|
6
|
+
- { action: edit, resource: "*.md", effect: allow }
|
|
7
|
+
- { action: shell, resource: "*", effect: deny }
|
|
12
8
|
---
|
|
13
9
|
|
|
14
10
|
# Scope - Feature Scoping
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Documentation recorder that reads completed agent outputs and appends structured documentation to docs/<feature>/<agent>.md. Runs once after a pipeline finishes to produce a human-readable record of what was accomplished."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
edit: allow
|
|
9
|
-
write: allow
|
|
10
|
-
"memory-bank/*": allow
|
|
11
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: all
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: deny }
|
|
6
|
+
- { action: edit, resource: "*.md", effect: allow }
|
|
7
|
+
- { action: shell, resource: "*", effect: deny }
|
|
12
8
|
---
|
|
13
9
|
|
|
14
10
|
# Tracker - Documentation Recorder
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Unit and integration testing specialist. Writes comprehensive tests, improves coverage, validates edge cases, and ensures code quality through automated testing."
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
edit: allow
|
|
8
|
-
execute: allow
|
|
9
|
-
"memory-bank/*": allow
|
|
10
|
-
"knowledgebase/*": allow
|
|
3
|
+
mode: all
|
|
4
|
+
permissions:
|
|
5
|
+
- { action: edit, resource: "*", effect: allow }
|
|
6
|
+
- { action: shell, resource: "*", effect: allow }
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# Unit Tester - Test Coverage
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Project-owned. Sync never overwrites this file.
|
|
2
|
+
# Keep formatters away from files managed by @abarcenas/ai-workflow-template:
|
|
3
|
+
# a formatting pass over managed files makes every future sync skip them.
|
|
4
|
+
|
|
5
|
+
# Managed agent configuration
|
|
6
|
+
.agents/
|
|
7
|
+
.opencode/agents/
|
|
8
|
+
.opencode/commands/
|
|
9
|
+
|
|
10
|
+
# Managed root files
|
|
11
|
+
AGENTS.md
|
|
12
|
+
AGENTS.project.md
|
|
13
|
+
skills-lock.json
|
|
14
|
+
|
|
15
|
+
# Managed scripts (scripts/sync.js scriptsToSync)
|
|
16
|
+
scripts/memory-cli.js
|
|
17
|
+
scripts/memory-index.js
|
|
18
|
+
scripts/bump-version.js
|
|
19
|
+
scripts/validate-memory-schema.js
|
|
20
|
+
scripts/vocab-sync.js
|
|
21
|
+
scripts/mcp-memory-server.js
|
|
22
|
+
scripts/mcp/playwright-mcp-launcher.js
|
|
23
|
+
scripts/knowledgebase-cli.js
|
|
24
|
+
scripts/knowledgebase-index.js
|
|
25
|
+
scripts/mcp-knowledgebase-server.js
|
|
26
|
+
scripts/knowledgebase-init.sql
|
package/AGENTS.md
CHANGED
|
@@ -9,10 +9,14 @@ This project includes AI-assisted development configuration distributed through
|
|
|
9
9
|
- `.opencode/agents/` — Specialized agent definitions for planning, research, and implementation
|
|
10
10
|
- `.agents/prompts/` — Reusable prompt templates
|
|
11
11
|
|
|
12
|
+
## Project-Specific Rules
|
|
13
|
+
|
|
14
|
+
Put project-specific agent rules in `AGENTS.project.md` at the repository root. That file is project-owned: sync never overwrites or prunes it, and `--force` cannot replace it. New projects load it automatically through the `instructions` entry in `opencode.json`.
|
|
15
|
+
|
|
12
16
|
## Core Workflow
|
|
13
17
|
|
|
14
18
|
1. **Understand before acting** — Read relevant instructions from `.agents/instructions/` before working with specific technologies
|
|
15
|
-
2. **Plan before implementing** — Narrow underspecified work with the `scope` agent first, then use the `.opencode/agents/
|
|
19
|
+
2. **Plan before implementing** — Narrow underspecified work with the `scope` agent first, then use the `.opencode/agents/planner.md` (optional deep planning) or `.opencode/agents/implementer.md` patterns for structured work
|
|
16
20
|
3. **Track progress** — Update `memory-bank/activeContext.md` and `memory-bank/progress.md` after each task (see `.agents/instructions/task-implementation.instructions.md`)
|
|
17
21
|
4. **Maintain context** — Keep memory bank files updated (see `.agents/instructions/memory-bank.instructions.md`)
|
|
18
22
|
|
|
@@ -105,9 +109,9 @@ Five skills installed from `mattpocock/skills` (pinned at `v1.3.1`) drive scopin
|
|
|
105
109
|
|
|
106
110
|
### Scope agent
|
|
107
111
|
|
|
108
|
-
`.opencode/agents/scope.
|
|
112
|
+
`.opencode/agents/scope.md` is the front door for underspecified work. It runs `grilling` in rounds against a single draft file, emits each round's frontier as numbered questions with a recommended answer per question, and stops when the frontier is empty or the remaining unknowns are explicitly deferred.
|
|
109
113
|
|
|
110
|
-
It terminates by writing `docs/spike-<feature>.md` — the spike document `.opencode/agents/researcher.
|
|
114
|
+
It terminates by writing `docs/spike-<feature>.md` — the spike document `.opencode/agents/researcher.md` already expects as its input. From there the work continues to `researcher` (open questions need evidence), `implementer` (scope settled, planning remains), or `architect` (the shape of the system is the open problem).
|
|
111
115
|
|
|
112
116
|
The agent has no command-execution permission: it never builds, runs, or tests code. When a question can only be settled empirically it emits `prototype needed: <question>` with a branch, and that work is handed off to `coder` (logic) or `designer` (UI).
|
|
113
117
|
|
|
@@ -124,7 +128,7 @@ These agent workflows (from `.opencode/agents/`) define specialized modes of ope
|
|
|
124
128
|
|
|
125
129
|
Underspecified work does not start here. The default front door is the **`scope` agent** (see [`## Agent skills`](#agent-skills)): it narrows the request through grilling rounds and writes `docs/spike-<feature>.md`, which is handed to `researcher` when open questions need evidence, or to `implementer` when only planning remains.
|
|
126
130
|
|
|
127
|
-
`.opencode/agents/
|
|
131
|
+
`.opencode/agents/planner.md` remains available as an **optional deep-planning mode** for work that is already scoped but needs a step-by-step plan. It is not deleted and not deprecated — it is demoted in the default flow only. When you use it, follow this sequence:
|
|
128
132
|
|
|
129
133
|
1. **Understand the Goal** — Ask clarifying questions about requirements and goals
|
|
130
134
|
2. **Explore Context** — Examine relevant files, components, and systems that will be affected
|
|
@@ -176,7 +180,7 @@ Always ask user permission before: creating files, running commands, modifying t
|
|
|
176
180
|
|
|
177
181
|
Use this when you want a fixed, opinionated pipeline: **implementer → designer → coder → tracker**. It bootstraps architecture context, supports step-by-step confirmation, logs progress, and persists lessons learned.
|
|
178
182
|
|
|
179
|
-
The agent file is at `.opencode/agents/orchestrator/feature-pipeline.
|
|
183
|
+
The agent file is at `.opencode/agents/orchestrator/feature-pipeline.md`.
|
|
180
184
|
|
|
181
185
|
**When to use:** You want a predictable, four-step feature pipeline without dynamic agent selection. The orchestrator agent is more flexible; this is more opinionated.
|
|
182
186
|
|
|
@@ -197,7 +201,7 @@ implementer (PLAN) → unit-tester∥ (RED) → coder∥ (GREEN) → unit-tester
|
|
|
197
201
|
| 5 | REVIEW | reviewer | Audits tests + code for quality, security, patterns |
|
|
198
202
|
| 6 | DOCUMENT | tracker | Records results to `docs/tracker-log.md` |
|
|
199
203
|
|
|
200
|
-
The agent file is at `.opencode/agents/orchestrator/tdd-orchestrator.
|
|
204
|
+
The agent file is at `.opencode/agents/orchestrator/tdd-orchestrator.md`.
|
|
201
205
|
|
|
202
206
|
**When to use:** Any feature, bug fix, or refactor where tests should be written first. The orchestrator automatically selects this pipeline when testable code changes are requested.
|
|
203
207
|
|
package/README.md
CHANGED
|
@@ -75,8 +75,29 @@ npm run sync # Normal sync
|
|
|
75
75
|
- New files are copied automatically
|
|
76
76
|
- Unmodified files are refreshed from the package
|
|
77
77
|
- Locally edited files are preserved (skipped by default)
|
|
78
|
+
- Project-owned files are never overwritten or pruned after creation, and `--force` cannot replace them
|
|
78
79
|
- GitHub Actions workflows are excluded from consumer sync (`.github/workflows/`)
|
|
79
80
|
|
|
81
|
+
> `--dry-run` previews copies and prunes, but missing scaffold files (memory-bank stubs, `opencode.json`, `AGENTS.project.md`, `.prettierignore`) are still created. This matches the pre-existing scaffold behaviour.
|
|
82
|
+
|
|
83
|
+
### Project-owned files
|
|
84
|
+
|
|
85
|
+
`AGENTS.project.md` is the supported home for project-specific agent rules. It is created if absent, then treated as project-owned: sync never overwrites or prunes it, `--force` cannot replace it, and deleting it recreates it on the next sync. New projects load it through `"instructions": ["AGENTS.project.md"]` in `opencode.json`; a project created before that entry existed must add it once, because sync never rewrites an existing `opencode.json`.
|
|
86
|
+
|
|
87
|
+
The same ownership rule protects `opencode.json`, `.prettierignore`, and `.agents/instructions/learned-knowledge.instructions.md`. `.agents-sync-ignore` is also protected from overwrite and deletion, but sync does **not** read or honour its contents yet — do not rely on it.
|
|
88
|
+
|
|
89
|
+
`__project__/<file>` entries in `.agents-sync-manifest.json` are reporting metadata written only when sync creates the file. Files that already existed before the upgrade are intentionally absent, because sync has no managed baseline for them.
|
|
90
|
+
|
|
91
|
+
The package ships a `.prettierignore` and scaffolds it when absent. New projects get coverage automatically for `.agents/`, `.opencode/agents/`, `.opencode/commands/`, `AGENTS.md`, `skills-lock.json`, and every synced script; the shipped file also ignores `AGENTS.project.md`, though that file is not hash-managed. Existing projects keep their own `.prettierignore` untouched (it is project-owned), so if it does not cover every managed path sync prints one warning:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
[ai-workflow-template] Existing .prettierignore does not protect managed files; merge the patterns from node_modules/@abarcenas/ai-workflow-template/.prettierignore
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Merge those patterns manually — sync never edits the file. Template-side additions to `rootFiles` or `scriptsToSync` also require a matching manual line in an existing project; the shipped file only updates the defaults for new projects. A formatter run over managed files rewrites their hashes, so every later sync skips them and the consumer stops receiving template updates.
|
|
98
|
+
|
|
99
|
+
If sync warns `Skipped locally modified root file: AGENTS.md`, move those local rules into `AGENTS.project.md`, restore the managed file from `node_modules/@abarcenas/ai-workflow-template/AGENTS.md`, then re-run sync.
|
|
100
|
+
|
|
80
101
|
## Core Structure
|
|
81
102
|
|
|
82
103
|
Post-install, your project receives this structure:
|
|
@@ -90,6 +111,7 @@ Post-install, your project receives this structure:
|
|
|
90
111
|
.github/workflows/ # CI/CD automation (excluded from sync)
|
|
91
112
|
docs/ # Guides (e.g. playwright-mcp-configuration.md)
|
|
92
113
|
AGENTS.md # Master instruction file with agent guidance
|
|
114
|
+
AGENTS.project.md # Project-owned rules (recreated if deleted, never overwritten)
|
|
93
115
|
```
|
|
94
116
|
|
|
95
117
|
## Multi-Agent Orchestrator
|
|
@@ -98,18 +120,18 @@ AGENTS.md # Master instruction file with agent guidance
|
|
|
98
120
|
|
|
99
121
|
| Agent | File | Role |
|
|
100
122
|
| --- | --- | --- |
|
|
101
|
-
| Orchestrator | `.opencode/agents/orchestrator/orchestrator.
|
|
102
|
-
| Scope | `.opencode/agents/scope.
|
|
103
|
-
| Researcher | `.opencode/agents/researcher.
|
|
104
|
-
| Architect | `.opencode/agents/architect.
|
|
105
|
-
| Implementer | `.opencode/agents/implementer.
|
|
106
|
-
| Designer | `.opencode/agents/designer.
|
|
107
|
-
| Coder | `.opencode/agents/coder.
|
|
108
|
-
| Unit Tester | `.opencode/agents/unit-tester.
|
|
109
|
-
| E2E Tester | `.opencode/agents/e2e-tester.
|
|
110
|
-
| Reviewer | `.opencode/agents/reviewer.
|
|
111
|
-
| Deployer | `.opencode/agents/deployer.
|
|
112
|
-
| Tracker | `.opencode/agents/tracker.
|
|
123
|
+
| Orchestrator | `.opencode/agents/orchestrator/orchestrator.md` | Master — analyzes requests, builds pipelines, delegates |
|
|
124
|
+
| Scope | `.opencode/agents/scope.md` | Conditional front door for underspecified requests — grilling rounds, then a spike doc |
|
|
125
|
+
| Researcher | `.opencode/agents/researcher.md` | Technical investigation, library evaluation |
|
|
126
|
+
| Architect | `.opencode/agents/architect.md` | System design, component architecture |
|
|
127
|
+
| Implementer | `.opencode/agents/implementer.md` | Translates designs into implementation plans |
|
|
128
|
+
| Designer | `.opencode/agents/designer.md` | UI/UX, styling, responsive design |
|
|
129
|
+
| Coder | `.opencode/agents/coder.md` | Production code implementation |
|
|
130
|
+
| Unit Tester | `.opencode/agents/unit-tester.md` | Unit and integration tests |
|
|
131
|
+
| E2E Tester | `.opencode/agents/e2e-tester.md` | Playwright browser tests |
|
|
132
|
+
| Reviewer | `.opencode/agents/reviewer.md` | Code review, security audit |
|
|
133
|
+
| Deployer | `.opencode/agents/deployer.md` | CI/CD, deployment scripts |
|
|
134
|
+
| Tracker | `.opencode/agents/tracker.md` | Documentation recorder |
|
|
113
135
|
|
|
114
136
|
### How to Use
|
|
115
137
|
|
|
@@ -286,6 +308,8 @@ npm run memory:normalize # Normalize frontmatter (runs automatically on instal
|
|
|
286
308
|
|
|
287
309
|
- Uses `INIT_CWD` to install against the consuming project (not the package dir)
|
|
288
310
|
- Local changes are always preserved unless `--force` is used
|
|
311
|
+
- Project-owned files (`AGENTS.project.md`, `opencode.json`, `.prettierignore`, learned knowledge) are created if absent and never overwritten or pruned after that, even with `--force`
|
|
312
|
+
- Do not add `AGENTS.project.md` or `opencode.json` to `package.json` `files`: both are scaffolded create-if-absent and must never ship from the package
|
|
289
313
|
- `AGENTS.md` is the main instruction file agents should read
|
|
290
314
|
- Package assumes the public npm registry
|
|
291
315
|
- Playwright MCP integration is documented in `docs/`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"instructions": ["AGENTS.project.md"],
|
|
3
4
|
"mcp": {
|
|
4
5
|
"chrome-devtools": {
|
|
5
6
|
"type": "local",
|
|
@@ -18,10 +19,9 @@
|
|
|
18
19
|
},
|
|
19
20
|
"github": {
|
|
20
21
|
"type": "local",
|
|
21
|
-
"command": "npx",
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PERSONAL_ACCESS_TOKEN"
|
|
22
|
+
"command": ["npx", "-y", "@modelcontextprotocol/server-github"],
|
|
23
|
+
"environment": {
|
|
24
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_PERSONAL_ACCESS_TOKEN}"
|
|
25
25
|
},
|
|
26
26
|
"enabled": true
|
|
27
27
|
},
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"type": "remote",
|
|
30
30
|
"url": "https://mcp.context7.com/mcp",
|
|
31
31
|
"headers": {
|
|
32
|
-
"CONTEXT7_API_KEY": "
|
|
32
|
+
"CONTEXT7_API_KEY": "{env:CONTEXT7_TOKEN}"
|
|
33
33
|
},
|
|
34
34
|
"enabled": true
|
|
35
35
|
},
|
|
36
36
|
"playwright": {
|
|
37
37
|
"type": "local",
|
|
38
|
-
"command": "node",
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"VIEWPORT": "$VIEWPORT"
|
|
38
|
+
"command": ["node", "scripts/mcp/playwright-mcp-launcher.js"],
|
|
39
|
+
"environment": {
|
|
40
|
+
"HEADLESS": "{env:HEADLESS}",
|
|
41
|
+
"SLOW_MO": "{env:SLOW_MO}",
|
|
42
|
+
"VIEWPORT": "{env:VIEWPORT}"
|
|
44
43
|
},
|
|
44
|
+
"timeout": 120000,
|
|
45
45
|
"enabled": true
|
|
46
46
|
},
|
|
47
47
|
"example-server": {
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"mcp-everything_*": "allow",
|
|
67
67
|
"angular-cli_*": "allow",
|
|
68
68
|
"playwright_*": "allow",
|
|
69
|
+
"context7_*": "allow",
|
|
69
70
|
"memory-bank_*": "allow"
|
|
70
71
|
}
|
|
71
|
-
}
|
|
72
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abarcenas/ai-workflow-template",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"description": "A comprehensive template repository for AI-assisted development workflows using GitHub Copilot. This template provides a structured approach to leveraging AI assistance through pre-configured skills, prompts, agents, and coding standards.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/abarcenas29/ai-workflow-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/abarcenas29/ai-workflow-template#readme",
|
|
41
|
+
"//": "Never add AGENTS.project.md or opencode.json to files: both are scaffolded create-if-absent at the consumer root and must not ship from the package.",
|
|
41
42
|
"files": [
|
|
42
43
|
"bin/",
|
|
43
44
|
".agents/",
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
".husky/",
|
|
50
51
|
"memory-bank/.vocabulary.json",
|
|
51
52
|
"AGENTS.md",
|
|
53
|
+
".prettierignore",
|
|
52
54
|
"opencode.mcp.example.json",
|
|
53
55
|
"skills-lock.json",
|
|
54
56
|
".husky/post-merge",
|