@plainconceptsplatform/agent-harness 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +423 -419
  2. package/package.json +3 -3
  3. package/src/commands/join.js +244 -244
  4. package/src/commands/shared.js +27 -27
  5. package/src/commands/single.js +79 -79
  6. package/src/commands/update.js +109 -109
  7. package/src/commands/wizard.js +134 -134
  8. package/src/content/.agents/skills/browser-automation/SKILL.md +66 -66
  9. package/src/content/.agents/skills/pc-guardrails-generic/SKILL.md +68 -68
  10. package/src/content/.agents/skills/pc-guardrails-project/SKILL.md +8 -8
  11. package/src/content/.agents/skills/pc-make-architecture/SKILL.md +51 -51
  12. package/src/content/.agents/skills/pc-make-architecture/structure-template.md +38 -38
  13. package/src/content/.agents/skills/pc-make-design/SKILL.md +68 -68
  14. package/src/content/.agents/skills/pc-make-engineer/SKILL.md +219 -219
  15. package/src/content/.agents/skills/pc-make-engineer/signal-mapping.md +68 -68
  16. package/src/content/.agents/skills/pc-make-engineer/template.md +81 -81
  17. package/src/content/.agents/skills/pc-make-evidence-scaffold/SKILL.md +18 -18
  18. package/src/content/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +29 -29
  19. package/src/content/.agents/skills/pc-make-guardrails/SKILL.md +74 -74
  20. package/src/content/.agents/skills/pc-make-guardrails/category-reference.md +68 -68
  21. package/src/content/.agents/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
  22. package/src/content/.agents/skills/pc-make-merge-risk-assess/category-reference.md +98 -98
  23. package/src/content/.agents/skills/pc-make-user-model/SKILL.md +66 -66
  24. package/src/content/.agents/skills/pc-ops-evidence/SKILL.md +127 -127
  25. package/src/content/.agents/skills/pc-ops-ship/SKILL.md +18 -18
  26. package/src/content/.agents/skills/pc-plan-apply/SKILL.md +83 -83
  27. package/src/content/.agents/skills/pc-plan-apply/simple-mode.md +21 -21
  28. package/src/content/.agents/skills/pc-plan-archive/SKILL.md +63 -63
  29. package/src/content/.agents/skills/pc-plan-explore/SKILL.md +9 -9
  30. package/src/content/.agents/skills/pc-plan-goal/SKILL.md +94 -94
  31. package/src/content/.agents/skills/pc-plan-goal/branching.md +30 -30
  32. package/src/content/.agents/skills/pc-plan-goal/failure-policy.md +30 -30
  33. package/src/content/.agents/skills/pc-plan-goal/output-mode.md +9 -9
  34. package/src/content/.agents/skills/pc-plan-goal/output.md +68 -68
  35. package/src/content/.agents/skills/pc-plan-propose/SKILL.md +125 -125
  36. package/src/content/.agents/skills/pc-plan-propose/task-annotation.md +39 -39
  37. package/src/content/.agents/skills/pc-plan-quick/SKILL.md +62 -62
  38. package/src/content/.agents/skills/pc-plan-story/SKILL.md +146 -146
  39. package/src/content/.agents/skills/pc-repo-audit/SKILL.md +44 -44
  40. package/src/content/.agents/skills/pc-repo-help/SKILL.md +91 -91
  41. package/src/content/.agents/skills/pc-repo-initialize/SKILL.md +130 -130
  42. package/src/content/.agents/skills/pc-repo-onboard/SKILL.md +87 -87
  43. package/src/content/.agents/skills/pc-repo-verify/SKILL.md +34 -34
  44. package/src/content/.agents/skills/pc-userstory-az/SKILL.md +157 -157
  45. package/src/content/.agents/skills/pc-userstory-browser/SKILL.md +132 -132
  46. package/src/content/.agents/skills/pc-userstory-gh/SKILL.md +120 -120
  47. package/src/content/.agents/skills/pc-userstory-jira/SKILL.md +131 -131
  48. package/src/content/.opencode/_gitignore +7 -7
  49. package/src/content/.opencode/commands/init.md +5 -5
  50. package/src/content/.opencode/commands/make-architecture.md +5 -5
  51. package/src/content/.opencode/commands/make-design.md +5 -5
  52. package/src/content/.opencode/commands/make-engineer.md +5 -5
  53. package/src/content/.opencode/commands/make-evidence-scaffold.md +5 -5
  54. package/src/content/.opencode/commands/make-guardrails.md +5 -5
  55. package/src/content/.opencode/commands/make-user-model.md +5 -5
  56. package/src/content/.opencode/commands/ops-backlog.md +10 -10
  57. package/src/content/.opencode/commands/ops-evidence.md +9 -9
  58. package/src/content/.opencode/commands/ops-review.md +8 -8
  59. package/src/content/.opencode/commands/ops-ship.md +9 -9
  60. package/src/content/.opencode/commands/plan-apply.md +9 -9
  61. package/src/content/.opencode/commands/plan-archive.md +5 -5
  62. package/src/content/.opencode/commands/plan-explore.md +9 -9
  63. package/src/content/.opencode/commands/plan-goal.md +5 -5
  64. package/src/content/.opencode/commands/plan-propose.md +9 -9
  65. package/src/content/.opencode/commands/plan-quick.md +5 -5
  66. package/src/content/.opencode/commands/plan-story.md +9 -9
  67. package/src/content/.opencode/commands/repo-audit.md +5 -5
  68. package/src/content/.opencode/commands/repo-help.md +5 -5
  69. package/src/content/.opencode/commands/repo-initialize.md +5 -5
  70. package/src/content/.opencode/commands/repo-onboard.md +5 -5
  71. package/src/content/.opencode/commands/repo-verify.md +5 -5
  72. package/src/content/.opencode/plugins/pc-subagent-monitor.js +139 -139
  73. package/src/content/.opencode/plugins/pc-subagent-tiers.js +179 -179
  74. package/src/content/.opencode/plugins/pc-system-reminders.js +96 -96
  75. package/src/content/.opencode/tui/pc-subagents.tsx +98 -98
  76. package/src/content/.opencode/tui.json +6 -6
  77. package/src/content/AGENTS.md +71 -71
  78. package/src/fragments/archive/az.md +95 -95
  79. package/src/fragments/archive/gh.md +94 -94
  80. package/src/fragments/archive/gl.md +94 -94
  81. package/src/fragments/archive/none.md +73 -73
  82. package/src/fragments/guardrails/codegraph.md +7 -7
  83. package/src/fragments/guardrails/humanizer.md +4 -4
  84. package/src/fragments/guardrails/memory.md +4 -4
  85. package/src/fragments/guardrails/rtk.md +3 -3
  86. package/src/fragments/guardrails/simple-english.md +4 -4
  87. package/src/fragments/ops-backlog/az.md +28 -28
  88. package/src/fragments/ops-backlog/gh.md +29 -29
  89. package/src/fragments/ops-backlog/jira.md +28 -28
  90. package/src/fragments/ops-evidence/az.md +41 -41
  91. package/src/fragments/ops-evidence/gh.md +53 -53
  92. package/src/fragments/ops-evidence/jira.md +38 -38
  93. package/src/fragments/ops-review/az.md +62 -62
  94. package/src/fragments/ops-review/gh.md +52 -52
  95. package/src/fragments/ops-review/gl.md +56 -56
  96. package/src/fragments/ops-ship/az.md +80 -80
  97. package/src/fragments/ops-ship/gh.md +68 -68
  98. package/src/fragments/ops-ship/gl.md +85 -85
  99. package/src/index.js +107 -107
  100. package/src/presets/agents-content.json +53 -53
  101. package/src/presets/models.json +68 -68
  102. package/src/steps/copy/agents.js +118 -118
  103. package/src/steps/copy/commands.js +91 -91
  104. package/src/steps/copy/fullstack-engineer.js +83 -83
  105. package/src/steps/copy/index.js +88 -88
  106. package/src/steps/copy/opencode-json.js +129 -129
  107. package/src/steps/copy/skills.js +196 -196
  108. package/src/steps/metadata/index.js +108 -108
  109. package/src/steps/models/write.js +34 -34
  110. package/src/steps/optimization/patch-guardrails.js +108 -108
  111. package/src/utils/copy.js +108 -108
  112. package/src/utils/legacy-check.js +30 -30
  113. package/src/utils/models-cache.js +58 -58
  114. package/src/utils/paths.js +64 -64
  115. package/src/utils/update-manifest.js +49 -49
  116. package/src/content/.opencode/plugins/pc-system-reminders.test.js +0 -35
