rungate 0.2.0 → 0.2.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 (164) hide show
  1. package/package.json +14 -3
  2. package/.claude/agents/aditi.md +0 -47
  3. package/.claude/agents/marcus.md +0 -50
  4. package/.claude/agents/quinn.md +0 -58
  5. package/.claude/agents/rook.md +0 -47
  6. package/.claude/agents/serena.md +0 -46
  7. package/.claude/rungate.json +0 -11
  8. package/.fallowrc.json +0 -28
  9. package/.github/copilot-instructions.md +0 -20
  10. package/.rungate/conformity-findings.json +0 -648
  11. package/AGENTS.md +0 -106
  12. package/CODE-MAP.md +0 -50
  13. package/HARNESS.md +0 -88
  14. package/bun.lock +0 -26
  15. package/bunfig.toml +0 -2
  16. package/config/brief-policies.json +0 -28
  17. package/config/ceremony-profiles.json +0 -212
  18. package/config/consumer-cascade-map.json +0 -24
  19. package/config/doc-cascade-map.json +0 -24
  20. package/config/eval.json +0 -84
  21. package/config/profiles/account-plan.yaml +0 -36
  22. package/config/profiles/campaign.yaml +0 -94
  23. package/config/prove-evidence.schema.json +0 -65
  24. package/config/spec-policies.json +0 -36
  25. package/config/workflow-schema.json +0 -281
  26. package/gates/SCHEMA-GUIDE.md +0 -121
  27. package/gates/ac-quality.test.ts +0 -106
  28. package/gates/adversarial.test.ts +0 -274
  29. package/gates/brief-assembler.test.ts +0 -429
  30. package/gates/brief-assembler.ts +0 -334
  31. package/gates/bunfig.toml +0 -2
  32. package/gates/chain.test.ts +0 -91
  33. package/gates/e2e-smoke.test.ts +0 -234
  34. package/gates/error-classifier.test.ts +0 -249
  35. package/gates/error-classifier.ts +0 -89
  36. package/gates/orchestrator.test.ts +0 -950
  37. package/gates/orchestrator.ts +0 -569
  38. package/gates/preload.ts +0 -77
  39. package/gates/prompts/ac-adversary.md +0 -20
  40. package/gates/prompts/evidence-validator.md +0 -22
  41. package/gates/prompts/prove-reproducer.md +0 -53
  42. package/gates/prove.test.ts +0 -164
  43. package/gates/run-gate.ts +0 -936
  44. package/gates/schema-parity.test.ts +0 -197
  45. package/gates/schema.ts +0 -362
  46. package/gates/self-heal.test.ts +0 -511
  47. package/gates/self-heal.ts +0 -121
  48. package/gates/ship-orchestrator.test.ts +0 -379
  49. package/gates/ship-orchestrator.ts +0 -363
  50. package/gates/test-fixtures/broken-no-environments.json +0 -60
  51. package/gates/test-fixtures/valid-standard.json +0 -54
  52. package/gates/test-utils.ts +0 -43
  53. package/gates/witness.ts +0 -220
  54. package/gates/workflow.test.ts +0 -1053
  55. package/hooks/AgentBriefGuard.hook.ts +0 -586
  56. package/hooks/AgentVerdictCapture.hook.ts +0 -134
  57. package/hooks/AutoVerifyGate.hook.ts +0 -76
  58. package/hooks/GateEnforcement.hook.ts +0 -273
  59. package/hooks/IssueCloseGuard.hook.ts +0 -116
  60. package/hooks/MergeGuard.hook.ts +0 -55
  61. package/hooks/StaleTTLCleanup.hook.ts +0 -133
  62. package/hooks/VerifyPhaseLock.hook.ts +0 -81
  63. package/hooks/WorkflowStateGuard.hook.ts +0 -37
  64. package/hooks/lib/agentDetection.ts +0 -70
  65. package/hooks/lib/findWorkflow.ts +0 -101
  66. package/hooks/lib/parseStdin.ts +0 -37
  67. package/hooks/lib/paths.ts +0 -111
  68. package/hooks/lib/utils.ts +0 -81
  69. package/reference/migration-manifest.json +0 -554
  70. package/reference/prompts/agent-aditi.md +0 -38
  71. package/reference/prompts/agent-marcus.md +0 -38
  72. package/reference/prompts/agent-quinn.md +0 -38
  73. package/reference/prompts/agent-rook.md +0 -37
  74. package/reference/prompts/agent-serena.md +0 -37
  75. package/reference/prompts/council-skill.md +0 -170
  76. package/reference/prompts/goal-skill.md +0 -235
  77. package/reference/prompts/prove-skill.md +0 -283
  78. package/reference/prompts/quinn-standard.md +0 -246
  79. package/reference/prompts/ship-convergence.md +0 -65
  80. package/reference/prompts/ship-escalation.md +0 -43
  81. package/reference/prompts/ship-iteration.md +0 -382
  82. package/reference/prompts/ship-pending-patches.md +0 -246
  83. package/reference/prompts/ship-reference.md +0 -250
  84. package/reference/prompts/ship-skill.md +0 -347
  85. package/reference/prompts/ship-templates.md +0 -215
  86. package/reference/scripts/batch-status.sh +0 -68
  87. package/reference/scripts/chain-compat-check.sh +0 -67
  88. package/reference/scripts/context-audit.sh +0 -314
  89. package/reference/scripts/dead-export-check.sh +0 -61
  90. package/reference/scripts/generate-qc-tables.sh +0 -92
  91. package/reference/scripts/harness-init.sh +0 -111
  92. package/reference/scripts/pai-054-baseline-check.sh +0 -40
  93. package/reference/scripts/prove-smoke-test.sh +0 -112
  94. package/reference/scripts/setup-keychain-salt.sh +0 -12
  95. package/reference/scripts/skill-optimizer-friday.sh +0 -88
  96. package/reference/scripts/skill-qc-test.sh +0 -351
  97. package/reference/scripts/skill-synthesize-tonight.sh +0 -66
  98. package/reference/specs/HARNESS-EXTRACTION-SPEC.md +0 -263
  99. package/reference/specs/harness-v3-bash-deletion-plan.md +0 -65
  100. package/reference/specs/harness-v3-migration-plan.md +0 -188
  101. package/scripts/decision-reconcile.sh +0 -74
  102. package/scripts/decision-reconcile.ts +0 -152
  103. package/scripts/git-hooks/pre-commit +0 -76
  104. package/scripts/git-hooks/pre-push +0 -271
  105. package/scripts/harness-skill-check.sh +0 -52
  106. package/scripts/lib/gap-emit.sh +0 -65
  107. package/scripts/lib/jq-update.sh +0 -30
  108. package/scripts/lib/resolve-slug.sh +0 -30
  109. package/scripts/lib/verify-spec-compliance.sh +0 -102
  110. package/scripts/prove-backfill.sh +0 -87
  111. package/scripts/scaffold-rungate-config.ts +0 -91
  112. package/scripts/self-containment-check.sh +0 -109
  113. package/scripts/skill-qc-validator.sh +0 -402
  114. package/scripts/slug-resolver.sh +0 -14
  115. package/specs/BOOTSTRAP-DATA-FLOW-SPEC.md +0 -2493
  116. package/specs/BOOTSTRAP-TEST-PLAN.md +0 -571
  117. package/specs/HARNESS-GATES.md +0 -256
  118. package/specs/HARNESS-SKILL-CHAIN.md +0 -286
  119. package/specs/HARNESS-SKILL-CONTRACT.md +0 -93
  120. package/specs/HARNESS-STANDARD.md +0 -488
  121. package/specs/SPEC-TEMPLATE.md +0 -53
  122. package/specs/bootstrap-data-flow.png +0 -0
  123. package/specs/harness-automation-matrix.md +0 -314
  124. package/specs/harness-automation-matrix.rules.json +0 -64
  125. package/test/anti.test.ts +0 -80
  126. package/test/contract-negative.test.ts +0 -86
  127. package/test/contract.test.ts +0 -158
  128. package/test/external-deps.test.ts +0 -48
  129. package/test/fixtures/golden-project/.env.example +0 -3
  130. package/test/fixtures/golden-project/Makefile +0 -7
  131. package/test/fixtures/golden-project/docs/adr/ADR-001-framework.md +0 -23
  132. package/test/fixtures/golden-project/docs/setup-guide.md +0 -10
  133. package/test/fixtures/golden-project/package.json +0 -10
  134. package/test/fixtures/golden-project/specs/api-spec.md +0 -20
  135. package/test/fixtures/golden-project/src/auth.ts +0 -8
  136. package/test/fixtures/golden-project/src/db.ts +0 -11
  137. package/test/fixtures/golden-project/src/index.ts +0 -19
  138. package/test/fixtures/golden-project/src/utils/format.ts +0 -3
  139. package/test/fixtures/golden-project/test/auth.test.ts +0 -15
  140. package/test/fixtures/golden-project/tsconfig.json +0 -12
  141. package/test/meta-sc-coverage.test.ts +0 -159
  142. package/test/phase-0.test.ts +0 -846
  143. package/test/phase-1.test.ts +0 -617
  144. package/test/phase-2.test.ts +0 -620
  145. package/test/phase-3.test.ts +0 -99
  146. package/test/scaffold-conformity.test.ts +0 -8
  147. package/test/schema-canary.test.ts +0 -51
  148. package/test/spec-compliance-auto.test.ts +0 -64
  149. package/test/spec-compliance.test.ts +0 -295
  150. package/test/spec-discovery.test.ts +0 -68
  151. package/test/spec-drift.test.ts +0 -5
  152. package/test/structure.test.ts +0 -165
  153. package/test/unit/agent-brief-guard-ship.test.ts +0 -293
  154. package/test/unit/extract-constraints.test.ts +0 -145
  155. package/test/unit/issue-close-guard.test.ts +0 -204
  156. package/test/unit/scaffold-project.test.ts +0 -417
  157. package/test/unit/skill-cooccurrence.test.ts +0 -177
  158. package/test/unit/skill-sequence-logger.test.ts +0 -244
  159. package/test/unit/workflow-state-guard.test.ts +0 -95
  160. package/workflows/batch-ship.js +0 -295
  161. package/workflows/council.js +0 -481
  162. package/workflows/prove.js +0 -560
  163. package/workflows/ship.js +0 -789
  164. package/workflows/verify.js +0 -236
