← Back to Kontasks
Decisions as Compliance Gates - Design Exploration
Exploring decisions and standards as checkpoints for turn execution
Output
Decisions as Compliance Gates
Absolutely possible - and this is a powerful pattern!
The Vision
Decisions aren't just historical records - they become active constraints that guide future work. When a turn touches code covered by a decision, the system checks compliance.
How It Would Work
1. Decision Created dec_xyz: "Use SQLite for local storage" affects: { files: ["**/storage/*.ts"], apis: ["Database*"] } chosen: { value: "sqlite" } 2. Turn Starts Claude edits src/storage/user-store.ts 3. Compliance Check (Pre-Commit Hook or Turn Context) ⚠️ Active decision applies: dec_xyz → Must use SQLite, not Postgres/Redis 4. Outcomes ✓ Compliant → Proceed, link turn to decision ✗ Violation → Warn/block, require override or pivot
Decision "affects" Field (Already Exists!)
interface GvDecision { affects?: { files?: string[]; // Glob patterns functions?: string[]; // Function names types?: string[]; // Type definitions apis?: string[]; // API endpoints tests?: string[]; // Test files docs?: string[]; // Documentation }; }
This is already in the schema - just needs activation!
New: gvStandard Schema
Standards are like permanent decisions - project-wide rules that apply everywhere.
interface GvStandard { id: string; // "std_error_wrapping" title: string; // "Always wrap errors with context" category: "code" | "security" | "api" | "docs"; // What it applies to applies: { languages?: string[]; // ["go", "typescript"] files?: string[]; // Glob patterns scopes?: string[]; // ["greatvibe", "product"] }; // The rule rule: { pattern?: string; // Regex to detect violations antiPattern?: string; // "return err" without wrapping guidance: string; // What Claude should do }; // Enforcement enforcement: "warn" | "block" | "info"; sourceDoc?: string; // Link to full docs }
Integration Points
| Turn Context | Inject relevant decisions/standards into Claude's prompt |
| Pre-Commit Hook | Check changed files against decision affects patterns |
| Curator | Claude-powered check: "Does this turn comply with decisions?" |
| Timeline | Show compliance status on turn cards (✓/⚠️/✗) |
Example: gvCodingStandards.md → gvStandards
Current: /gv/docs/gvCodingStandards.md (markdown, manual enforcement) Future: /konui/data/gv-standards.jsonl (structured, active enforcement) std_error_wrapping: title: "Always wrap errors with context" applies: { languages: ["go"], files: ["gv/gvshell/**"] } rule: antiPattern: "return err$" guidance: "Use fmt.Errorf('context: %w', err)" enforcement: "block" sourceDoc: "/gv/docs/gvCodingStandards.md#error-wrapping"
Timeline with Compliance
turn
Added retry logic to hub client
✓ 2 decisions
decision
Use exponential backoff for retries
→ affects hub/client.go
turn
Updated database connection
⚠️ std violation
Implementation Path
- Phase 1: Activate decision "affects" matching in turn context
- Phase 2: Create gvStandard schema + store
- Phase 3: Add compliance checking to pre-commit/turn-start
- Phase 4: Claude-powered semantic compliance (Curator)
This transforms decisions from passive history into active governance. Docs and standards become enforceable, not just advisory.
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
greatvibe
Tags
gvDecisionarchitecturecompliancestandards
Created
12 Jan 2026, 12:29 pm
Updated
12 Jan 2026, 12:29 pm
Timing
⏱️ 78.1s
0 tools
● TTFE 1%
● Thinking 99%
● Tools 0%
Created By
claude
📋 Claude's Context
Session
ses_6da72c13...
Raw Data
{
"id": "2044d6cf-3ece-4b72-ae36-ac8591a10266",
"type": "general",
"status": "completed",
"title": "Decisions as Compliance Gates - Design Exploration",
"description": "Exploring decisions and standards as checkpoints for turn execution",
"context": {
"requestedAt": "2026-01-12T10:40:00Z",
"requestId": "a3f66339-1f95-4c91-a9fe-824cb4099f68",
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">Decisions as Compliance Gates</h2>\n\n<p style=\"color:#98c379;font-size:14px;margin:0 0 20px 0;\">Absolutely possible - and this is a powerful pattern!</p>\n\n<h3 style=\"font-family:sans-serif;color:#61afef;margin:20px 0 12px 0;\">The Vision</h3>\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin:8px 0;\">\n<p style=\"color:#e0e0e0;margin:0;line-height:1.8;\">Decisions aren't just historical records - they become <strong style=\"color:#e5c07b;\">active constraints</strong> that guide future work. When a turn touches code covered by a decision, the system checks compliance.</p>\n</div>\n\n<h3 style=\"font-family:sans-serif;color:#c678dd;margin:20px 0 12px 0;\">How It Would Work</h3>\n<pre style=\"background:#2d2d2d;padding:16px;border-radius:6px;overflow-x:auto;line-height:1.8;\">\n<span style=\"color:#7f848e;\">1. Decision Created</span>\n <span style=\"color:#e5c07b;\">dec_xyz</span>: \"Use SQLite for local storage\"\n <span style=\"color:#61afef;\">affects</span>: { files: [\"**/storage/*.ts\"], apis: [\"Database*\"] }\n <span style=\"color:#61afef;\">chosen</span>: { value: \"sqlite\" }\n\n<span style=\"color:#7f848e;\">2. Turn Starts</span>\n Claude edits <span style=\"color:#98c379;\">src/storage/user-store.ts</span>\n\n<span style=\"color:#7f848e;\">3. Compliance Check (Pre-Commit Hook or Turn Context)</span>\n <span style=\"color:#f59e0b;\">⚠️ Active decision applies:</span> dec_xyz\n <span style=\"color:#7f848e;\"> → Must use SQLite, not Postgres/Redis</span>\n\n<span style=\"color:#7f848e;\">4. Outcomes</span>\n <span style=\"color:#22c55e;\">✓ Compliant</span> → Proceed, link turn to decision\n <span style=\"color:#f43f5e;\">✗ Violation</span> → Warn/block, require override or pivot\n</pre>\n\n<h3 style=\"font-family:sans-serif;color:#61afef;margin:20px 0 12px 0;\">Decision \"affects\" Field (Already Exists!)</h3>\n<pre style=\"background:#2d2d2d;padding:12px;border-radius:6px;overflow-x:auto;\">\n<span style=\"color:#c678dd;\">interface</span> <span style=\"color:#e5c07b;\">GvDecision</span> {\n affects?: {\n <span style=\"color:#61afef;\">files</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Glob patterns</span>\n <span style=\"color:#61afef;\">functions</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Function names</span>\n <span style=\"color:#61afef;\">types</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Type definitions</span>\n <span style=\"color:#61afef;\">apis</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// API endpoints</span>\n <span style=\"color:#61afef;\">tests</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Test files</span>\n <span style=\"color:#61afef;\">docs</span>?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Documentation</span>\n };\n}\n</pre>\n<p style=\"color:#98c379;font-size:13px;margin:8px 0 0 0;\">This is already in the schema - just needs activation!</p>\n\n<h3 style=\"font-family:sans-serif;color:#c678dd;margin:20px 0 12px 0;\">New: gvStandard Schema</h3>\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin:8px 0;border-left:3px solid #8b5cf6;\">\n<p style=\"color:#e0e0e0;margin:0 0 12px 0;\">Standards are like <strong>permanent decisions</strong> - project-wide rules that apply everywhere.</p>\n<pre style=\"line-height:1.6;margin:0;\">\n<span style=\"color:#c678dd;\">interface</span> <span style=\"color:#e5c07b;\">GvStandard</span> {\n id: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// \"std_error_wrapping\"</span>\n title: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// \"Always wrap errors with context\"</span>\n category: <span style=\"color:#98c379;\">\"code\"</span> | <span style=\"color:#98c379;\">\"security\"</span> | <span style=\"color:#98c379;\">\"api\"</span> | <span style=\"color:#98c379;\">\"docs\"</span>;\n \n <span style=\"color:#7f848e;\">// What it applies to</span>\n applies: {\n languages?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// [\"go\", \"typescript\"]</span>\n files?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// Glob patterns</span>\n scopes?: <span style=\"color:#c678dd;\">string</span>[]; <span style=\"color:#7f848e;\">// [\"greatvibe\", \"product\"]</span>\n };\n \n <span style=\"color:#7f848e;\">// The rule</span>\n rule: {\n pattern?: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// Regex to detect violations</span>\n antiPattern?: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// \"return err\" without wrapping</span>\n guidance: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// What Claude should do</span>\n };\n \n <span style=\"color:#7f848e;\">// Enforcement</span>\n enforcement: <span style=\"color:#98c379;\">\"warn\"</span> | <span style=\"color:#98c379;\">\"block\"</span> | <span style=\"color:#98c379;\">\"info\"</span>;\n sourceDoc?: <span style=\"color:#c678dd;\">string</span>; <span style=\"color:#7f848e;\">// Link to full docs</span>\n}\n</pre>\n</div>\n\n<h3 style=\"font-family:sans-serif;color:#61afef;margin:20px 0 12px 0;\">Integration Points</h3>\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin:8px 0;\">\n<table style=\"width:100%;border-collapse:collapse;\">\n<tr style=\"border-bottom:1px solid #3a3a4d;\">\n<td style=\"color:#e5c07b;padding:8px 12px 8px 0;font-weight:bold;width:150px;\">Turn Context</td>\n<td style=\"color:#e0e0e0;\">Inject relevant decisions/standards into Claude's prompt</td>\n</tr>\n<tr style=\"border-bottom:1px solid #3a3a4d;\">\n<td style=\"color:#e5c07b;padding:8px 12px 8px 0;font-weight:bold;\">Pre-Commit Hook</td>\n<td style=\"color:#e0e0e0;\">Check changed files against decision affects patterns</td>\n</tr>\n<tr style=\"border-bottom:1px solid #3a3a4d;\">\n<td style=\"color:#e5c07b;padding:8px 12px 8px 0;font-weight:bold;\">Curator</td>\n<td style=\"color:#e0e0e0;\">Claude-powered check: \"Does this turn comply with decisions?\"</td>\n</tr>\n<tr>\n<td style=\"color:#e5c07b;padding:8px 12px 8px 0;font-weight:bold;\">Timeline</td>\n<td style=\"color:#e0e0e0;\">Show compliance status on turn cards (✓/⚠️/✗)</td>\n</tr>\n</table>\n</div>\n\n<h3 style=\"font-family:sans-serif;color:#c678dd;margin:20px 0 12px 0;\">Example: gvCodingStandards.md → gvStandards</h3>\n<pre style=\"background:#2d2d2d;padding:12px;border-radius:6px;overflow-x:auto;line-height:1.6;\">\n<span style=\"color:#7f848e;\">Current:</span> /gv/docs/gvCodingStandards.md (markdown, manual enforcement)\n\n<span style=\"color:#7f848e;\">Future:</span> /konui/data/gv-standards.jsonl (structured, active enforcement)\n\n<span style=\"color:#e5c07b;\">std_error_wrapping</span>:\n title: \"Always wrap errors with context\"\n applies: { languages: [\"go\"], files: [\"gv/gvshell/**\"] }\n rule:\n antiPattern: <span style=\"color:#98c379;\">\"return err$\"</span>\n guidance: <span style=\"color:#98c379;\">\"Use fmt.Errorf('context: %w', err)\"</span>\n enforcement: <span style=\"color:#f59e0b;\">\"block\"</span>\n sourceDoc: <span style=\"color:#98c379;\">\"/gv/docs/gvCodingStandards.md#error-wrapping\"</span>\n</pre>\n\n<h3 style=\"font-family:sans-serif;color:#61afef;margin:20px 0 12px 0;\">Timeline with Compliance</h3>\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin:8px 0;border-left:3px solid #3a3a4d;\">\n<div style=\"margin-bottom:12px;\">\n<span style=\"background:#3b82f6;color:#fff;padding:2px 8px;border-radius:4px;font-size:11px;margin-right:8px;\">turn</span>\n<span style=\"color:#e0e0e0;\">Added retry logic to hub client</span>\n<span style=\"background:#22c55e;color:#fff;padding:1px 6px;border-radius:3px;font-size:10px;margin-left:8px;\">✓ 2 decisions</span>\n</div>\n<div style=\"margin-bottom:12px;\">\n<span style=\"background:#8b5cf6;color:#fff;padding:2px 8px;border-radius:4px;font-size:11px;margin-right:8px;\">decision</span>\n<span style=\"color:#e0e0e0;\">Use exponential backoff for retries</span>\n<span style=\"color:#7f848e;font-size:12px;margin-left:8px;\">→ affects hub/client.go</span>\n</div>\n<div style=\"margin-bottom:12px;\">\n<span style=\"background:#3b82f6;color:#fff;padding:2px 8px;border-radius:4px;font-size:11px;margin-right:8px;\">turn</span>\n<span style=\"color:#e0e0e0;\">Updated database connection</span>\n<span style=\"background:#f59e0b;color:#fff;padding:1px 6px;border-radius:3px;font-size:10px;margin-left:8px;\">⚠️ std violation</span>\n</div>\n</div>\n\n<h3 style=\"font-family:sans-serif;color:#98c379;margin:20px 0 12px 0;\">Implementation Path</h3>\n<ol style=\"color:#e0e0e0;line-height:2;\">\n<li><strong>Phase 1:</strong> Activate decision \"affects\" matching in turn context</li>\n<li><strong>Phase 2:</strong> Create gvStandard schema + store</li>\n<li><strong>Phase 3:</strong> Add compliance checking to pre-commit/turn-start</li>\n<li><strong>Phase 4:</strong> Claude-powered semantic compliance (Curator)</li>\n</ol>\n\n<p style=\"color:#7f848e;font-size:13px;margin:20px 0 0 0;border-top:1px solid #3a3a4d;padding-top:12px;\">This transforms decisions from passive history into active governance. Docs and standards become enforceable, not just advisory.</p>\n</div>",
"choices": [
{
"label": "Design gvStandard schema",
"value": "Create a detailed gvStandard schema document similar to gvDecisionSchema.md",
"primary": true
},
{
"label": "Add to backlog",
"value": "Add 'Decisions as Compliance Gates' and 'gvStandard Schema' to the VIBE.md backlog"
},
{
"label": "Prototype affects matching",
"value": "Implement a prototype of decision affects pattern matching against changed files"
}
],
"turnTiming": {
"totalMs": 78072,
"ttfeMs": 428,
"thinkingMs": 77644,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 99,
"toolsPct": 0,
"ttfePct": 1
}
},
"createdBy": "claude",
"createdAt": "2026-01-12T02:29:43.478Z",
"updatedAt": "2026-01-12T02:29:50.856Z",
"requestId": "a3f66339-1f95-4c91-a9fe-824cb4099f68",
"scope": "greatvibe",
"tags": [
"gvDecision",
"architecture",
"compliance",
"standards"
],
"sessionId": "ses_6da72c13-15f"
}