@@ -1,66 +1,66 @@
1
- ---
2
- name: browser-automation
3
- description: Reliable, composable browser automation using OpenCode Browser primitives. Use when capturing screenshots of a locally running app, clicking UI elements, reading page content, or automating browser interactions on localhost.
4
- license: MIT
5
- compatibility: Requires opencode-browser extension installed and running.
6
- metadata:
7
- author: copilots
8
- version: "1.0"
9
- ---
10
-
11
- This skill operates on `localhost` URLs only. Screenshots, clicks, typing, scrolling, and queries on locally running apps are in scope. External services (github.com, dev.azure.com, npmjs.com, etc.) are out of scope for browser tools.
12
-
13
- The only exception: when the user selects "Others (Browser)" as their backlog platform during onboarding, the `pc-userstory` skill may navigate to work item URLs the user explicitly provides. That is the sole case where external navigation is permitted, and only to URLs the user explicitly gives you.
14
-
15
- ## Best-practice workflow
16
-
17
- 1. Inspect tabs with `browser_get_tabs`
18
- 2. Open new tabs with `browser_open_tab` when needed
19
- 3. Navigate with `browser_navigate` if needed
20
- 4. Wait for UI using `browser_query` with `timeoutMs`
21
- 5. Discover candidates using `browser_query` with `mode=list`
22
- 6. Click, type, or select using `index`
23
- 7. Confirm using `browser_query` or `browser_snapshot`
24
-
25
- ## CLI-first debugging
26
-
27
- - List all available tools: `npx @different-ai/opencode-browser@4.6.1 tools`
28
- - Run one tool directly: `npx @different-ai/opencode-browser@4.6.1 tool browser_status`
29
- - Pass JSON args: `npx @different-ai/opencode-browser@4.6.1 tool browser_query --args '{"mode":"page_text"}'`
30
- - Run smoke test: `npx @different-ai/opencode-browser@4.6.1 self-test`
31
- - After `update`, reload the unpacked extension in `chrome://extensions`
32
-
33
- ## Selecting options
34
-
35
- - Use `browser_select` for native `<select>` elements
36
- - Prefer `value` or `label`; use `optionIndex` when needed
37
- - Example: `browser_select({ selector: "select", value: "plugin" })`
38
-
39
- ## Query modes
40
-
41
- - `text`: read visible text from a matched element
42
- - `value`: read input values
43
- - `list`: list many matches with text/metadata
44
- - `exists`: check presence and count
45
- - `page_text`: extract visible page text
46
-
47
- ## Opening tabs
48
-
49
- - Use `browser_open_tab` to create a new tab, optionally with `url` and `active`
50
- - Example: `browser_open_tab({ url: "https://example.com", active: false })`
51
-
52
- ## Troubleshooting
53
-
54
- - If a selector fails, run `browser_query` with `mode=page_text` to confirm the content exists
55
- - Use `mode=list` on broad selectors (`button`, `a`, `*[role="button"]`, `*[role="listitem"]`) and choose by index
56
- - For inbox/chat panes, try text selectors first (`text:Subject line`) then verify selection with `browser_query`
57
- - For scrollable containers, pass both `selector` and `x`/`y` to `browser_scroll` and then verify `scrollTop`
58
-
59
- ## Scope
60
-
61
- - Screenshots of locally running app on `localhost` URLs: in scope
62
- - Click, type, scroll, query on `localhost` pages: in scope
63
- - Navigate to work item URLs the user explicitly provides (when backlog platform is "Others (Browser)"): in scope
64
- - Navigate to external services for non-work-item purposes: out of scope
65
- - DevOps or GitHub CLI operations via browser tools: out of scope
66
- - Reading or modifying production systems via browser tools: out of scope
1
+ ---
2
+ name: browser-automation
3
+ description: Reliable, composable browser automation using OpenCode Browser primitives. Use when capturing screenshots of a locally running app, clicking UI elements, reading page content, or automating browser interactions on localhost.
4
+ license: MIT
5
+ compatibility: Requires opencode-browser extension installed and running.
6
+ metadata:
7
+ author: copilots
8
+ version: "1.0"
9
+ ---
10
+
11
+ This skill operates on `localhost` URLs only. Screenshots, clicks, typing, scrolling, and queries on locally running apps are in scope. External services (github.com, dev.azure.com, npmjs.com, etc.) are out of scope for browser tools.
12
+
13
+ The only exception: when the user selects "Others (Browser)" as their backlog platform during onboarding, the `pc-userstory` skill may navigate to work item URLs the user explicitly provides. That is the sole case where external navigation is permitted, and only to URLs the user explicitly gives you.
14
+
15
+ ## Best-practice workflow
16
+
17
+ 1. Inspect tabs with `browser_get_tabs`
18
+ 2. Open new tabs with `browser_open_tab` when needed
19
+ 3. Navigate with `browser_navigate` if needed
20
+ 4. Wait for UI using `browser_query` with `timeoutMs`
21
+ 5. Discover candidates using `browser_query` with `mode=list`
22
+ 6. Click, type, or select using `index`
23
+ 7. Confirm using `browser_query` or `browser_snapshot`
24
+
25
+ ## CLI-first debugging
26
+
27
+ - List all available tools: `npx @different-ai/opencode-browser@4.6.1 tools`
28
+ - Run one tool directly: `npx @different-ai/opencode-browser@4.6.1 tool browser_status`
29
+ - Pass JSON args: `npx @different-ai/opencode-browser@4.6.1 tool browser_query --args '{"mode":"page_text"}'`
30
+ - Run smoke test: `npx @different-ai/opencode-browser@4.6.1 self-test`
31
+ - After `update`, reload the unpacked extension in `chrome://extensions`
32
+
33
+ ## Selecting options
34
+
35
+ - Use `browser_select` for native `<select>` elements
36
+ - Prefer `value` or `label`; use `optionIndex` when needed
37
+ - Example: `browser_select({ selector: "select", value: "plugin" })`
38
+
39
+ ## Query modes
40
+
41
+ - `text`: read visible text from a matched element
42
+ - `value`: read input values
43
+ - `list`: list many matches with text/metadata
44
+ - `exists`: check presence and count
45
+ - `page_text`: extract visible page text
46
+
47
+ ## Opening tabs
48
+
49
+ - Use `browser_open_tab` to create a new tab, optionally with `url` and `active`
50
+ - Example: `browser_open_tab({ url: "https://example.com", active: false })`
51
+
52
+ ## Troubleshooting
53
+
54
+ - If a selector fails, run `browser_query` with `mode=page_text` to confirm the content exists
55
+ - Use `mode=list` on broad selectors (`button`, `a`, `*[role="button"]`, `*[role="listitem"]`) and choose by index
56
+ - For inbox/chat panes, try text selectors first (`text:Subject line`) then verify selection with `browser_query`
57
+ - For scrollable containers, pass both `selector` and `x`/`y` to `browser_scroll` and then verify `scrollTop`
58
+
59
+ ## Scope
60
+
61
+ - Screenshots of locally running app on `localhost` URLs: in scope
62
+ - Click, type, scroll, query on `localhost` pages: in scope
63
+ - Navigate to work item URLs the user explicitly provides (when backlog platform is "Others (Browser)"): in scope
64
+ - Navigate to external services for non-work-item purposes: out of scope
65
+ - DevOps or GitHub CLI operations via browser tools: out of scope
66
+ - Reading or modifying production systems via browser tools: out of scope
@@ -1,68 +1,68 @@
1
- ---
2
- name: pc-guardrails-generic
3
- description: Generic guardrails, foundational rules that all agents follow. Users add specialized guardrails skills for specific concerns. Covers secrets, code quality, security, tool usage, and engineer workflow.
4
- license: MIT
5
- ---
6
-
7
- ## Transitive loads (optimization skills)
8
-
9
- The marker sections below may contain instructions for selected optimization skills. These are mandatory. If a section says "call `skill("xxx")`", you must call the skill tool with that exact name before doing any work.
10
-
11
- ## Secrets
12
-
13
- - Treat `.env` files as write-only: write to them when configuring, read credentials from the environment or secret store at runtime.
14
- - Keep credentials, API keys, and tokens out of logs and output.
15
- - Stage secrets through environment variables or secret stores, committed only in encrypted or template form.
16
-
17
- ## Code
18
-
19
- - Run tests before marking done.
20
- - Run lint/build before pushing.
21
- - Keep changes small and focused.
22
- - Comments are for WHY, not WHAT. Use them only when the code does something non-obvious or the reason cannot be inferred from context. Keep comment ratio under 10%. If more than 10% of lines in a file are comments, refactor for clarity instead.
23
- - Each file should have one clear responsibility. Split by domain or feature (e.g. `user-constants.ts`, `order-types.ts`, `auth-config.ts`) rather than creating catch-all files like `constants.js`, `types.ts`, `config.js`, or `utils.ts` that collect unrelated things. A file that imports from many unrelated modules is a sign it should be split.
24
-
25
- ## Temporary files
26
-
27
- - Create scratch files only under `$REPO_ROOT/.opencode/.tmp/`; create a task-specific child directory when needed.
28
- - Keep final artifacts in their required repository path. Copy or move a scratch artifact into that path before reporting it.
29
- - Never use operating-system temporary directories or paths outside `$REPO_ROOT`.
30
- - Remove scratch files when the task ends unless they are needed to diagnose a failure.
31
-
32
- ## Security
33
-
34
- - Validate all inputs.
35
- - Escape all outputs.
36
- - Keep credentials in environment variables or secret stores, committed only in encrypted or template form.
37
-
38
- ## Communication
39
-
40
- - Ask for clarification if unclear.
41
- - Report blockers immediately.
42
- - Show progress when asked.
43
-
44
- <!-- PC-GUARDRAILS-RTK-START -->
45
- <!-- PC-GUARDRAILS-RTK-END -->
46
-
47
- <!-- PC-GUARDRAILS-CODEGRAPH-START -->
48
- <!-- PC-GUARDRAILS-CODEGRAPH-END -->
49
-
50
- <!-- PC-GUARDRAILS-MEMORY-START -->
51
- <!-- PC-GUARDRAILS-MEMORY-END -->
52
-
53
- <!-- PC-GUARDRAILS-SIMPLE-ENGLISH-START -->
54
- <!-- PC-GUARDRAILS-SIMPLE-ENGLISH-END -->
55
-
56
- <!-- PC-GUARDRAILS-HUMANIZER-START -->
57
- <!-- PC-GUARDRAILS-HUMANIZER-END -->
58
-
59
- ## Engineer workflow (when spawned)
60
-
61
- When the lead spawns you via the task tool, your assigned task IDs and text are already in your prompt:
62
-
63
- 1. The `pc-system-reminders` plugin has already loaded the skills listed under your `## Abilities`, guardrails first.
64
- 2. Gather context using the project-selected tools described above.
65
- 3. Implement your assigned tasks in dependency order. Edit only files within your assigned scope.
66
- 4. Run the project's tests/lint before marking done (see Code above).
67
- 5. Record the task result through the project-selected workflow.
68
- 6. Return a summary containing: task IDs done, files changed, tests/lint result, and any decisions made. Then you exit; you do not poll, claim, or wait for more work.
1
+ ---
2
+ name: pc-guardrails-generic
3
+ description: Generic guardrails, foundational rules that all agents follow. Users add specialized guardrails skills for specific concerns. Covers secrets, code quality, security, tool usage, and engineer workflow.
4
+ license: MIT
5
+ ---
6
+
7
+ ## Transitive loads (optimization skills)
8
+
9
+ The marker sections below may contain instructions for selected optimization skills. These are mandatory. If a section says "call `skill("xxx")`", you must call the skill tool with that exact name before doing any work.
10
+
11
+ ## Secrets
12
+
13
+ - Treat `.env` files as write-only: write to them when configuring, read credentials from the environment or secret store at runtime.
14
+ - Keep credentials, API keys, and tokens out of logs and output.
15
+ - Stage secrets through environment variables or secret stores, committed only in encrypted or template form.
16
+
17
+ ## Code
18
+
19
+ - Run tests before marking done.
20
+ - Run lint/build before pushing.
21
+ - Keep changes small and focused.
22
+ - Comments are for WHY, not WHAT. Use them only when the code does something non-obvious or the reason cannot be inferred from context. Keep comment ratio under 10%. If more than 10% of lines in a file are comments, refactor for clarity instead.
23
+ - Each file should have one clear responsibility. Split by domain or feature (e.g. `user-constants.ts`, `order-types.ts`, `auth-config.ts`) rather than creating catch-all files like `constants.js`, `types.ts`, `config.js`, or `utils.ts` that collect unrelated things. A file that imports from many unrelated modules is a sign it should be split.
24
+
25
+ ## Temporary files
26
+
27
+ - Create scratch files only under `$REPO_ROOT/.opencode/.tmp/`; create a task-specific child directory when needed.
28
+ - Keep final artifacts in their required repository path. Copy or move a scratch artifact into that path before reporting it.
29
+ - Never use operating-system temporary directories or paths outside `$REPO_ROOT`.
30
+ - Remove scratch files when the task ends unless they are needed to diagnose a failure.
31
+
32
+ ## Security
33
+
34
+ - Validate all inputs.
35
+ - Escape all outputs.
36
+ - Keep credentials in environment variables or secret stores, committed only in encrypted or template form.
37
+
38
+ ## Communication
39
+
40
+ - Ask for clarification if unclear.
41
+ - Report blockers immediately.
42
+ - Show progress when asked.
43
+
44
+ <!-- PC-GUARDRAILS-RTK-START -->
45
+ <!-- PC-GUARDRAILS-RTK-END -->
46
+
47
+ <!-- PC-GUARDRAILS-CODEGRAPH-START -->
48
+ <!-- PC-GUARDRAILS-CODEGRAPH-END -->
49
+
50
+ <!-- PC-GUARDRAILS-MEMORY-START -->
51
+ <!-- PC-GUARDRAILS-MEMORY-END -->
52
+
53
+ <!-- PC-GUARDRAILS-SIMPLE-ENGLISH-START -->
54
+ <!-- PC-GUARDRAILS-SIMPLE-ENGLISH-END -->
55
+
56
+ <!-- PC-GUARDRAILS-HUMANIZER-START -->
57
+ <!-- PC-GUARDRAILS-HUMANIZER-END -->
58
+
59
+ ## Engineer workflow (when spawned)
60
+
61
+ When the lead spawns you via the task tool, your assigned task IDs and text are already in your prompt:
62
+
63
+ 1. The `pc-system-reminders` plugin has already loaded the skills listed under your `## Abilities`, guardrails first.
64
+ 2. Gather context using the project-selected tools described above.
65
+ 3. Implement your assigned tasks in dependency order. Edit only files within your assigned scope.
66
+ 4. Run the project's tests/lint before marking done (see Code above).
67
+ 5. Record the task result through the project-selected workflow.
68
+ 6. Return a summary containing: task IDs done, files changed, tests/lint result, and any decisions made. Then you exit; you do not poll, claim, or wait for more work.
@@ -1,8 +1,8 @@
1
- ---
2
- name: pc-guardrails-project
3
- description: Project-specific guardrails extracted from ARCHITECTURE.md and project config files. Populated by /make-guardrails. Load this skill before implementing any change to understand boundaries, conventions, and constraints for this codebase.
4
- license: MIT
5
- ---
6
-
7
- <!-- This skill is a placeholder until /make-guardrails is run. -->
8
- <!-- /make-guardrails will populate this file with project-specific rules. -->
1
+ ---
2
+ name: pc-guardrails-project
3
+ description: Project-specific guardrails extracted from ARCHITECTURE.md and project config files. Populated by /make-guardrails. Load this skill before implementing any change to understand boundaries, conventions, and constraints for this codebase.
4
+ license: MIT
5
+ ---
6
+
7
+ <!-- This skill is a placeholder until /make-guardrails is run. -->
8
+ <!-- /make-guardrails will populate this file with project-specific rules. -->
@@ -1,51 +1,51 @@
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
- Analyze the architecture of this codebase and generate or update `ARCHITECTURE.md` in the project root.
10
-
11
- ## Steps
12
-
13
- 1. **Check current state**
14
-
15
- Read `ARCHITECTURE.md`. Determine which mode to use:
16
- - Does not exist or is a placeholder (no real content): Generate mode. Create from scratch.
17
- - Exists with content and has a `<!-- Last updated:` footer: Update mode. Incrementally update (see step 2b).
18
- - Exists with content but no timestamp: warn the user, then proceed in Generate mode (full regeneration).
19
-
20
- 2a. **Generate mode: analyze the codebase**
21
-
22
- Read `.opencode/source-roots.json` when present. Only analyze those roots plus this repo's docs/config files.
23
-
24
- Use file tools to discover the architecture: `glob` for folder structure, `grep` for route/model/schema definitions, `read` config files, CI/CD workflows, Dockerfiles, README, changelogs, ADRs.
25
-
26
- 2b. **Update mode: incremental analysis**
27
-
28
- Extract the `<!-- Last updated: <ISO date> -->` timestamp from the existing file. Then:
29
- - Run `git log --oneline --since="<date>" -- <source roots>` to find what changed since the last analysis.
30
- - If nothing changed: report "Architecture unchanged since last update" and stop.
31
- - For each changed area, understand what's affected.
32
- - Update only the affected sections. Preserve manually-added content in unchanged sections.
33
- - If the changes are too pervasive (more than ~40% of sections affected), fall back to Generate mode.
34
-
35
- 3. **Write ARCHITECTURE.md**
36
-
37
- Write (or update) `ARCHITECTURE.md` following the [structure template](structure-template.md) reference. That reference defines every section, the rules for writing, and the timestamp footer format.
38
-
39
- 4. **Store summary in configured persistent context**
40
-
41
- `write_note` MCP tool with title `architecture-summary` containing:
42
- - The ISO timestamp of this run
43
- - A bullet list of top-level components found (every top-level component must appear)
44
- - Any key architectural decisions or risks identified
45
-
46
- 5. **Report**
47
-
48
- Tell the user:
49
- - Whether ARCHITECTURE.md was generated or updated (and which sections changed)
50
- - Top-level components found
51
- - Tip: "Rerun `/make-architecture` any time the architecture changes significantly."
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
+ Analyze the architecture of this codebase and generate or update `ARCHITECTURE.md` in the project root.
10
+
11
+ ## Steps
12
+
13
+ 1. **Check current state**
14
+
15
+ Read `ARCHITECTURE.md`. Determine which mode to use:
16
+ - Does not exist or is a placeholder (no real content): Generate mode. Create from scratch.
17
+ - Exists with content and has a `<!-- Last updated:` footer: Update mode. Incrementally update (see step 2b).
18
+ - Exists with content but no timestamp: warn the user, then proceed in Generate mode (full regeneration).
19
+
20
+ 2a. **Generate mode: analyze the codebase**
21
+
22
+ Read `.opencode/source-roots.json` when present. Only analyze those roots plus this repo's docs/config files.
23
+
24
+ Use file tools to discover the architecture: `glob` for folder structure, `grep` for route/model/schema definitions, `read` config files, CI/CD workflows, Dockerfiles, README, changelogs, ADRs.
25
+
26
+ 2b. **Update mode: incremental analysis**
27
+
28
+ Extract the `<!-- Last updated: <ISO date> -->` timestamp from the existing file. Then:
29
+ - Run `git log --oneline --since="<date>" -- <source roots>` to find what changed since the last analysis.
30
+ - If nothing changed: report "Architecture unchanged since last update" and stop.
31
+ - For each changed area, understand what's affected.
32
+ - Update only the affected sections. Preserve manually-added content in unchanged sections.
33
+ - If the changes are too pervasive (more than ~40% of sections affected), fall back to Generate mode.
34
+
35
+ 3. **Write ARCHITECTURE.md**
36
+
37
+ Write (or update) `ARCHITECTURE.md` following the [structure template](structure-template.md) reference. That reference defines every section, the rules for writing, and the timestamp footer format.
38
+
39
+ 4. **Store summary in configured persistent context**
40
+
41
+ `write_note` MCP tool with title `architecture-summary` containing:
42
+ - The ISO timestamp of this run
43
+ - A bullet list of top-level components found (every top-level component must appear)
44
+ - Any key architectural decisions or risks identified
45
+
46
+ 5. **Report**
47
+
48
+ Tell the user:
49
+ - Whether ARCHITECTURE.md was generated or updated (and which sections changed)
50
+ - Top-level components found
51
+ - Tip: "Rerun `/make-architecture` any time the architecture changes significantly."
@@ -1,38 +1,38 @@
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.
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.
@@ -1,68 +1,68 @@
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
- Analyze the design system of this codebase and generate or update `DESIGN.md` in the project root.
10
-
11
- Reference material:
12
- Overview: https://stitch.withgoogle.com/docs/design-md/overview/
13
- Format: https://stitch.withgoogle.com/docs/design-md/format/
14
- Spec: https://github.com/google-labs-code/design.md
15
-
16
- Examples from the spec repo:
17
- https://github.com/google-labs-code/design.md/blob/main/examples/atmospheric-glass/DESIGN.md
18
- https://github.com/google-labs-code/design.md/blob/main/examples/paws-and-paths/DESIGN.md
19
-
20
- ## Steps
21
-
22
- 1. **Check current state**
23
-
24
- Read `DESIGN.md`. Determine which mode to use:
25
- - Does not exist or is a placeholder (no real content): Generate mode. Create from scratch.
26
- - Exists with content and has a `<!-- Last updated:` footer: Update mode. Incrementally update (see step 2b).
27
- - Exists with content but no timestamp: warn the user, then proceed in Generate mode (full regeneration).
28
-
29
- 2a. **Generate mode: analyze the codebase**
30
-
31
- Read `.opencode/source-roots.json` when present. Only analyze those roots.
32
-
33
- Use file tools to discover the design system: `glob` for CSS files, Tailwind config, PostCSS config, component files, design token definitions (JS/TS/JSON/YAML), theme files, UI framework config (shadcn, MUI, Chakra, etc.).
34
-
35
- 2b. **Update mode: incremental analysis**
36
-
37
- Extract the `<!-- Last updated: <ISO date> -->` timestamp from the existing file. Then:
38
- - Run `git log --oneline --since="<date>" -- <source roots>` to find what changed since the last analysis.
39
- - If nothing changed: report "Design system unchanged since last update" and stop.
40
- - For changed CSS/token/component files, understand what uses them.
41
- - Update only the affected tokens and sections. Preserve manually-added content in unchanged sections.
42
- - If the changes are too pervasive (entire token system replaced), fall back to Generate mode.
43
-
44
- 3. **Write DESIGN.md**
45
-
46
- Write (or update) `DESIGN.md`. The output must:
47
- - Begin with YAML frontmatter containing all structured design tokens (colors, typography, spacing, elevation, motion, radii, shadows, etc.)
48
- - Follow with free-form Markdown describing the look and feel and capturing design intent that token values alone cannot convey
49
- - Be entirely self-contained: reference no files, variables, or paths from the codebase
50
- - Use valid YAML design token format for all token values
51
-
52
- Append at the very end of the file:
53
- ```
54
- <!-- Last updated: <current ISO timestamp> -->
55
- ```
56
-
57
- 4. **Store summary in configured persistent context**
58
-
59
- `write_note` MCP tool with title `design-summary` containing:
60
- - The ISO timestamp of this run
61
- - Key design tokens found (color palette, fonts, spacing scale)
62
-
63
- 5. **Report**
64
-
65
- Tell the user:
66
- - Whether DESIGN.md was generated or updated (and which tokens/sections changed)
67
- - Key design tokens found (color palette, fonts, spacing scale)
68
- - Tip: "Rerun `/make-design` any time your design system changes."
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
+ Analyze the design system of this codebase and generate or update `DESIGN.md` in the project root.
10
+
11
+ Reference material:
12
+ Overview: https://stitch.withgoogle.com/docs/design-md/overview/
13
+ Format: https://stitch.withgoogle.com/docs/design-md/format/
14
+ Spec: https://github.com/google-labs-code/design.md
15
+
16
+ Examples from the spec repo:
17
+ https://github.com/google-labs-code/design.md/blob/main/examples/atmospheric-glass/DESIGN.md
18
+ https://github.com/google-labs-code/design.md/blob/main/examples/paws-and-paths/DESIGN.md
19
+
20
+ ## Steps
21
+
22
+ 1. **Check current state**
23
+
24
+ Read `DESIGN.md`. Determine which mode to use:
25
+ - Does not exist or is a placeholder (no real content): Generate mode. Create from scratch.
26
+ - Exists with content and has a `<!-- Last updated:` footer: Update mode. Incrementally update (see step 2b).
27
+ - Exists with content but no timestamp: warn the user, then proceed in Generate mode (full regeneration).
28
+
29
+ 2a. **Generate mode: analyze the codebase**
30
+
31
+ Read `.opencode/source-roots.json` when present. Only analyze those roots.
32
+
33
+ Use file tools to discover the design system: `glob` for CSS files, Tailwind config, PostCSS config, component files, design token definitions (JS/TS/JSON/YAML), theme files, UI framework config (shadcn, MUI, Chakra, etc.).
34
+
35
+ 2b. **Update mode: incremental analysis**
36
+
37
+ Extract the `<!-- Last updated: <ISO date> -->` timestamp from the existing file. Then:
38
+ - Run `git log --oneline --since="<date>" -- <source roots>` to find what changed since the last analysis.
39
+ - If nothing changed: report "Design system unchanged since last update" and stop.
40
+ - For changed CSS/token/component files, understand what uses them.
41
+ - Update only the affected tokens and sections. Preserve manually-added content in unchanged sections.
42
+ - If the changes are too pervasive (entire token system replaced), fall back to Generate mode.
43
+
44
+ 3. **Write DESIGN.md**
45
+
46
+ Write (or update) `DESIGN.md`. The output must:
47
+ - Begin with YAML frontmatter containing all structured design tokens (colors, typography, spacing, elevation, motion, radii, shadows, etc.)
48
+ - Follow with free-form Markdown describing the look and feel and capturing design intent that token values alone cannot convey
49
+ - Be entirely self-contained: reference no files, variables, or paths from the codebase
50
+ - Use valid YAML design token format for all token values
51
+
52
+ Append at the very end of the file:
53
+ ```
54
+ <!-- Last updated: <current ISO timestamp> -->
55
+ ```
56
+
57
+ 4. **Store summary in configured persistent context**
58
+
59
+ `write_note` MCP tool with title `design-summary` containing:
60
+ - The ISO timestamp of this run
61
+ - Key design tokens found (color palette, fonts, spacing scale)
62
+
63
+ 5. **Report**
64
+
65
+ Tell the user:
66
+ - Whether DESIGN.md was generated or updated (and which tokens/sections changed)
67
+ - Key design tokens found (color palette, fonts, spacing scale)
68
+ - Tip: "Rerun `/make-design` any time your design system changes."