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.
- package/.docs/unwired-routing.md +16 -15
- package/AGENTS.md +105 -68
- package/CHANGELOG.md +91 -0
- package/GLOSSARY.md +46 -0
- package/LICENSE +1 -1
- package/README.md +48 -60
- package/agents/cleaner.md +86 -0
- package/agents/critic.md +79 -0
- package/agents/historian.md +92 -0
- package/agents/maintainer.md +106 -0
- package/agents/ops.md +69 -0
- package/agents/orchestrator.md +48 -18
- package/agents/researcher.md +72 -0
- package/agents/verifier.md +84 -0
- package/agents/worker.md +87 -0
- package/bin/cli.js +349 -133
- package/commands/close.md +11 -0
- package/commands/evolve.md +11 -0
- package/commands/fast.md +11 -0
- package/commands/goal.md +11 -0
- package/commands/search.md +11 -0
- package/commands/swarm.md +11 -0
- package/opencode.jsonc +39 -79
- package/package.json +13 -6
- package/reference/README.md +12 -14
- package/reference/canon.md +71 -0
- package/reference/context.md +35 -0
- package/reference/enforcement.md +6 -0
- package/reference/flow.md +19 -0
- package/reference/gates.md +23 -0
- package/reference/harness.md +15 -0
- package/reference/hygiene.md +13 -0
- package/reference/memory.md +13 -0
- package/reference/models.md +19 -24
- package/reference/phases.md +23 -0
- package/reference/repos.md +49 -0
- package/reference/tools.md +35 -0
- package/scripts/harness-doctor.ps1 +83 -0
- package/skills/close/SKILL.md +36 -0
- package/skills/evolve/SKILL.md +76 -0
- package/skills/fast/SKILL.md +36 -0
- package/skills/goal/SKILL.md +65 -0
- package/skills/search/SKILL.md +68 -0
- package/skills/swarm/SKILL.md +69 -0
- package/state-seed/lessons.md +22 -0
- package/state-seed/template.md +12 -0
- package/agents/build.md +0 -20
- package/agents/explore.md +0 -26
- package/agents/general.md +0 -19
- package/agents/plan.md +0 -29
- package/agents/reviewer.md +0 -22
- package/agents/vault.md +0 -73
- package/commands/build.md +0 -7
- package/commands/checkpoint.md +0 -7
- package/commands/code-simplify.md +0 -7
- package/commands/gauntlet.md +0 -7
- package/commands/handoff.md +0 -7
- package/commands/keeper.md +0 -7
- package/commands/kill.md +0 -11
- package/commands/plan.md +0 -7
- package/commands/retro.md +0 -15
- package/commands/review.md +0 -7
- package/commands/ship.md +0 -7
- package/commands/spec.md +0 -7
- package/commands/test.md +0 -7
- package/commands/webperf.md +0 -7
- package/reference/auto-mandate.md +0 -11
- package/reference/backup-convention.md +0 -9
- package/reference/clean-mandate.md +0 -13
- package/reference/editor-parity.md +0 -7
- package/reference/gc-scripts.md +0 -8
- package/reference/intent-routing.md +0 -14
- package/reference/lifecycle.md +0 -15
- package/reference/model-keeper.md +0 -46
- package/reference/model-test.md +0 -176
- package/reference/oc-source-map.md +0 -162
- package/reference/owner-pin.md +0 -31
- package/reference/roster.md +0 -15
- package/reference/session-scope.md +0 -9
- package/reference/session-state.md +0 -13
- package/reference/swarm.md +0 -32
- package/scripts/backup-config.ps1 +0 -42
- package/scripts/gc-branch.ps1 +0 -196
- package/scripts/gc-bump.ps1 +0 -198
- package/scripts/gc-clean.ps1 +0 -648
- package/scripts/gc-commit.ps1 +0 -143
- package/scripts/gc-merge.ps1 +0 -272
- package/scripts/gc-pr.ps1 +0 -190
- package/scripts/gc-push.ps1 +0 -111
- package/scripts/gc-read.ps1 +0 -150
- package/scripts/gc-rebase.ps1 +0 -162
- package/scripts/gc-release.ps1 +0 -225
- package/scripts/gc-stage.ps1 +0 -103
- package/scripts/gc-status.ps1 +0 -127
- package/scripts/gc-sync.ps1 +0 -65
- package/scripts/gc.core.ps1 +0 -715
- package/scripts/gc.smoke.ps1 +0 -779
- package/scripts/interrupt-session.ps1 +0 -65
- package/scripts/logbook/README.md +0 -108
- package/scripts/logbook/logbook.test.ts +0 -440
- package/scripts/logbook/logbook.ts +0 -797
- package/scripts/pirep/README.md +0 -147
- package/scripts/pirep/pirep.test.ts +0 -735
- package/scripts/pirep/pirep.ts +0 -836
- package/scripts/testflight/README.md +0 -112
- package/scripts/testflight/testflight.test.ts +0 -512
- package/scripts/testflight/testflight.ts +0 -806
- package/skills/_shared/SOURCES.md +0 -26
- package/skills/_shared/references/accessibility-checklist.md +0 -160
- package/skills/_shared/references/definition-of-done.md +0 -67
- package/skills/_shared/references/observability-checklist.md +0 -92
- package/skills/_shared/references/orchestration-patterns.md +0 -155
- package/skills/_shared/references/performance-checklist.md +0 -236
- package/skills/_shared/references/security-checklist.md +0 -245
- package/skills/_shared/references/testing-patterns.md +0 -235
- package/skills/api-and-interface-design/SKILL.md +0 -14
- package/skills/browser-testing-with-devtools/SKILL.md +0 -303
- package/skills/code-simplification/SKILL.md +0 -14
- package/skills/creative-writing/SKILL.md +0 -96
- package/skills/debugging-and-error-recovery/SKILL.md +0 -15
- package/skills/flight-deck/SKILL.md +0 -17
- package/skills/frontend-ui-engineering/SKILL.md +0 -16
- package/skills/gauntlet/SKILL.md +0 -21
- package/skills/git-ceremony/SKILL.md +0 -27
- package/skills/grilling/SKILL.md +0 -18
- package/skills/observability-and-instrumentation/SKILL.md +0 -18
- package/skills/performance-optimization/SKILL.md +0 -16
- package/skills/pilot-report/SKILL.md +0 -18
- package/skills/planning-and-task-breakdown/SKILL.md +0 -16
- package/skills/security-and-hardening/SKILL.md +0 -18
- package/skills/source-driven-development/SKILL.md +0 -16
- package/skills/spec-driven-development/SKILL.md +0 -26
- package/skills/test-driven-development/SKILL.md +0 -18
- package/skills/test-flight/SKILL.md +0 -14
- package/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/skills/writing-for-agents/SKILL.md +0 -89
package/scripts/gc-bump.ps1
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
#Requires -Version 7.0
|
|
2
|
-
<#
|
|
3
|
-
.SYNOPSIS
|
|
4
|
-
Version bump per ceremony §8: detect the repo's single manifest, apply the
|
|
5
|
-
bump table, justify it, and land the bump as its own commit. No tags, no
|
|
6
|
-
release body, no human in the middle.
|
|
7
|
-
|
|
8
|
-
.DESCRIPTION
|
|
9
|
-
git-ceremony §8 as a script. Rules enforced:
|
|
10
|
-
- one source of truth: exactly one manifest (package.json, pyproject.toml,
|
|
11
|
-
Cargo.toml, or a VERSION file) may exist — two is a repo defect, stop.
|
|
12
|
-
- repo-declared format wins: only 3-part MAJOR.MINOR.PATCH is auto-bumped;
|
|
13
|
-
CalVer, 4-part, or build numbers are refused (repo convention wins, bump
|
|
14
|
-
by hand).
|
|
15
|
-
- the bump table: -Major resets MINOR and PATCH to 0; -Minor resets PATCH
|
|
16
|
-
to 0; -Patch increments PATCH. -Set forces an explicit version.
|
|
17
|
-
- never bump downward, never reuse a version (§8).
|
|
18
|
-
- every bump is justified: -Reason (one line) lands in the bump commit.
|
|
19
|
-
- the bump is its own commit: `chore(release): <old> -> <new>`; a dirty
|
|
20
|
-
tree is refused, and the bump refuses to commit on the default branch
|
|
21
|
-
(the release commit ships through a PR, §6/§11b).
|
|
22
|
-
Write-back is text-preserving (only the version value changes), verified by
|
|
23
|
-
re-reading the manifest before the commit.
|
|
24
|
-
|
|
25
|
-
.PARAMETER Major
|
|
26
|
-
Breaking API or behavior change (resets MINOR, PATCH).
|
|
27
|
-
.PARAMETER Minor
|
|
28
|
-
New backward-compatible capability (resets PATCH).
|
|
29
|
-
.PARAMETER Patch
|
|
30
|
-
Bug fix, no new surface.
|
|
31
|
-
.PARAMETER Set
|
|
32
|
-
Explicit target version MAJOR.MINOR.PATCH (still justified, still no
|
|
33
|
-
downward moves).
|
|
34
|
-
.PARAMETER Reason
|
|
35
|
-
Required one-line justification — what kind of change forced which digit.
|
|
36
|
-
.PARAMETER RepoRoot
|
|
37
|
-
Repository path (defaults to the current directory); git is always pinned
|
|
38
|
-
with git -C.
|
|
39
|
-
.PARAMETER Detailed
|
|
40
|
-
Restore the step narration, ok/info lines, and raw git/gh relay the terse
|
|
41
|
-
default hides. Never affects the RESULT line, warnings, failures, or the
|
|
42
|
-
security/remediation lines.
|
|
43
|
-
.PARAMETER Quiet
|
|
44
|
-
Accepted for compatibility and now a no-op: the default is already terse.
|
|
45
|
-
-Quiet forces the gate closed and so wins if passed with -Detailed.
|
|
46
|
-
|
|
47
|
-
.EXAMPLE
|
|
48
|
-
pwsh -File scripts\gc-bump.ps1 -Minor -Reason 'adds token refresh endpoint (backward compatible)'
|
|
49
|
-
#>
|
|
50
|
-
param(
|
|
51
|
-
[switch]$Major,
|
|
52
|
-
[switch]$Minor,
|
|
53
|
-
[switch]$Patch,
|
|
54
|
-
[string]$Set,
|
|
55
|
-
[Parameter(Mandatory)][string]$Reason,
|
|
56
|
-
[string]$RepoRoot = (Get-Location).Path,
|
|
57
|
-
[switch]$Detailed,
|
|
58
|
-
[switch]$Quiet
|
|
59
|
-
)
|
|
60
|
-
Set-StrictMode -Version Latest
|
|
61
|
-
$ErrorActionPreference = 'Stop'
|
|
62
|
-
. (Join-Path $PSScriptRoot 'gc.core.ps1')
|
|
63
|
-
if ($Detailed) { $script:GcQuiet = $false }
|
|
64
|
-
if ($Quiet) { $script:GcQuiet = $true }
|
|
65
|
-
|
|
66
|
-
function Get-GcManifestEncoding {
|
|
67
|
-
<# detect the manifest's byte-encoding (BOM/UTF-16) so write-back preserves
|
|
68
|
-
it — the "only the version value changes" promise must survive. #>
|
|
69
|
-
param([Parameter(Mandatory)][string]$Path)
|
|
70
|
-
$bytes = [System.IO.File]::ReadAllBytes($Path)
|
|
71
|
-
if ($bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF) { return @{ Enc = [System.Text.UTF8Encoding]::new($true); Name = 'utf8-bom' } }
|
|
72
|
-
if ($bytes.Length -ge 2 -and $bytes[0] -eq 0xFF -and $bytes[1] -eq 0xFE) { return @{ Enc = [System.Text.UnicodeEncoding]::new($false, $true); Name = 'utf16-le' } }
|
|
73
|
-
if ($bytes.Length -ge 2 -and $bytes[0] -eq 0xFE -and $bytes[1] -eq 0xFF) { return @{ Enc = [System.Text.UnicodeEncoding]::new($true, $true); Name = 'utf16-be' } }
|
|
74
|
-
return @{ Enc = [System.Text.UTF8Encoding]::new($false); Name = 'utf8' }
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function Read-GcVersion {
|
|
78
|
-
param([Parameter(Mandatory)][string]$Root, [Parameter(Mandatory)][string]$Manifest, [Parameter(Mandatory)][hashtable]$Encoding)
|
|
79
|
-
$abs = Join-Path $Root $Manifest
|
|
80
|
-
$enc = $Encoding.Enc
|
|
81
|
-
$content = $enc.GetString([System.IO.File]::ReadAllBytes($abs))
|
|
82
|
-
switch -Regex ($Manifest) {
|
|
83
|
-
'package\.json$' {
|
|
84
|
-
if ($content -notmatch '"version"\s*:\s*"([^"]+)"') { throw [GcException]::new("package.json has no version field — repo defect", $script:GcExitPre) }
|
|
85
|
-
return $Matches[1]
|
|
86
|
-
}
|
|
87
|
-
'\.toml$' {
|
|
88
|
-
if ($content -notmatch '(?m)^version\s*=\s*"([^"]+)"') { throw [GcException]::new("$Manifest has no top-level version entry — repo defect", $script:GcExitPre) }
|
|
89
|
-
return $Matches[1]
|
|
90
|
-
}
|
|
91
|
-
'^VERSION$' {
|
|
92
|
-
$v = $content.Trim()
|
|
93
|
-
if (-not $v) { throw [GcException]::new('VERSION file is empty — repo defect', $script:GcExitPre) }
|
|
94
|
-
return $v
|
|
95
|
-
}
|
|
96
|
-
default { throw [GcException]::new("unsupported manifest: $Manifest", $script:GcExitPre) }
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function Write-GcVersion {
|
|
101
|
-
param([Parameter(Mandatory)][string]$Root, [Parameter(Mandatory)][string]$Manifest, [Parameter(Mandatory)][string]$Old, [Parameter(Mandatory)][string]$New, [Parameter(Mandatory)][hashtable]$Encoding)
|
|
102
|
-
$abs = Join-Path $Root $Manifest
|
|
103
|
-
$enc = $Encoding.Enc
|
|
104
|
-
$content = $enc.GetString([System.IO.File]::ReadAllBytes($abs))
|
|
105
|
-
switch -Regex ($Manifest) {
|
|
106
|
-
'package\.json$' {
|
|
107
|
-
$content = $content -replace '("version"\s*:\s*")[^"]+(")', "`${1}$New`${2}"
|
|
108
|
-
}
|
|
109
|
-
'\.toml$' {
|
|
110
|
-
$content = $content -replace '(?m)^(version\s*=\s*")[^"]+(")', "`${1}$New`${2}"
|
|
111
|
-
}
|
|
112
|
-
'^VERSION$' {
|
|
113
|
-
$content = $New + "`n"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
[System.IO.File]::WriteAllBytes($abs, $enc.GetBytes($content))
|
|
117
|
-
# verify the write-back, never trust the replace
|
|
118
|
-
$readBack = Read-GcVersion -Root $Root -Manifest $Manifest -Encoding $Encoding
|
|
119
|
-
if ($readBack -ne $New) {
|
|
120
|
-
throw [GcException]::new("write-back verification failed — manifest reads '$readBack', expected '$New'; nothing was committed", $script:GcExitFail)
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
try {
|
|
125
|
-
$root = Resolve-GcRoot -Path $RepoRoot
|
|
126
|
-
Write-GcInfo "repo: $root"
|
|
127
|
-
|
|
128
|
-
$cur = Get-GcCurrentBranch -Root $root
|
|
129
|
-
$default = Get-GcDefaultBranch -Root $root
|
|
130
|
-
if ($cur -eq $default) {
|
|
131
|
-
throw [GcException]::new("refusing to bump on the default branch ($default) — the release commit ships through a PR (§6/§11b); gc-branch first", $script:GcExitPre)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
# exactly one bump direction
|
|
135
|
-
$flags = @([bool]$Major, [bool]$Minor, [bool]$Patch)
|
|
136
|
-
$given = @($flags | Where-Object { $_ }).Count + $(if ($Set) { 1 } else { 0 })
|
|
137
|
-
if ($given -ne 1) {
|
|
138
|
-
throw [GcException]::new('pick exactly one: -Major, -Minor, -Patch, or -Set <version>', $script:GcExitPre)
|
|
139
|
-
}
|
|
140
|
-
if ($Reason -match '\r?\n' -or $Reason.Length -gt 200) {
|
|
141
|
-
throw [GcException]::new('-Reason must be one line, ≤200 chars', $script:GcExitPre)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
# one source of truth (§8)
|
|
145
|
-
$manifests = @(@('package.json','pyproject.toml','Cargo.toml','VERSION') | Where-Object { Test-Path -LiteralPath (Join-Path $root $_) })
|
|
146
|
-
if (-not $manifests) {
|
|
147
|
-
throw [GcException]::new('no version manifest found — expected package.json, pyproject.toml, Cargo.toml, or a VERSION file', $script:GcExitPre)
|
|
148
|
-
}
|
|
149
|
-
if (@($manifests).Count -gt 1) {
|
|
150
|
-
throw [GcException]::new("multiple manifests ($($manifests -join ', ')) — two sources of truth; fix before bumping (§8)", $script:GcExitPre)
|
|
151
|
-
}
|
|
152
|
-
$manifest = $manifests[0]
|
|
153
|
-
|
|
154
|
-
$manifestAbs = Join-Path $root $manifest
|
|
155
|
-
$manifestEnc = Get-GcManifestEncoding -Path $manifestAbs
|
|
156
|
-
$old = Read-GcVersion -Root $root -Manifest $manifest -Encoding $manifestEnc
|
|
157
|
-
if ($old -notmatch '^\d+\.\d+\.\d+$') {
|
|
158
|
-
throw [GcException]::new("repo version '$old' is not MAJOR.MINOR.PATCH — repo-declared format wins; bump it by hand (§8)", $script:GcExitPre)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
$maj, $min, $pat = $old -split '\.' | ForEach-Object { [int]$_ }
|
|
162
|
-
if ($Set) {
|
|
163
|
-
if ($Set -notmatch '^\d+\.\d+\.\d+$') { throw [GcException]::new("-Set must be MAJOR.MINOR.PATCH", $script:GcExitPre) }
|
|
164
|
-
$new = $Set; $kind = 'set'
|
|
165
|
-
} elseif ($Major) { $maj++; $new = "$maj.0.0"; $kind = 'major' }
|
|
166
|
-
elseif ($Minor) { $min++; $new = "$maj.$min.0"; $kind = 'minor' }
|
|
167
|
-
else { $pat++; $new = "$maj.$min.$pat"; $kind = 'patch' }
|
|
168
|
-
|
|
169
|
-
if ([version]$new -le [version]$old) {
|
|
170
|
-
throw [GcException]::new("$new is not above $old — never bump downward, never reuse a version (§8)", $script:GcExitPre)
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
# the bump is its own commit — a dirty tree is refused, not mixed in
|
|
174
|
-
if (-not (Test-GcCleanTree -Root $root)) {
|
|
175
|
-
throw [GcException]::new('tree is not clean — the bump must be its own commit; commit or stash the feature work first (§8)', $script:GcExitPre)
|
|
176
|
-
}
|
|
177
|
-
Assert-GcIdentity -Root $root
|
|
178
|
-
|
|
179
|
-
Write-GcInfo "bumping ${manifest}: $old -> $new ($kind)"
|
|
180
|
-
Write-GcVersion -Root $root -Manifest $manifest -Old $old -New $new -Encoding $manifestEnc
|
|
181
|
-
|
|
182
|
-
$subject = "chore(release): $old -> $new"
|
|
183
|
-
Get-GcSubjectParts -Subject $subject | Out-Null # ceremony-valid message
|
|
184
|
-
$argv = @('commit','-m',$subject,'-m',"-${kind}: $Reason")
|
|
185
|
-
Invoke-GcGit -Root $root -Argv (@('add','--',$manifest))
|
|
186
|
-
Stop-GcOnSecrets -Root $root # same gate as gc-commit — a manifest must never smuggle a secret
|
|
187
|
-
Invoke-GcGit -Root $root -Argv $argv
|
|
188
|
-
|
|
189
|
-
$sha = (Get-GcGit -Root $root -Argv @('rev-parse','--short','HEAD') | Select-Object -First 1).Trim()
|
|
190
|
-
Write-GcOk "$subject @ $sha"
|
|
191
|
-
Write-GcResult -Props @{ manifest = $manifest; old = $old; new = $new; kind = $kind; reason = $Reason; sha = $sha; action = 'bumped' }
|
|
192
|
-
} catch [GcException] {
|
|
193
|
-
Write-GcFail $_.Exception.Message
|
|
194
|
-
Write-GcResult -Code $_.Exception.Code -Props @{ message = $_.Exception.Message }
|
|
195
|
-
} catch {
|
|
196
|
-
Write-GcFail "unexpected: $($_.Exception.Message)"
|
|
197
|
-
Write-GcResult -Code $script:GcExitFail -Props @{ message = $_.Exception.Message }
|
|
198
|
-
}
|