@abarcenas/ai-workflow-template 1.1.0 → 1.13.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.
Files changed (76) hide show
  1. package/.agents/instructions/learned-knowledge.instructions.md +46 -0
  2. package/{.github → .agents}/instructions/memory-bank.instructions.md +14 -0
  3. package/{.github → .agents}/instructions/task-implementation.instructions.md +8 -0
  4. package/.agents/skills/architecture-blueprint-generator/SKILL.md +378 -0
  5. package/.agents/skills/cavecrew/SKILL.md +82 -0
  6. package/.agents/skills/caveman/SKILL.md +74 -0
  7. package/.agents/skills/caveman-commit/SKILL.md +65 -0
  8. package/.agents/skills/caveman-compress/README.md +163 -0
  9. package/.agents/skills/caveman-compress/SECURITY.md +31 -0
  10. package/.agents/skills/caveman-compress/SKILL.md +111 -0
  11. package/.agents/skills/caveman-compress/scripts/__init__.py +9 -0
  12. package/.agents/skills/caveman-compress/scripts/__main__.py +3 -0
  13. package/.agents/skills/caveman-compress/scripts/benchmark.py +78 -0
  14. package/.agents/skills/caveman-compress/scripts/cli.py +85 -0
  15. package/.agents/skills/caveman-compress/scripts/compress.py +254 -0
  16. package/.agents/skills/caveman-compress/scripts/detect.py +121 -0
  17. package/.agents/skills/caveman-compress/scripts/validate.py +213 -0
  18. package/.agents/skills/caveman-help/SKILL.md +59 -0
  19. package/.agents/skills/caveman-review/SKILL.md +55 -0
  20. package/.agents/skills/caveman-stats/SKILL.md +10 -0
  21. package/.agents/skills/compress/SKILL.md +111 -0
  22. package/.agents/skills/compress/scripts/__init__.py +9 -0
  23. package/.agents/skills/compress/scripts/__main__.py +3 -0
  24. package/.agents/skills/compress/scripts/benchmark.py +78 -0
  25. package/.agents/skills/compress/scripts/cli.py +85 -0
  26. package/.agents/skills/compress/scripts/compress.py +254 -0
  27. package/.agents/skills/compress/scripts/detect.py +121 -0
  28. package/.agents/skills/compress/scripts/validate.py +213 -0
  29. package/{.github/agents/implementation-plan.agent.md → .agents/skills/create-implementation-plan/SKILL.md} +17 -52
  30. package/.agents/skills/create-specification/SKILL.md +127 -0
  31. package/AGENTS.md +149 -0
  32. package/README.md +197 -60
  33. package/opencode.mcp.example.json +54 -0
  34. package/package.json +13 -5
  35. package/scripts/mcp/playwright-mcp-launcher.js +46 -0
  36. package/scripts/sync.js +54 -11
  37. package/.github/agents/plan.agent.md +0 -135
  38. package/.github/agents/research-spike.agent.md +0 -204
  39. package/.github/prompts/copilot-instructions-blueprint-generator.prompt.md +0 -317
  40. /package/{.github → .agents}/instructions/agent-safety.instructions.md +0 -0
  41. /package/{.github → .agents}/instructions/agent-skill.instructions.md +0 -0
  42. /package/{.github → .agents}/instructions/agent.instructions.md +0 -0
  43. /package/{.github → .agents}/instructions/ai-prompt-engineering-safety.instructions.md +0 -0
  44. /package/{.github → .agents}/instructions/angular.instructions.md +0 -0
  45. /package/{.github → .agents}/instructions/context7.instructions.md +0 -0
  46. /package/{.github → .agents}/instructions/go.instructions.md +0 -0
  47. /package/{.github → .agents}/instructions/html-to-css-guide.instructions.md +0 -0
  48. /package/{.github → .agents}/instructions/instructions.instructions.md +0 -0
  49. /package/{.github → .agents}/instructions/markdown.instructions.md +0 -0
  50. /package/{.github → .agents}/instructions/nodejs-vitest.instructions.md +0 -0
  51. /package/{.github → .agents}/instructions/playwright-typescript.instructions.md +0 -0
  52. /package/{.github → .agents}/instructions/prompt.instructions.md +0 -0
  53. /package/{.github → .agents}/instructions/security-owasp.instructions.md +0 -0
  54. /package/{.github → .agents}/instructions/shell.instructions.md +0 -0
  55. /package/{.github → .agents}/instructions/typescript.instructions.md +0 -0
  56. /package/{.github → .agents}/prompts/documentation-writer.prompt.md +0 -0
  57. /package/{.github → .agents}/prompts/editconfig.prompt.md +0 -0
  58. /package/{.github → .agents}/prompts/playwright-explore.prompt.md +0 -0
  59. /package/{.github → .agents}/prompts/playwright-generate-test.prompt.md +0 -0
  60. /package/{.github → .agents}/skills/agent-governance/SKILL.md +0 -0
  61. /package/{.github → .agents}/skills/boost-prompt/SKILL.md +0 -0
  62. /package/{.github → .agents}/skills/chrome-devtools/SKILL.md +0 -0
  63. /package/{.github → .agents}/skills/context-map/SKILL.md +0 -0
  64. /package/{.github → .agents}/skills/conventional-commit/SKILL.md +0 -0
  65. /package/{.github → .agents}/skills/create-readme/SKILL.md +0 -0
  66. /package/{.github → .agents}/skills/editorconfig/SKILL.md +0 -0
  67. /package/{.github → .agents}/skills/gh-cli/SKILL.md +0 -0
  68. /package/{.github → .agents}/skills/git-commit/SKILL.md +0 -0
  69. /package/{.github → .agents}/skills/github-issues/SKILL.md +0 -0
  70. /package/{.github → .agents}/skills/github-issues/references/templates.md +0 -0
  71. /package/{.github → .agents}/skills/microsoft-docs/SKILL.md +0 -0
  72. /package/{.github → .agents}/skills/playwright-explore-website/SKILL.md +0 -0
  73. /package/{.github → .agents}/skills/playwright-generate-test/SKILL.md +0 -0
  74. /package/{.github → .agents}/skills/polygot-test-agent/SKILL.md +0 -0
  75. /package/{.github → .agents}/skills/polygot-test-agent/unit-test-genearation.prompt.md +0 -0
  76. /package/{.github → .agents}/skills/prompt-builder/SKILL.md +0 -0
