Skip to content

Commit ef1781d

Browse files
authored
Merge pull request #19 from Eilodon/claude/account-skill-vheatm-check-xpsva8
Add VHEATM v16.1.1 audit orchestration skill
2 parents 6d199f0 + 787041e commit ef1781d

34 files changed

Lines changed: 11251 additions & 0 deletions

.claude/skills/vheatm/SKILL.md

Lines changed: 878 additions & 0 deletions
Large diffs are not rendered by default.

.claude/skills/vheatm/SYNTHESIS_REPORT.md

Lines changed: 324 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Context Modes — Full Adaptation Table (v10.0)
2+
3+
## Five Modes
4+
5+
| Mode | When to use |
6+
|---|---|
7+
| **DESIGN** | Auditing a product concept, PRD, specification, or proposal. No running code. |
8+
| **CODE** | Auditing a codebase not yet in production. Tests may or may not exist. |
9+
| **LIVE** | Auditing a production system with real users. Metrics and incidents available. |
10+
| **LEGACY** | Codebase with significant technical debt. Partial docs, original authors unavailable. |
11+
| 🆕 **ENTERPRISE** | Multi-system, multi-team, cross-regulatory, production at scale. Multiple teams own components. SLAs, compliance obligations, and organizational incentives are first-class audit concerns. Use when ALL of the following are true: (1) >2 teams own distinct parts of the system under audit, AND (2) at least one of: any regulatory framework applies (GDPR/PCI-DSS/HIPAA/SOC2), or a bug's fix would require changes by more than one team. **Note**: a LIVE system with external users is not automatically ENTERPRISE. The distinguishing signal is cross-team ownership of the fix path, not just regulatory exposure. If only one team owns all the code but the system is under GDPR, use LIVE with L7.11 activated. ENTERPRISE adds organizational blast radius modeling on top. |
12+
13+
---
14+
15+
## Adaptation Table by Phase
16+
17+
| Phase | DESIGN | CODE | LIVE | LEGACY | 🆕 ENTERPRISE |
18+
|---|---|---|---|---|---|
19+
| **[V] Architecture map** | Logical diagram | Actual file structure | Deployment topology | Reconstructed from code | Org ownership map + deployment topology + SLA chains |
20+
| **Evidence Anchoring** | T1-T2 for MANDATORY | file:line required | file:line + metrics | file:line + uncertainty flag | file:line + team-confirmation + regulatory anchor |
21+
| **[E] Execution Mode** | STATIC only | STATIC or LIVE | LIVE preferred | STATIC, no reliable baseline | LIVE preferred + multi-team verification |
22+
| **[G.U] Unknown Probe** | Spec Comparison primary | All 3 techniques | Gap from metrics | README vs Reality primary | Org boundary gap analysis primary |
23+
| **Red-Green Gate** | Conceptual only | STATIC or LIVE | Must use LIVE | STATIC with caveat | LIVE + cross-team sign-off |
24+
| **CLI formula** | Document complexity units | Standard formula | Standard + incident log | LCC (see below) | Enterprise formula (see below) |
25+
| **[G.UX] UX Lens** | Required | Recommended | Recommended | Optional | Recommended (multi-stakeholder UX) |
26+
| **[G.INC]** | N/A | FAST signal only | FAST signal only | Recommended | **MANDATORY** |
27+
| **[G.ORG]** | N/A | Recommended | Recommended | Recommended | **MANDATORY** |
28+
| **L7.11 Compliance** | Future-looking | Recommended | Recommended | Recommended | **MANDATORY** |
29+
30+
---
31+
32+
## Evidence Tier (DESIGN mode only)
33+
34+
When there is no code to anchor to, use Evidence Tier instead of file:line:
35+
36+
| Tier | Label | Examples | MANDATORY ADR? |
37+
|---|---|---|---|
38+
| T1 | Peer-reviewed research / systematic review | Academic papers, meta-analyses | ✅ Acceptable |
39+
| T2 | Industry data / known case studies | Post-mortems, engineering blogs, benchmarks | ✅ Acceptable |
40+
| T3 | Expert consensus / documented best practices | Style guides, framework docs, RFCs | ✅ Acceptable (with note) |
41+
| T4 | Logical inference / first-principles | Reasoning from known constraints | ❌ Downgrade to REQUIRED |
42+
| T5 | Intuition / gut feeling | Unanchored assertions | ❌ Not acceptable |
43+
44+
🆕 **T2-Reg: Regulatory / Legal evidence** (applies in ENTERPRISE and DESIGN modes):
45+
Legal text, audit reports, compliance officer documentation, case law.
46+
MANDATORY ADR in compliance context: T2-Reg or better required.
47+
48+
---
49+
50+
## CLI Formula Adaptation
51+
52+
**Standard (CODE/LIVE):**
53+
```
54+
CLI = (lines_changed × 0.1) + (files_touched × 0.5) + (external_dependencies × 2)
55+
CalibrationFactor (EMA-3) applied
56+
```
57+
58+
**DESIGN mode adaptation:**
59+
```
60+
CLI = (sections_affected × 0.5) + (stakeholders_impacted × 1.0) + (downstream_systems × 2)
61+
```
62+
63+
**🆕 LEGACY mode — Legacy Complexity Classifier (replaces × 1.5):**
64+
65+
Step 1: Classify the legacy system's complexity level:
66+
67+
| Level | Criteria | CLI Multiplier |
68+
|---|---|---|
69+
| **Level A** | Stand-alone system. No external service dependencies. At least one original author available. Partial but readable documentation. | × 1.5 |
70+
| **Level B** | Part of a larger system. Data or API dependencies on other systems. Most original authors unavailable. Documentation incomplete or stale. | × 2.0 |
71+
| **Level C** | Data-critical or multi-generation. Original authors unavailable. 3+ layers of patches by different teams. Critical business logic embedded in undocumented tribal knowledge. | × 3.0 |
72+
73+
Step 2: If Level C → **Tribal Knowledge Probe is MANDATORY**:
74+
75+
```
76+
Tribal Knowledge Probe:
77+
□ Name 2 people who understand this subsystem most deeply.
78+
□ What critical knowledge lives only in their heads?
79+
□ What happens to this remediation if either is unavailable within the next sprint?
80+
□ What is the minimum documentation to transfer their knowledge before fix begins?
81+
□ If you cannot name 2 people → the system has no living knowledge owner.
82+
This is itself a MANDATORY finding (BC-010: undocumented-tribal-knowledge-system).
83+
```
84+
85+
**Evidence base**: Ramasubbu & Balan (2015, 50 citations, Information Systems): 10-year
86+
longitudinal study across 48 enterprise deployments found modular debt remediation was 53%
87+
more effective than architectural, but increased vendor error probability by 83% — competing
88+
remediation effects that a flat multiplier cannot model.
89+
90+
**🆕 ENTERPRISE mode formula:**
91+
```
92+
CLI_enterprise = CLI_standard
93+
+ (ownership_boundaries_crossed × 3)
94+
+ (regulatory_obligations_count × 2)
95+
+ (sla_chains_at_risk × 1.5)
96+
97+
Where:
98+
ownership_boundaries_crossed = number of distinct team codebases that must change
99+
regulatory_obligations_count = number of distinct regulatory frameworks affected
100+
sla_chains_at_risk = number of SLA commitments that could breach if bug hits prod
101+
```
102+
103+
Example: A bug in a shared auth service at an enterprise, touching 3 teams' code,
104+
under GDPR + PCI-DSS, with 2 SLA chains at risk:
105+
```
106+
CLI_enterprise = CLI_standard + (3 × 3) + (2 × 2) + (2 × 1.5)
107+
= CLI_standard + 9 + 4 + 3
108+
= CLI_standard + 16
109+
```
110+
111+
---
112+
113+
## Context Mode — Self-Check
114+
115+
Before leaving [P]:
116+
- [ ] Context Mode declared (DESIGN / CODE / LIVE / LEGACY / ENTERPRISE)
117+
- [ ] Stakeholder declared
118+
- [ ] Goal declared
119+
- [ ] Org-Context declared (team that owns code, if applicable)
120+
- [ ] Evidence Anchoring standard confirmed for this mode
121+
- [ ] CLI formula variant noted (including LCC level if LEGACY)
122+
- [ ] UX Lens requirement checked
123+
- [ ] 🆕 ENTERPRISE activations checked: [G.INC] / [G.ORG] / L7.11 / LCC
124+
125+
---
126+
127+
## ENTERPRISE — What It Unlocks vs. LIVE
128+
129+
LIVE assumes a single production system owned by one team.
130+
ENTERPRISE explicitly models the org layer.
131+
132+
**When to use LIVE vs ENTERPRISE:**
133+
134+
| Signal | Mode |
135+
|--------|------|
136+
| Single team owns all code; system happens to have external users | LIVE + L7.11 |
137+
| Single team owns code; system under GDPR/PCI-DSS | LIVE + L7.11 |
138+
| Multiple teams own code; any fix requires one team to change | ENTERPRISE |
139+
| Bug's fix path crosses a team ownership boundary | ENTERPRISE |
140+
| System under compliance AND multi-team ownership | ENTERPRISE |
141+
142+
The key discriminator is **fix path ownership**, not just regulatory scope.
143+
144+
| Concern | LIVE handles? | ENTERPRISE adds |
145+
|---|---|---|
146+
| Bug in single service | ✅ fully | Same |
147+
| Bug that crosses team ownership | ⚠️ partial | [G.INC] + [G.ORG] mandatory |
148+
| SLA chain breach risk | ⚠️ partial | ORG blast radius map |
149+
| Regulatory exposure | ❌ not modeled | L7.11 mandatory |
150+
| Incentive to defer fix | ❌ not modeled | [G.INC] probe mandatory |
151+
| Legacy in multi-system context | ❌ flat × 1.5 | LCC with tribal knowledge |
152+
| Multi-team adversarial pass | ❌ single perspective | 4-lens AP mandatory |
153+

0 commit comments

Comments
 (0)