@plainconceptsplatform/agent-harness 3.5.0 → 3.7.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/LICENSE +21 -21
- package/README.md +471 -454
- package/cli/commands/join.js +259 -259
- package/cli/commands/migrate.js +310 -310
- package/cli/commands/shared.js +27 -27
- package/cli/commands/single.js +79 -79
- package/cli/commands/update.js +121 -121
- package/cli/commands/wizard.js +134 -134
- package/cli/fragments/archive/az.md +97 -97
- package/cli/fragments/archive/gh.md +96 -96
- package/cli/fragments/archive/gl.md +96 -96
- package/cli/fragments/archive/none.md +75 -75
- package/cli/fragments/guardrails/codegraph.md +5 -5
- package/cli/fragments/guardrails/humanizer.md +4 -4
- package/cli/fragments/guardrails/memory.md +4 -4
- package/cli/fragments/guardrails/rtk.md +3 -3
- package/cli/fragments/guardrails/simple-english.md +4 -4
- package/cli/fragments/ops-backlog/az.md +28 -28
- package/cli/fragments/ops-backlog/gh.md +28 -28
- package/cli/fragments/ops-backlog/jira.md +28 -28
- package/cli/fragments/ops-review/az.md +62 -62
- package/cli/fragments/ops-review/gh.md +51 -51
- package/cli/fragments/ops-review/gl.md +55 -55
- package/cli/fragments/ops-ship/az.md +81 -81
- package/cli/fragments/ops-ship/gh.md +67 -67
- package/cli/fragments/ops-ship/gl.md +84 -84
- package/cli/index.js +116 -116
- package/cli/presets/agents-content.json +34 -34
- package/cli/presets/browser.json +10 -10
- package/cli/presets/clean.json +21 -21
- package/cli/presets/models.json +68 -68
- package/cli/presets/optimization.json +32 -32
- package/cli/presets/platforms.json +76 -76
- package/cli/presets/source.json +23 -23
- package/cli/steps/browser/index.js +48 -48
- package/cli/steps/clean/index.js +120 -120
- package/cli/steps/copy/agents.js +120 -120
- package/cli/steps/copy/commands.js +79 -79
- package/cli/steps/copy/fullstack-engineer.js +89 -89
- package/cli/steps/copy/index.js +88 -88
- package/cli/steps/copy/opencode-json.js +324 -324
- package/cli/steps/copy/skills.js +316 -316
- package/cli/steps/metadata/index.js +115 -115
- package/cli/steps/models/format.js +88 -88
- package/cli/steps/models/index.js +64 -64
- package/cli/steps/models/write.js +38 -38
- package/cli/steps/openspec/index.js +136 -136
- package/cli/steps/optimization/codegraph.js +141 -141
- package/cli/steps/optimization/detect.js +66 -66
- package/cli/steps/optimization/humanizer.js +17 -17
- package/cli/steps/optimization/index.js +158 -158
- package/cli/steps/optimization/memory.js +91 -91
- package/cli/steps/optimization/patch-guardrails.js +111 -111
- package/cli/steps/optimization/simple-english.js +17 -17
- package/cli/steps/optimization/skills-lock.js +30 -30
- package/cli/steps/platform/index.js +109 -109
- package/cli/steps/source/index.js +123 -123
- package/cli/utils/agent-color.js +111 -111
- package/cli/utils/copy.js +134 -134
- package/cli/utils/exec-spinner.js +47 -47
- package/cli/utils/exec.js +134 -134
- package/cli/utils/legacy-check.js +30 -30
- package/cli/utils/models-cache.js +58 -58
- package/cli/utils/models-pricing.js +42 -42
- package/cli/utils/paths.js +81 -81
- package/cli/utils/process.js +3 -3
- package/cli/utils/terminal.js +6 -6
- package/cli/utils/update-manifest.js +75 -75
- package/harness/.opencode/_gitignore +10 -10
- package/harness/.opencode/commands/init.md +5 -5
- package/harness/.opencode/commands/make-architecture.md +5 -5
- package/harness/.opencode/commands/make-design.md +5 -5
- package/harness/.opencode/commands/make-engineer.md +5 -5
- package/harness/.opencode/commands/make-guardrails.md +5 -5
- package/harness/.opencode/commands/make-user-model.md +5 -5
- package/harness/.opencode/commands/ops-backlog.md +10 -10
- package/harness/.opencode/commands/ops-review.md +10 -10
- package/harness/.opencode/commands/ops-ship.md +9 -9
- package/harness/.opencode/commands/plan-apply.md +9 -9
- package/harness/.opencode/commands/plan-archive.md +7 -7
- package/harness/.opencode/commands/plan-explore.md +11 -11
- package/harness/.opencode/commands/plan-goal.md +5 -5
- package/harness/.opencode/commands/plan-propose.md +11 -11
- package/harness/.opencode/commands/plan-quick.md +7 -7
- package/harness/.opencode/commands/plan-story.md +11 -11
- package/harness/.opencode/commands/repo-audit.md +7 -7
- package/harness/.opencode/commands/repo-help.md +5 -5
- package/harness/.opencode/commands/repo-initialize.md +5 -5
- package/harness/.opencode/commands/repo-onboard.md +5 -5
- package/harness/.opencode/commands/repo-verify.md +5 -5
- package/harness/.opencode/package.json +5 -5
- package/harness/.opencode/plugins/pc-commit-coauthor.js +41 -0
- package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
- package/harness/.opencode/plugins/pc-subagent-tiers.js +367 -367
- package/harness/.opencode/plugins/pc-system-reminders.js +404 -386
- package/harness/.opencode/scripts/check-diff.mjs +279 -252
- package/harness/.opencode/scripts/code-rules.mjs +288 -288
- package/harness/.opencode/scripts/platform-manifest.mjs +112 -0
- package/harness/AGENTS.md +49 -49
- package/harness/ARCHITECTURE.md +13 -13
- package/harness/DESIGN.md +13 -13
- package/harness/opencode.jsonc +36 -36
- package/harness/openspec/config.yaml +20 -20
- package/harness/skills-lock.json +17 -17
- package/package.json +14 -12
- package/skills/README.md +18 -18
- package/skills/agent-harness-cli/SKILL.md +86 -86
- package/skills/browser-automation/SKILL.md +72 -72
- package/skills/pc-guardrails-generic/SKILL.md +53 -53
- package/skills/pc-guardrails-project/SKILL.md +8 -8
- package/skills/pc-make-architecture/SKILL.md +33 -32
- package/skills/pc-make-architecture/structure-template.md +64 -64
- package/skills/pc-make-design/SKILL.md +45 -45
- package/skills/pc-make-engineer/SKILL.md +59 -59
- package/skills/pc-make-engineer/signal-mapping.md +53 -53
- package/skills/pc-make-engineer/template.md +36 -36
- package/skills/pc-make-guardrails/SKILL.md +44 -44
- package/skills/pc-make-guardrails/category-reference.md +112 -112
- package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
- package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
- package/skills/pc-make-user-model/SKILL.md +56 -56
- package/skills/pc-ops-ship/SKILL.md +22 -22
- package/skills/pc-plan-apply/SKILL.md +88 -88
- package/skills/pc-plan-apply/simple-mode.md +21 -21
- package/skills/pc-plan-archive/SKILL.md +66 -66
- package/skills/pc-plan-explore/SKILL.md +21 -21
- package/skills/pc-plan-goal/SKILL.md +91 -91
- package/skills/pc-plan-goal/branching.md +39 -39
- package/skills/pc-plan-goal/failure-policy.md +30 -30
- package/skills/pc-plan-goal/output-mode.md +10 -10
- package/skills/pc-plan-goal/output.md +71 -71
- package/skills/pc-plan-propose/SKILL.md +125 -125
- package/skills/pc-plan-propose/task-annotation.md +39 -39
- package/skills/pc-plan-quick/SKILL.md +46 -46
- package/skills/pc-plan-story/SKILL.md +93 -93
- package/skills/pc-repo-audit/SKILL.md +44 -44
- package/skills/pc-repo-help/SKILL.md +87 -87
- package/skills/pc-repo-initialize/SKILL.md +119 -119
- package/skills/pc-repo-onboard/SKILL.md +32 -32
- package/skills/pc-repo-verify/SKILL.md +150 -150
- package/skills/pc-userstory-az/SKILL.md +71 -71
- package/skills/pc-userstory-browser/SKILL.md +64 -64
- package/skills/pc-userstory-gh/SKILL.md +63 -63
- package/skills/pc-userstory-jira/SKILL.md +74 -74
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# ARCHITECTURE.md structure template
|
|
2
|
-
|
|
3
|
-
Write (or update) `ARCHITECTURE.md` following this structure. Only include sections relevant to the project; omit sections with no evidence.
|
|
4
|
-
|
|
5
|
-
- Architecture Overview: what the system is, what problem it solves, major architectural style
|
|
6
|
-
- 1. Project Structure: annotated directory tree with purpose of each major directory
|
|
7
|
-
- 2. High-Level System Diagram: Mermaid diagram of actors, services, data stores, external systems
|
|
8
|
-
- 3. Core Components: each major component: name, responsibility, key files, technologies, inputs/outputs
|
|
9
|
-
- 3.1 Frontend / User Interface (if present)
|
|
10
|
-
- 3.2 Backend / Server / API (if present)
|
|
11
|
-
- 3.3 Shared Libraries / Common Code (if present)
|
|
12
|
-
- 3.4 CLI / Scripts / Automation (if present)
|
|
13
|
-
- 4. Data Flow: request lifecycle, key user journeys, sequence diagram for main runtime flow
|
|
14
|
-
- 5. Data Stores: all persistent storage: type, purpose, schemas, migration approach
|
|
15
|
-
- 6. External Integrations / APIs: each integration: method, config location, auth, failure behavior
|
|
16
|
-
- 7. Key Technologies: full stack summary with architectural relevance of each
|
|
17
|
-
- 8. Deployment & Infrastructure: build artifacts, env config, containerization, CI/CD, hosting
|
|
18
|
-
- 9. Security Architecture: auth, authz, secrets, input validation, trust boundaries
|
|
19
|
-
- 10. Monitoring & Observability: logging, metrics, tracing, error reporting
|
|
20
|
-
- 11. Performance & Scalability: caching, batching, concurrency, known bottlenecks
|
|
21
|
-
- 12. Development Workflow: local setup, install/dev/test/build/lint commands
|
|
22
|
-
- 13. Testing Strategy: test frameworks, locations, coverage gates, gaps
|
|
23
|
-
- 14. Architectural Decisions & Rationale: key choices with evidence and tradeoffs
|
|
24
|
-
- 15. Constraints, Risks, and Technical Debt: tight coupling, TODOs, operational risks
|
|
25
|
-
- 16. Future Considerations: documented roadmap + reasonable recommendations (labeled as such)
|
|
26
|
-
- 17. Project Identification: name, language, type, runtime, date of review, maintainer
|
|
27
|
-
- 18. Glossary / Acronyms: project-specific terms an agent or new developer needs to know
|
|
28
|
-
|
|
29
|
-
Append at the very end of the file:
|
|
30
|
-
```
|
|
31
|
-
<!-- Last updated: <current ISO timestamp> -->
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Rules:
|
|
35
|
-
- Be specific and concrete: include actual directories, files, modules, commands.
|
|
36
|
-
- Mark anything undiscoverable as "Not evident from the repository".
|
|
37
|
-
- Use Mermaid diagrams where helpful.
|
|
38
|
-
- Write as if this document will be committed and maintained over time.
|
|
39
|
-
|
|
40
|
-
## Writing rules
|
|
41
|
-
|
|
42
|
-
These rules govern the voice and shape of every section. The ARCHITECTURE.md is the primary artifact an agent reads to understand the system's invariants — it must teach constraints, not just inventory structure. These are enforced by re-reading each section after generation (see the self-check in the skill).
|
|
43
|
-
|
|
44
|
-
1. **Every section must answer "what breaks if this is violated," not just "what exists."** A section that only describes structure without stating the constraint it protects and the consequence of crossing it is reference material, not architecture. "The system has four modules" is structure; "Modules must not cross-reference each other in Domain or Application, and flow goes through port interfaces or domain events" is a constraint.
|
|
45
|
-
|
|
46
|
-
2. **Architectural decisions must carry their rationale and what they superseded.** A decision table row that says "Adopt X" is a fact; "Adopt X because Y, supersedes decision Z which assumed W" is a constraint that teaches an agent why a change would be wrong. If a decision was reached after rejecting an alternative, name the alternative and why it was rejected.
|
|
47
|
-
|
|
48
|
-
3. **State boundaries as prohibitions with consequences.** "Layering is enforced: Api → Application → Domain" is a constraint. "Api → Application → Domain" alone is a dependency list. "Only the Composition namespace in Api reaches Infrastructure" is a constraint; "Api depends on Infrastructure" is a fact. Prefer the constraint form: name the boundary, state who must not cross it, and what breaks when it is crossed.
|
|
49
|
-
|
|
50
|
-
4. **Include what was tried and rejected, not just what was chosen.** The most valuable architecture decisions are the ones where an alternative was tested and found wanting. A section that says "dynamic sessions were rejected because they accept no volumes, cost more at scale, and are blocked by policy" teaches an agent more than "the engine runs as a container app."
|
|
51
|
-
|
|
52
|
-
5. **Narrative over inventory.** Describe how the system behaves, what holds it together, and where the seams are. A reader who understands the constraints can infer the structure; a reader who only sees the structure cannot infer the constraints.
|
|
53
|
-
|
|
54
|
-
## Self-check (before writing the file)
|
|
55
|
-
|
|
56
|
-
Re-read every section you are about to write. Then:
|
|
57
|
-
|
|
58
|
-
1. **Identify inventory-only sections.** If a section describes what exists without stating what breaks when its constraints are violated, rewrite it as constraint-embedded prose or cut it.
|
|
59
|
-
|
|
60
|
-
2. **Check decision rows.** Every row in the decisions table must carry its rationale. If a decision has no "why," it is a fact, not a decision — cut it or find the rationale.
|
|
61
|
-
|
|
62
|
-
3. **Scan for bare dependency lists.** "Api depends on Application depends on Domain" is a fact. Rewrite it as: name the boundary, state who must not cross it, and what breaks when it is crossed.
|
|
63
|
-
|
|
64
|
-
4. **Verify rejected alternatives are present where they matter.** If a significant architectural choice was made, the rejected alternative and the reason for rejection should be in the document. An agent that does not know what was rejected will propose it again.
|
|
1
|
+
# ARCHITECTURE.md structure template
|
|
2
|
+
|
|
3
|
+
Write (or update) `ARCHITECTURE.md` following this structure. Only include sections relevant to the project; omit sections with no evidence.
|
|
4
|
+
|
|
5
|
+
- Architecture Overview: what the system is, what problem it solves, major architectural style
|
|
6
|
+
- 1. Project Structure: annotated directory tree with purpose of each major directory
|
|
7
|
+
- 2. High-Level System Diagram: Mermaid diagram of actors, services, data stores, external systems
|
|
8
|
+
- 3. Core Components: each major component: name, responsibility, key files, technologies, inputs/outputs
|
|
9
|
+
- 3.1 Frontend / User Interface (if present)
|
|
10
|
+
- 3.2 Backend / Server / API (if present)
|
|
11
|
+
- 3.3 Shared Libraries / Common Code (if present)
|
|
12
|
+
- 3.4 CLI / Scripts / Automation (if present)
|
|
13
|
+
- 4. Data Flow: request lifecycle, key user journeys, sequence diagram for main runtime flow
|
|
14
|
+
- 5. Data Stores: all persistent storage: type, purpose, schemas, migration approach
|
|
15
|
+
- 6. External Integrations / APIs: each integration: method, config location, auth, failure behavior
|
|
16
|
+
- 7. Key Technologies: full stack summary with architectural relevance of each
|
|
17
|
+
- 8. Deployment & Infrastructure: build artifacts, env config, containerization, CI/CD, hosting
|
|
18
|
+
- 9. Security Architecture: auth, authz, secrets, input validation, trust boundaries
|
|
19
|
+
- 10. Monitoring & Observability: logging, metrics, tracing, error reporting
|
|
20
|
+
- 11. Performance & Scalability: caching, batching, concurrency, known bottlenecks
|
|
21
|
+
- 12. Development Workflow: local setup, install/dev/test/build/lint commands
|
|
22
|
+
- 13. Testing Strategy: test frameworks, locations, coverage gates, gaps
|
|
23
|
+
- 14. Architectural Decisions & Rationale: key choices with evidence and tradeoffs
|
|
24
|
+
- 15. Constraints, Risks, and Technical Debt: tight coupling, TODOs, operational risks
|
|
25
|
+
- 16. Future Considerations: documented roadmap + reasonable recommendations (labeled as such)
|
|
26
|
+
- 17. Project Identification: name, language, type, runtime, date of review, maintainer
|
|
27
|
+
- 18. Glossary / Acronyms: project-specific terms an agent or new developer needs to know
|
|
28
|
+
|
|
29
|
+
Append at the very end of the file:
|
|
30
|
+
```
|
|
31
|
+
<!-- Last updated: <current ISO timestamp> -->
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Rules:
|
|
35
|
+
- Be specific and concrete: include actual directories, files, modules, commands.
|
|
36
|
+
- Mark anything undiscoverable as "Not evident from the repository".
|
|
37
|
+
- Use Mermaid diagrams where helpful.
|
|
38
|
+
- Write as if this document will be committed and maintained over time.
|
|
39
|
+
|
|
40
|
+
## Writing rules
|
|
41
|
+
|
|
42
|
+
These rules govern the voice and shape of every section. The ARCHITECTURE.md is the primary artifact an agent reads to understand the system's invariants — it must teach constraints, not just inventory structure. These are enforced by re-reading each section after generation (see the self-check in the skill).
|
|
43
|
+
|
|
44
|
+
1. **Every section must answer "what breaks if this is violated," not just "what exists."** A section that only describes structure without stating the constraint it protects and the consequence of crossing it is reference material, not architecture. "The system has four modules" is structure; "Modules must not cross-reference each other in Domain or Application, and flow goes through port interfaces or domain events" is a constraint.
|
|
45
|
+
|
|
46
|
+
2. **Architectural decisions must carry their rationale and what they superseded.** A decision table row that says "Adopt X" is a fact; "Adopt X because Y, supersedes decision Z which assumed W" is a constraint that teaches an agent why a change would be wrong. If a decision was reached after rejecting an alternative, name the alternative and why it was rejected.
|
|
47
|
+
|
|
48
|
+
3. **State boundaries as prohibitions with consequences.** "Layering is enforced: Api → Application → Domain" is a constraint. "Api → Application → Domain" alone is a dependency list. "Only the Composition namespace in Api reaches Infrastructure" is a constraint; "Api depends on Infrastructure" is a fact. Prefer the constraint form: name the boundary, state who must not cross it, and what breaks when it is crossed.
|
|
49
|
+
|
|
50
|
+
4. **Include what was tried and rejected, not just what was chosen.** The most valuable architecture decisions are the ones where an alternative was tested and found wanting. A section that says "dynamic sessions were rejected because they accept no volumes, cost more at scale, and are blocked by policy" teaches an agent more than "the engine runs as a container app."
|
|
51
|
+
|
|
52
|
+
5. **Narrative over inventory.** Describe how the system behaves, what holds it together, and where the seams are. A reader who understands the constraints can infer the structure; a reader who only sees the structure cannot infer the constraints.
|
|
53
|
+
|
|
54
|
+
## Self-check (before writing the file)
|
|
55
|
+
|
|
56
|
+
Re-read every section you are about to write. Then:
|
|
57
|
+
|
|
58
|
+
1. **Identify inventory-only sections.** If a section describes what exists without stating what breaks when its constraints are violated, rewrite it as constraint-embedded prose or cut it.
|
|
59
|
+
|
|
60
|
+
2. **Check decision rows.** Every row in the decisions table must carry its rationale. If a decision has no "why," it is a fact, not a decision — cut it or find the rationale.
|
|
61
|
+
|
|
62
|
+
3. **Scan for bare dependency lists.** "Api depends on Application depends on Domain" is a fact. Rewrite it as: name the boundary, state who must not cross it, and what breaks when it is crossed.
|
|
63
|
+
|
|
64
|
+
4. **Verify rejected alternatives are present where they matter.** If a significant architectural choice was made, the rejected alternative and the reason for rejection should be in the document. An agent that does not know what was rejected will propose it again.
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-make-design
|
|
3
|
-
description: Generate or update DESIGN.md by analyzing the codebase design system (Tailwind, CSS vars, tokens, UI framework config). Safe to run at any time. Invoked by the /make-design command and the repo-initialize flow.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Make Design
|
|
8
|
-
|
|
9
|
-
Write `DESIGN.md` in the project root from the design system the codebase actually uses.
|
|
10
|
-
|
|
11
|
-
The format is Google's design.md spec:
|
|
12
|
-
|
|
13
|
-
- Overview: https://stitch.withgoogle.com/docs/design-md/overview/
|
|
14
|
-
- Format: https://stitch.withgoogle.com/docs/design-md/format/
|
|
15
|
-
- Spec and examples: https://github.com/google-labs-code/design.md
|
|
16
|
-
|
|
17
|
-
## Rules
|
|
18
|
-
|
|
19
|
-
- Never regenerate over a file that carries a `<!-- Last updated:` footer. That footer is what makes the next run incremental, and a full rewrite silently drops whatever a human added by hand. Read the file first and pick the mode.
|
|
20
|
-
- Never reference a file, variable or path from the codebase. `DESIGN.md` is handed to tools that cannot see this repository, so it has to stand alone.
|
|
21
|
-
- Never analyze outside `.opencode/source-roots.json` when it exists.
|
|
22
|
-
|
|
23
|
-
## Contract
|
|
24
|
-
|
|
25
|
-
YAML frontmatter holding every structured token (colours, typography, spacing, elevation, motion, radii, shadows), valid as YAML design tokens. Then free-form Markdown for the look and feel, which is where intent that token values cannot carry belongs. The last line is the run's own ISO timestamp:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
<!-- Last updated: <ISO date> -->
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Modes
|
|
32
|
-
|
|
33
|
-
| The existing file | Mode |
|
|
34
|
-
|---|---|
|
|
35
|
-
| Missing, or a placeholder with no real content | Generate |
|
|
36
|
-
| Has content and a `<!-- Last updated:` footer | Update |
|
|
37
|
-
| Has content but no footer | Warn the user, then Generate |
|
|
38
|
-
|
|
39
|
-
**Generate.** `glob` for CSS, Tailwind and PostCSS config, component files, token definitions (JS, TS, JSON, YAML), theme files, and UI framework config (shadcn, MUI, Chakra).
|
|
40
|
-
|
|
41
|
-
**Update.** `git log --oneline --since="<footer date>" -- <source roots>` says what moved. Nothing changed means nothing to write: say "Design system unchanged since last update" and stop. Otherwise update only the affected tokens and sections. A replaced token system is a Generate.
|
|
42
|
-
|
|
43
|
-
## Report
|
|
44
|
-
|
|
45
|
-
Whether the file was generated or updated and which tokens changed, the palette, fonts and spacing scale found, and that `/make-design` can be re-run whenever the design system moves.
|
|
1
|
+
---
|
|
2
|
+
name: pc-make-design
|
|
3
|
+
description: Generate or update DESIGN.md by analyzing the codebase design system (Tailwind, CSS vars, tokens, UI framework config). Safe to run at any time. Invoked by the /make-design command and the repo-initialize flow.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Make Design
|
|
8
|
+
|
|
9
|
+
Write `DESIGN.md` in the project root from the design system the codebase actually uses.
|
|
10
|
+
|
|
11
|
+
The format is Google's design.md spec:
|
|
12
|
+
|
|
13
|
+
- Overview: https://stitch.withgoogle.com/docs/design-md/overview/
|
|
14
|
+
- Format: https://stitch.withgoogle.com/docs/design-md/format/
|
|
15
|
+
- Spec and examples: https://github.com/google-labs-code/design.md
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Never regenerate over a file that carries a `<!-- Last updated:` footer. That footer is what makes the next run incremental, and a full rewrite silently drops whatever a human added by hand. Read the file first and pick the mode.
|
|
20
|
+
- Never reference a file, variable or path from the codebase. `DESIGN.md` is handed to tools that cannot see this repository, so it has to stand alone.
|
|
21
|
+
- Never analyze outside `.opencode/source-roots.json` when it exists.
|
|
22
|
+
|
|
23
|
+
## Contract
|
|
24
|
+
|
|
25
|
+
YAML frontmatter holding every structured token (colours, typography, spacing, elevation, motion, radii, shadows), valid as YAML design tokens. Then free-form Markdown for the look and feel, which is where intent that token values cannot carry belongs. The last line is the run's own ISO timestamp:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
<!-- Last updated: <ISO date> -->
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Modes
|
|
32
|
+
|
|
33
|
+
| The existing file | Mode |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Missing, or a placeholder with no real content | Generate |
|
|
36
|
+
| Has content and a `<!-- Last updated:` footer | Update |
|
|
37
|
+
| Has content but no footer | Warn the user, then Generate |
|
|
38
|
+
|
|
39
|
+
**Generate.** `glob` for CSS, Tailwind and PostCSS config, component files, token definitions (JS, TS, JSON, YAML), theme files, and UI framework config (shadcn, MUI, Chakra).
|
|
40
|
+
|
|
41
|
+
**Update.** `git log --oneline --since="<footer date>" -- <source roots>` says what moved. Nothing changed means nothing to write: say "Design system unchanged since last update" and stop. Otherwise update only the affected tokens and sections. A replaced token system is a Generate.
|
|
42
|
+
|
|
43
|
+
## Report
|
|
44
|
+
|
|
45
|
+
Whether the file was generated or updated and which tokens changed, the palette, fonts and spacing scale found, and that `/make-design` can be re-run whenever the design system moves.
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-make-engineer
|
|
3
|
-
description: Create a custom engineer agent via persona-driven interactive design. Invoked by the /make-engineer command.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Create one file, `.opencode/agents/{persona}-engineer.md`, from the [template](template.md). The research behind it is for choosing the right skills, not for filling the file: expertise notes, architecture, conventions, file maps and workflow steps belong in skills.
|
|
8
|
-
|
|
9
|
-
## Rules
|
|
10
|
-
|
|
11
|
-
- Never write the agent file before the user has confirmed the skill set and it is installed. An engineer whose abilities do not exist cannot work.
|
|
12
|
-
- Never write `model:` or `color:`. `pc-subagent-tiers` injects both at startup, so a hand-picked colour is overwritten.
|
|
13
|
-
- Never create `*.build.md`, `*.fast.md`, `*.plan.md`, `build.md` or `plan.md`. The plugin regenerates all of them every startup and anything written there is lost.
|
|
14
|
-
- `mode: subagent`. Engineers are reached through the subagent tool, and a primary would clutter the two-entry list a human picks from.
|
|
15
|
-
- The only `##` heading is `## Abilities`, and the identity paragraph is two or three sentences carrying no project knowledge.
|
|
16
|
-
- Every `@skill` under `## Abilities` exists in `.agents/skills/` and in `skills-lock.json`. A name that is not installed is skipped rather than blocking the worker, so a typo costs the agent that ability in silence.
|
|
17
|
-
- Project-local installs only: `npx skills add -y ...`, never `-g`.
|
|
18
|
-
- At most five form questions, and only where more than one option was detected. A signal with one option is used without asking.
|
|
19
|
-
|
|
20
|
-
## Contracts
|
|
21
|
-
|
|
22
|
-
Personas: `frontend`, `layout`, `backend`, `data`, `devops`, `security`, `mobile`, `api`, `qa`. A persona passed as an argument (`/make-engineer frontend`) or typed by the user is taken as given.
|
|
23
|
-
|
|
24
|
-
Signals to detect: language, framework, data layer, testing, styling, architecture, i18n, CI/CD, cloud and IaC, monitoring, linting, dependency injection.
|
|
25
|
-
|
|
26
|
-
Discovery needs `find-skills`, and has no fallback without it:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npx skills add -y vercel-labs/skills@find-skills
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
When `.opencode/agents/{persona}-engineer.md` already exists, ask before touching it:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"questions": [
|
|
37
|
-
{
|
|
38
|
-
"header": "Overwrite engineer",
|
|
39
|
-
"question": "An engineer named \"{persona}-engineer\" already exists. Overwrite or cancel?",
|
|
40
|
-
"options": [
|
|
41
|
-
{ "label": "Overwrite", "description": "Rewrite the file from the template." },
|
|
42
|
-
{ "label": "Cancel", "description": "Stop. Do not modify the existing file." }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
`fullstack-engineer.md` is the body `pc-subagent-tiers` copies into `build.md` and `plan.md`, so every skill listed there reaches both primaries. Merge into it additively: add only skills it does not already list, put them in the category lines that already exist where they fit, and leave its frontmatter, identity paragraph and existing ability lines alone.
|
|
50
|
-
|
|
51
|
-
## Flow
|
|
52
|
-
|
|
53
|
-
1. **Persona.** Ask with the `question` tool unless it arrived as an argument. The answer decides what to detect, what to ask, and which skills to look for.
|
|
54
|
-
2. **Signals.** Read `.opencode/source-roots.json` (if it is missing or empty, ask which directories to scan), then `ARCHITECTURE.md`, `DESIGN.md`, and the manifests (`package.json`, `tsconfig.json`, `*.csproj`, `pyproject.toml`, `go.mod`, `Cargo.toml`). Detect what the persona needs and report the inventory.
|
|
55
|
-
3. **Form.** Present the detected options with the `question` tool, pre-selected and marked `(Recommended)`. For `frontend`, `backend`, `layout` and `api`, one question is architecture and patterns, whose options come from the [signal mapping](signal-mapping.md) tables.
|
|
56
|
-
4. **Skills.** A signal already covered by a skill in `.agents/skills/` or `skills-lock.json` needs no search. Map each remaining signal to a query through the [signal mapping](signal-mapping.md), present the candidates as one multi-select `question` grouped by category (name, one line, `owner/repo`, install count), install what the user confirms, and verify each one landed in both `.agents/skills/` and the lockfile.
|
|
57
|
-
5. **Write** the file from the [template](template.md).
|
|
58
|
-
6. **Merge** the new skills into `fullstack-engineer.md`.
|
|
59
|
-
7. **Report** the file created, the skills installed, the signals with no quality skill, whatever failed, and that opencode has to restart before `pc-subagent-tiers` picks the engineer up.
|
|
1
|
+
---
|
|
2
|
+
name: pc-make-engineer
|
|
3
|
+
description: Create a custom engineer agent via persona-driven interactive design. Invoked by the /make-engineer command.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Create one file, `.opencode/agents/{persona}-engineer.md`, from the [template](template.md). The research behind it is for choosing the right skills, not for filling the file: expertise notes, architecture, conventions, file maps and workflow steps belong in skills.
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
|
|
11
|
+
- Never write the agent file before the user has confirmed the skill set and it is installed. An engineer whose abilities do not exist cannot work.
|
|
12
|
+
- Never write `model:` or `color:`. `pc-subagent-tiers` injects both at startup, so a hand-picked colour is overwritten.
|
|
13
|
+
- Never create `*.build.md`, `*.fast.md`, `*.plan.md`, `build.md` or `plan.md`. The plugin regenerates all of them every startup and anything written there is lost.
|
|
14
|
+
- `mode: subagent`. Engineers are reached through the subagent tool, and a primary would clutter the two-entry list a human picks from.
|
|
15
|
+
- The only `##` heading is `## Abilities`, and the identity paragraph is two or three sentences carrying no project knowledge.
|
|
16
|
+
- Every `@skill` under `## Abilities` exists in `.agents/skills/` and in `skills-lock.json`. A name that is not installed is skipped rather than blocking the worker, so a typo costs the agent that ability in silence.
|
|
17
|
+
- Project-local installs only: `npx skills add -y ...`, never `-g`.
|
|
18
|
+
- At most five form questions, and only where more than one option was detected. A signal with one option is used without asking.
|
|
19
|
+
|
|
20
|
+
## Contracts
|
|
21
|
+
|
|
22
|
+
Personas: `frontend`, `layout`, `backend`, `data`, `devops`, `security`, `mobile`, `api`, `qa`. A persona passed as an argument (`/make-engineer frontend`) or typed by the user is taken as given.
|
|
23
|
+
|
|
24
|
+
Signals to detect: language, framework, data layer, testing, styling, architecture, i18n, CI/CD, cloud and IaC, monitoring, linting, dependency injection.
|
|
25
|
+
|
|
26
|
+
Discovery needs `find-skills`, and has no fallback without it:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx skills add -y vercel-labs/skills@find-skills
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
When `.opencode/agents/{persona}-engineer.md` already exists, ask before touching it:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"questions": [
|
|
37
|
+
{
|
|
38
|
+
"header": "Overwrite engineer",
|
|
39
|
+
"question": "An engineer named \"{persona}-engineer\" already exists. Overwrite or cancel?",
|
|
40
|
+
"options": [
|
|
41
|
+
{ "label": "Overwrite", "description": "Rewrite the file from the template." },
|
|
42
|
+
{ "label": "Cancel", "description": "Stop. Do not modify the existing file." }
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`fullstack-engineer.md` is the body `pc-subagent-tiers` copies into `build.md` and `plan.md`, so every skill listed there reaches both primaries. Merge into it additively: add only skills it does not already list, put them in the category lines that already exist where they fit, and leave its frontmatter, identity paragraph and existing ability lines alone.
|
|
50
|
+
|
|
51
|
+
## Flow
|
|
52
|
+
|
|
53
|
+
1. **Persona.** Ask with the `question` tool unless it arrived as an argument. The answer decides what to detect, what to ask, and which skills to look for.
|
|
54
|
+
2. **Signals.** Read `.opencode/source-roots.json` (if it is missing or empty, ask which directories to scan), then `ARCHITECTURE.md`, `DESIGN.md`, and the manifests (`package.json`, `tsconfig.json`, `*.csproj`, `pyproject.toml`, `go.mod`, `Cargo.toml`). Detect what the persona needs and report the inventory.
|
|
55
|
+
3. **Form.** Present the detected options with the `question` tool, pre-selected and marked `(Recommended)`. For `frontend`, `backend`, `layout` and `api`, one question is architecture and patterns, whose options come from the [signal mapping](signal-mapping.md) tables.
|
|
56
|
+
4. **Skills.** A signal already covered by a skill in `.agents/skills/` or `skills-lock.json` needs no search. Map each remaining signal to a query through the [signal mapping](signal-mapping.md), present the candidates as one multi-select `question` grouped by category (name, one line, `owner/repo`, install count), install what the user confirms, and verify each one landed in both `.agents/skills/` and the lockfile.
|
|
57
|
+
5. **Write** the file from the [template](template.md).
|
|
58
|
+
6. **Merge** the new skills into `fullstack-engineer.md`.
|
|
59
|
+
7. **Report** the file created, the skills installed, the signals with no quality skill, whatever failed, and that opencode has to restart before `pc-subagent-tiers` picks the engineer up.
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# Signal-to-query mapping
|
|
2
|
-
|
|
3
|
-
Every uncovered signal gets its own search.
|
|
4
|
-
|
|
5
|
-
| Signal type | Search query |
|
|
6
|
-
|---|---|
|
|
7
|
-
| Language | `npx skills find "<language-name>"` (e.g. `typescript`, `csharp`, `python`) |
|
|
8
|
-
| Framework | `npx skills find "<framework-name>"` (e.g. `react`, `ink`, `angular`, `django`) |
|
|
9
|
-
| Architecture | Use the known direct sources below. Optionally also `npx skills find "<pattern-name>"` |
|
|
10
|
-
| Testing | `npx skills find "<test-framework> testing"` (e.g. `vitest testing`, `jest testing`) |
|
|
11
|
-
| Styling | `npx skills find "<css-framework>"` (e.g. `tailwind`, `css modules`, `design tokens`) |
|
|
12
|
-
| Linting | `npx skills find "eslint prettier"` or `"lint format"` |
|
|
13
|
-
| CI/CD | `npx skills find "ci cd pipeline"` or `"<platform> actions"` |
|
|
14
|
-
| Cloud / IaC | `npx skills find "<cloud-provider> infrastructure"` (e.g. `azure infrastructure`) |
|
|
15
|
-
| Monitoring | `npx skills find "observability monitoring"` |
|
|
16
|
-
| i18n | `npx skills find "i18n internationalization"` |
|
|
17
|
-
| Data layer | `npx skills find "<orm-or-db> orm"` (e.g. `entity framework orm`, `prisma orm`) |
|
|
18
|
-
| Dependency Injection | `npx skills find "<di-framework>"` (e.g. `inversify`, `autofac`) |
|
|
19
|
-
|
|
20
|
-
A signal that fits no row derives its query from its own value: `npx skills find "<signal-value>"`.
|
|
21
|
-
|
|
22
|
-
## Known direct sources (architecture and patterns)
|
|
23
|
-
|
|
24
|
-
These live in dedicated repos and install by `owner/repo`, so `npx skills find` never surfaces them. They are the option list for the architecture question, and the source for it when the user picks one.
|
|
25
|
-
|
|
26
|
-
| Selection | Install command | Skill(s) to pick |
|
|
27
|
-
|---|---|---|
|
|
28
|
-
| Feature-Sliced Design (FSD) | `npx skills add -y feature-sliced/skills` | `feature-sliced-design` |
|
|
29
|
-
| Design patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `hooks-pattern`, `hoc-pattern`, `compound-pattern`, `render-props-pattern`, `provider-pattern`, `observer-pattern`, `factory-pattern`, `module-pattern` |
|
|
30
|
-
| Rendering patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `server-side-rendering`, `client-side-rendering`, `static-rendering`, `streaming-ssr`, `react-server-components`, `progressive-hydration`, `islands-architecture` |
|
|
31
|
-
| Performance patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `bundle-splitting`, `tree-shaking`, `dynamic-import`, `route-based`, `js-performance-patterns`, `react-render-optimization` |
|
|
32
|
-
| Modern React (2026 stack) | `npx skills add -y PatternsDev/skills --skill <name>` | `react-2026`, `react-composition-2026`, `react-data-fetching` |
|
|
33
|
-
| Microservices, monolith / layered | `npx skills find "<pattern-name> architecture"` | best result per the quality filter |
|
|
34
|
-
|
|
35
|
-
Take only what the persona and the user's selection call for, at most two or three patterns.dev picks (full catalog: https://www.patterns.dev/ai/skills/catalog/). These sources are curated, so the install-count filter does not apply to them.
|
|
36
|
-
|
|
37
|
-
## Quality filter
|
|
38
|
-
|
|
39
|
-
From each search result, in order:
|
|
40
|
-
|
|
41
|
-
1. Install count at least 100, preferably 1000. Below 100, record "no quality skill found on skills.sh for \<signal\>" and move on.
|
|
42
|
-
2. Prefer an official or canonical source (`vercel-labs`, `anthropics`, `microsoft`, `feature-sliced`, `wshobson`, `github`) over an unknown author.
|
|
43
|
-
3. The description has to match the signal. A React skill with 500K installs does not cover TypeScript.
|
|
44
|
-
4. No redundancy: skip a candidate whose scope an already-selected skill covers, unless it goes genuinely deeper on a different concern.
|
|
45
|
-
|
|
46
|
-
One skill per detected signal is the floor, five to eight is the usual range, ten is the cap: past that, rank by install count and source and keep the top ten. Fewer than five found is worth saying out loud, since the user can add more in the confirmation form.
|
|
47
|
-
|
|
48
|
-
## Verifying an install
|
|
49
|
-
|
|
50
|
-
`npx skills add` is not proof of anything. Read back both `.agents/skills/<skill-name>/SKILL.md` and `skills-lock.json`.
|
|
51
|
-
|
|
52
|
-
- Skill present, lockfile entry missing: add the entry with the Edit tool, matching the existing keys' naming, as `"source": "<owner/repo>", "sourceType": "github", "skillPath": "skills/<skill-name>/SKILL.md", "computedHash": "<skill-name>-placeholder"`, then re-read the file to confirm it is still valid JSON.
|
|
53
|
-
- Skill missing: retry once, then drop it from the set and report the failure.
|
|
1
|
+
# Signal-to-query mapping
|
|
2
|
+
|
|
3
|
+
Every uncovered signal gets its own search.
|
|
4
|
+
|
|
5
|
+
| Signal type | Search query |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Language | `npx skills find "<language-name>"` (e.g. `typescript`, `csharp`, `python`) |
|
|
8
|
+
| Framework | `npx skills find "<framework-name>"` (e.g. `react`, `ink`, `angular`, `django`) |
|
|
9
|
+
| Architecture | Use the known direct sources below. Optionally also `npx skills find "<pattern-name>"` |
|
|
10
|
+
| Testing | `npx skills find "<test-framework> testing"` (e.g. `vitest testing`, `jest testing`) |
|
|
11
|
+
| Styling | `npx skills find "<css-framework>"` (e.g. `tailwind`, `css modules`, `design tokens`) |
|
|
12
|
+
| Linting | `npx skills find "eslint prettier"` or `"lint format"` |
|
|
13
|
+
| CI/CD | `npx skills find "ci cd pipeline"` or `"<platform> actions"` |
|
|
14
|
+
| Cloud / IaC | `npx skills find "<cloud-provider> infrastructure"` (e.g. `azure infrastructure`) |
|
|
15
|
+
| Monitoring | `npx skills find "observability monitoring"` |
|
|
16
|
+
| i18n | `npx skills find "i18n internationalization"` |
|
|
17
|
+
| Data layer | `npx skills find "<orm-or-db> orm"` (e.g. `entity framework orm`, `prisma orm`) |
|
|
18
|
+
| Dependency Injection | `npx skills find "<di-framework>"` (e.g. `inversify`, `autofac`) |
|
|
19
|
+
|
|
20
|
+
A signal that fits no row derives its query from its own value: `npx skills find "<signal-value>"`.
|
|
21
|
+
|
|
22
|
+
## Known direct sources (architecture and patterns)
|
|
23
|
+
|
|
24
|
+
These live in dedicated repos and install by `owner/repo`, so `npx skills find` never surfaces them. They are the option list for the architecture question, and the source for it when the user picks one.
|
|
25
|
+
|
|
26
|
+
| Selection | Install command | Skill(s) to pick |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| Feature-Sliced Design (FSD) | `npx skills add -y feature-sliced/skills` | `feature-sliced-design` |
|
|
29
|
+
| Design patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `hooks-pattern`, `hoc-pattern`, `compound-pattern`, `render-props-pattern`, `provider-pattern`, `observer-pattern`, `factory-pattern`, `module-pattern` |
|
|
30
|
+
| Rendering patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `server-side-rendering`, `client-side-rendering`, `static-rendering`, `streaming-ssr`, `react-server-components`, `progressive-hydration`, `islands-architecture` |
|
|
31
|
+
| Performance patterns | `npx skills add -y PatternsDev/skills --skill <name>` | `bundle-splitting`, `tree-shaking`, `dynamic-import`, `route-based`, `js-performance-patterns`, `react-render-optimization` |
|
|
32
|
+
| Modern React (2026 stack) | `npx skills add -y PatternsDev/skills --skill <name>` | `react-2026`, `react-composition-2026`, `react-data-fetching` |
|
|
33
|
+
| Microservices, monolith / layered | `npx skills find "<pattern-name> architecture"` | best result per the quality filter |
|
|
34
|
+
|
|
35
|
+
Take only what the persona and the user's selection call for, at most two or three patterns.dev picks (full catalog: https://www.patterns.dev/ai/skills/catalog/). These sources are curated, so the install-count filter does not apply to them.
|
|
36
|
+
|
|
37
|
+
## Quality filter
|
|
38
|
+
|
|
39
|
+
From each search result, in order:
|
|
40
|
+
|
|
41
|
+
1. Install count at least 100, preferably 1000. Below 100, record "no quality skill found on skills.sh for \<signal\>" and move on.
|
|
42
|
+
2. Prefer an official or canonical source (`vercel-labs`, `anthropics`, `microsoft`, `feature-sliced`, `wshobson`, `github`) over an unknown author.
|
|
43
|
+
3. The description has to match the signal. A React skill with 500K installs does not cover TypeScript.
|
|
44
|
+
4. No redundancy: skip a candidate whose scope an already-selected skill covers, unless it goes genuinely deeper on a different concern.
|
|
45
|
+
|
|
46
|
+
One skill per detected signal is the floor, five to eight is the usual range, ten is the cap: past that, rank by install count and source and keep the top ten. Fewer than five found is worth saying out loud, since the user can add more in the confirmation form.
|
|
47
|
+
|
|
48
|
+
## Verifying an install
|
|
49
|
+
|
|
50
|
+
`npx skills add` is not proof of anything. Read back both `.agents/skills/<skill-name>/SKILL.md` and `skills-lock.json`.
|
|
51
|
+
|
|
52
|
+
- Skill present, lockfile entry missing: add the entry with the Edit tool, matching the existing keys' naming, as `"source": "<owner/repo>", "sourceType": "github", "skillPath": "skills/<skill-name>/SKILL.md", "computedHash": "<skill-name>-placeholder"`, then re-read the file to confirm it is still valid JSON.
|
|
53
|
+
- Skill missing: retry once, then drop it from the set and report the failure.
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Agent file template
|
|
2
|
-
|
|
3
|
-
The whole file, with nothing else in it:
|
|
4
|
-
|
|
5
|
-
```markdown
|
|
6
|
-
---
|
|
7
|
-
description: <one sentence naming the persona + top 3-5 detected technologies>
|
|
8
|
-
mode: subagent
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<One paragraph: "You are a {persona} engineer specializing in {top technologies}. You own all work in {scope/files}." Keep it to 2-3 sentences max.>
|
|
12
|
-
|
|
13
|
-
## Abilities
|
|
14
|
-
- Guardrails: @pc-guardrails-generic, @pc-guardrails-project
|
|
15
|
-
- Development: <@installed-skill-1>, <@installed-skill-2>, ...
|
|
16
|
-
- Testing: <@installed-skill-for-testing>, ...
|
|
17
|
-
- Infrastructure: <@installed-skill-for-devops>, ...
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Replace every `<...>` placeholder with real values, and drop any category line with no skills in it (Guardrails always stays). Development is language, framework, UI and DI skills; Testing is test, lint and typecheck skills; Infrastructure is DevOps, CI/CD and cloud skills.
|
|
21
|
-
|
|
22
|
-
## Description quality bar
|
|
23
|
-
|
|
24
|
-
`description:` is the matching key for `/plan-apply`: the lead compares a task's domain text against it to pick a specialist, so a vague one gets the wrong engineer spawned.
|
|
25
|
-
|
|
26
|
-
Bad: `"A frontend engineer for React"`
|
|
27
|
-
|
|
28
|
-
Good: `"Frontend engineer for Ink 7 + React 19 TUI, FSD architecture, Inversify DI, design tokens, and i18n"`
|
|
29
|
-
|
|
30
|
-
Name the persona, list the three to five technologies actually detected, one sentence, no padding.
|
|
31
|
-
|
|
32
|
-
## Identity paragraph
|
|
33
|
-
|
|
34
|
-
Two or three sentences: who the engineer is, and what files or layers it owns. A knowledge dump here is knowledge the lead cannot reuse and the engineer did not ask for.
|
|
35
|
-
|
|
36
|
-
Good: `"You are a frontend engineer specializing in terminal UI development with Ink 7 + React 19. You own all work in the FSD layers: src/app/, src/widgets/, src/features/, src/entities/, and src/shared/."`
|
|
1
|
+
# Agent file template
|
|
2
|
+
|
|
3
|
+
The whole file, with nothing else in it:
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
---
|
|
7
|
+
description: <one sentence naming the persona + top 3-5 detected technologies>
|
|
8
|
+
mode: subagent
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<One paragraph: "You are a {persona} engineer specializing in {top technologies}. You own all work in {scope/files}." Keep it to 2-3 sentences max.>
|
|
12
|
+
|
|
13
|
+
## Abilities
|
|
14
|
+
- Guardrails: @pc-guardrails-generic, @pc-guardrails-project
|
|
15
|
+
- Development: <@installed-skill-1>, <@installed-skill-2>, ...
|
|
16
|
+
- Testing: <@installed-skill-for-testing>, ...
|
|
17
|
+
- Infrastructure: <@installed-skill-for-devops>, ...
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Replace every `<...>` placeholder with real values, and drop any category line with no skills in it (Guardrails always stays). Development is language, framework, UI and DI skills; Testing is test, lint and typecheck skills; Infrastructure is DevOps, CI/CD and cloud skills.
|
|
21
|
+
|
|
22
|
+
## Description quality bar
|
|
23
|
+
|
|
24
|
+
`description:` is the matching key for `/plan-apply`: the lead compares a task's domain text against it to pick a specialist, so a vague one gets the wrong engineer spawned.
|
|
25
|
+
|
|
26
|
+
Bad: `"A frontend engineer for React"`
|
|
27
|
+
|
|
28
|
+
Good: `"Frontend engineer for Ink 7 + React 19 TUI, FSD architecture, Inversify DI, design tokens, and i18n"`
|
|
29
|
+
|
|
30
|
+
Name the persona, list the three to five technologies actually detected, one sentence, no padding.
|
|
31
|
+
|
|
32
|
+
## Identity paragraph
|
|
33
|
+
|
|
34
|
+
Two or three sentences: who the engineer is, and what files or layers it owns. A knowledge dump here is knowledge the lead cannot reuse and the engineer did not ask for.
|
|
35
|
+
|
|
36
|
+
Good: `"You are a frontend engineer specializing in terminal UI development with Ink 7 + React 19. You own all work in the FSD layers: src/app/, src/widgets/, src/features/, src/entities/, and src/shared/."`
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-make-guardrails
|
|
3
|
-
description: Generate or update the pc-guardrails-project skill from ARCHITECTURE.md and relevant project files, then wire it into every engineer agent. Invoked by the /make-guardrails command and the repo-initialize flow.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Make Guardrails
|
|
8
|
-
|
|
9
|
-
Turn this project's own documentation into `.agents/skills/pc-guardrails-project/SKILL.md`: the rules and constraints its agents work under, per the [category reference](category-reference.md).
|
|
10
|
-
|
|
11
|
-
## Rules
|
|
12
|
-
|
|
13
|
-
- Never regenerate over a file that carries a `<!-- Last updated:` footer. `pc-guardrails-project` is the one skill a team is expected to hand-edit, and a full rewrite silently drops that work. Read the file first and pick the mode.
|
|
14
|
-
- Never invent a rule the project does not state somewhere. A guardrail that came from nowhere is one nobody agreed to, and it will be followed anyway.
|
|
15
|
-
- Never write an empty category. Omit it.
|
|
16
|
-
- Never touch a tier variant (`*-engineer.build.md`, `*-engineer.fast.md`, `*-engineer.plan.md`): they are regenerated from the base templates every startup.
|
|
17
|
-
- Before writing the file, run the self-check defined in the [category reference](category-reference.md): count rules, cut positive phrasing and reference facts, strip anything already enforced by tooling or by `pc-guardrails-generic`, and re-count. The file is not written until the self-check passes.
|
|
18
|
-
|
|
19
|
-
## Sources
|
|
20
|
-
|
|
21
|
-
`ARCHITECTURE.md` is the primary one. Then whatever else exists: `DESIGN.md`, `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.opencode/harness.json`, `openspec/config.yaml`, the root manifests (`package.json`, `tsconfig.json`, `biome.json`, `.eslintrc*`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`), and the CI definitions (`.github/workflows/*`, `azure-pipelines.yml`). Lint and formatter config is where the conventions are actually enforced, so it outranks any document that describes them.
|
|
22
|
-
|
|
23
|
-
## Modes
|
|
24
|
-
|
|
25
|
-
| The existing skill file | Mode |
|
|
26
|
-
|---|---|
|
|
27
|
-
| Missing | Generate |
|
|
28
|
-
| Has a `<!-- Last updated:` footer | Update |
|
|
29
|
-
| Exists with no footer | Generate |
|
|
30
|
-
|
|
31
|
-
**Update.** If `ARCHITECTURE.md` has not changed since the footer date, say "Guardrails up to date" and stop. Otherwise `git log --oneline --since="<footer date>" -- <config, lint config, CI workflows>`, update only the affected categories, and leave the rest, including hand-written rules, as they stand. A new architecture, framework or platform is a Generate.
|
|
32
|
-
|
|
33
|
-
## Wiring
|
|
34
|
-
|
|
35
|
-
Every `*-engineer.md` in `.opencode/agents/` gets `@pc-guardrails-project` on its Guardrails line, right after `@pc-guardrails-generic`, with its existing entries untouched:
|
|
36
|
-
|
|
37
|
-
```markdown
|
|
38
|
-
## Abilities
|
|
39
|
-
- Guardrails: @pc-guardrails-generic, @pc-guardrails-project[, ...existing entries unchanged]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Report
|
|
43
|
-
|
|
44
|
-
Whether the skill was generated or updated and which categories changed, the rule count per category, how many agent files were wired, and that `/make-guardrails` can be re-run whenever the conventions move.
|
|
1
|
+
---
|
|
2
|
+
name: pc-make-guardrails
|
|
3
|
+
description: Generate or update the pc-guardrails-project skill from ARCHITECTURE.md and relevant project files, then wire it into every engineer agent. Invoked by the /make-guardrails command and the repo-initialize flow.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Make Guardrails
|
|
8
|
+
|
|
9
|
+
Turn this project's own documentation into `.agents/skills/pc-guardrails-project/SKILL.md`: the rules and constraints its agents work under, per the [category reference](category-reference.md).
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Never regenerate over a file that carries a `<!-- Last updated:` footer. `pc-guardrails-project` is the one skill a team is expected to hand-edit, and a full rewrite silently drops that work. Read the file first and pick the mode.
|
|
14
|
+
- Never invent a rule the project does not state somewhere. A guardrail that came from nowhere is one nobody agreed to, and it will be followed anyway.
|
|
15
|
+
- Never write an empty category. Omit it.
|
|
16
|
+
- Never touch a tier variant (`*-engineer.build.md`, `*-engineer.fast.md`, `*-engineer.plan.md`): they are regenerated from the base templates every startup.
|
|
17
|
+
- Before writing the file, run the self-check defined in the [category reference](category-reference.md): count rules, cut positive phrasing and reference facts, strip anything already enforced by tooling or by `pc-guardrails-generic`, and re-count. The file is not written until the self-check passes.
|
|
18
|
+
|
|
19
|
+
## Sources
|
|
20
|
+
|
|
21
|
+
`ARCHITECTURE.md` is the primary one. Then whatever else exists: `DESIGN.md`, `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.opencode/harness.json`, `openspec/config.yaml`, the root manifests (`package.json`, `tsconfig.json`, `biome.json`, `.eslintrc*`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`), and the CI definitions (`.github/workflows/*`, `azure-pipelines.yml`). Lint and formatter config is where the conventions are actually enforced, so it outranks any document that describes them.
|
|
22
|
+
|
|
23
|
+
## Modes
|
|
24
|
+
|
|
25
|
+
| The existing skill file | Mode |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Missing | Generate |
|
|
28
|
+
| Has a `<!-- Last updated:` footer | Update |
|
|
29
|
+
| Exists with no footer | Generate |
|
|
30
|
+
|
|
31
|
+
**Update.** If `ARCHITECTURE.md` has not changed since the footer date, say "Guardrails up to date" and stop. Otherwise `git log --oneline --since="<footer date>" -- <config, lint config, CI workflows>`, update only the affected categories, and leave the rest, including hand-written rules, as they stand. A new architecture, framework or platform is a Generate.
|
|
32
|
+
|
|
33
|
+
## Wiring
|
|
34
|
+
|
|
35
|
+
Every `*-engineer.md` in `.opencode/agents/` gets `@pc-guardrails-project` on its Guardrails line, right after `@pc-guardrails-generic`, with its existing entries untouched:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
## Abilities
|
|
39
|
+
- Guardrails: @pc-guardrails-generic, @pc-guardrails-project[, ...existing entries unchanged]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Report
|
|
43
|
+
|
|
44
|
+
Whether the skill was generated or updated and which categories changed, the rule count per category, how many agent files were wired, and that `/make-guardrails` can be re-run whenever the conventions move.
|