@@ -0,0 +1,213 @@
1
+ #!/usr/bin/env python3
2
+ import re
3
+ from collections import Counter
4
+ from pathlib import Path
5
+
6
+ URL_REGEX = re.compile(r"https?://[^\s)]+")
7
+ FENCE_OPEN_REGEX = re.compile(r"^(\s{0,3})(`{3,}|~{3,})(.*)$")
8
+ HEADING_REGEX = re.compile(r"^(#{1,6})\s+(.*)", re.MULTILINE)
9
+ BULLET_REGEX = re.compile(r"^\s*[-*+]\s+", re.MULTILINE)
10
+
11
+ # crude but effective path detection
12
+ # Requires either a path prefix (./ ../ / or drive letter) or a slash/backslash within the match
13
+ PATH_REGEX = re.compile(r"(?:\./|\.\./|/|[A-Za-z]:\\)[\w\-/\\\.]+|[\w\-\.]+[/\\][\w\-/\\\.]+")
14
+
15
+
16
+ class ValidationResult:
17
+ def __init__(self):
18
+ self.is_valid = True
19
+ self.errors = []
20
+ self.warnings = []
21
+
22
+ def add_error(self, msg):
23
+ self.is_valid = False
24
+ self.errors.append(msg)
25
+
26
+ def add_warning(self, msg):
27
+ self.warnings.append(msg)
28
+
29
+
30
+ def read_file(path: Path) -> str:
31
+ return path.read_text(errors="ignore")
32
+
33
+
34
+ # ---------- Extractors ----------
35
+
36
+
37
+ def extract_headings(text):
38
+ return [(level, title.strip()) for level, title in HEADING_REGEX.findall(text)]
39
+
40
+
41
+ def extract_code_blocks(text):
42
+ """Line-based fenced code block extractor.
43
+
44
+ Handles ``` and ~~~ fences with variable length (CommonMark: closing
45
+ fence must use same char and be at least as long as opening). Supports
46
+ nested fences (e.g. an outer 4-backtick block wrapping inner 3-backtick
47
+ content).
48
+ """
49
+ blocks = []
50
+ lines = text.split("\n")
51
+ i = 0
52
+ n = len(lines)
53
+ while i < n:
54
+ m = FENCE_OPEN_REGEX.match(lines[i])
55
+ if not m:
56
+ i += 1
57
+ continue
58
+ fence_char = m.group(2)[0]
59
+ fence_len = len(m.group(2))
60
+ open_line = lines[i]
61
+ block_lines = [open_line]
62
+ i += 1
63
+ closed = False
64
+ while i < n:
65
+ close_m = FENCE_OPEN_REGEX.match(lines[i])
66
+ if (
67
+ close_m
68
+ and close_m.group(2)[0] == fence_char
69
+ and len(close_m.group(2)) >= fence_len
70
+ and close_m.group(3).strip() == ""
71
+ ):
72
+ block_lines.append(lines[i])
73
+ closed = True
74
+ i += 1
75
+ break
76
+ block_lines.append(lines[i])
77
+ i += 1
78
+ if closed:
79
+ blocks.append("\n".join(block_lines))
80
+ # Unclosed fences are silently skipped — they indicate malformed markdown
81
+ # and including them would cause false-positive validation failures.
82
+ return blocks
83
+
84
+
85
+ def extract_urls(text):
86
+ return set(URL_REGEX.findall(text))
87
+
88
+
89
+ def extract_paths(text):
90
+ return set(PATH_REGEX.findall(text))
91
+
92
+
93
+ def count_bullets(text):
94
+ return len(BULLET_REGEX.findall(text))
95
+
96
+
97
+ def extract_inline_codes(text):
98
+ text_without_fences = re.sub(r"^```[\s\S]*?^```", "", text, flags=re.MULTILINE)
99
+ text_without_fences = re.sub(r"^~~~[\s\S]*?^~~~", "", text_without_fences, flags=re.MULTILINE)
100
+ return re.findall(r"`([^`]+)`", text_without_fences)
101
+
102
+
103
+ # ---------- Validators ----------
104
+
105
+
106
+ def validate_headings(orig, comp, result):
107
+ h1 = extract_headings(orig)
108
+ h2 = extract_headings(comp)
109
+
110
+ if len(h1) != len(h2):
111
+ result.add_error(f"Heading count mismatch: {len(h1)} vs {len(h2)}")
112
+
113
+ if h1 != h2:
114
+ result.add_warning("Heading text/order changed")
115
+
116
+
117
+ def validate_code_blocks(orig, comp, result):
118
+ c1 = extract_code_blocks(orig)
119
+ c2 = extract_code_blocks(comp)
120
+
121
+ if c1 != c2:
122
+ result.add_error("Code blocks not preserved exactly")
123
+
124
+
125
+ def validate_urls(orig, comp, result):
126
+ u1 = extract_urls(orig)
127
+ u2 = extract_urls(comp)
128
+
129
+ if u1 != u2:
130
+ result.add_error(f"URL mismatch: lost={u1 - u2}, added={u2 - u1}")
131
+
132
+
133
+ def validate_paths(orig, comp, result):
134
+ p1 = extract_paths(orig)
135
+ p2 = extract_paths(comp)
136
+
137
+ if p1 != p2:
138
+ result.add_warning(f"Path mismatch: lost={p1 - p2}, added={p2 - p1}")
139
+
140
+
141
+ def validate_bullets(orig, comp, result):
142
+ b1 = count_bullets(orig)
143
+ b2 = count_bullets(comp)
144
+
145
+ if b1 == 0:
146
+ return
147
+
148
+ diff = abs(b1 - b2) / b1
149
+
150
+ if diff > 0.15:
151
+ result.add_warning(f"Bullet count changed too much: {b1} -> {b2}")
152
+
153
+
154
+ def validate_inline_codes(orig, comp, result):
155
+ c1 = Counter(extract_inline_codes(orig))
156
+ c2 = Counter(extract_inline_codes(comp))
157
+
158
+ if c1 != c2:
159
+ lost = set(c1.keys()) - set(c2.keys())
160
+ added = set(c2.keys()) - set(c1.keys())
161
+ for code, count in c1.items():
162
+ if code in c2 and c2[code] < count:
163
+ lost.add(f"{code} (lost {count - c2[code]} of {count} occurrences)")
164
+ if lost:
165
+ result.add_error(f"Inline code lost: {lost}")
166
+ if added:
167
+ result.add_warning(f"Inline code added: {added}")
168
+
169
+
170
+ # ---------- Main ----------
171
+
172
+
173
+ def validate(original_path: Path, compressed_path: Path) -> ValidationResult:
174
+ result = ValidationResult()
175
+
176
+ orig = read_file(original_path)
177
+ comp = read_file(compressed_path)
178
+
179
+ validate_headings(orig, comp, result)
180
+ validate_code_blocks(orig, comp, result)
181
+ validate_urls(orig, comp, result)
182
+ validate_paths(orig, comp, result)
183
+ validate_bullets(orig, comp, result)
184
+ validate_inline_codes(orig, comp, result)
185
+
186
+ return result
187
+
188
+
189
+ # ---------- CLI ----------
190
+
191
+ if __name__ == "__main__":
192
+ import sys
193
+
194
+ if len(sys.argv) != 3:
195
+ print("Usage: python validate.py <original> <compressed>")
196
+ sys.exit(1)
197
+
198
+ orig = Path(sys.argv[1]).resolve()
199
+ comp = Path(sys.argv[2]).resolve()
200
+
201
+ res = validate(orig, comp)
202
+
203
+ print(f"\nValid: {res.is_valid}")
204
+
205
+ if res.errors:
206
+ print("\nErrors:")
207
+ for e in res.errors:
208
+ print(f" - {e}")
209
+
210
+ if res.warnings:
211
+ print("\nWarnings:")
212
+ for w in res.warnings:
213
+ print(f" - {w}")
@@ -1,49 +1,17 @@
1
1
  ---
