@haposoft/cafekit 0.15.3 → 0.16.0-rc.2

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 (90) hide show
  1. package/README.md +4 -2
  2. package/bin/__tests__/codex-hooks.test.js +140 -0
  3. package/bin/__tests__/codex-native.test.js +2 -2
  4. package/bin/__tests__/develop-contract.test.js +1120 -0
  5. package/bin/__tests__/installer-safety.test.js +510 -2
  6. package/bin/__tests__/package-inventory.test.js +258 -0
  7. package/bin/__tests__/secret-scanner.test.js +157 -0
  8. package/bin/__tests__/validator-grounding.test.js +713 -0
  9. package/bin/install.js +5 -1
  10. package/bin/lib/codex-install.js +21 -6
  11. package/bin/lib/context.js +17 -6
  12. package/bin/lib/copy-utils.js +31 -0
  13. package/bin/lib/instruction-blocks.js +85 -0
  14. package/bin/lib/managed-writer.js +4 -1
  15. package/bin/lib/opencode-install.js +75 -30
  16. package/bin/phases/claude-runtime.js +103 -4
  17. package/bin/phases/codex-runtime.js +9 -5
  18. package/bin/phases/post-install.js +29 -22
  19. package/bin/phases/root-config.js +89 -10
  20. package/package.json +14 -4
  21. package/src/claude/CLAUDE.md +6 -122
  22. package/src/claude/agents/code-auditor.md +28 -22
  23. package/src/claude/agents/debugger.md +3 -3
  24. package/src/claude/agents/deployer.md +1 -1
  25. package/src/claude/agents/{god-developer.md → implementer.md} +2 -2
  26. package/src/claude/agents/project-manager.md +1 -1
  27. package/src/claude/agents/spec-maker.md +2 -2
  28. package/src/claude/hooks/__tests__/spec-gate.test.js +356 -5
  29. package/src/claude/hooks/agent.cjs +7 -14
  30. package/src/claude/hooks/rules.cjs +33 -53
  31. package/src/claude/hooks/spec-gate.cjs +66 -21
  32. package/src/claude/hooks/spec-state.cjs +5 -0
  33. package/src/claude/migration-manifest.json +9 -2
  34. package/src/claude/runtime.json +0 -3
  35. package/src/claude/scripts/generate-skill-catalog.cjs +1 -1
  36. package/src/claude/scripts/scan-staged-secrets.cjs +170 -0
  37. package/src/claude/scripts/spec-ground.cjs +189 -83
  38. package/src/claude/scripts/validate-spec-output.cjs +294 -30
  39. package/src/claude/scripts/workflow-policy.cjs +609 -0
  40. package/src/claude/skills/ai-multimodal/SKILL.md +2 -2
  41. package/src/claude/skills/ai-multimodal/references/audio-processing.md +6 -6
  42. package/src/claude/skills/ai-multimodal/references/video-analysis.md +1 -1
  43. package/src/claude/skills/backend-development/SKILL.md +4 -4
  44. package/src/claude/skills/backend-development/references/backend-architecture.md +1 -1
  45. package/src/claude/skills/backend-development/references/backend-devops.md +2 -2
  46. package/src/claude/skills/backend-development/references/backend-mindset.md +3 -3
  47. package/src/claude/skills/backend-development/references/backend-performance.md +5 -5
  48. package/src/claude/skills/backend-development/references/backend-security.md +55 -3
  49. package/src/claude/skills/backend-development/references/backend-technologies.md +5 -5
  50. package/src/claude/skills/backend-development/references/backend-testing.md +2 -2
  51. package/src/claude/skills/brainstorm/SKILL.md +2 -3
  52. package/src/claude/skills/code-review/SKILL.md +12 -8
  53. package/src/claude/skills/code-review/references/verification-gate.md +4 -4
  54. package/src/claude/skills/debug/SKILL.md +2 -0
  55. package/src/claude/skills/develop/SKILL.md +100 -52
  56. package/src/claude/skills/develop/references/parallel-waves.md +105 -26
  57. package/src/claude/skills/develop/references/quality-gate.md +78 -38
  58. package/src/claude/skills/develop/references/subagent-patterns.md +2 -2
  59. package/src/claude/skills/git/SKILL.md +44 -50
  60. package/src/claude/skills/hotfix/SKILL.md +10 -8
  61. package/src/claude/skills/hotfix/references/parallel-patterns.md +2 -2
  62. package/src/claude/skills/hotfix/references/review-cycle.md +26 -21
  63. package/src/claude/skills/inspect/SKILL.md +12 -30
  64. package/src/claude/skills/mobile-development/SKILL.md +12 -12
  65. package/src/claude/skills/mobile-development/references/mobile-android.md +7 -7
  66. package/src/claude/skills/mobile-development/references/mobile-best-practices.md +22 -23
  67. package/src/claude/skills/mobile-development/references/mobile-frameworks.md +13 -13
  68. package/src/claude/skills/mobile-development/references/mobile-ios.md +1 -1
  69. package/src/claude/skills/mobile-development/references/mobile-mindset.md +17 -19
  70. package/src/claude/skills/question/SKILL.md +13 -13
  71. package/src/claude/skills/research/SKILL.md +2 -2
  72. package/src/claude/skills/specs/SKILL.md +32 -15
  73. package/src/claude/skills/specs/references/review.md +3 -3
  74. package/src/claude/skills/specs/rules/tasks-generation.md +1 -1
  75. package/src/claude/skills/specs/templates/spec-state.json +7 -3
  76. package/src/claude/skills/sync/SKILL.md +26 -1
  77. package/src/claude/skills/sync/references/sync-protocols.md +3 -3
  78. package/src/claude/skills/test/SKILL.md +12 -4
  79. package/src/claude/skills/test/references/failure-triage.md +17 -17
  80. package/src/claude/skills/test/references/test-memory.md +2 -2
  81. package/src/codex/AGENTS.md +16 -24
  82. package/src/codex/hooks/lib/spec-receipt.cjs +57 -4
  83. package/src/codex/hooks/rules.cjs +27 -26
  84. package/src/codex/hooks/spec-gate.cjs +19 -8
  85. package/src/codex/hooks/spec-state.cjs +10 -1
  86. package/src/common/AGENTS.md +43 -0
  87. package/src/opencode/AGENTS.md +21 -121
  88. package/src/opencode/plugins/rules.ts +26 -34
  89. package/src/opencode/plugins/spec-gate.ts +283 -0
  90. package/src/claude/skills/inspect/references/external-gemini-inspection.md +0 -169
