@plainconceptsplatform/agent-harness 3.1.1 → 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.
Files changed (64) hide show
  1. package/README.md +452 -434
  2. package/cli/commands/update.js +121 -121
  3. package/cli/fragments/archive/az.md +97 -97
  4. package/cli/fragments/archive/gh.md +96 -96
  5. package/cli/fragments/archive/gl.md +96 -96
  6. package/cli/fragments/archive/none.md +75 -75
  7. package/cli/fragments/guardrails/codegraph.md +5 -5
  8. package/cli/fragments/guardrails/humanizer.md +4 -4
  9. package/cli/fragments/guardrails/memory.md +4 -4
  10. package/cli/fragments/guardrails/rtk.md +3 -3
  11. package/cli/fragments/guardrails/simple-english.md +4 -4
  12. package/cli/fragments/ops-ship/az.md +81 -81
  13. package/cli/presets/agents-content.json +34 -34
  14. package/cli/presets/browser.json +10 -10
  15. package/cli/steps/browser/index.js +48 -48
  16. package/cli/steps/copy/commands.js +79 -79
  17. package/cli/steps/copy/index.js +88 -88
  18. package/cli/steps/copy/skills.js +307 -307
  19. package/cli/steps/metadata/index.js +115 -115
  20. package/cli/steps/models/write.js +38 -38
  21. package/cli/utils/copy.js +5 -2
  22. package/cli/utils/paths.js +80 -80
  23. package/harness/.opencode/_gitignore +9 -9
  24. package/harness/.opencode/commands/init.md +5 -5
  25. package/harness/.opencode/commands/make-architecture.md +5 -5
  26. package/harness/.opencode/commands/make-design.md +5 -5
  27. package/harness/.opencode/commands/make-engineer.md +5 -5
  28. package/harness/.opencode/commands/make-guardrails.md +5 -5
  29. package/harness/.opencode/commands/make-user-model.md +5 -5
  30. package/harness/.opencode/commands/plan-apply.md +9 -9
  31. package/harness/.opencode/commands/plan-goal.md +5 -5
  32. package/harness/.opencode/commands/plan-quick.md +5 -5
  33. package/harness/.opencode/commands/plan-story.md +9 -9
  34. package/harness/.opencode/commands/repo-audit.md +5 -5
  35. package/harness/.opencode/commands/repo-initialize.md +5 -5
  36. package/harness/.opencode/commands/repo-onboard.md +5 -5
  37. package/harness/.opencode/commands/repo-verify.md +5 -5
  38. package/harness/.opencode/scripts/check-diff.mjs +225 -0
  39. package/harness/.opencode/scripts/code-rules.mjs +280 -0
  40. package/harness/AGENTS.md +49 -49
  41. package/package.json +1 -1
  42. package/skills/README.md +18 -18
  43. package/skills/browser-automation/SKILL.md +72 -72
  44. package/skills/pc-guardrails-generic/SKILL.md +2 -1
  45. package/skills/pc-make-architecture/SKILL.md +32 -32
  46. package/skills/pc-make-design/SKILL.md +45 -45
  47. package/skills/pc-make-engineer/signal-mapping.md +53 -53
  48. package/skills/pc-make-guardrails/SKILL.md +44 -44
  49. package/skills/pc-make-user-model/SKILL.md +56 -56
  50. package/skills/pc-plan-apply/SKILL.md +1 -1
  51. package/skills/pc-plan-apply/simple-mode.md +21 -21
  52. package/skills/pc-plan-archive/SKILL.md +66 -66
  53. package/skills/pc-plan-goal/branching.md +39 -39
  54. package/skills/pc-plan-goal/output.md +71 -71
  55. package/skills/pc-plan-quick/SKILL.md +46 -46
  56. package/skills/pc-plan-story/SKILL.md +93 -93
  57. package/skills/pc-repo-help/SKILL.md +87 -87
  58. package/skills/pc-repo-initialize/SKILL.md +119 -119
  59. package/skills/pc-repo-onboard/SKILL.md +32 -32
  60. package/skills/pc-repo-verify/SKILL.md +150 -150
  61. package/skills/pc-userstory-az/SKILL.md +71 -71
  62. package/skills/pc-userstory-browser/SKILL.md +64 -64
  63. package/skills/pc-userstory-gh/SKILL.md +63 -63
  64. package/skills/pc-userstory-jira/SKILL.md +74 -74