2
- description: "Generate an implementation plan for new features or refactoring existing code."
3
- name: "Implementation Plan Generation Mode"
4
- tools:
5
- [
6
- "search/codebase",
7
- "search/usages",
8
- "vscode/vscodeAPI",
9
- "think",
10
- "read/problems",
11
- "search/changes",
12
- "execute/testFailure",
13
- "read/terminalSelection",
14
- "read/terminalLastCommand",
15
- "vscode/openSimpleBrowser",
16
- "web/fetch",
17
- "findTestFiles",
18
- "search/searchResults",
19
- "web/githubRepo",
20
- "vscode/extensions",
21
- "edit/editFiles",
22
- "execute/runNotebookCell",
23
- "read/getNotebookSummary",
24
- "read/readNotebookCellOutput",
25
- "search",
26
- "vscode/getProjectSetupInfo",
27
- "vscode/installExtension",
28
- "vscode/newWorkspace",
29
- "vscode/runCommand",
30
- "execute/getTerminalOutput",
31
- "execute/runInTerminal",
32
- "execute/createAndRunTask",
33
- "execute/getTaskOutput",
34
- "execute/runTask",
35
- ]
2
+ name: create-implementation-plan
3
+ description: 'Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.'
36
4
  ---
37
5
 
38
- # Implementation Plan Generation Mode
6
+ # Create Implementation Plan
39
7
 