@@ -59,13 +59,13 @@ See: `references/backend-technologies.md` for detailed comparisons
59
59
 
60
60
  ## Key Best Practices (2025)
61
61
 
62
- **Security:** Argon2id passwords, parameterized queries (98% SQL injection reduction), OAuth 2.1 + PKCE, rate limiting, security headers
62
+ **Security:** Argon2id passwords, parameterized queries prevent SQL injection, OAuth 2.1 + PKCE, rate limiting, security headers
63
63
 
64
- **Performance:** Redis caching (90% DB load reduction), database indexing (30% I/O reduction), CDN (50%+ latency cut), connection pooling
64
+ **Performance:** Redis caching reduces DB load, database indexing reduces I/O, CDN cuts latency, connection pooling
65
65
 
66
- **Testing:** 70-20-10 pyramid (unit-integration-E2E), Vitest 50% faster than Jest, contract testing for microservices, 83% migrations fail without tests
66
+ **Testing:** 70-20-10 pyramid (unit-integration-E2E), Vitest or Jest, contract testing for microservices, migration tests
67
67
 
68
- **DevOps:** Blue-green/canary deployments, feature flags (90% fewer failures), Kubernetes 84% adoption, Prometheus/Grafana monitoring, OpenTelemetry tracing
68
+ **DevOps:** Blue-green/canary deployments, feature flags can reduce failures, Kubernetes, Prometheus/Grafana monitoring, OpenTelemetry tracing
69
69
 