@@ -1,115 +1,115 @@
1
- import { execa } from 'execa'
2
- import fse from 'fs-extra'
3
- import path from 'path'
4
- import { createRequire } from 'node:module'
5
- import { header, success, warn } from '../../utils/exec.js'
6
- import { configPath } from '../../utils/paths.js'
7
-
8
- const require = createRequire(import.meta.url)
9
- const { version: harnessVersion } = require('../../../package.json')
10
-
11
- function clampConcurrency(n) {
12
- const v = Number(n)
13
- if (!Number.isFinite(v)) return 3
14
- return Math.min(5, Math.max(1, Math.round(v)))
15
- }
16
-
17
- async function detectOpencodeVersion() {
18
- try {
19
- const result = await execa('opencode', ['--version'], { reject: false })
20
- if (result.exitCode !== 0) return null
21
- // `opencode --version` prints "opencode v2.0.22" on some builds and "2.0.22" on others;
22
- // record the bare version so the field does not churn between machines.
23
- const output = (result.stdout || result.stderr || '').trim()
24
- return output.match(/\d+\.\d+\.\d+[\w.-]*/)?.[0] ?? (output || null)
25
- } catch {
26
- return null
27
- }
28
- }
29
-
30
- export async function writeHarnessConfig(data) {
31
- header('Step 10, Writing onboarding metadata')
32
-
33
- const opencodeVersion = await detectOpencodeVersion()
34
- const cwd = data.cwd ?? process.cwd()
35
- const target = configPath(cwd)
36
-
37
- // Read the existing file so load-bearing config (models, maxConcurrent)
38
- // is preserved across metadata refreshes when not explicitly provided.
39
- const existing = await fse.readJson(target).catch(() => null)
40
-
41
- const selectedModels = Object.fromEntries(
42
- Object.entries({
43
- plan: data.planModel,
44
- build: data.buildModel,
45
- fast: data.fastModel,
46
- }).filter(([, value]) => value)
47
- )
48
- const models = Object.keys(selectedModels).length > 0
49
- ? { ...existing?.models, ...selectedModels }
50
- : existing?.models ?? null
51
- const maxConcurrent = clampConcurrency(data.maxConcurrentAgents ?? existing?.agents?.maxConcurrent ?? 3)
52
-
53
- const optionalTools = data.optionalTools ?? existing?.tools ?? {}
54
- const { caveman: _caveman, ...existingTools } = existing?.tools ?? {}
55
- const tools = {
56
- rtk: !!(optionalTools.rtk?.optedIn ?? optionalTools.rtk),
57
- quota: !!(optionalTools.quota?.optedIn ?? optionalTools.quota),
58
- simpleEnglish: !!(
59
- optionalTools.simpleEnglish?.optedIn ?? optionalTools.simpleEnglish ??
60
- optionalTools.caveman?.optedIn ?? optionalTools.caveman
61
- ),
62
- codegraph: !!(optionalTools.codegraph?.optedIn ?? optionalTools.codegraph),
63
- memory: !!(optionalTools.memory?.optedIn ?? optionalTools.memory),
64
- // humanizer was missing here, so a selection never survived a metadata
65
- // write and patchGuardrails always saw it as off, leaving its marker
66
- // section empty however the project was actually set up.
67
- humanizer: !!(optionalTools.humanizer?.optedIn ?? optionalTools.humanizer),
68
- }
69
-
70
- const payload = {
71
- ...existing,
72
- // Never lower a schema version a repository already records.
73
- version: Math.max(2, Number(existing?.version) || 0),
74
- generatedAt: new Date().toISOString(),
75
- harnessVersion,
76
- opencodeVersion,
77
-
78
- platform: {
79
- ...existing?.platform,
80
- backlog: data.backlogPlatform ?? 'none',
81
- repo: data.repoPlatform ?? 'none',
82
- },
83
-
84
- ...(models ? { models } : {}),
85
-
86
- agents: {
87
- ...existing?.agents,
88
- maxConcurrent,
89
- },
90
-
91
- source: {
92
- ...existing?.source,
93
- mode: data.sourceMode ?? 'current',
94
- roots: data.sourceRoots ?? [],
95
- },
96
-
97
- tools: { ...existingTools, ...tools },
98
-
99
- preexisting: {
100
- ...existing?.preexisting,
101
- design: !!data.hasDesign,
102
- architecture: !!data.hasArchitecture,
103
- openspec: !!data.hasOpenspec,
104
- },
105
- }
106
-
107
- try {
108
- await fse.ensureDir(path.dirname(target))
109
- await fse.writeJson(target, payload, { spaces: 2 })
110
- success('Wrote .opencode/harness.json')
111
- if (!opencodeVersion) warn('Could not detect opencode version, saved as null')
112
- } catch (err) {
113
- warn(`Could not write onboarding metadata: ${err.message}`)
114
- }
115
- }
1
+ import { execa } from 'execa'
2
+ import fse from 'fs-extra'
3
+ import path from 'path'
4
+ import { createRequire } from 'node:module'
5
+ import { header, success, warn } from '../../utils/exec.js'
6
+ import { configPath } from '../../utils/paths.js'
7
+
8
+ const require = createRequire(import.meta.url)
9
+ const { version: harnessVersion } = require('../../../package.json')
10
+
11
+ function clampConcurrency(n) {
12
+ const v = Number(n)
13
+ if (!Number.isFinite(v)) return 3
14
+ return Math.min(5, Math.max(1, Math.round(v)))
15
+ }
16
+
17
+ async function detectOpencodeVersion() {
18
+ try {
19
+ const result = await execa('opencode', ['--version'], { reject: false })
20
+ if (result.exitCode !== 0) return null
21
+ // `opencode --version` prints "opencode v2.0.22" on some builds and "2.0.22" on others;
22
+ // record the bare version so the field does not churn between machines.
23
+ const output = (result.stdout || result.stderr || '').trim()
24
+ return output.match(/\d+\.\d+\.\d+[\w.-]*/)?.[0] ?? (output || null)
25
+ } catch {
26
+ return null
27
+ }
28
+ }
29
+
30
+ export async function writeHarnessConfig(data) {
31
+ header('Step 10, Writing onboarding metadata')
32
+
33
+ const opencodeVersion = await detectOpencodeVersion()
34
+ const cwd = data.cwd ?? process.cwd()
35
+ const target = configPath(cwd)
36
+
37
+ // Read the existing file so load-bearing config (models, maxConcurrent)
38
+ // is preserved across metadata refreshes when not explicitly provided.
39
+ const existing = await fse.readJson(target).catch(() => null)
40
+
41
+ const selectedModels = Object.fromEntries(
42
+ Object.entries({
43
+ plan: data.planModel,
44
+ build: data.buildModel,
45
+ fast: data.fastModel,
46
+ }).filter(([, value]) => value)
47
+ )
48
+ const models = Object.keys(selectedModels).length > 0
49
+ ? { ...existing?.models, ...selectedModels }
50
+ : existing?.models ?? null
51
+ const maxConcurrent = clampConcurrency(data.maxConcurrentAgents ?? existing?.agents?.maxConcurrent ?? 3)
52
+
53
+ const optionalTools = data.optionalTools ?? existing?.tools ?? {}
54
+ const { caveman: _caveman, ...existingTools } = existing?.tools ?? {}
55
+ const tools = {
56
+ rtk: !!(optionalTools.rtk?.optedIn ?? optionalTools.rtk),
57
+ quota: !!(optionalTools.quota?.optedIn ?? optionalTools.quota),
58
+ simpleEnglish: !!(
59
+ optionalTools.simpleEnglish?.optedIn ?? optionalTools.simpleEnglish ??
60
+ optionalTools.caveman?.optedIn ?? optionalTools.caveman
61
+ ),
62
+ codegraph: !!(optionalTools.codegraph?.optedIn ?? optionalTools.codegraph),
63
+ memory: !!(optionalTools.memory?.optedIn ?? optionalTools.memory),
64
+ // humanizer was missing here, so a selection never survived a metadata
65
+ // write and patchGuardrails always saw it as off, leaving its marker
66
+ // section empty however the project was actually set up.
67
+ humanizer: !!(optionalTools.humanizer?.optedIn ?? optionalTools.humanizer),
68
+ }
69
+
70
+ const payload = {
71
+ ...existing,
72
+ // Never lower a schema version a repository already records.
73
+ version: Math.max(2, Number(existing?.version) || 0),
74
+ generatedAt: new Date().toISOString(),
75
+ harnessVersion,
76
+ opencodeVersion,
77
+
78
+ platform: {
79
+ ...existing?.platform,
80
+ backlog: data.backlogPlatform ?? 'none',
81
+ repo: data.repoPlatform ?? 'none',
82
+ },
83
+
84
+ ...(models ? { models } : {}),
85
+
86
+ agents: {
87
+ ...existing?.agents,
88
+ maxConcurrent,
89
+ },
90
+
91
+ source: {
92
+ ...existing?.source,
93
+ mode: data.sourceMode ?? 'current',
94
+ roots: data.sourceRoots ?? [],
95
+ },
96
+
97
+ tools: { ...existingTools, ...tools },
98
+
99
+ preexisting: {
100
+ ...existing?.preexisting,
101
+ design: !!data.hasDesign,
102
+ architecture: !!data.hasArchitecture,
103
+ openspec: !!data.hasOpenspec,
104
+ },
105
+ }
106
+
107
+ try {
108
+ await fse.ensureDir(path.dirname(target))
109
+ await fse.writeJson(target, payload, { spaces: 2 })
110
+ success('Wrote .opencode/harness.json')
111
+ if (!opencodeVersion) warn('Could not detect opencode version, saved as null')
112
+ } catch (err) {
113
+ warn(`Could not write onboarding metadata: ${err.message}`)
114
+ }
115
+ }
@@ -1,38 +1,38 @@
1
- import fse from 'fs-extra'
2
- import { applyEdits, modify, parse } from 'jsonc-parser'
3
- import path from 'path'
4
- import { success, warn } from '../../utils/exec.js'
5
-
6
- /**
7
- * Writes the selected build model as the default model in opencode.jsonc.
8
- * Per-tier models (plan/build/fast) are recorded in harness.json (models)
9
- * by the metadata step, then consumed by the agent-variant generator and /plan-apply.
10
- *
11
- * opencode tolerates JSONC (comments, trailing commas) in its config, so this
12
- * must not use readJson/writeJson: a strict parse crashes on valid configs and
13
- * a strict rewrite deletes user comments. jsonc-parser edits only the `model`
14
- * key and preserves the rest of the file byte-for-byte.
15
- */
16
- export async function writeModelsToConfigs({ buildModel, keepExisting = false, cwd = process.cwd() }) {
17
- const opencodeJsonPath = path.join(cwd, 'opencode.jsonc')
18
- if (!await fse.pathExists(opencodeJsonPath)) return
19
-
20
- const text = await fse.readFile(opencodeJsonPath, 'utf-8')
21
- const errors = []
22
- parse(text, errors)
23
- if (errors.length > 0) {
24
- warn('opencode.jsonc could not be parsed: leaving it untouched. Set "model" manually.')
25
- return
26
- }
27
-
28
- // A model the repository already chose is its decision, not the wizard's: `update` used to
29
- // reset a deliberately pinned default to the build tier in every consumer it ran in.
30
- if (keepExisting && typeof parse(text)?.model === 'string') return
31
-
32
- // `undefined` removes the key; a string value sets it.
33
- const edits = modify(text, ['model'], buildModel || undefined, {
34
- formattingOptions: { insertSpaces: true, tabSize: 2 },
35
- })
36
- await fse.writeFile(opencodeJsonPath, applyEdits(text, edits), 'utf-8')
37
- if (buildModel) success(`default model -> ${buildModel} (written to opencode.jsonc)`)
38
- }
1
+ import fse from 'fs-extra'
2
+ import { applyEdits, modify, parse } from 'jsonc-parser'
3
+ import path from 'path'
4
+ import { success, warn } from '../../utils/exec.js'
5
+
6
+ /**
7
+ * Writes the selected build model as the default model in opencode.jsonc.
8
+ * Per-tier models (plan/build/fast) are recorded in harness.json (models)
9
+ * by the metadata step, then consumed by the agent-variant generator and /plan-apply.
10
+ *
11
+ * opencode tolerates JSONC (comments, trailing commas) in its config, so this
12
+ * must not use readJson/writeJson: a strict parse crashes on valid configs and
13
+ * a strict rewrite deletes user comments. jsonc-parser edits only the `model`
14
+ * key and preserves the rest of the file byte-for-byte.
15
+ */
16
+ export async function writeModelsToConfigs({ buildModel, keepExisting = false, cwd = process.cwd() }) {
17
+ const opencodeJsonPath = path.join(cwd, 'opencode.jsonc')
18
+ if (!await fse.pathExists(opencodeJsonPath)) return
19
+
20
+ const text = await fse.readFile(opencodeJsonPath, 'utf-8')
21
+ const errors = []
22
+ parse(text, errors)
23
+ if (errors.length > 0) {
24
+ warn('opencode.jsonc could not be parsed: leaving it untouched. Set "model" manually.')
25
+ return
26
+ }
27
+
28
+ // A model the repository already chose is its decision, not the wizard's: `update` used to
29
+ // reset a deliberately pinned default to the build tier in every consumer it ran in.
30
+ if (keepExisting && typeof parse(text)?.model === 'string') return
31
+
32
+ // `undefined` removes the key; a string value sets it.
33
+ const edits = modify(text, ['model'], buildModel || undefined, {
34
+ formattingOptions: { insertSpaces: true, tabSize: 2 },
35
+ })
36
+ await fse.writeFile(opencodeJsonPath, applyEdits(text, edits), 'utf-8')
37
+ if (buildModel) success(`default model -> ${buildModel} (written to opencode.jsonc)`)
38
+ }
package/cli/utils/copy.js CHANGED
@@ -33,13 +33,16 @@ async function documentedElsewhere(destDir, fileName) {
33
33
  return false
34
34
  }