40
8
  ## Primary Directive
41
9
 
42
- You are an AI agent operating in planning mode. Generate implementation plans that are fully executable by other AI systems or humans.
10
+ Your goal is to create a new implementation plan file for `${input:PlanPurpose}`. Your output must be machine-readable, deterministic, and structured for autonomous execution by other AI systems or humans.
43
11
 
44
12
  ## Execution Context
45
13
 
46
- This mode is designed for AI-to-AI communication and automated processing. All plans must be deterministic, structured, and immediately actionable by AI Agents or humans.
14
+ This prompt is designed for AI-to-AI communication and automated processing. All instructions must be interpreted literally and executed systematically without human interpretation or clarification.
47
15
 
48
16
  ## Core Requirements
49
17
 
@@ -51,7 +19,6 @@ This mode is designed for AI-to-AI communication and automated processing. All p
51
19
  - Use deterministic language with zero ambiguity
52
20
  - Structure all content for automated parsing and execution
53
21
  - Ensure complete self-containment with no external dependencies for understanding
54
- - DO NOT make any code edits - only generate structured plans
55
22
 
56
23
  ## Plan Structure Requirements
57
24
 
@@ -76,8 +43,6 @@ Plans must consist of discrete, atomic phases containing executable tasks. Each
76
43
 
77
44
  ## Output File Specifications
78
45
 
79
- When creating plan files:
80
-
81
46
  - Save implementation plan files in `/plan/` directory
82
47
  - Use naming convention: `[purpose]-[component]-[version].md`
83
48
  - Purpose prefixes: `upgrade|refactor|feature|data|infrastructure|process|architecture|design`
@@ -93,7 +58,7 @@ All implementation plans must strictly adhere to the following template. Each se
93
58
  - All front matter fields must be present and properly formatted
