oc-harness-setup 0.3.3 → 0.4.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 (136) hide show
  1. package/.docs/unwired-routing.md +16 -15
  2. package/AGENTS.md +105 -68
  3. package/CHANGELOG.md +91 -0
  4. package/GLOSSARY.md +46 -0
  5. package/LICENSE +1 -1
  6. package/README.md +48 -60
  7. package/agents/cleaner.md +86 -0
  8. package/agents/critic.md +79 -0
  9. package/agents/historian.md +92 -0
  10. package/agents/maintainer.md +106 -0
  11. package/agents/ops.md +69 -0
  12. package/agents/orchestrator.md +48 -18
  13. package/agents/researcher.md +72 -0
  14. package/agents/verifier.md +84 -0
  15. package/agents/worker.md +87 -0
  16. package/bin/cli.js +349 -133
  17. package/commands/close.md +11 -0
  18. package/commands/evolve.md +11 -0
  19. package/commands/fast.md +11 -0
  20. package/commands/goal.md +11 -0
  21. package/commands/search.md +11 -0
  22. package/commands/swarm.md +11 -0
  23. package/opencode.jsonc +39 -79
  24. package/package.json +13 -6
  25. package/reference/README.md +12 -14
  26. package/reference/canon.md +71 -0
  27. package/reference/context.md +35 -0
  28. package/reference/enforcement.md +6 -0
  29. package/reference/flow.md +19 -0
  30. package/reference/gates.md +23 -0
  31. package/reference/harness.md +15 -0
  32. package/reference/hygiene.md +13 -0
  33. package/reference/memory.md +13 -0
  34. package/reference/models.md +19 -24
  35. package/reference/phases.md +23 -0
  36. package/reference/repos.md +49 -0
  37. package/reference/tools.md +35 -0
  38. package/scripts/harness-doctor.ps1 +83 -0
  39. package/skills/close/SKILL.md +36 -0
  40. package/skills/evolve/SKILL.md +76 -0
  41. package/skills/fast/SKILL.md +36 -0
  42. package/skills/goal/SKILL.md +65 -0
  43. package/skills/search/SKILL.md +68 -0
  44. package/skills/swarm/SKILL.md +69 -0
  45. package/state-seed/lessons.md +22 -0
  46. package/state-seed/template.md +12 -0
  47. package/agents/build.md +0 -20
  48. package/agents/explore.md +0 -26
  49. package/agents/general.md +0 -19
  50. package/agents/plan.md +0 -29
  51. package/agents/reviewer.md +0 -22
  52. package/agents/vault.md +0 -73
  53. package/commands/build.md +0 -7
  54. package/commands/checkpoint.md +0 -7
  55. package/commands/code-simplify.md +0 -7
  56. package/commands/gauntlet.md +0 -7
  57. package/commands/handoff.md +0 -7
  58. package/commands/keeper.md +0 -7
  59. package/commands/kill.md +0 -11
  60. package/commands/plan.md +0 -7
  61. package/commands/retro.md +0 -15
  62. package/commands/review.md +0 -7
  63. package/commands/ship.md +0 -7
  64. package/commands/spec.md +0 -7
  65. package/commands/test.md +0 -7
  66. package/commands/webperf.md +0 -7
  67. package/reference/auto-mandate.md +0 -11
  68. package/reference/backup-convention.md +0 -9
  69. package/reference/clean-mandate.md +0 -13
  70. package/reference/editor-parity.md +0 -7
  71. package/reference/gc-scripts.md +0 -8
  72. package/reference/intent-routing.md +0 -14
  73. package/reference/lifecycle.md +0 -15
  74. package/reference/model-keeper.md +0 -46
  75. package/reference/model-test.md +0 -176
  76. package/reference/oc-source-map.md +0 -162
  77. package/reference/owner-pin.md +0 -31
  78. package/reference/roster.md +0 -15
  79. package/reference/session-scope.md +0 -9
  80. package/reference/session-state.md +0 -13
  81. package/reference/swarm.md +0 -32
  82. package/scripts/backup-config.ps1 +0 -42
  83. package/scripts/gc-branch.ps1 +0 -196
  84. package/scripts/gc-bump.ps1 +0 -198
  85. package/scripts/gc-clean.ps1 +0 -648
  86. package/scripts/gc-commit.ps1 +0 -143
  87. package/scripts/gc-merge.ps1 +0 -272
  88. package/scripts/gc-pr.ps1 +0 -190
  89. package/scripts/gc-push.ps1 +0 -111
  90. package/scripts/gc-read.ps1 +0 -150
  91. package/scripts/gc-rebase.ps1 +0 -162
  92. package/scripts/gc-release.ps1 +0 -225
  93. package/scripts/gc-stage.ps1 +0 -103
  94. package/scripts/gc-status.ps1 +0 -127
  95. package/scripts/gc-sync.ps1 +0 -65
  96. package/scripts/gc.core.ps1 +0 -715
  97. package/scripts/gc.smoke.ps1 +0 -779
  98. package/scripts/interrupt-session.ps1 +0 -65
  99. package/scripts/logbook/README.md +0 -108
  100. package/scripts/logbook/logbook.test.ts +0 -440
  101. package/scripts/logbook/logbook.ts +0 -797
  102. package/scripts/pirep/README.md +0 -147
  103. package/scripts/pirep/pirep.test.ts +0 -735
  104. package/scripts/pirep/pirep.ts +0 -836
  105. package/scripts/testflight/README.md +0 -112
  106. package/scripts/testflight/testflight.test.ts +0 -512
  107. package/scripts/testflight/testflight.ts +0 -806
  108. package/skills/_shared/SOURCES.md +0 -26
  109. package/skills/_shared/references/accessibility-checklist.md +0 -160
  110. package/skills/_shared/references/definition-of-done.md +0 -67
  111. package/skills/_shared/references/observability-checklist.md +0 -92
  112. package/skills/_shared/references/orchestration-patterns.md +0 -155
  113. package/skills/_shared/references/performance-checklist.md +0 -236
  114. package/skills/_shared/references/security-checklist.md +0 -245
  115. package/skills/_shared/references/testing-patterns.md +0 -235
  116. package/skills/api-and-interface-design/SKILL.md +0 -14
  117. package/skills/browser-testing-with-devtools/SKILL.md +0 -303
  118. package/skills/code-simplification/SKILL.md +0 -14
  119. package/skills/creative-writing/SKILL.md +0 -96
  120. package/skills/debugging-and-error-recovery/SKILL.md +0 -15
  121. package/skills/flight-deck/SKILL.md +0 -17
  122. package/skills/frontend-ui-engineering/SKILL.md +0 -16
  123. package/skills/gauntlet/SKILL.md +0 -21
  124. package/skills/git-ceremony/SKILL.md +0 -27
  125. package/skills/grilling/SKILL.md +0 -18
  126. package/skills/observability-and-instrumentation/SKILL.md +0 -18
  127. package/skills/performance-optimization/SKILL.md +0 -16
  128. package/skills/pilot-report/SKILL.md +0 -18
  129. package/skills/planning-and-task-breakdown/SKILL.md +0 -16
  130. package/skills/security-and-hardening/SKILL.md +0 -18
  131. package/skills/source-driven-development/SKILL.md +0 -16
  132. package/skills/spec-driven-development/SKILL.md +0 -26
  133. package/skills/test-driven-development/SKILL.md +0 -18
  134. package/skills/test-flight/SKILL.md +0 -14
  135. package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
  136. package/skills/writing-for-agents/SKILL.md +0 -89