35
35
 
36
+ const MANAGED_DIRS = ['.opencode/plugins/', '.opencode/scripts/']
37
+
36
38
  function isTemplateTest(relativePath) {
37
- return relativePath.split(path.sep).join('/').startsWith('.opencode/plugins/') && relativePath.endsWith('.test.js')
39
+ const normalized = relativePath.split(path.sep).join('/')
40
+ return MANAGED_DIRS.some(dir => normalized.startsWith(dir)) && normalized.endsWith('.test.js')
38
41
  }
39
42
 
40
43
  export function isManagedContentPath(relativePath) {
41
44
  const normalized = relativePath.split(path.sep).join('/')
42
- if (normalized.startsWith('.opencode/plugins/')) return true
45
+ if (MANAGED_DIRS.some(dir => normalized.startsWith(dir))) return true
43
46
  if (normalized.startsWith('.opencode/commands/') && !MARKER_COMMANDS.has(normalized)) return true
44
47
  return normalized === 'openspec/specs/.gitkeep' || normalized === 'openspec/changes/archive/.gitkeep'
45
48
  }
@@ -1,80 +1,80 @@
1
- import os from 'node:os'
2
- import path from 'node:path'
3
-
4
- /**
5
- * Every harness path that lands in a consumer repo, in one place.
6
- *
7
- * These filenames are a contract with every repo the harness has been
8
- * installed into: the CLI writes them, and the opencode plugins shipped in
9
- * harness/.opencode/plugins/ read them back at runtime. Changing a name
10
- * here means changing it in that payload too, or the plugins go blind.
11
- *
12
- * They are deliberately named for the harness rather than for the CLI, so a
13
- * future rename of the package does not become a rename of the on-disk state.
14
- */
15
- export const OPENCODE_DIR = '.opencode'
16
-
17
- /** Project config written by the metadata step. */
18
- export const CONFIG_FILE = 'harness.json'
19
-
20
- /** Per-developer model override, gitignored, never committed. */
21
- export const USER_CONFIG_FILE = 'harness.user.json'
22
-
23
- /** Hashes of every managed file, so `update` can detect local edits. */
24
- export const MANIFEST_FILE = 'harness-managed.json'
25
-
26
- /** Live subagent wave state, owned by the pc-subagent-monitor plugin. */
27
- export const RUN_STATE_FILE = 'harness-run.json'
28
-
29
- /** Names `.opencode/.gitignore` must cover. Mirrored in content/.opencode/_gitignore. */
30
- export const IGNORED_ENTRIES = [
31
- 'node_modules',
32
- RUN_STATE_FILE,
33
- USER_CONFIG_FILE,
34
- MANIFEST_FILE,
35
- 'source-roots.json',
36
- '*-engineer.*.md',
37
- // Regenerated from fullstack-engineer.md by pc-subagent-tiers every startup.
38
- 'agents/build.md',
39
- 'agents/plan.md',
40
- ]
41
-
42
- /**
43
- * Files the harness shipped and has since retired. `update` deletes them, because a skill or
44
- * command left behind keeps being offered to agents long after the procedure it describes is
45
- * gone. pc-ops-evidence wrote a capturePlan for a CI workflow that no longer exists; the
46
- * verification plan from pc-repo-verify is what the evidence workflow replays now.
47
- */
48
- export const RETIRED_PATHS = [
49
- '.agents/skills/pc-ops-evidence',
50
- '.agents/skills/pc-make-evidence-scaffold',
51
- '.opencode/commands/ops-evidence.md',
52
- '.opencode/commands/make-evidence-scaffold.md',
53
- ]
54
-
55
- export function configPath(cwd = process.cwd()) {
56
- return path.join(cwd, OPENCODE_DIR, CONFIG_FILE)
57
- }
58
-
59
- export function userConfigPath(cwd = process.cwd()) {
60
- return path.join(cwd, OPENCODE_DIR, USER_CONFIG_FILE)
61
- }
62
-
63
- export function manifestPath(cwd = process.cwd()) {
64
- return path.join(cwd, OPENCODE_DIR, MANIFEST_FILE)
65
- }
66
-
67
- /** Cross-run models cache, keyed to the CLI rather than to any one repo. */
68
- export function modelsCacheDir() {
69
- return path.join(os.homedir(), '.config', 'agent-harness')
70
- }
71
-
72
- /**
73
- * Filenames written by opencode-onboard v1.x. Only used to detect a v1 repo
74
- * and refuse to half-patch it: nothing reads their contents.
75
- */
76
- export const LEGACY_CONFIG_FILES = [
77
- 'opencode-onboard.json',
78
- 'opencode-onboard.user.json',
79
- 'opencode-onboard-managed.json',
80
- ]
1
+ import os from 'node:os'
2
+ import path from 'node:path'
3
+
4
+ /**
5
+ * Every harness path that lands in a consumer repo, in one place.
6
+ *
7
+ * These filenames are a contract with every repo the harness has been
8
+ * installed into: the CLI writes them, and the opencode plugins shipped in
9
+ * harness/.opencode/plugins/ read them back at runtime. Changing a name
10
+ * here means changing it in that payload too, or the plugins go blind.
11
+ *
12
+ * They are deliberately named for the harness rather than for the CLI, so a
13
+ * future rename of the package does not become a rename of the on-disk state.
14
+ */
15
+ export const OPENCODE_DIR = '.opencode'
16
+
17
+ /** Project config written by the metadata step. */
18
+ export const CONFIG_FILE = 'harness.json'
19
+
20
+ /** Per-developer model override, gitignored, never committed. */
21
+ export const USER_CONFIG_FILE = 'harness.user.json'
22
+
23
+ /** Hashes of every managed file, so `update` can detect local edits. */
24
+ export const MANIFEST_FILE = 'harness-managed.json'
25
+
26
+ /** Live subagent wave state, owned by the pc-subagent-monitor plugin. */
27
+ export const RUN_STATE_FILE = 'harness-run.json'
28
+
29
+ /** Names `.opencode/.gitignore` must cover. Mirrored in content/.opencode/_gitignore. */
30
+ export const IGNORED_ENTRIES = [
31
+ 'node_modules',
32
+ RUN_STATE_FILE,
33
+ USER_CONFIG_FILE,
34
+ MANIFEST_FILE,
35
+ 'source-roots.json',
36
+ '*-engineer.*.md',
37
+ // Regenerated from fullstack-engineer.md by pc-subagent-tiers every startup.
38
+ 'agents/build.md',
39
+ 'agents/plan.md',
40
+ ]
41
+
42
+ /**
43
+ * Files the harness shipped and has since retired. `update` deletes them, because a skill or
44
+ * command left behind keeps being offered to agents long after the procedure it describes is
45
+ * gone. pc-ops-evidence wrote a capturePlan for a CI workflow that no longer exists; the
46
+ * verification plan from pc-repo-verify is what the evidence workflow replays now.
47
+ */
48
+ export const RETIRED_PATHS = [
49
+ '.agents/skills/pc-ops-evidence',
50
+ '.agents/skills/pc-make-evidence-scaffold',
51
+ '.opencode/commands/ops-evidence.md',
52
+ '.opencode/commands/make-evidence-scaffold.md',
53
+ ]
54
+
55
+ export function configPath(cwd = process.cwd()) {
56
+ return path.join(cwd, OPENCODE_DIR, CONFIG_FILE)
57
+ }
58
+
59
+ export function userConfigPath(cwd = process.cwd()) {
60
+ return path.join(cwd, OPENCODE_DIR, USER_CONFIG_FILE)
61
+ }
62
+
63
+ export function manifestPath(cwd = process.cwd()) {
64
+ return path.join(cwd, OPENCODE_DIR, MANIFEST_FILE)
65
+ }
66
+
67
+ /** Cross-run models cache, keyed to the CLI rather than to any one repo. */
68
+ export function modelsCacheDir() {
69
+ return path.join(os.homedir(), '.config', 'agent-harness')
70
+ }
71
+
72
+ /**
73
+ * Filenames written by opencode-onboard v1.x. Only used to detect a v1 repo
74
+ * and refuse to half-patch it: nothing reads their contents.
75
+ */
76
+ export const LEGACY_CONFIG_FILES = [
77
+ 'opencode-onboard.json',
78
+ 'opencode-onboard.user.json',
79
+ 'opencode-onboard-managed.json',
80
+ ]
@@ -1,9 +1,9 @@
1
- node_modules
2
- harness-run.json
3
- harness.user.json
4
- harness-managed.json
5
- source-roots.json
6
- tmp/
7
- *-engineer.*.md
8
- agents/build.md
9
- agents/plan.md
1
+ node_modules
2
+ harness-run.json
3
+ harness.user.json
4
+ harness-managed.json
5
+ source-roots.json
6
+ tmp/
7
+ *-engineer.*.md
8
+ agents/build.md
9
+ agents/plan.md
@@ -1,5 +1,5 @@
1
- ---
2
- description: Initialize the project. Presents a single form with all setup questions, then executes selected steps.
3
- ---
4
-
5
- Load the `pc-repo-initialize` skill.
1
+ ---
2
+ description: Initialize the project. Presents a single form with all setup questions, then executes selected steps.
3
+ ---
4
+
5
+ Load the `pc-repo-initialize` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Generate or update ARCHITECTURE.md by analyzing the codebase structure. Safe to run at any time.
3
- ---
4
-
5
- Load the `pc-make-architecture` skill.
1
+ ---
2
+ description: Generate or update ARCHITECTURE.md by analyzing the codebase structure. Safe to run at any time.
3
+ ---
4
+
5
+ Load the `pc-make-architecture` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Generate or update DESIGN.md by analyzing the codebase design system. Safe to run at any time.
3
- ---
4
-
5
- Load the `pc-make-design` skill.
1
+ ---
2
+ description: Generate or update DESIGN.md by analyzing the codebase design system. Safe to run at any time.
3
+ ---
4
+
5
+ Load the `pc-make-design` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Create a custom engineer agent via persona-driven interactive design
3
- ---
4
-
5
- Load the `pc-make-engineer` skill.
1
+ ---
2
+ description: Create a custom engineer agent via persona-driven interactive design
3
+ ---
4
+
5
+ Load the `pc-make-engineer` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Generate or update a pc-guardrails-project skill from ARCHITECTURE.md and relevant project files.
3
- ---
4
-
5
- Load the `pc-make-guardrails` skill.
1
+ ---
2
+ description: Generate or update a pc-guardrails-project skill from ARCHITECTURE.md and relevant project files.
3
+ ---
4
+
5
+ Load the `pc-make-guardrails` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Set the model for a tier (plan, build, or fast). Team-wide or user-local override.
3
- ---
4
-
5
- Load the `pc-make-user-model` skill.
1
+ ---
2
+ description: Set the model for a tier (plan, build, or fast). Team-wide or user-local override.
3
+ ---
4
+
5
+ Load the `pc-make-user-model` skill.
@@ -1,9 +1,9 @@
1
- ---
2
- description: "Implement tasks from a plan: works with OpenSpec proposals and in-conversation plans."
3
- ---
4
-
5
- Load the `pc-plan-apply` skill and execute it in **interactive mode** with `start_from: branch`.
6
-
7
- Input:
8
-
9
- $ARGUMENTS
1
+ ---
2
+ description: "Implement tasks from a plan: works with OpenSpec proposals and in-conversation plans."
3
+ ---
4
+
5
+ Load the `pc-plan-apply` skill and execute it in **interactive mode** with `start_from: branch`.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -1,5 +1,5 @@
1
- ---
2
- description: "Autonomous pipeline: explore, propose, apply, archive, then merge/PR/push. For loop-engineering."
3
- ---
4
-
5
- Load the `pc-plan-goal` skill.
1
+ ---
2
+ description: "Autonomous pipeline: explore, propose, apply, archive, then merge/PR/push. For loop-engineering."
3
+ ---
4
+
5
+ Load the `pc-plan-goal` skill.
@@ -1,5 +1,5 @@
1
- ---
2
- description: "Quick plan: analyze the codebase and create a task checklist using the Todo pane. No files, no OpenSpec."
3
- ---
4
-
5
- Load the `pc-plan-quick` skill.
1
+ ---
2
+ description: "Quick plan: analyze the codebase and create a task checklist using the Todo pane. No files, no OpenSpec."
3
+ ---
4
+
5
+ Load the `pc-plan-quick` skill.
@@ -1,9 +1,9 @@
1
- ---
2
- description: Write a detailed, repo-aware user story from a feature idea or need.
3
- ---
4
-
5
- Load the `pc-plan-story` skill.
6
-
7
- Input:
8
-
9
- $ARGUMENTS
1
+ ---
2
+ description: Write a detailed, repo-aware user story from a feature idea or need.
3
+ ---
4
+
5
+ Load the `pc-plan-story` skill.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -1,5 +1,5 @@
1
- ---
2
- description: Audit every configured source root against the fullstack engineer's guardrails and abilities. Read-only.
3
- ---
4
-
5
- Load the `pc-repo-audit` skill.
1
+ ---
2
+ description: Audit every configured source root against the fullstack engineer's guardrails and abilities. Read-only.
3
+ ---
4
+
5
+ Load the `pc-repo-audit` skill.