94
59
  - All section headers must match exactly (case-sensitive)
95
60
  - All identifier prefixes must follow the specified format
96
- - Tables must include all required columns with specific task details
61
+ - Tables must include all required columns
97
62
  - No placeholder text may remain in the final output
98
63
 
99
64
  ## Status
@@ -134,21 +99,21 @@ tags: [Optional: List of relevant tags or categories, e.g., `feature`, `upgrade`
134
99
 
135
100
  - GOAL-001: [Describe the goal of this phase, e.g., "Implement feature X", "Refactor module Y", etc.]
136
101
 
137
- | Task | Description | Completed | Date |
138
- | -------- | --------------------- | --------- | ---------- |
139
- | TASK-001 | Description of task 1 | ✅ | 2025-04-25 |
140
- | TASK-002 | Description of task 2 | | |
141
- | TASK-003 | Description of task 3 | | |
102
+ | Task | Description | Completed | Date |
103
+ |------|-------------|-----------|------|
104
+ | TASK-001 | Description of task 1 | ✅ | 2025-04-25 |
105
+ | TASK-002 | Description of task 2 | | |
106
+ | TASK-003 | Description of task 3 | | |
142
107
 
143
108
  ### Implementation Phase 2
144
109
 
145
110
  - GOAL-002: [Describe the goal of this phase, e.g., "Implement feature X", "Refactor module Y", etc.]
146
111
 
147
- | Task | Description | Completed | Date |
148
- | -------- | --------------------- | --------- | ---- |
149
- | TASK-004 | Description of task 4 | | |
150
- | TASK-005 | Description of task 5 | | |
151
- | TASK-006 | Description of task 6 | | |
112
+ | Task | Description | Completed | Date |
113
+ |------|-------------|-----------|------|
114
+ | TASK-004 | Description of task 4 | | |
115
+ | TASK-005 | Description of task 5 | | |
116
+ | TASK-006 | Description of task 6 | | |
152
117
 
153
118
  ## 3. Alternatives
154
119
 
@@ -189,4 +154,4 @@ tags: [Optional: List of relevant tags or categories, e.g., `feature`, `upgrade`
189
154
 
190
155
  [Link to related spec 1]
191
156
  [Link to relevant external documentation]
192
- ```
157
+ ```
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: create-specification
3
+ description: 'Create a new specification file for the solution, optimized for Generative AI consumption.'
4
+ ---
5
+
6
+ # Create Specification
7
+
8
+ Your goal is to create a new specification file for `${input:SpecPurpose}`.
9
+
10
+ The specification file must define the requirements, constraints, and interfaces for the solution components in a manner that is clear, unambiguous, and structured for effective use by Generative AIs. Follow established documentation standards and ensure the content is machine-readable and self-contained.
11
+
12
+ ## Best Practices for AI-Ready Specifications
13
+
14
+ - Use precise, explicit, and unambiguous language.
15
+ - Clearly distinguish between requirements, constraints, and recommendations.
16
+ - Use structured formatting (headings, lists, tables) for easy parsing.
17
+ - Avoid idioms, metaphors, or context-dependent references.
18
+ - Define all acronyms and domain-specific terms.
19
+ - Include examples and edge cases where applicable.
20
+ - Ensure the document is self-contained and does not rely on external context.
21
+
22
+ The specification should be saved in the [/spec/](/spec/) directory and named according to the following convention: `spec-[a-z0-9-]+.md`, where the name should be descriptive of the specification's content and starting with the highlevel purpose, which is one of [schema, tool, data, infrastructure, process, architecture, or design].
23
+
24
+ The specification file must be formatted in well formed Markdown.
25
+
26
+ Specification files must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the markdown should be structured correctly as per the example following:
27
+
28
+ ```md
29
+ ---
30
+ title: [Concise Title Describing the Specification's Focus]
31
+ version: [Optional: e.g., 1.0, Date]
32
+ date_created: [YYYY-MM-DD]
33
+ last_updated: [Optional: YYYY-MM-DD]
34
+ owner: [Optional: Team/Individual responsible for this spec]
35
+ tags: [Optional: List of relevant tags or categories, e.g., `infrastructure`, `process`, `design`, `app` etc]
36
+ ---
37
+
38
+ # Introduction
39
+
40
+ [A short concise introduction to the specification and the goal it is intended to achieve.]
41
+
42
+ ## 1. Purpose & Scope
43
+
44
+ [Provide a clear, concise description of the specification's purpose and the scope of its application. State the intended audience and any assumptions.]
45
+
46
+ ## 2. Definitions
47
+
48
+ [List and define all acronyms, abbreviations, and domain-specific terms used in this specification.]
49
+
50
+ ## 3. Requirements, Constraints & Guidelines
51
+
52
+ [Explicitly list all requirements, constraints, rules, and guidelines. Use bullet points or tables for clarity.]
53
+
54
+ - **REQ-001**: Requirement 1
55
+ - **SEC-001**: Security Requirement 1
56
+ - **[3 LETTERS]-001**: Other Requirement 1
57
+ - **CON-001**: Constraint 1
58
+ - **GUD-001**: Guideline 1
59
+ - **PAT-001**: Pattern to follow 1
60
+
61
+ ## 4. Interfaces & Data Contracts
62
+
63
+ [Describe the interfaces, APIs, data contracts, or integration points. Use tables or code blocks for schemas and examples.]
64
+
65
+ ## 5. Acceptance Criteria
66
+
67
+ [Define clear, testable acceptance criteria for each requirement using Given-When-Then format where appropriate.]
68
+
69
+ - **AC-001**: Given [context], When [action], Then [expected outcome]
70
+ - **AC-002**: The system shall [specific behavior] when [condition]
71
+ - **AC-003**: [Additional acceptance criteria as needed]
72
+
73
+ ## 6. Test Automation Strategy
74
+
75
+ [Define the testing approach, frameworks, and automation requirements.]
76
+
77
+ - **Test Levels**: Unit, Integration, End-to-End
78
+ - **Frameworks**: MSTest, FluentAssertions, Moq (for .NET applications)
79
+ - **Test Data Management**: [approach for test data creation and cleanup]
80
+ - **CI/CD Integration**: [automated testing in GitHub Actions pipelines]
81
+ - **Coverage Requirements**: [minimum code coverage thresholds]
82
+ - **Performance Testing**: [approach for load and performance testing]
83
+
84
+ ## 7. Rationale & Context
85
+
86
+ [Explain the reasoning behind the requirements, constraints, and guidelines. Provide context for design decisions.]
87
+
88
+ ## 8. Dependencies & External Integrations
89
+
90
+ [Define the external systems, services, and architectural dependencies required for this specification. Focus on **what** is needed rather than **how** it's implemented. Avoid specific package or library versions unless they represent architectural constraints.]
91
+
92
+ ### External Systems
93
+ - **EXT-001**: [External system name] - [Purpose and integration type]
94
+
95
+ ### Third-Party Services
96
+ - **SVC-001**: [Service name] - [Required capabilities and SLA requirements]
97
+
98
+ ### Infrastructure Dependencies
99
+ - **INF-001**: [Infrastructure component] - [Requirements and constraints]
100
+
101
+ ### Data Dependencies
102
+ - **DAT-001**: [External data source] - [Format, frequency, and access requirements]
103
+
104
+ ### Technology Platform Dependencies
105
+ - **PLT-001**: [Platform/runtime requirement] - [Version constraints and rationale]
106
+
107
+ ### Compliance Dependencies
108
+ - **COM-001**: [Regulatory or compliance requirement] - [Impact on implementation]
109
+
110
+ **Note**: This section should focus on architectural and business dependencies, not specific package implementations. For example, specify "OAuth 2.0 authentication library" rather than "Microsoft.AspNetCore.Authentication.JwtBearer v6.0.1".
111
+
112
+ ## 9. Examples & Edge Cases
113
+
114
+ ```code
115
+ // Code snippet or data example demonstrating the correct application of the guidelines, including edge cases
116
+ ```
117
+
118
+ ## 10. Validation Criteria
119
+
120
+ [List the criteria or tests that must be satisfied for compliance with this specification.]
121
+
122
+ ## 11. Related Specifications / Further Reading
123
+
124
+ [Link to related spec 1]
125
+ [Link to relevant external documentation]
126
+
127
+ ```
package/AGENTS.md ADDED
@@ -0,0 +1,149 @@
1
+ # opencode Agent Instructions
2
+
3
+ ## Project Context
4
+
5
+ This project includes AI-assisted development configuration distributed through the `ai-workflow-template` package. The key directories are:
6
+
7
+ - `.agents/instructions/` — Language, framework, and workflow instructions
8
+ - `.agents/skills/` — Reusable skill definitions for task-based workflows
9
+ - `.agents/agents/` — Specialized agent definitions for planning, research, and implementation
10
+ - `.agents/prompts/` — Reusable prompt templates
11
+
12
+ ## Core Workflow
13
+
14
+ 1. **Understand before acting** — Read relevant instructions from `.agents/instructions/` before working with specific technologies
15
+ 2. **Plan before implementing** — Use `.agents/agents/plan.agent.md` or `.agents/agents/implementation-plan.agent.md` patterns for structured work
16
+ 3. **Track progress** — Update `.copilot-tracking/changes/*.md` after each task (see `.agents/instructions/task-implementation.instructions.md`)
17
+ 4. **Maintain context** — Keep memory bank files updated (see `.agents/instructions/memory-bank.instructions.md`)
18
+
19
+ ## Instructions Reference
20
+
21
+ | Scope | File |
22
+ |---|---|
23
+ | All work | `.agents/instructions/memory-bank.instructions.md` |
24
+ | Task implementation | `.agents/instructions/task-implementation.instructions.md` |
25
+ | TypeScript | `.agents/instructions/typescript.instructions.md` |
26
+ | Node.js / Vitest | `.agents/instructions/nodejs-vitest.instructions.md` |
27
+ | Shell scripts | `.agents/instructions/shell.instructions.md` |
28
+ | Go | `.agents/instructions/go.instructions.md` |
29
+ | Angular | `.agents/instructions/angular.instructions.md` |
30
+ | Markdown docs | `.agents/instructions/markdown.instructions.md` |
31
+ | Prompts | `.agents/instructions/prompt.instructions.md` |
32
+ | Agent files | `.agents/instructions/agent.instructions.md` |
33
+ | Agent skills | `.agents/instructions/agent-skill.instructions.md` |
34
+ | Security | `.agents/instructions/security-owasp.instructions.md` |
35
+ | Playwright tests | `.agents/instructions/playwright-typescript.instructions.md` |
36
+ | Instructions files | `.agents/instructions/instructions.instructions.md` |
37
+ | Agent safety | `.agents/instructions/agent-safety.instructions.md` |
38
+ | AI safety | `.agents/instructions/ai-prompt-engineering-safety.instructions.md` |
39
+ | Context7 | `.agents/instructions/context7.instructions.md` |
40
+ | HTML/CSS styling | `.agents/instructions/html-to-css-guide.instructions.md` |
41
+
42
+ ## Available Skills
43
+
44
+ Skills in `.agents/skills/` provide structured workflows for common tasks. Load them when the task matches the skill's purpose:
45
+
46
+ - `architecture-blueprint-generator` — Generate project architecture blueprints
47
+ - `conventional-commit` — Create conventional commit messages
48
+ - `create-implementation-plan` — Create structured implementation plans
49
+ - `create-readme` — Generate README files
50
+ - `create-specification` — Create specification files for GenAI consumption
51
+ - `context-map` — Map relevant files before making changes
52
+ - `editorconfig` — Generate .editorconfig files
53
+ - `git-commit` — Execute safe git commits
54
+ - `github-issues` — Manage GitHub issues via MCP
55
+ - `microsoft-docs` — Query Microsoft documentation
56
+ - `playwright-explore-website` — Explore websites with Playwright
57
+ - `playwright-generate-test` — Generate Playwright tests
58
+ - `polygot-test-agent` — Multi-agent polyglot test generation
59
+ - `prompt-builder` — Build high-quality prompts
60
+ - `agent-governance` — Add governance and safety to agent systems
61
+ - `boost-prompt` — Iteratively refine prompts
62
+ - `chrome-devtools` — Browser automation via Chrome DevTools MCP
63
+ - `gh-cli` — GitHub CLI reference
64
+ - `caveman` — Ultra-compressed communication mode
65
+ - `caveman-commit` — Compressed commit message generator
66
+ - `caveman-compress` — Token compression tool
67
+ - `caveman-help` — Help system for caveman skills
68
+ - `caveman-review` — Automated code review
69
+ - `caveman-stats` — Tracking and statistics for caveman usage
70
+ - `cavecrew` — Multi-agent coordination for caveman skills
71
+ - `compress` — General compression utilities
72
+
73
+ ## Available Prompts
74
+
75
+ Prompts in `.agents/prompts/` can be invoked directly:
76
+
77
+ - `editconfig` — Generate .editorconfig
78
+ - `playwright-explore` — Explore a website
79
+ - `playwright-generate-test` — Generate Playwright tests
80
+ - `documentation-writer` — Write documentation (Diataxis framework)
81
+
82
+ ## Available Agent Workflows
83
+
84
+ These agent workflows (from `.agents/agents/`) define specialized modes of operation. Invoke the relevant workflow at the start of a task by stating which mode you want to activate.
85
+
86
+ ### Plan Mode — Strategic Planning & Architecture
87
+
88
+ Use this when starting a new feature, refactoring, or any non-trivial change. Follow this sequence:
89
+
90
+ 1. **Understand the Goal** — Ask clarifying questions about requirements and goals
91
+ 2. **Explore Context** — Examine relevant files, components, and systems that will be affected
92
+ 3. **Identify Constraints** — Determine technical limitations, dependencies, and requirements
93
+ 4. **Clarify Scope** — Establish how extensive the changes should be
94
+ 5. **Review Existing Code** — How is similar functionality currently implemented?
95
+ 6. **Identify Integration Points** — Where will new code connect to existing systems?
96
+ 7. **Plan Step-by-Step** — Create a logical sequence for implementation
97
+ 8. **Consider Testing** — How can the implementation be validated?
98
+ 9. **Present Clear Plans** — Provide detailed strategy with reasoning, file paths, and order
99
+
100
+ Always prioritize understanding and planning over immediate implementation. Break down complex requirements into manageable components. Propose multiple approaches with trade-offs when viable alternatives exist.
101
+
102
+ ### Implementation Plan Generation
103
+
104
+ Use this to create deterministic, structured plans saved to `/plan/`. Follow this template:
105
+
106
+ - Save files as `/plan/[purpose]-[component]-[version].md`
107
+ - Purpose prefixes: `upgrade|refactor|feature|data|infrastructure|process|architecture|design`
108
+ - **Required front matter**: `goal`, `version`, `date_created`, `status` (Completed/In progress/Planned/Deprecated/On Hold), `tags`
109
+ - **Required sections** (in order):
110
+ 1. Introduction (with status badge)
111
+ 2. Requirements & Constraints (with REQ-, SEC-, CON- identifiers)
112
+ 3. Implementation Steps (phases with task tables: Task ID, Description, Completed, Date)
113
+ 4. Alternatives (ALT- identifiers with rationale)
114
+ 5. Dependencies (DEP- identifiers)
115
+ 6. Files (FILE- identifiers)
116
+ 7. Testing (TEST- identifiers)
117
+ 8. Risks & Assumptions (RISK-, ASSUMPTION- identifiers)
118
+ 9. Related Specifications
119
+
120
+ Plans must be deterministic, self-contained, and immediately actionable. Use unambiguous language, specific file paths, and explicit completion criteria per task. DO NOT make code edits — only generate the plan.
121
+
122
+ ### Research Spike — Systematic Technical Investigation
123
+
124
+ Use this when investigating technical unknowns, evaluating libraries, or validating approaches. Follow this process:
125
+
126
+ 1. **Parse Spike** — Read and understand the spike document; identify all research questions and success criteria
127
+ 2. **Investigate Exhaustively** — Research official docs, search for code examples, examine real implementations, explore edge cases
128
+ 3. **Recursive Research** — For every new term/concept discovered, immediately investigate it; continue until no new relevant information emerges
129
+ 4. **Cross-Reference** — Validate findings across multiple sources; document both successes AND dead ends
130
+ 5. **Experimental Validation** — Ask permission before creating files or running commands; design minimal proof-of-concept tests
131
+ 6. **Continuous Documentation** — Update the spike document continuously as discoveries are made (not just at the end)
132
+ 7. **Evidence Standards** — Cite specific sources with URLs and versions; include timestamps; note limitations
133
+
134
+ Always ask user permission before: creating files, running commands, modifying the system, or experimental operations.
135
+
136
+ ### Feature Pipeline — Stripped-Down Sequential Pipeline
137
+
138
+ 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.
139
+
140
+ The agent file is at `.opencode/agents/orchestrator/feature-pipeline.agent.md`.
141
+
142
+ **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.
143
+
144
+ ## Additional Resources
145
+
146
+ ### Playwright MCP Configuration
147
+
148
+ For details on how Playwright MCP integrates with the headed mode debugging configuration, see:
149
+ - **Docs**: `docs/playwright-mcp-configuration.md`