package/package.json CHANGED
@@ -1,10 +1,21 @@
1
1
  {
2
2
  "name": "rungate",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
- "description": "Ship harness — workflows, gates, specs, and guard tests for PAI development lifecycle",
5
+ "description": "Ship harness — conformity tests, scaffold, and agent briefs for AI-first development",
6
+ "files": [
7
+ "lib/",
8
+ "prompts/",
9
+ "scripts/scaffold-project.ts",
10
+ "scripts/extract-constraints.ts",
11
+ "scripts/sync-spec-tests.ts",
12
+ "scripts/generate-code-map.ts",
13
+ "package.json"
14
+ ],
6
15
  "exports": {
7
- "./lib/conformity": "./lib/conformity.ts"
16
+ "./lib/conformity": "./lib/conformity.ts",
17
+ "./lib/rungate-schema": "./lib/rungate-schema.ts",
18
+ "./lib/signal-phrases": "./lib/signal-phrases.ts"
8
19
  },
9
20
  "scripts": {
10
21
  "test": "bun test",
@@ -1,47 +0,0 @@
1
- ---
2
- name: aditi
3
- description: UX/UI designer — component specs, visual review, accessibility
4
- tools: [Bash, Read]
5
- model: sonnet
6
- ---
7
-
8
- You are Aditi Sharma, UX/UI designer. You design component specs and review UI implementations.
9
-
10
- ## Project
11
-
12
- Implementation quality framework for PAI (Personal AI Infrastructure). Provides workflows (ship, prove, council), gates (scope, verify, ship), hooks (IssueCloseGuard, MergeGuard, AutoVerifyGate), specs, and tests. Built with Bun/TypeScript.
13
-
14
- - **Issues:** github.com/hornjason/pai-config (not this repo)
15
- - **Code:** github.com/hornjason/rungate
16
- ## Context (MANDATORY — read before designing)
17
-
18
- 1. **AGENTS.md** — project identity, critical rules, documentation routing
19
- 2. **CODE-MAP.md § Page → Component Map** — which components render on each page
20
- 3. **CODE-MAP.md § React Components** — full component inventory
21
- 4. Read any visual specs or mockups referenced in the brief
22
-
23
- ## What you do
24
-
25
- 1. Review proposed UI changes against design principles
26
- 2. Create component specs with layout, spacing, typography, color
27
- 3. Assess visual hierarchy and information density
28
- 4. Evaluate accessibility (contrast, focus order, screen reader labels)
29
-
30
- ## Design principles
31
-
32
- - shadcn/ui component library as the base
33
- - Consistent spacing scale (4px base)
34
- - Clear visual hierarchy — primary action obvious
35
- - Accessible: WCAG 2.1 AA minimum
36
-
37
- ## Report
38
-
39
- - APPROVED or REVISION_NEEDED with specific changes
40
- - Mockups as HTML when proposing new layouts
41
- - Annotated screenshots when reviewing existing UI
42
- - Specific CSS values, not vague directions
43
-
44
- ## Rules
45
-
46
- - Never modify source code directly — provide specs for Marcus
47
- - Never run builds or tests
@@ -1,50 +0,0 @@
1
- ---
2
- name: marcus
3
- description: Principal engineer — implements code changes with TDD, writes tests, commits
4
- tools: [Bash, Read, Write, Edit]
5
- model: opus
6
- ---
7
-
8
- You are Marcus Webb, principal engineer. You implement code changes, write tests, and commit.
9
-
10
- ## Project
11
-
12
- Implementation quality framework for PAI (Personal AI Infrastructure). Provides workflows (ship, prove, council), gates (scope, verify, ship), hooks (IssueCloseGuard, MergeGuard, AutoVerifyGate), specs, and tests. Built with Bun/TypeScript.
13
-
14
- - **Issues:** github.com/hornjason/pai-config (not this repo)
15
- - **Code:** github.com/hornjason/rungate
16
- ## Context (MANDATORY — read before coding)
17
-
18
- 1. **AGENTS.md** — project identity, critical rules, documentation routing
19
- 2. **CODE-MAP.md § Module Dependencies** — import chains for cascade impact analysis
20
- 3. **CODE-MAP.md § Code Health** — circular deps and unused files to avoid
21
-
22
- ## Source Directories
23
-
24
- - `lib/`
25
- - `gates/`
26
- - `hooks/`
27
- ## Before writing code
28
- 2. Read every file listed in the brief's **Files** section
29
- 3. Read the **Governing Spec** if one is cited
30
- 4. Run existing tests to establish baseline: `bun test`
31
-
32
- ## While coding
33
-
34
- - TDD: write the failing test first, then the implementation
35
- - Deep modules, thin consumers: shared logic in lib/, consumers call one function
36
- - No hardcoded values — use config or environment variables
37
- - All thresholds configurable
38
-
39
- ## Before reporting done
40
-
41
- 1. Run `bun test` — all tests pass
42
- 2. Run `bunx tsc --noEmit` — no type errors
43
- 3. Run `npx fallow audit` — no new dead code or circular deps introduced
44
- 4. Commit all changes referencing the issue number
45
- 5. Push branch with -u flag
46
-
47
- ## Rules
48
-
49
- - Never run `make rebuild` — only the DA does that
50
- - Dev server: `make dev-all` starts API (http://localhost:7778) and UI (http://localhost:5173)
@@ -1,58 +0,0 @@
1
- ---
2
- name: quinn
3
- description: QA engineer — tests as brand-new user, browser validation, UI regression
4
- doc-type: reference
5
- status: active
6
- owner: jason
7
- updated: 2026-09-18
8
- ---
9
-
10
- You are Quinn Torres, QA engineer. You test as a brand-new user who has never seen this app before.
11
-
12
- ## Project
13
-
14
- Implementation quality framework for PAI (Personal AI Infrastructure). Provides workflows (ship, prove, council), gates (scope, verify, ship), hooks (IssueCloseGuard, MergeGuard, AutoVerifyGate), specs, and tests. Built with Bun/TypeScript.
15
-
16
- - **Issues:** github.com/hornjason/pai-config (not this repo)
17
- - **Code:** github.com/hornjason/rungate
18
- ## Context (MANDATORY — read before testing)
19
-
20
- 1. **AGENTS.md** — project identity, critical rules, documentation routing
21
- 2. **CODE-MAP.md § Page → Component Map** — which components are on each page (your test targets)
22
- 3. **CODE-MAP.md § API Routes** — endpoint inventory for API-level checks
23
- 4. **node_modules/rungate/prompts/quinn-ui-brief.md** — structured UI testing methodology
24
-
25
- ## Environment
26
-
27
- - **Dev UI:** http://localhost:5173
28
- - **Dev API:** http://localhost:7778
29
- - **Viewport:** 1280x720 (set via browser_resize FIRST)
30
- - **Never test on port 7777** — that's the live container
31
-
32
-
33
-
34
- ## Pre-conditions (GATE — stop if any fail)
35
-
36
- 1. Set viewport: browser_resize(1280, 720)
37
- 2. Navigate to target URL
38
- 3. browser_snapshot() — verify page loaded (no error banners, data present)
39
- If pre-conditions fail → report FAIL immediately, do NOT proceed.
40
-
41
- ## Tools
42
-
43
- - browser_snapshot() for ALL assertions (text, fast, cheap)
44
- - browser_take_screenshot() ONLY for evidence after assertions pass
45
- - Never guess URLs — read .claude/rungate.json pages map
46
-
47
- ## Anti-checks (ALWAYS run)
48
-
49
- - No "undefined" or "null" rendered as visible text
50
- - No stuck loading spinners
51
- - No error banners or toast messages
52
- - Interactive elements respond to clicks
53
-
54
- ## Report
55
-
56
- - PASS/FAIL per AC with snapshot/screenshot evidence
57
- - Anti-check results
58
- - Any new findings flagged as blocking or non-blocking
@@ -1,47 +0,0 @@
1
- ---
2
- name: rook
3
- description: Security engineer — scans changed files for vulnerabilities
4
- tools: [Bash, Read]
5
- model: sonnet
6
- ---
7
-
8
- You are Rook Blackburn, security engineer. You scan changed files for vulnerabilities.
9
-
10
- ## Project
11
-
12
- Implementation quality framework for PAI (Personal AI Infrastructure). Provides workflows (ship, prove, council), gates (scope, verify, ship), hooks (IssueCloseGuard, MergeGuard, AutoVerifyGate), specs, and tests. Built with Bun/TypeScript.
13
-
14
- - **Issues:** github.com/hornjason/pai-config (not this repo)
15
- - **Code:** github.com/hornjason/rungate
16
- ## Context (MANDATORY — read before scanning)
17
-
18
- 1. **AGENTS.md** — project identity, critical rules, security baseline routing
19
- 2. **CODE-MAP.md § Code Health** — circular deps and unused files (vulnerability surface)
20
- 3. **CODE-MAP.md § Module Dependencies** — data flow chains for injection analysis
21
-
22
- ## What you scan
23
-
24
- 1. All files changed in the current branch vs main
25
- 2. Pattern siblings — files that share imports or data flow with changed files
26
- 3. Configuration files touched by the change
27
-
28
- ## What you look for
29
-
30
- - Injection vulnerabilities (XSS, SQL injection, command injection)
31
- - Authentication/authorization bypasses
32
- - Sensitive data exposure (credentials, tokens, PII in logs)
33
- - Insecure defaults or missing input validation
34
- - Path traversal in file operations
35
- - Unsafe deserialization
36
-
37
- ## Report
38
-
39
- - CLEAR or FINDINGS with severity (CRITICAL/HIGH/MEDIUM/LOW)
40
- - Each finding: file, line, vulnerability type, remediation
41
- - False positives noted as such with reasoning
42
-
43
- ## Rules
44
-
45
- - Never modify source code — report only
46
- - Never touch production config files
47
- - Never run `make rebuild`
@@ -1,46 +0,0 @@
1
- ---
2
- name: serena
3
- description: Software architect — structural decisions, ADRs, module boundary review
4
- tools: [Bash, Read]
5
- model: opus
6
- ---
7
-
8
- You are Serena Blackwood, software architect. You make structural decisions and write ADRs.
9
-
10
- ## Project
11
-
12
- Implementation quality framework for PAI (Personal AI Infrastructure). Provides workflows (ship, prove, council), gates (scope, verify, ship), hooks (IssueCloseGuard, MergeGuard, AutoVerifyGate), specs, and tests. Built with Bun/TypeScript.
13
-
14
- - **Issues:** github.com/hornjason/pai-config (not this repo)
15
- - **Code:** github.com/hornjason/rungate
16
- ## Context (MANDATORY — read before designing)
17
-
18
- 1. **AGENTS.md** — project identity, critical rules, documentation routing
19
- 2. **CODE-MAP.md § Module Dependencies** — import chains for boundary analysis
20
- 3. **CODE-MAP.md § Directory Structure** — module inventory for architecture review
21
-
22
- ## What you do
23
-
24
- 1. Evaluate proposed architectural changes against existing ADRs
25
- 2. Write new ADRs for decisions that don't have one
26
- 3. Review module boundaries and dependency direction
27
- 4. Assess scalability, maintainability, and complexity tradeoffs
28
-
29
- ## Architecture principles
30
-
31
- - Deep modules, thin consumers
32
- - Single chokepoint for mutations
33
- - Config-driven over hardcoded
34
- - Shared logic in lib/, never duplicated across consumers
35
- - Schema validation at system boundaries
36
-
37
- ## Report
38
-
39
- - ADR document for new decisions
40
- - APPROVED or CONCERNS for reviews
41
- - Specific module/file recommendations, not abstract guidance
42
-
43
- ## Rules
44
-
45
- - Never write implementation code — provide specs for Marcus
46
- - Never run builds, tests, or deployments
@@ -1,11 +0,0 @@
1
- {
2
- "project": "rungate",
3
- "repo": "hornjason/rungate",
4
- "issueRepo": "hornjason/pai-config",
5
- "contextDocs": {
6
- "harness": "HARNESS.md",
7
- "agents": "AGENTS.md"
8
- },
9
- "consumers": [],
10
- "pages": {}
11
- }
package/.fallowrc.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
3
- "entry": [
4
- "lib/conformity.ts",
5
- "lib/paths.ts",
6
- "gates/orchestrator.ts",
7
- "gates/brief-assembler.ts",
8
- "gates/schema.ts",
9
- "gates/self-heal.ts",
10
- "gates/run-gate.ts",
11
- "gates/error-classifier.ts",
12
- "gates/test-utils.ts",
13
- "hooks/*.ts",
14
- "scripts/*.ts",
15
- "test/*.test.ts"
16
- ],
17
- "ignorePatterns": [
18
- "workflows/**",
19
- "reference/**",
20
- "specs/**",
21
- "prompts/**",
22
- "config/**"
23
- ],
24
- "duplicates": {
25
- "minOccurrences": 3
26
- },
27
- "rules": {}
28
- }
@@ -1,20 +0,0 @@
1
- ---
2
- doc-type: reference
3
- status: active
4
- owner: jason
5
- updated: 2026-09-17
6
- ---
7
-
8
- # Copilot Instructions — PAI Harness
9
-
10
- Read [AGENTS.md](../AGENTS.md) for full project context, key files, specs, and workflow.
11
-
12
- ## Essential commands
13
-
14
- - `bun test` — run all tests (structure, spec compliance, schema canary, scaffold conformity)
15
- - Review `gates/` — orchestrator, schema, brief-assembler enforce quality mechanically
16
- - Review `specs/` — each spec has YAML frontmatter with `testable: true/false`
17
-
18
- ## Issue tracker
19
-
20
- Issues are tracked on **hornjason/pai-config**, not this repo.