@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,98 +1,98 @@
1
- /** @jsxImportSource @opentui/solid */
2
- import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
3
- import { createSignal, For, Show } from "solid-js"
4
- import { readFile } from "node:fs/promises"
5
- import { join } from "node:path"
6
-
7
- const id = "ob.subagents"
8
-
9
- type Row = { id: string; agent: string; model: string; task: string; status: string }
10
-
11
- // Renders a live "Subagents" panel in the session sidebar.
12
- //
13
- // Server plugins (opencode.json) cannot draw UI, only TUI plugins (tui.json)
14
- // can, via the `sidebar_content` slot. This panel is fed by the
15
- // `.opencode/harness-run.json` state file that the `pc-subagent-monitor` server
16
- // plugin maintains, so the two cooperate: server plugin = data producer,
17
- // this TUI plugin = renderer.
18
- const tui: TuiPlugin = async (api) => {
19
- const statePath = join(process.cwd(), ".opencode", "harness-run.json")
20
- const [rows, setRows] = createSignal<Row[]>([])
21
- // Only show live subagents, finished/failed ones are kept in harness-run.json
22
- // for recovery but are not navigable targets the user cares about here.
23
- // Entries marked stale (left "running" by a crashed process) are not live.
24
- const active = () => rows().filter((r) => r.status === "running")
25
-
26
- const refresh = async () => {
27
- try {
28
- const data = JSON.parse(await readFile(statePath, "utf-8"))
29
- const agents = data?.agents ?? {}
30
- setRows(
31
- Object.entries(agents)
32
- .filter(([, a]: [string, any]) => !a?.stale)
33
- .map(([sid, a]: [string, any]) => ({
34
- id: sid,
35
- agent: a?.agent ?? "?",
36
- model: a?.model ?? "",
37
- task: Array.isArray(a?.tasks) && a.tasks.length ? a.tasks.join(",") : (a?.title ?? ""),
38
- status: a?.status ?? "running",
39
- })),
40
- )
41
- } catch (err: any) {
42
- // Missing file = genuinely idle. Anything else (transient read/parse
43
- // hiccup) keeps the last good rows instead of flashing "idle" mid-run.
44
- if (err?.code === "ENOENT") setRows([])
45
- }
46
- }
47
-
48
- await refresh()
49
- // session.updated fires constantly; debounce so we don't re-read the file
50
- // on every keystroke-sized event.
51
- let timer: ReturnType<typeof setTimeout> | null = null
52
- const scheduleRefresh = () => {
53
- if (timer) return
54
- timer = setTimeout(() => {
55
- timer = null
56
- void refresh()
57
- }, 200)
58
- }
59
- for (const evt of ["session.created", "session.idle", "session.updated"]) {
60
- try {
61
- api.event.on(evt as any, scheduleRefresh)
62
- } catch {
63
- /* event type unavailable on this host, ignore */
64
- }
65
- }
66
-
67
- api.slots.register({
68
- order: 50,
69
- slots: {
70
- sidebar_content() {
71
- return (
72
- <box flexDirection="column">
73
- <text>Subagents</text>
74
- <Show when={active().length === 0}>
75
- <text> idle</text>
76
- </Show>
77
- <For each={active()}>
78
- {(r) => (
79
- <box onMouseUp={() => api.route.navigate("session", { sessionID: r.id })}>
80
- <text>
81
- {"▶ "}
82
- {r.agent}
83
- {r.model ? ` · ${r.model}` : ""}
84
- {r.task ? `, ${r.task}` : ""}
85
- </text>
86
- </box>
87
- )}
88
- </For>
89
- </box>
90
- )
91
- },
92
- },
93
- })
94
- }
95
-
96
- const pluginModule: TuiPluginModule & { id: string } = { id, tui }
97
-
98
- export default pluginModule
1
+ /** @jsxImportSource @opentui/solid */
2
+ import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
3
+ import { createSignal, For, Show } from "solid-js"
4
+ import { readFile } from "node:fs/promises"
5
+ import { join } from "node:path"
6
+
7
+ const id = "ob.subagents"
8
+
9
+ type Row = { id: string; agent: string; model: string; task: string; status: string }
10
+
11
+ // Renders a live "Subagents" panel in the session sidebar.
12
+ //
13
+ // Server plugins (opencode.json) cannot draw UI, only TUI plugins (tui.json)
14
+ // can, via the `sidebar_content` slot. This panel is fed by the
15
+ // `.opencode/harness-run.json` state file that the `pc-subagent-monitor` server
16
+ // plugin maintains, so the two cooperate: server plugin = data producer,
17
+ // this TUI plugin = renderer.
18
+ const tui: TuiPlugin = async (api) => {
19
+ const statePath = join(process.cwd(), ".opencode", "harness-run.json")
20
+ const [rows, setRows] = createSignal<Row[]>([])
21
+ // Only show live subagents, finished/failed ones are kept in harness-run.json
22
+ // for recovery but are not navigable targets the user cares about here.
23
+ // Entries marked stale (left "running" by a crashed process) are not live.
24
+ const active = () => rows().filter((r) => r.status === "running")
25
+
26
+ const refresh = async () => {
27
+ try {
28
+ const data = JSON.parse(await readFile(statePath, "utf-8"))
29
+ const agents = data?.agents ?? {}
30
+ setRows(
31
+ Object.entries(agents)
32
+ .filter(([, a]: [string, any]) => !a?.stale)
33
+ .map(([sid, a]: [string, any]) => ({
34
+ id: sid,
35
+ agent: a?.agent ?? "?",
36
+ model: a?.model ?? "",
37
+ task: Array.isArray(a?.tasks) && a.tasks.length ? a.tasks.join(",") : (a?.title ?? ""),
38
+ status: a?.status ?? "running",
39
+ })),
40
+ )
41
+ } catch (err: any) {
42
+ // Missing file = genuinely idle. Anything else (transient read/parse
43
+ // hiccup) keeps the last good rows instead of flashing "idle" mid-run.
44
+ if (err?.code === "ENOENT") setRows([])
45
+ }
46
+ }
47
+
48
+ await refresh()
49
+ // session.updated fires constantly; debounce so we don't re-read the file
50
+ // on every keystroke-sized event.
51
+ let timer: ReturnType<typeof setTimeout> | null = null
52
+ const scheduleRefresh = () => {
53
+ if (timer) return
54
+ timer = setTimeout(() => {
55
+ timer = null
56
+ void refresh()
57
+ }, 200)
58
+ }
59
+ for (const evt of ["session.created", "session.idle", "session.updated"]) {
60
+ try {
61
+ api.event.on(evt as any, scheduleRefresh)
62
+ } catch {
63
+ /* event type unavailable on this host, ignore */
64
+ }
65
+ }
66
+
67
+ api.slots.register({
68
+ order: 50,
69
+ slots: {
70
+ sidebar_content() {
71
+ return (
72
+ <box flexDirection="column">
73
+ <text>Subagents</text>
74
+ <Show when={active().length === 0}>
75
+ <text> idle</text>
76
+ </Show>
77
+ <For each={active()}>
78
+ {(r) => (
79
+ <box onMouseUp={() => api.route.navigate("session", { sessionID: r.id })}>
80
+ <text>
81
+ {"▶ "}
82
+ {r.agent}
83
+ {r.model ? ` · ${r.model}` : ""}
84
+ {r.task ? `, ${r.task}` : ""}
85
+ </text>
86
+ </box>
87
+ )}
88
+ </For>
89
+ </box>
90
+ )
91
+ },
92
+ },
93
+ })
94
+ }
95
+
96
+ const pluginModule: TuiPluginModule & { id: string } = { id, tui }
97
+
98
+ export default pluginModule
@@ -1,6 +1,6 @@
1
- {
2
- "$schema": "https://opencode.ai/tui.json",
3
- "plugin": [
4
- "./tui/pc-subagents.tsx"
5
- ]
6
- }
1
+ {
2
+ "$schema": "https://opencode.ai/tui.json",
3
+ "plugin": [
4
+ "./tui/pc-subagents.tsx"
5
+ ]
6
+ }
@@ -1,71 +1,71 @@
1
- # AGENTS.md
2
-
3
- <!-- PC-NOT-INITIALIZED -->
4
-
5
- # Agent operating guide
6
-
7
- This guide defines the common operating contract for AI agents in this repository.
8
- It is agent-agnostic and works with OpenCode, Claude Code, Codex, Gemini, and other agents.
9
-
10
- ## Purpose and scope
11
-
12
- Use this file for repository-wide workflow rules. Keep product architecture, security constraints, and design rules in their source documents rather than duplicating them here.
13
-
14
- ## Session context
15
-
16
- Before a non-trivial change, read these documents in order:
17
-
18
- 1. `AGENTS.md` for workflow and repository rules.
19
- 2. `ARCHITECTURE.md` for boundaries, dependencies, and component interactions.
20
- 3. `DESIGN.md` for UI and design-system work.
21
- 4. The active OpenSpec change or the relevant specification for the area being changed.
22
-
23
- Read each document once per session unless it changes or the task moves into a different area.
24
-
25
- Command aliases: OpenSpec skills may reference `/opsx-propose`, `/opsx-apply`, `/opsx-archive`, or `/opsx-explore`. Always substitute them with the `pc-plan-propose`, `pc-plan-apply`, `pc-plan-archive`, and `pc-plan-explore` skills respectively. User-facing command names are `/plan-propose`, `/plan-apply`, `/plan-archive`, and `/plan-explore`. Never mention the `opsx-` names to the user.
26
-
27
- ## Workflow ownership
28
-
29
- <!-- PC-PLATFORM-WORKFLOW-START -->
30
- <!-- PC-PLATFORM-WORKFLOW-END -->
31
-
32
- ## Planning and execution
33
-
34
- - Plan before delegating work. Use OpenSpec when the change needs explicit scope, decisions, or sequenced tasks.
35
- - Keep changes focused. Do not combine unrelated refactors with requested work.
36
- - Do not guess when requirements, architecture, or security constraints are unclear. Ask before proceeding.
37
- - Prefer the project's established patterns and source documents over introducing new conventions.
38
-
39
- ## Engineer selection
40
-
41
- Inspect `.opencode/agents/*.md` before spawning. Prefer the most specialized custom engineer. `fullstack-engineer` is `mode: primary`, the planning agent, and is not a spawned worker. If no specialist matches, tell the user to create one with `/make-engineer`. Spawn only engineers present in that directory.
42
-
43
- The `pc-plan-apply` skill is authoritative for subagent waves, dependency ordering, retries, and concurrency. Read `agents.maxConcurrent` from `.opencode/harness.json` before spawning workers.
44
-
45
- ## Tool and repository safety
46
-
47
- - Never expose or commit secrets, credentials, tokens, or production data.
48
- - Read before editing. Respect repository ownership, generated files, and existing local changes.
49
- - Run only commands appropriate to the task. Do not bypass checks, weaken tests, or silence lint rules to get a green result.
50
- - Commit, push, create pull requests, alter dependencies, or change deployment configuration only with the user's explicit approval and the repository's stated process.
51
-
52
- ## Verification and completion
53
-
54
- - Run the applicable tests, lint, typecheck, and build before reporting completion.
55
- - A bug fix needs a test that would have caught the defect when practical.
56
- - Update specifications, architecture, or design documentation when the change makes their current statements inaccurate.
57
- - Report changed files, checks run, and any remaining risk or follow-up work.
58
-
59
- ## Communication
60
-
61
- - Keep updates concise and factual.
62
- - State blockers early and explain the decision needed.
63
- - Use the repository's language and writing conventions for source, documentation, issues, commits, and pull requests.
64
- - Comments explain non-obvious reasons, constraints, or invariants. Do not add comments that restate code.
65
-
66
- ## Skills
67
-
68
- Skills live in `.agents/skills/`. Always installed: `@pc-guardrails-generic`, `@pc-guardrails-project`, and `@browser-automation`. The always-installed `pc-system-reminders` plugin loads each agent's `## Abilities` before work, guardrails first. Skills can require mandatory transitive loads. Keep `## Abilities` complete and do not treat entries as passive references.
69
-
70
- <!-- PC-PLATFORM-SKILLS-GUIDE-START -->
71
- <!-- PC-PLATFORM-SKILLS-GUIDE-END -->
1
+ # AGENTS.md
2
+
3
+ <!-- PC-NOT-INITIALIZED -->
4
+
5
+ # Agent operating guide
6
+
7
+ This guide defines the common operating contract for AI agents in this repository.
8
+ It is agent-agnostic and works with OpenCode, Claude Code, Codex, Gemini, and other agents.
9
+
10
+ ## Purpose and scope
11
+
12
+ Use this file for repository-wide workflow rules. Keep product architecture, security constraints, and design rules in their source documents rather than duplicating them here.
13
+
14
+ ## Session context
15
+
16
+ Before a non-trivial change, read these documents in order:
17
+
18
+ 1. `AGENTS.md` for workflow and repository rules.
19
+ 2. `ARCHITECTURE.md` for boundaries, dependencies, and component interactions.
20
+ 3. `DESIGN.md` for UI and design-system work.
21
+ 4. The active OpenSpec change or the relevant specification for the area being changed.
22
+
23
+ Read each document once per session unless it changes or the task moves into a different area.
24
+
25
+ Command aliases: OpenSpec skills may reference `/opsx-propose`, `/opsx-apply`, `/opsx-archive`, or `/opsx-explore`. Always substitute them with the `pc-plan-propose`, `pc-plan-apply`, `pc-plan-archive`, and `pc-plan-explore` skills respectively. User-facing command names are `/plan-propose`, `/plan-apply`, `/plan-archive`, and `/plan-explore`. Never mention the `opsx-` names to the user.
26
+
27
+ ## Workflow ownership
28
+
29
+ <!-- PC-PLATFORM-WORKFLOW-START -->
30
+ <!-- PC-PLATFORM-WORKFLOW-END -->
31
+
32
+ ## Planning and execution
33
+
34
+ - Plan before delegating work. Use OpenSpec when the change needs explicit scope, decisions, or sequenced tasks.
35
+ - Keep changes focused. Do not combine unrelated refactors with requested work.
36
+ - Do not guess when requirements, architecture, or security constraints are unclear. Ask before proceeding.
37
+ - Prefer the project's established patterns and source documents over introducing new conventions.
38
+
39
+ ## Engineer selection
40
+
41
+ Inspect `.opencode/agents/*.md` before spawning. Prefer the most specialized custom engineer. `fullstack-engineer` is `mode: primary`, the planning agent, and is not a spawned worker. If no specialist matches, tell the user to create one with `/make-engineer`. Spawn only engineers present in that directory.
42
+
43
+ The `pc-plan-apply` skill is authoritative for subagent waves, dependency ordering, retries, and concurrency. Read `agents.maxConcurrent` from `.opencode/harness.json` before spawning workers.
44
+
45
+ ## Tool and repository safety
46
+
47
+ - Never expose or commit secrets, credentials, tokens, or production data.
48
+ - Read before editing. Respect repository ownership, generated files, and existing local changes.
49
+ - Run only commands appropriate to the task. Do not bypass checks, weaken tests, or silence lint rules to get a green result.
50
+ - Commit, push, create pull requests, alter dependencies, or change deployment configuration only with the user's explicit approval and the repository's stated process.
51
+
52
+ ## Verification and completion
53
+
54
+ - Run the applicable tests, lint, typecheck, and build before reporting completion.
55
+ - A bug fix needs a test that would have caught the defect when practical.
56
+ - Update specifications, architecture, or design documentation when the change makes their current statements inaccurate.
57
+ - Report changed files, checks run, and any remaining risk or follow-up work.
58
+
59
+ ## Communication
60
+
61
+ - Keep updates concise and factual.
62
+ - State blockers early and explain the decision needed.
63
+ - Use the repository's language and writing conventions for source, documentation, issues, commits, and pull requests.
64
+ - Comments explain non-obvious reasons, constraints, or invariants. Do not add comments that restate code.
65
+
66
+ ## Skills
67
+
68
+ Skills live in `.agents/skills/`. Always installed: `@pc-guardrails-generic`, `@pc-guardrails-project`, and `@browser-automation`. The always-installed `pc-system-reminders` plugin loads each agent's `## Abilities` before work, guardrails first. Skills can require mandatory transitive loads. Keep `## Abilities` complete and do not treat entries as passive references.
69
+
70
+ <!-- PC-PLATFORM-SKILLS-GUIDE-START -->
71
+ <!-- PC-PLATFORM-SKILLS-GUIDE-END -->
@@ -1,95 +1,95 @@
1
- 2. **Find the oldest change with a completed PR**
2
-
3
- List unarchived changes (top-level only, excludes `archive/`):
4
-
5
- ```bash
6
- find "$REPO_ROOT/openspec/changes" -mindepth 1 -maxdepth 1 -type d -not -name 'archive' | sort
7
- ```
8
-
9
- If empty, report a blocker and stop.
10
-
11
- List completed PRs:
12
-
13
- ```bash
14
- az repos pr list --repository {repo} --status completed --query "sort_by(@, &closedDate)[].{name:title,sourceRefName:sourceRefName,closedDate:closedDate,pullRequestId:pullRequestId}"
15
- ```
16
-
17
- Match each change to a completed PR using its ID and slug as search hints:
18
- - No match → skip (record as blocked: `no merged PR found`).
19
- - One match → eligible.
20
- - Multiple matches → ask the user which PR belongs to that change.
21
-
22
- If nothing is eligible, report a blocker and stop. Otherwise select the eligible change with the **oldest** PR `closedDate` as the candidate.
23
-
24
- 3. **Confirm the candidate**
25
-
26
- Show the candidate (ID, title, PR ID, merged date) and any blocked changes, then ask:
27
-
28
- ```text
29
- Oldest unarchived merged change found:
30
- ID: {change-id}
31
- Title: {title from resolved PR}
32
- PR ID: {pullRequestId}
33
- Merged: {closedDate}
34
-
35
- Proceed with archiving? [yes/no]
36
- ```
37
-
38
- Stop if the user does not confirm.
39
-
40
- 4. **Archive the change**
41
-
42
- ```bash
43
- git checkout -b archive/{change-id}
44
- ```
45
-
46
- Load `@openspec-archive-change` skill and follow it to archive the change.
47
-
48
- 5. **Update docs**
49
-
50
- Compare the archived change's specs against `ARCHITECTURE.md` and `DESIGN.md`. If updates are needed, show them and get user approval before applying.
51
-
52
- 6. **Create the archive PR**
53
-
54
- ```bash
55
- git add -A
56
- git commit -m "archive: {title} ({change-id})"
57
- git push origin archive/{change-id}
58
-
59
- az repos pr create \
60
- --repository {repo} \
61
- --source-branch refs/heads/archive/{change-id} \
62
- --target-branch "refs/heads/$DEFAULT_BRANCH" \
63
- --title "archive: {title} ({change-id})" \
64
- --description "Archive SDD artifacts for {change-id} after merge of {sourceRefName}." \
65
- --auto-complete
66
- ```
67
-
68
- If work was stashed in step 1, restore it after the PR is created unless the user opts out.
69
-
70
- 7. **Report**
71
-
72
- Display:
73
-
74
- ```text
75
- Archive complete
76
-
77
- Change ID: {change-id}
78
- Title: {title}
79
- Original PR: {original-pr-link}
80
- Archive PR: {archive-pr-link}
81
-
82
- Documentation updates:
83
- - ARCHITECTURE.md: {count} changes applied
84
- - DESIGN.md: {count} changes applied
85
- ```
86
-
87
- ## Rules
88
-
89
- - All OpenSpec paths resolve from `git rev-parse --show-toplevel`. Never use `/openspec/...`.
90
- - Only process top-level directories in `$REPO_ROOT/openspec/changes/`; exclude `archive/`.
91
- - Use change ID and slug only as search hints; do not assume the source branch name.
92
- - The oldest eligible merged change is the only candidate: never ask the user which change to archive (but do ask which PR if multiple match one change).
93
- - Never proceed if the selected PR is not completed.
94
- - Never use browser tools or direct web requests for Azure DevOps. Use `az` CLI only.
95
- - Never invent or guess PR, branch, or merge metadata.
1
+ 2. **Find the oldest change with a completed PR**
2
+
3
+ List unarchived changes (top-level only, excludes `archive/`):
4
+
5
+ ```bash
6
+ find "$REPO_ROOT/openspec/changes" -mindepth 1 -maxdepth 1 -type d -not -name 'archive' | sort
7
+ ```
8
+
9
+ If empty, report a blocker and stop.
10
+
11
+ List completed PRs:
12
+
13
+ ```bash
14
+ az repos pr list --repository {repo} --status completed --query "sort_by(@, &closedDate)[].{name:title,sourceRefName:sourceRefName,closedDate:closedDate,pullRequestId:pullRequestId}"
15
+ ```
16
+
17
+ Match each change to a completed PR using its ID and slug as search hints:
18
+ - No match → skip (record as blocked: `no merged PR found`).
19
+ - One match → eligible.
20
+ - Multiple matches → ask the user which PR belongs to that change.
21
+
22
+ If nothing is eligible, report a blocker and stop. Otherwise select the eligible change with the **oldest** PR `closedDate` as the candidate.
23
+
24
+ 3. **Confirm the candidate**
25
+
26
+ Show the candidate (ID, title, PR ID, merged date) and any blocked changes, then ask:
27
+
28
+ ```text
29
+ Oldest unarchived merged change found:
30
+ ID: {change-id}
31
+ Title: {title from resolved PR}
32
+ PR ID: {pullRequestId}
33
+ Merged: {closedDate}
34
+
35
+ Proceed with archiving? [yes/no]
36
+ ```
37
+
38
+ Stop if the user does not confirm.
39
+
40
+ 4. **Archive the change**
41
+
42
+ ```bash
43
+ git checkout -b archive/{change-id}
44
+ ```
45
+
46
+ Load `@openspec-archive-change` skill and follow it to archive the change.
47
+
48
+ 5. **Update docs**
49
+
50
+ Compare the archived change's specs against `ARCHITECTURE.md` and `DESIGN.md`. If updates are needed, show them and get user approval before applying.
51
+
52
+ 6. **Create the archive PR**
53
+
54
+ ```bash
55
+ git add -A
56
+ git commit -m "archive: {title} ({change-id})"
57
+ git push origin archive/{change-id}
58
+
59
+ az repos pr create \
60
+ --repository {repo} \
61
+ --source-branch refs/heads/archive/{change-id} \
62
+ --target-branch "refs/heads/$DEFAULT_BRANCH" \
63
+ --title "archive: {title} ({change-id})" \
64
+ --description "Archive SDD artifacts for {change-id} after merge of {sourceRefName}." \
65
+ --auto-complete
66
+ ```
67
+
68
+ If work was stashed in step 1, restore it after the PR is created unless the user opts out.
69
+
70
+ 7. **Report**
71
+
72
+ Display:
73
+
74
+ ```text
75
+ Archive complete
76
+
77
+ Change ID: {change-id}
78
+ Title: {title}
79
+ Original PR: {original-pr-link}
80
+ Archive PR: {archive-pr-link}
81
+
82
+ Documentation updates:
83
+ - ARCHITECTURE.md: {count} changes applied
84
+ - DESIGN.md: {count} changes applied
85
+ ```
86
+
87
+ ## Rules
88
+
89
+ - All OpenSpec paths resolve from `git rev-parse --show-toplevel`. Never use `/openspec/...`.
90
+ - Only process top-level directories in `$REPO_ROOT/openspec/changes/`; exclude `archive/`.
91
+ - Use change ID and slug only as search hints; do not assume the source branch name.
92
+ - The oldest eligible merged change is the only candidate: never ask the user which change to archive (but do ask which PR if multiple match one change).
93
+ - Never proceed if the selected PR is not completed.
94
+ - Never use browser tools or direct web requests for Azure DevOps. Use `az` CLI only.
95
+ - Never invent or guess PR, branch, or merge metadata.