@plainconceptsplatform/agent-harness 3.1.0 → 3.2.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/README.md +452 -434
- package/cli/commands/update.js +1 -1
- 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-ship/az.md +81 -81
- package/cli/index.js +0 -0
- package/cli/presets/agents-content.json +34 -34
- package/cli/presets/browser.json +10 -10
- package/cli/steps/browser/index.js +48 -48
- package/cli/steps/copy/commands.js +79 -79
- package/cli/steps/copy/index.js +88 -88
- package/cli/steps/copy/skills.js +307 -307
- package/cli/steps/metadata/index.js +5 -2
- package/cli/steps/models/write.js +5 -1
- package/cli/utils/copy.js +5 -2
- package/cli/utils/paths.js +80 -80
- package/harness/.opencode/_gitignore +9 -9
- 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/plan-apply.md +9 -9
- package/harness/.opencode/commands/plan-goal.md +5 -5
- package/harness/.opencode/commands/plan-quick.md +5 -5
- package/harness/.opencode/commands/plan-story.md +9 -9
- package/harness/.opencode/commands/repo-audit.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/scripts/check-diff.mjs +225 -0
- package/harness/.opencode/scripts/code-rules.mjs +280 -0
- package/harness/AGENTS.md +49 -49
- package/package.json +12 -14
- package/skills/README.md +18 -18
- package/skills/browser-automation/SKILL.md +72 -72
- package/skills/pc-guardrails-generic/SKILL.md +2 -1
- package/skills/pc-make-architecture/SKILL.md +32 -32
- package/skills/pc-make-design/SKILL.md +45 -45
- package/skills/pc-make-engineer/signal-mapping.md +53 -53
- package/skills/pc-make-guardrails/SKILL.md +44 -44
- package/skills/pc-make-user-model/SKILL.md +56 -56
- package/skills/pc-plan-apply/SKILL.md +1 -1
- package/skills/pc-plan-apply/simple-mode.md +21 -21
- package/skills/pc-plan-archive/SKILL.md +66 -66
- package/skills/pc-plan-goal/branching.md +39 -39
- package/skills/pc-plan-goal/output.md +71 -71
- package/skills/pc-plan-quick/SKILL.md +46 -46
- package/skills/pc-plan-story/SKILL.md +93 -93
- 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,32 +1,32 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-make-architecture
|
|
3
|
-
description: Generate or update ARCHITECTURE.md by analyzing the codebase structure. Safe to run at any time. Invoked by the /make-architecture command and the repo-initialize flow.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Make Architecture
|
|
8
|
-
|
|
9
|
-
Write `ARCHITECTURE.md` in the project root from what the codebase actually contains, following the [structure template](structure-template.md).
|
|
10
|
-
|
|
11
|
-
## Rules
|
|
12
|
-
|
|
13
|
-
- 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.
|
|
14
|
-
- Never analyze outside `.opencode/source-roots.json` when it exists, plus this repo's own docs and config.
|
|
15
|
-
- The footer is the file's last line, and it is the run's own ISO timestamp: `<!-- Last updated: <ISO date> -->`.
|
|
16
|
-
- Follow the writing rules and self-check defined in the [structure template](structure-template.md). After generating, re-read each section: if a section only describes what exists without stating what breaks when its constraints are violated, rewrite it as constraint-embedded prose or cut it. The file is not written until the self-check passes.
|
|
17
|
-
|
|
18
|
-
## Modes
|
|
19
|
-
|
|
20
|
-
| The existing file | Mode |
|
|
21
|
-
|---|---|
|
|
22
|
-
| Missing, or a placeholder with no real content | Generate |
|
|
23
|
-
| Has content and a `<!-- Last updated:` footer | Update |
|
|
24
|
-
| Has content but no footer | Warn the user, then Generate |
|
|
25
|
-
|
|
26
|
-
**Generate.** Discover the architecture with the file tools: `glob` for structure, `grep` for routes, models and schemas, `read` for config, CI workflows, Dockerfiles, README, changelogs and ADRs.
|
|
27
|
-
|
|
28
|
-
**Update.** `git log --oneline --since="<footer date>" -- <source roots>` says what moved. Nothing changed means nothing to write: say "Architecture unchanged since last update" and stop. Otherwise rewrite only the affected sections and leave the rest, including anything hand-written, as it stands. Past roughly 40% of sections affected, fall back to Generate.
|
|
29
|
-
|
|
30
|
-
## Report
|
|
31
|
-
|
|
32
|
-
Whether the file was generated or updated and which sections changed, the top-level components found, and that `/make-architecture` can be re-run whenever the architecture moves.
|
|
1
|
+
---
|
|
2
|
+
name: pc-make-architecture
|
|
3
|
+
description: Generate or update ARCHITECTURE.md by analyzing the codebase structure. Safe to run at any time. Invoked by the /make-architecture command and the repo-initialize flow.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Make Architecture
|
|
8
|
+
|
|
9
|
+
Write `ARCHITECTURE.md` in the project root from what the codebase actually contains, following the [structure template](structure-template.md).
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
- Never analyze outside `.opencode/source-roots.json` when it exists, plus this repo's own docs and config.
|
|
15
|
+
- The footer is the file's last line, and it is the run's own ISO timestamp: `<!-- Last updated: <ISO date> -->`.
|
|
16
|
+
- Follow the writing rules and self-check defined in the [structure template](structure-template.md). After generating, re-read each section: if a section only describes what exists without stating what breaks when its constraints are violated, rewrite it as constraint-embedded prose or cut it. The file is not written until the self-check passes.
|
|
17
|
+
|
|
18
|
+
## Modes
|
|
19
|
+
|
|
20
|
+
| The existing file | Mode |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Missing, or a placeholder with no real content | Generate |
|
|
23
|
+
| Has content and a `<!-- Last updated:` footer | Update |
|
|
24
|
+
| Has content but no footer | Warn the user, then Generate |
|
|
25
|
+
|
|
26
|
+
**Generate.** Discover the architecture with the file tools: `glob` for structure, `grep` for routes, models and schemas, `read` for config, CI workflows, Dockerfiles, README, changelogs and ADRs.
|
|
27
|
+
|
|
28
|
+
**Update.** `git log --oneline --since="<footer date>" -- <source roots>` says what moved. Nothing changed means nothing to write: say "Architecture unchanged since last update" and stop. Otherwise rewrite only the affected sections and leave the rest, including anything hand-written, as it stands. Past roughly 40% of sections affected, fall back to Generate.
|
|
29
|
+
|
|
30
|
+
## Report
|
|
31
|
+
|
|
32
|
+
Whether the file was generated or updated and which sections changed, the top-level components found, and that `/make-architecture` can be re-run whenever the architecture moves.
|
|
@@ -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,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,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.
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-make-user-model
|
|
3
|
-
description: Set the model for a tier (plan, build, or fast). Team-wide or user-local override. Invoked by the /make-user-model command.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Point one tier at one model, in the team config or in a machine-local override.
|
|
8
|
-
|
|
9
|
-
## Rules
|
|
10
|
-
|
|
11
|
-
- Only `models.<tier>` in `.opencode/harness.json` or `.opencode/harness.user.json` changes. Agent files, `opencode.jsonc` and `tasks.md` are not this command's business, and tier variants are rebuilt from these configs at startup anyway.
|
|
12
|
-
- Never guess the id behind `current`: read it from the status line. A guessed id writes a model that does not exist into the team's config.
|
|
13
|
-
- Never write anything when the arguments do not parse. Print the usage and stop.
|
|
14
|
-
- Preserve the file's other fields and its 2-space formatting.
|
|
15
|
-
|
|
16
|
-
## Contract
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
/make-user-model <tier> <model>
|
|
20
|
-
/make-user-model user <tier> <model>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
`user` writes `.opencode/harness.user.json`, which is gitignored and wins on this machine only; without it the target is `.opencode/harness.json`, which is shared. `<tier>` is exactly `plan`, `build` or `fast`. `<model>` is a fully-qualified id (`opencode/big-pickle`) or `current` for the model this session is running.
|
|
24
|
-
|
|
25
|
-
No arguments means show the `models` block from both files, team first, then the usage. Change nothing.
|
|
26
|
-
|
|
27
|
-
A team config that does not exist yet is a stop: onboarding has not run. A missing user config is created as `{ "models": {} }`.
|
|
28
|
-
|
|
29
|
-
An id with no `/` in it is malformed; confirm before writing it:
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"questions": [
|
|
34
|
-
{
|
|
35
|
-
"header": "Malformed model id",
|
|
36
|
-
"question": "\"<model>\" doesn't look like a valid model id (expected provider/model-id). Write it anyway?",
|
|
37
|
-
"options": [
|
|
38
|
-
{ "label": "yes", "description": "Write the value as-is to the config file." },
|
|
39
|
-
{ "label": "no", "description": "Cancel. Do not write anything." }
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Report
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
<team|user> config updated
|
|
50
|
-
<tier> model -> <resolved-id>
|
|
51
|
-
file: <path written>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The change lands on the next opencode start, when `pc-subagent-tiers` reads the configs and rebuilds the tier variants.
|
|
55
|
-
|
|
56
|
-
Arguments: `$ARGUMENTS`
|
|
1
|
+
---
|
|
2
|
+
name: pc-make-user-model
|
|
3
|
+
description: Set the model for a tier (plan, build, or fast). Team-wide or user-local override. Invoked by the /make-user-model command.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Point one tier at one model, in the team config or in a machine-local override.
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
|
|
11
|
+
- Only `models.<tier>` in `.opencode/harness.json` or `.opencode/harness.user.json` changes. Agent files, `opencode.jsonc` and `tasks.md` are not this command's business, and tier variants are rebuilt from these configs at startup anyway.
|
|
12
|
+
- Never guess the id behind `current`: read it from the status line. A guessed id writes a model that does not exist into the team's config.
|
|
13
|
+
- Never write anything when the arguments do not parse. Print the usage and stop.
|
|
14
|
+
- Preserve the file's other fields and its 2-space formatting.
|
|
15
|
+
|
|
16
|
+
## Contract
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
/make-user-model <tier> <model>
|
|
20
|
+
/make-user-model user <tier> <model>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`user` writes `.opencode/harness.user.json`, which is gitignored and wins on this machine only; without it the target is `.opencode/harness.json`, which is shared. `<tier>` is exactly `plan`, `build` or `fast`. `<model>` is a fully-qualified id (`opencode/big-pickle`) or `current` for the model this session is running.
|
|
24
|
+
|
|
25
|
+
No arguments means show the `models` block from both files, team first, then the usage. Change nothing.
|
|
26
|
+
|
|
27
|
+
A team config that does not exist yet is a stop: onboarding has not run. A missing user config is created as `{ "models": {} }`.
|
|
28
|
+
|
|
29
|
+
An id with no `/` in it is malformed; confirm before writing it:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"questions": [
|
|
34
|
+
{
|
|
35
|
+
"header": "Malformed model id",
|
|
36
|
+
"question": "\"<model>\" doesn't look like a valid model id (expected provider/model-id). Write it anyway?",
|
|
37
|
+
"options": [
|
|
38
|
+
{ "label": "yes", "description": "Write the value as-is to the config file." },
|
|
39
|
+
{ "label": "no", "description": "Cancel. Do not write anything." }
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Report
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
<team|user> config updated
|
|
50
|
+
<tier> model -> <resolved-id>
|
|
51
|
+
file: <path written>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The change lands on the next opencode start, when `pc-subagent-tiers` reads the configs and rebuilds the tier variants.
|
|
55
|
+
|
|
56
|
+
Arguments: `$ARGUMENTS`
|
|
@@ -79,7 +79,7 @@ wave = pick groups whose file-sets are pairwise DISJOINT, capped at maxConcu
|
|
|
79
79
|
|
|
80
80
|
**9. Progress guard.** If a full wave moved zero tasks to DONE: STOP (do not re-spawn the identical failing set). Otherwise recompute `eligible` and loop to step 5.
|
|
81
81
|
|
|
82
|
-
**10. Verify.** In this (lead) session, run the project's lint, typecheck, test, build, and proposal-required validation commands. Every command must exit 0. On failure, reopen the offending tasks (uncheck, mark failed) so they re-enter `eligible` and run another wave. When every task is checked, no eligible task remains, and every command passes, report `VERIFIED` to the caller.
|
|
82
|
+
**10. Verify.** In this (lead) session, run the project's lint, typecheck, test, build, and proposal-required validation commands, then `node .opencode/scripts/check-diff.mjs`. Every command must exit 0. A `check-diff` failure lists file, line and fix: reopen the tasks that own those files. On failure, reopen the offending tasks (uncheck, mark failed) so they re-enter `eligible` and run another wave. When every task is checked, no eligible task remains, and every command passes, report `VERIFIED` to the caller.
|
|
83
83
|
|
|
84
84
|
**11. Close.** Mark all `tasks.md` checkboxes, run `openspec status --change "<name>" --json`, and report progress (N/M tasks). The wave state in `.opencode/harness-run.json` persists for resume.
|
|
85
85
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# Simple mode: sequential in-session
|
|
2
|
-
|
|
3
|
-
When the plan lives in the Todo pane (from `/plan-quick`) and no OpenSpec change exists:
|
|
4
|
-
|
|
5
|
-
1. Read the task list from the Todo pane (the `pending` items created by `/plan-quick`).
|
|
6
|
-
2. Create a feature branch if not already on one: `git switch -c feature/{slug}`. (Skip when the caller passed `start_from: load-plan`.)
|
|
7
|
-
3. Work through tasks one at a time, in order, directly in this session:
|
|
8
|
-
- Read the task text from the Todo item.
|
|
9
|
-
- Mark it `in_progress` via `todowrite`.
|
|
10
|
-
- Implement it (edit files, run commands as needed).
|
|
11
|
-
- Mark it `completed` via `todowrite`.
|
|
12
|
-
- Commit the change: `git add <the paths this task wrote> && git commit -m "task {id}: {summary}"`. Unscoped staging is denied (`pc-system-reminders`).
|
|
13
|
-
4. After all tasks are done, run the project's typecheck/build check if one exists. Fix any errors.
|
|
14
|
-
5. Report: tasks N/N completed, commits made, branch name.
|
|
15
|
-
|
|
16
|
-
Rules:
|
|
17
|
-
- Work in this session only. No subagent spawning.
|
|
18
|
-
- No OpenSpec commands.
|
|
19
|
-
- Keep each commit focused on one task.
|
|
20
|
-
- Use `todowrite` to track progress: `pending` -> `in_progress` -> `completed`.
|
|
21
|
-
- Never mark a task `completed` that you did not finish. Use `cancelled` with the reason and continue with the next; a false green is invisible to whoever reads the report.
|
|
1
|
+
# Simple mode: sequential in-session
|
|
2
|
+
|
|
3
|
+
When the plan lives in the Todo pane (from `/plan-quick`) and no OpenSpec change exists:
|
|
4
|
+
|
|
5
|
+
1. Read the task list from the Todo pane (the `pending` items created by `/plan-quick`).
|
|
6
|
+
2. Create a feature branch if not already on one: `git switch -c feature/{slug}`. (Skip when the caller passed `start_from: load-plan`.)
|
|
7
|
+
3. Work through tasks one at a time, in order, directly in this session:
|
|
8
|
+
- Read the task text from the Todo item.
|
|
9
|
+
- Mark it `in_progress` via `todowrite`.
|
|
10
|
+
- Implement it (edit files, run commands as needed).
|
|
11
|
+
- Mark it `completed` via `todowrite`.
|
|
12
|
+
- Commit the change: `git add <the paths this task wrote> && git commit -m "task {id}: {summary}"`. Unscoped staging is denied (`pc-system-reminders`).
|
|
13
|
+
4. After all tasks are done, run the project's typecheck/build check if one exists, then `node .opencode/scripts/check-diff.mjs`. Fix any errors until both exit 0.
|
|
14
|
+
5. Report: tasks N/N completed, commits made, branch name.
|
|
15
|
+
|
|
16
|
+
Rules:
|
|
17
|
+
- Work in this session only. No subagent spawning.
|
|
18
|
+
- No OpenSpec commands.
|
|
19
|
+
- Keep each commit focused on one task.
|
|
20
|
+
- Use `todowrite` to track progress: `pending` -> `in_progress` -> `completed`.
|
|
21
|
+
- Never mark a task `completed` that you did not finish. Use `cancelled` with the reason and continue with the next; a false green is invisible to whoever reads the report.
|