70
70
  ## Quick Decision Matrix
71
71
 
@@ -218,7 +218,7 @@ Shipping Service
218
218
 
219
219
  ## Event-Driven Architecture
220
220
 
221
- **Impact:** 85% organizations recognize business value
221
+ **Impact:** Organizations recognize business value
222
222
 
223
223
  ### Event Sourcing
224
224
 
@@ -50,7 +50,7 @@ kubectl rollout resume deployment/api
50
50
 
51
51
  ### Feature Flags (Progressive Delivery)
52
52
 
53
- **Impact:** 90% fewer deployment failures when combined with canary
53
+ **Impact:** Fewer deployment failures when combined with canary
54
54
 
55
55
  ```typescript
56
56
  import { LaunchDarkly } from 'launchdarkly-node-server-sdk';
@@ -105,7 +105,7 @@ CMD ["node", "dist/main.js"]
105
105
  ```
106
106
 
107
107
  **Benefits:**
108
- - Smaller image size (50-90% reduction)
108
+ - Smaller image size
109
109
  - Faster deployments
110
110
  - Reduced attack surface
111
111
 
@@ -105,7 +105,7 @@ const users = await db.query(`
105
105
 
106
106
  ### Technical Debt Management
107
107
 
108
- **20-40% productivity increase** from addressing technical debt properly
108
+ **Productivity increase** from addressing technical debt properly
109
109
 
110
110
  **Debt Quadrants:**
111
111
  1. **Reckless + Deliberate:** "We don't have time for design"
@@ -264,7 +264,7 @@ async function getUsers(limit?: number) {
264
264
 
265
265
  ### Testing Mindset (TDD/BDD)
266
266
 
267
- **70% happy-path tests drafted by AI, humans focus on edge cases**
267
+ **AI drafts happy-path tests, humans focus on edge cases**
268
268
 
269
269
  **Test-Driven Development (TDD):**
270
270
  ```
@@ -287,7 +287,7 @@ Feature: User Registration
287
287
 
288
288
  ### Observability and Debugging Approach
289
289
 
290
- **100% median ROI, $500k average return** from observability investments
290
+ **Positive ROI** from observability investments
291
291
 
292
292
  **Three Questions:**
293
293
  1. **Is it slow?** → Check metrics (response time, DB queries)
@@ -8,7 +8,7 @@ Performance optimization strategies, caching patterns, and scalability best prac
8
8
 
9
9
  #### Indexing Strategies
10
10
 
11
- **Impact:** 30% disk I/O reduction, 10-100x query speedup
11
+ **Impact:** Reduced disk I/O and faster queries
12
12
 
13
13
  ```sql
14
14
  -- Create index on frequently queried columns
@@ -88,7 +88,7 @@ const posts = await Post.findAll({
88
88
 
89
89
  ### Redis Caching
90
90
 
91
- **Impact:** 90% DB load reduction, 10-100x faster response
91
+ **Impact:** Reduced DB load and faster responses
92
92
 
93
93
  #### Cache-Aside Pattern (Lazy Loading)
94
94
 
@@ -140,7 +140,7 @@ await redis.keys('user:*').then(keys => redis.del(...keys));
140
140
 
141
141
  ```
142
142
  Client
143
- → CDN Cache (static assets, 50%+ latency reduction)
143
+ → CDN Cache (static assets, reduced latency)
144
144
  → API Gateway Cache (public endpoints)
145
145
  → Application Cache (Redis)
146
146
  → Database Query Cache
@@ -236,7 +236,7 @@ emailQueue.process('send-welcome', async (job) => {
236
236
 
237
237
  ## CDN (Content Delivery Network)
238
238
 
239
- **Impact:** 50%+ latency reduction for global users
239
+ **Impact:** Reduced latency for global users
240
240
 
241
241
  ### Configuration
242
242
 
@@ -302,7 +302,7 @@ const users = await replicaDb.users.findAll();
302
302
  ```
303
303
 
304
304
  **Use Cases:**
305
- - Read-heavy workloads (90%+ reads)
305
+ - Read-heavy workloads
306
306
  - Analytics queries
307
307
  - Reporting dashboards
308
308
 
@@ -11,7 +11,7 @@ Security best practices, OWASP Top 10 mitigation, and modern security standards
11
11
  ### Top Vulnerabilities & Mitigation
12
12
 
13
13
  #### 1. Broken Access Control
14
- **Risk:** Users access unauthorized resources (28% of vulnerabilities)
14
+ **Risk:** Users access unauthorized resources
15
15
 
16
16
  **Mitigation:**
17
17
  - Implement RBAC (Role-Based Access Control)
@@ -52,7 +52,7 @@ ph.verify(hash, "password123") # Verify password
52
52
  #### 3. Injection Attacks
53
53
  **Risk:** SQL injection, NoSQL injection, command injection (6x increase 2020-2024)
54
54
 
55
- **Mitigation (98% vulnerability reduction):**
55
+ **Mitigation:** Parameterized queries prevent SQL injection.
56
56
  - Use parameterized queries ALWAYS
57
57
  - Input validation with allow-lists
58
58
  - Escape special characters
@@ -156,7 +156,7 @@ pip-audit --fix
156
156
  - Network segmentation
157
157
  - Disable unnecessary protocols (file://, gopher://)
158
158
 
159
- ## Input Validation (Prevents 70%+ Vulnerabilities)
159
+ ## Input Validation (Prevents Vulnerabilities)
160
160
 
161
161
  ### Validation Strategies
162
162
 
@@ -257,6 +257,58 @@ const dbPassword = process.env.DB_PASSWORD;
257
257
  if (!dbPassword) throw new Error('DB_PASSWORD not set');
258
258
  ```
259
259
 
260
+ ## Critical Security Invariants (apply only when the task touches these surfaces)
261
+
262
+ These invariants are lane-aware: enforce them for Critical tasks that touch the
263
+ named surface; for Direct/Standard tasks that happen to touch it, apply the same
264
+ checks with proportional evidence (targeted unit test + diff self-check for Direct,
265
+ bounded suite for Standard). Do not impose a fixed heavy ceremony on every task.
266
+
267
+ ### Logging & Secret Redaction
268
+
269
+ - Match secret names by exact token boundaries, not broad substrings. Never redact
270
+ by substring inside safe identifiers — e.g. names ending in `_file`, `_path`,
271
+ `_hint`, `_label` or containing `tokenizer` must stay intact. Preserve the
272
+ field/key name, replace only the value with `[REDACTED]` (use `[REDACTED-PEM]`
273
+ for PEM blocks, keeping the surrounding structure).
274
+ - Leave public URLs and credential-free strings untouched. URL redaction applies
275
+ only when a credential is present in the URL (e.g. `user:pass@host`).
276
+ - Authorization redaction is quote-aware and delimiter-safe: match schemes
277
+ `Bearer`/`Basic` case-insensitively, redact only the credential that follows,
278
+ preserve surrounding quotes and trailing delimiters (`,`, `;`, whitespace) outside
279
+ the redacted value, and never drop the closing quote.
280
+ - Idempotence: `redact(redact(x)) === redact(x)`. The markers `[REDACTED]` /
281
+ `[REDACTED-PEM]` are stable and not re-wrapped or corrupted.
282
+ - Verification guidance: cover true-positive credential cases, false-positive
283
+ safe-identifier and public-URL cases, quoted `Bearer`/`Basic` with trailing
284
+ delimiters, multi-line/PEM cases when relevant, and an idempotence round-trip.
285
+ Assert that no secret appears in error messages or completion reports and that
286
+ safe values are byte-identical after redaction.
287
+
288
+ ### Filesystem Write Boundary
289
+
290
+ - Require an existing real directory as root. Reject before any mutation when
291
+ `targetPath` is empty or whitespace-only, contains a URI scheme, is absolute,
292
+ escapes via `..` segments, or escapes via sibling-prefix (`root` vs
293
+ `root-evil`).
294
+ - Containment needs two checks: lexical containment of the resolved path
295
+ (`path.resolve(root, target)` inside root) **and** `realpath` containment of
296
+ the deepest existing parent directory. This blocks symlink-pointing-outside
297
+ and traversal that lexical check alone would miss. Never follow or overwrite a
298
+ symlink at the final target; never create parent directories outside root.
299
+ - Perform atomic same-directory write: create a temporary file in the target
300
+ directory, write fully, then `rename` into place. Remove the temp file on any
301
+ error. Rejections must happen before creating or modifying anything outside root.
302
+ - Return the canonical `realpath` of the target on success (e.g. macOS
303
+ `/var` → `/private/var` alias must resolve). Keep the public API otherwise
304
+ unchanged.
305
+ - Verification guidance: nested success, traversal / absolute / URI / sibling-prefix
306
+ rejection, parent-symlink rejection, final-symlink rejection (do not follow or
307
+ overwrite), no-outside-mutation assertion (filesystem outside root unchanged on
308
+ failure), atomic temp cleanup, and canonical return-path equality. Critical runs
309
+ the full project suite; Direct/Standard use proportional lane evidence (targeted
310
+ unit test + diff self-check for Direct, bounded suite for Standard).
311
+
260
312
  ## API Security Checklist
261
313
 
262
314
  - [ ] Use HTTPS/TLS 1.3 only
@@ -22,7 +22,7 @@ Core technologies, frameworks, databases, and message queues for modern backend
22
22
  **When to Choose:** Team already using JavaScript/TypeScript, real-time features needed, rapid development priority
23
23
 
24
24
  ### Python
25
- **Market Position:** FastAPI adoption surge - 73% migrating from Flask
25
+ **Market Position:** FastAPI adoption is increasing among Flask users
26
26
 
27
27
  **Best For:**
28
28
  - Data-heavy applications
@@ -54,7 +54,7 @@ Core technologies, frameworks, databases, and message queues for modern backend
54
54
  **When to Choose:** Microservices, high concurrency needs, DevOps tooling, simple deployment (single binary)
55
55
 
56
56
  ### Rust
57
- **Market Position:** 72% most admired language, 1.5x faster than Go
57
+ **Market Position:** Highly admired language, faster than Go
58
58
 
59
59
  **Best For:**
60
60
  - Performance-critical systems
@@ -129,7 +129,7 @@ Core technologies, frameworks, databases, and message queues for modern backend
129
129
  - Rate limiting
130
130
  - Real-time leaderboards
131
131
  - Job queues (Bull, BullMQ)
132
- - Caching layer (90% DB load reduction)
132
+ - Caching layer (reduces DB load)
133
133
 
134
134
  **When to Choose:** Need sub-millisecond latency, caching layer, session management
135
135
 
@@ -242,9 +242,9 @@ Millions msg/sec? → Yes → Kafka
242
242
 
243
243
  1. **Choosing NoSQL for relational data** - Use PostgreSQL if data has clear relationships
244
244
  2. **Not using connection pooling** - Implement pooling for 5-10x performance boost
245
- 3. **Ignoring indexes** - Add indexes to frequently queried columns (30% I/O reduction)
245
+ 3. **Ignoring indexes** - Add indexes to frequently queried columns (reduces I/O)
246
246
  4. **Over-engineering with microservices** - Start monolith, split when needed
247
- 5. **Not caching** - Redis caching provides 90% DB load reduction
247
+ 5. **Not caching** - Redis caching reduces DB load
248
248
 
249
249
  ## Resources
250
250
 
@@ -24,7 +24,7 @@ Comprehensive testing approaches, frameworks, and quality assurance practices (2
24
24
  ### Frameworks by Language
25
25
 
26
26
  **TypeScript/JavaScript:**
27
- - **Vitest** - 50% faster than Jest in CI/CD, ESM native
27
+ - **Vitest** - Faster than Jest in CI/CD, ESM native
28
28
  - **Jest** - Mature, large ecosystem, snapshot testing
29
29
 
30
30
  **Python:**
@@ -269,7 +269,7 @@ test('user can register and login', async ({ page }) => {
269
269
 
270
270
  ## Database Migration Testing
271
271
 
272
- **Critical:** 83% migrations fail without proper testing
272
+ **Migrations fail without proper testing**
273
273
 
274
274
  ```typescript
275
275
  describe('Database Migrations', () => {
@@ -59,7 +59,7 @@ If any item is vague, ask one more grounded question. Do not proceed with phrase
59
59
  | "This is too simple to need a design" | Simple projects = most wasted work from unexamined assumptions. |
60
60
  | "I already know the solution" | Then writing it down takes 30 seconds. Do it. |
61
61
  | "The user wants action, not talk" | Bad action wastes more time than good planning. |
62
- | "Let me explore the code first" | Brainstorming tells you HOW to explore. Follow the process. |
62
+ | "I'll skip the scout summary and go straight to questions" | Gate order is scout → summarize findings → ask. Questions come from evidence. |
63
63
  | "I'll just prototype quickly" | Prototypes become production code. Design first. |
64
64
 
65
65
  ## Collaboration Tools
@@ -70,8 +70,7 @@ Leverage these specific tools or sub-agents to execute the workflow effectively:
70
70
  - `hapo:ai-multimodal`: Use this when analyzing visual materials and mockups.
71
71
  - `repomix --remote`: Use this bash command to summarize external Github repositories if a URL is provided.
72
72
  - `psql`: Query database schemas to understand existing data structures.
73
- - `brainstormer`: Call only for medium/high-complexity architecture trade-offs.
74
- - **Ecosystem Swarm (`SendMessage`):** Call `researcher` (validation), `docs-keeper` (architecture boundaries), or `project-manager` (scope warnings) for deeply complex specs.
73
+ Call brainstormer only when 2+ architectures have material trade-offs after discovery; call researcher only for external/current facts the repo cannot answer.
75
74
 
76
75
  ## Discovery Question Framework
77
76
 
@@ -24,6 +24,9 @@ Before executing any review, firmly grasp these two pillars:
24
24
  - `references/adversarial-review.md` (Stage 3 rules)
25
25
 
26
26
  ## Core Principles
27
+
28
+ Executable policy source: `.claude/scripts/workflow-policy.cjs` (source: `src/claude/scripts/workflow-policy.cjs`). Review outputs and consumers must use its exact `PASS | FAIL | BLOCKED` verdict enum.
29
+
27
30
  1. **YAGNI**, **KISS**, **DRY** always prevail.
28
31
  2. Technical correctness over social comfort. Be honest and straight to the point.
29
32
  3. If Specs are provided as PDF or Design Images, do not guess — use `hapo:ai-multimodal` to verify.
@@ -41,7 +44,7 @@ If invoked without explicit arguments, default to reviewing recent changes (pend
41
44
 
42
45
  ## 3-Stage Adversarial Protocol
43
46
 
44
- Ensure verification walks through these three stages before delivering a final score.
47
+ Ensure verification walks through these three stages before delivering a final verdict.
45
48
 
46
49
  ### Stage 1 — Spec Compliance (with `ai-multimodal` injection)
47
50
  Does the code match what was requested?
@@ -61,18 +64,18 @@ Actively try to break the code.
61
64
  - Find false assumptions, resource exhaustion loops, and race conditions.
62
65
  - Find unhandled edge cases (e.g. empty strings, null pointers, negative integers).
63
66
 
64
- ## Output Scoring
67
+ ## Output
65
68
 
66
- Your report MUST return a score out of 10.
67
- - **PASS:** Score >= 9.5 and **0 Critical findings**.
68
- - **FAIL:** Score < 9.5 or > 0 Critical findings.
69
+ Your report MUST classify every finding by severity and return exactly one verdict from `PASS | FAIL | BLOCKED`. Every review verdict/output consumer MUST accept only `PASS | FAIL | BLOCKED` and reject any other value.
70
+ - **PASS:** no Critical findings, no High findings, at most one Medium.
71
+ - **FAIL:** one or more Critical or High findings, or two or more Medium findings.
72
+ - **BLOCKED:** missing execution proof, permission, environment, or user-owned decision prevents review completion. Stop without blind retry; report blocker and required input.
69
73
 
70
74
  Format:
71
75
  ```markdown
72
76
  # Code Review Results [hapo:code-review]
73
77
 
74
- **Score:** X.X / 10
75
- **Status:** PASS | FAIL
78
+ **Verdict:** PASS | FAIL | BLOCKED
76
79
  **Target:** [PR | Commit | Path]
77
80
 
78
81
  ## Stage 1: Spec Compliance
@@ -83,7 +86,8 @@ Format:
83
86
 
84
87
  ## Stage 3: Adversarial Findings
85
88
  - [🔴 Critical] ...
86
- - [🟡 Warning] ...
89
+ - [🟠 High] ...
90
+ - [🟡 Medium] ...
87
91
  - [🔵 Suggestion] ...
88
92
 
89
93
  ## Fix Commands (Terminal ready)
@@ -8,7 +8,7 @@ description: The Iron Law of Proof. Prohibits reporting a 'PASS' status without
8
8
  In the Hapo ecosystem, words are cheap. Code that "looks right" to an AI can easily break in production. This reference defines the strictest, most uncompromising rule for Code Review.
9
9
 
10
10
  ## 1. The Iron Law
11
- **You MUST NOT issue a final score of PASS unless you hold concrete, verifiable execution proof.**
11
+ **You MUST NOT issue a final verdict of PASS unless you hold concrete, verifiable execution proof.**
12
12
 
13
13
  ## 2. Hallucination Block
14
14
  Never use the following phrases or implications to assess code functionality:
@@ -28,6 +28,6 @@ To clear the Verification Gate, you must cite one of the following concrete proo
28
28
  - **Multimodal Visual Evidence:** `hapo:ai-multimodal` confirming that the visual rendering perfectly matches the design layout.
29
29
 
30
30
  ## 4. How to Handle Missing Proof
31
- If you are asked to review a PR or commit and no execution proof is available in the memory or context:
32
- 1. **Demand Action:** Instruct the `god-developer` or `test-runner` to run the test suite and provide you with the terminal logs.
33
- 2. **Issue an Incomplete PASS:** If you must proceed due to workflow limitations, explicitly state: *"Verdict is tentative. Cannot issue an unconditional PASS because execution logs were not provided."*
31
+ If you are asked to review a PR or commit and no execution proof is available:
32
+ 1. **Return `BLOCKED`** and name missing commands, artifacts, permissions, or environment access.
33
+ 2. Do not issue `PASS`, do not downgrade to a tentative pass, and do not blind-retry. Resume only after proof arrives.
@@ -49,6 +49,8 @@ Do NOT recommend a fix until the root-cause contract is complete.
49
49
  Do NOT stop at the first plausible explanation. Test hypotheses against evidence.
50
50
  If 2+ hypotheses are refuted, change strategy before continuing.
51
51
  If evidence is insufficient, report `Root cause: unknown`, `Missing Evidence`, and `Next Diagnostic Action`; do not hand off to `hapo:hotfix` as ready.
52
+ Answer each item in one concrete sentence.
53
+ If any answer contains 'probably', 'I think', 'something with', or 'maybe' — it is not an answer; gather evidence instead.
52
54
  </ROOT-CAUSE-GATE>
53
55
 
54
56
  If the user asks to fix while still inside `hapo:debug`, finish the debug report first. Then hand off only the completed root-cause contract to `hapo:hotfix`.