@@ -1,103 +0,0 @@
1
- #Requires -Version 7.0
2
- <#
3
- .SYNOPSIS
4
- Stage content with ceremony gates: add the given paths (or -All), run the
5
- secret scan, report exactly what landed in the index.
6
-
7
- .DESCRIPTION
8
- The index is where ceremony violations get caught cheaply. This script adds
9
- paths, then scans the newly staged files for obvious secret shapes — a hit
10
- leaves the offending files UNSTAGED (working tree untouched) and exits 4
11
- with the file list, so the agent can fix and retry without losing anything.
12
- Nothing staged (unchanged / ignored paths) is a clean no-op, exit 0.
13
-
14
- Repo rules win: if the repo documents its own convention, follow that
15
- instead of this script.
16
-
17
- Output contract: stdout is exactly one RESULT: <json> line with staged
18
- file names and count; logs go to the console.
19
-
20
- .PARAMETER Path
21
- Files or globs to stage, relative to the repo root (or absolute). ONE path
22
- or glob per -Path invocation — pwsh -File does not array-bind a comma list
23
- ('a,b' arrives as a single literal path). Stage many at once with -All.
24
- .PARAMETER All
25
- Stage everything (git add -A) instead of specific paths.
26
- .PARAMETER RepoRoot
27
- Repository path (defaults to the current directory); git is always pinned
28
- with git -C.
29
- .PARAMETER Detailed
30
- Restore the step narration, ok/info lines, and raw git/gh relay the terse
31
- default hides. Never affects the RESULT line, warnings, failures, or the
32
- security/remediation lines.
33
- .PARAMETER Quiet
34
- Accepted for compatibility and now a no-op: the default is already terse.
35
- -Quiet forces the gate closed and so wins if passed with -Detailed.
36
-
37
- .EXAMPLE
38
- pwsh -File scripts\gc-stage.ps1 -Path 'src/foo.ts' -Path 'docs/foo.md'
39
-
40
- .EXAMPLE
41
- pwsh -File scripts\gc-stage.ps1 -All
42
- #>
43
- param(
44
- [string[]]$Path,
45
- [switch]$All,
46
- [string]$RepoRoot = (Get-Location).Path,
47
- [switch]$Detailed,
48
- [switch]$Quiet
49
- )
50
- Set-StrictMode -Version Latest
51
- $ErrorActionPreference = 'Stop'
52
- . (Join-Path $PSScriptRoot 'gc.core.ps1')
53
- if ($Detailed) { $script:GcQuiet = $false }
54
- if ($Quiet) { $script:GcQuiet = $true }
55
-
56
- try {
57
- $root = Resolve-GcRoot -Path $RepoRoot
58
- Write-GcInfo "repo: $root"
59
-
60
- if (-not $All -and -not $Path) {
61
- throw [GcException]::new('give -Path <files-or-globs> or -All', $script:GcExitPre)
62
- }
63
-
64
- if (-not $All) {
65
- # validate every path resolves before touching the index (atomic gate)
66
- foreach ($p in $Path) {
67
- $joined = Join-Path $root $p
68
- if ($p -match '[*?\[]') {
69
- $matched = @(Get-ChildItem -Path $joined -Force -ErrorAction SilentlyContinue)
70
- if ($matched.Count -eq 0) {
71
- throw [GcException]::new("no files match glob '$p' (under $root)", $script:GcExitPre)
72
- }
73
- } elseif (-not (Test-Path -LiteralPath $joined)) {
74
- throw [GcException]::new("path does not exist: $p (under $root)", $script:GcExitPre)
75
- }
76
- }
77
- Invoke-GcGit -Root $root -Argv (@('add','--') + $Path)
78
- Write-GcOk "staged $($Path -join ', ')"
79
- } else {
80
- Invoke-GcGit -Root $root -Argv @('add','-A')
81
- Write-GcOk 'staged all changes (-All)'
82
- }
83
-
84
- # security gate on exactly what is now staged
85
- Stop-GcOnSecrets -Root $root
86
-
87
- $staged = @(Get-GcStagedNames -Root $root)
88
- if (-not $staged) {
89
- Write-GcInfo 'nothing staged — paths unchanged, ignored, or already staged'
90
- Write-GcResult -Props @{ staged = @(); count = 0; action = 'no-op' }
91
- }
92
-
93
- $stat = Get-GcGit -Root $root -Argv @('diff','--cached','--stat')
94
- Write-GcNote (($stat -join "`n"))
95
- Write-GcOk "staged $($staged.Count) file(s)"
96
- Write-GcResult -Props @{ staged = $staged; count = $staged.Count; action = 'staged' }
97
- } catch [GcException] {
98
- Write-GcFail $_.Exception.Message
99
- Write-GcResult -Code $_.Exception.Code -Props @{ message = $_.Exception.Message }
100
- } catch {
101
- Write-GcFail "unexpected: $($_.Exception.Message)"
102
- Write-GcResult -Code $script:GcExitFail -Props @{ message = $_.Exception.Message }
103
- }
@@ -1,127 +0,0 @@
1
- #Requires -Version 7.0
2
- <#
3
- .SYNOPSIS
4
- One-shot ceremony-aware repo snapshot: branch, default, staleness, index
5
- state, upstream, remote, gh, open PR, checks. Read-only — an agent's first
6
- call in an unfamiliar repo.
7
-
8
- .DESCRIPTION
9
- Returns a single RESULT: <json> with everything an agent needs to decide the
10
- next ceremony step. Read-only: no fetch, no mutation. Every gh-backed field
11
- is guarded — an unauthenticated or absent gh degrades to gh_authed=false,
12
- never a failure.
13
-
14
- Fields: repo, branch, branch_type, detached, default, clean, staged,
15
- unstaged, conflicts, untracked, upstream, ahead, behind, remote, gh_authed,
16
- pr (number or null), pr_state, pr_draft, pr_checks
17
- ('pass'|'pending'|'fail'|null), rebase_in_progress. The branch value is
18
- '(detached)' when HEAD is detached.
19
-
20
- Repo rules win: this is a read-only snapshot; a repo's own convention still
21
- governs how git work happens there.
22
-
23
- .PARAMETER RepoRoot
24
- Repository path (defaults to the current directory).
25
- .PARAMETER Detailed
26
- Restore the step narration, ok/info lines, and raw git/gh relay the terse
27
- default hides. Never affects the RESULT line, warnings, failures, or the
28
- security/remediation lines.
29
- .PARAMETER Quiet
30
- Accepted for compatibility and now a no-op: the default is already terse.
31
- -Quiet forces the gate closed and so wins if passed with -Detailed.
32
-
33
- .EXAMPLE
34
- pwsh -File scripts\gc-status.ps1
35
- #>
36
- param(
37
- [string]$RepoRoot = (Get-Location).Path,
38
- [switch]$Detailed,
39
- [switch]$Quiet
40
- )
41
- Set-StrictMode -Version Latest
42
- $ErrorActionPreference = 'Stop'
43
- . (Join-Path $PSScriptRoot 'gc.core.ps1')
44
- if ($Detailed) { $script:GcQuiet = $false }
45
- if ($Quiet) { $script:GcQuiet = $true }
46
-
47
- try {
48
- $root = Resolve-GcRoot -Path $RepoRoot
49
-
50
- $branch = try { Get-GcCurrentBranch -Root $root } catch { '(detached)' }
51
- $detached = ($branch -eq '(detached)')
52
- $btype = if (-not $detached -and $branch -match '^([a-z]+)/') { $Matches[1] } else { $null }
53
- $default = Get-GcDefaultBranch -Root $root
54
-
55
- # one porcelain v2 call answers clean / staged / unstaged / conflicts /
56
- # untracked and upstream+ahead/behind (was: status + diff --cached +
57
- # rev-parse + 2x rev-list)
58
- $state = Get-GcRepoState -Root $root
59
- $staged = $state.Staged.Count
60
- $untracked = $state.Untracked
61
- $unstaged = $state.Unstaged
62
- $conflicts = $state.Conflicts
63
- $upstream = $state.Upstream
64
- $ahead = $state.Ahead
65
- $behind = $state.Behind
66
-
67
- $remote = $null
68
- try { $remote = Get-GcRemote -Root $root } catch { }
69
-
70
- $rebaseInProgress = Test-GcRebaseInProgress -Root $root
71
-
72
- # gh-backed fields — guarded, never fatal. The retired `gh auth status`
73
- # pre-flight made this three calls (a probe + 2x pr view); one call now
74
- # answers the whole PR question and its own failure is the auth probe.
75
- $ghAuthed = $false; $prNumber = $null; $prState = $null; $prDraft = $null; $prChecks = $null
76
- if ($remote -and -not $detached -and (Get-Command gh -ErrorAction SilentlyContinue)) {
77
- try {
78
- $pr = Get-GcGhJson -Root $root -Argv @('pr','view',$branch,'--json','number,state,isDraft,statusCheckRollup')
79
- $ghAuthed = $true
80
- $prNumber = $pr.number; $prState = $pr.state; $prDraft = $pr.isDraft
81
- $rollup = @($pr.statusCheckRollup | Where-Object { $null -ne $_ })
82
- if ($rollup.Count -gt 0) {
83
- $verdicts = @($rollup | ForEach-Object {
84
- if ($_.PSObject.Properties['status'] -and $_.status -in @('QUEUED','IN_PROGRESS')) { 'pending' }
85
- elseif ($_.PSObject.Properties['state'] -and $_.state -in @('FAILURE','ERROR')) { 'fail' }
86
- elseif ($_.PSObject.Properties['state'] -and $_.state -in @('PENDING','EXPECTED')) { 'pending' }
87
- elseif ($_.PSObject.Properties['conclusion'] -and $_.conclusion -and $_.conclusion -notin @('SUCCESS','NEUTRAL','SKIPPED')) { 'fail' }
88
- else { 'pass' }
89
- })
90
- $prChecks = if ($verdicts -contains 'fail') { 'fail' } elseif ($verdicts -contains 'pending') { 'pending' } else { 'pass' }
91
- }
92
- } catch {
93
- # not logged in → gh_authed=false; any other failure (usually "no pull
94
- # requests found") means authenticated with no open PR for the branch
95
- $ghAuthed = -not ($_.Exception.Message -match 'gh auth login')
96
- }
97
- }
98
-
99
- Write-GcResult -Props @{
100
- repo = $root
101
- branch = $branch
102
- branch_type = $btype
103
- detached = $detached
104
- default = $default
105
- clean = $state.Clean
106
- staged = $staged
107
- unstaged = $unstaged
108
- conflicts = $conflicts
109
- untracked = $untracked
110
- upstream = $upstream
111
- ahead = $ahead
112
- behind = $behind
113
- remote = $remote
114
- gh_authed = $ghAuthed
115
- pr = $prNumber
116
- pr_state = $prState
117
- pr_draft = $prDraft
118
- pr_checks = $prChecks
119
- rebase_in_progress = $rebaseInProgress
120
- }
121
- } catch [GcException] {
122
- Write-GcFail $_.Exception.Message
123
- Write-GcResult -Code $_.Exception.Code -Props @{ message = $_.Exception.Message }
124
- } catch {
125
- Write-GcFail "unexpected: $($_.Exception.Message)"
126
- Write-GcResult -Code $script:GcExitFail -Props @{ message = $_.Exception.Message }
127
- }
@@ -1,65 +0,0 @@
1
- #Requires -Version 7.0
2
- <#
3
- .SYNOPSIS
4
- Sync the default branch to its remote head: fetch origin, then fast-forward
5
- only. Standalone ceremony §1 — use it at session start and before a rebase.
6
-
7
- .DESCRIPTION
8
- The pull step of the ceremony as a stand-alone script. Fetch + fast-forward
9
- the default branch; never manufactures a merge; refuses to switch branches
10
- when the tree is dirty (commit or stash first). A repo with no origin is a
11
- clean no-op ('skipped-local'). Leaves you on the default branch when a
12
- fast-forward was needed, exactly where you were otherwise.
13
-
14
- Repo rules win: if the repo documents its own update convention, follow
15
- that instead of this script.
16
-
17
- .PARAMETER RepoRoot
18
- Repository path (defaults to the current directory); git is always pinned
19
- with git -C.
20
- .PARAMETER Detailed
21
- Restore the step narration, ok/info lines, and raw git/gh relay the terse
22
- default hides. Never affects the RESULT line, warnings, failures, or the
23
- security/remediation lines.
24
- .PARAMETER Quiet
25
- Accepted for compatibility and now a no-op: the default is already terse.
26
- -Quiet forces the gate closed and so wins if passed with -Detailed.
27
-
28
- .EXAMPLE
29
- pwsh -File scripts\gc-sync.ps1
30
- #>
31
- param(
32
- [string]$RepoRoot = (Get-Location).Path,
33
- [switch]$Detailed,
34
- [switch]$Quiet
35
- )
36
- Set-StrictMode -Version Latest
37
- $ErrorActionPreference = 'Stop'
38
- . (Join-Path $PSScriptRoot 'gc.core.ps1')
39
- if ($Detailed) { $script:GcQuiet = $false }
40
- if ($Quiet) { $script:GcQuiet = $true }
41
-
42
- try {
43
- $root = Resolve-GcRoot -Path $RepoRoot
44
- Write-GcInfo "repo: $root"
45
-
46
- $default = Get-GcDefaultBranch -Root $root
47
- # branch only — targeted rev-parse, no worktree walk (the state this reads
48
- # would be dropped by the fetch in Sync-GcDefaultBranch anyway).
49
- $cur = try { Get-GcCurrentBranch -Root $root -Targeted } catch { $null }
50
- if (-not (Test-GcRef -Root $root -Ref "refs/heads/$default")) {
51
- Write-GcOk "default branch '$default' is unborn (no commits) — nothing to sync"
52
- Write-GcResult -Props @{ default = $default; action = 'unborn' }
53
- }
54
- $action = Sync-GcDefaultBranch -Root $root -Default $default -CurrentBranch $cur
55
-
56
- $sha = (Get-GcGit -Root $root -Argv @('rev-parse','--short',"$default") | Select-Object -First 1).Trim()
57
- Write-GcOk "default branch ($default) @ $sha — sync: $action"
58
- Write-GcResult -Props @{ default = $default; sha = $sha; action = $action }
59
- } catch [GcException] {
60
- Write-GcFail $_.Exception.Message
61
- Write-GcResult -Code $_.Exception.Code -Props @{ message = $_.Exception.Message }
62
- } catch {
63
- Write-GcFail "unexpected: $($_.Exception.Message)"
64
- Write-GcResult -Code $script:GcExitFail -Props @{ message = $_.Exception.Message }
65
- }