@vextlabs/theron-cli 0.2.1 → 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/dist/api.d.ts +8 -0
- package/dist/api.js +3 -0
- package/dist/api.js.map +1 -1
- package/dist/auth.js +51 -1
- package/dist/auth.js.map +1 -1
- package/dist/banner.js +3 -2
- package/dist/banner.js.map +1 -1
- package/dist/checkpoints.d.ts +32 -0
- package/dist/checkpoints.js +61 -0
- package/dist/checkpoints.js.map +1 -0
- package/dist/index.js +61 -5
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +61 -0
- package/dist/input.js +574 -0
- package/dist/input.js.map +1 -0
- package/dist/profiles/index.js +5 -0
- package/dist/profiles/index.js.map +1 -1
- package/dist/profiles/methodologies/build_domains.d.ts +6 -0
- package/dist/profiles/methodologies/build_domains.js +170 -0
- package/dist/profiles/methodologies/build_domains.js.map +1 -0
- package/dist/profiles/methodologies/operate_domains.d.ts +8 -0
- package/dist/profiles/methodologies/operate_domains.js +1239 -0
- package/dist/profiles/methodologies/operate_domains.js.map +1 -0
- package/dist/profiles/methodologies/regulated_domains.d.ts +6 -0
- package/dist/profiles/methodologies/regulated_domains.js +153 -0
- package/dist/profiles/methodologies/regulated_domains.js.map +1 -0
- package/dist/profiles/methodologies/research_domains.d.ts +8 -0
- package/dist/profiles/methodologies/research_domains.js +179 -0
- package/dist/profiles/methodologies/research_domains.js.map +1 -0
- package/dist/profiles/methodologies/strategy_domains.d.ts +15 -0
- package/dist/profiles/methodologies/strategy_domains.js +193 -0
- package/dist/profiles/methodologies/strategy_domains.js.map +1 -0
- package/dist/profiles/seeds.js +241 -95
- package/dist/profiles/seeds.js.map +1 -1
- package/dist/receipt.d.ts +17 -0
- package/dist/receipt.js +46 -0
- package/dist/receipt.js.map +1 -0
- package/dist/render.d.ts +4 -1
- package/dist/render.js +95 -28
- package/dist/render.js.map +1 -1
- package/dist/repl.d.ts +8 -1
- package/dist/repl.js +420 -62
- package/dist/repl.js.map +1 -1
- package/dist/sessions.d.ts +14 -0
- package/dist/sessions.js +100 -0
- package/dist/sessions.js.map +1 -1
- package/dist/ship.d.ts +2 -0
- package/dist/ship.js +62 -0
- package/dist/ship.js.map +1 -0
- package/dist/skills/catalog.d.ts +13 -0
- package/dist/skills/catalog.js +86 -0
- package/dist/skills/catalog.js.map +1 -0
- package/dist/tools/bash.js +81 -14
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit.js +21 -1
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/glob.js +4 -1
- package/dist/tools/glob.js.map +1 -1
- package/dist/tools/grep.d.ts +5 -0
- package/dist/tools/grep.js +101 -2
- package/dist/tools/grep.js.map +1 -1
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.js +177 -41
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/ls.d.ts +3 -0
- package/dist/tools/ls.js +23 -12
- package/dist/tools/ls.js.map +1 -1
- package/dist/tools/multiedit.d.ts +12 -0
- package/dist/tools/multiedit.js +79 -0
- package/dist/tools/multiedit.js.map +1 -0
- package/dist/tools/stoa.d.ts +1 -1
- package/dist/tools/stoa.js +7 -3
- package/dist/tools/stoa.js.map +1 -1
- package/dist/tools/task.d.ts +9 -0
- package/dist/tools/task.js +166 -0
- package/dist/tools/task.js.map +1 -0
- package/dist/tools/todowrite.d.ts +12 -0
- package/dist/tools/todowrite.js +38 -0
- package/dist/tools/todowrite.js.map +1 -0
- package/dist/tools/webfetch.d.ts +6 -0
- package/dist/tools/webfetch.js +98 -0
- package/dist/tools/webfetch.js.map +1 -0
- package/dist/tools/websearch.d.ts +7 -0
- package/dist/tools/websearch.js +83 -0
- package/dist/tools/websearch.js.map +1 -0
- package/dist/tools/write.js +17 -1
- package/dist/tools/write.js.map +1 -1
- package/dist/verifiers/calc_gate.d.ts +2 -0
- package/dist/verifiers/calc_gate.js +112 -0
- package/dist/verifiers/calc_gate.js.map +1 -0
- package/dist/verifiers/citation_gate.d.ts +2 -0
- package/dist/verifiers/citation_gate.js +130 -0
- package/dist/verifiers/citation_gate.js.map +1 -0
- package/dist/verifiers/confidence_marked.d.ts +2 -0
- package/dist/verifiers/confidence_marked.js +49 -0
- package/dist/verifiers/confidence_marked.js.map +1 -0
- package/dist/verifiers/disclaimer_gate.d.ts +2 -0
- package/dist/verifiers/disclaimer_gate.js +57 -0
- package/dist/verifiers/disclaimer_gate.js.map +1 -0
- package/dist/verifiers/evidence_gate.d.ts +2 -0
- package/dist/verifiers/evidence_gate.js +108 -0
- package/dist/verifiers/evidence_gate.js.map +1 -0
- package/dist/verifiers/index.d.ts +5 -0
- package/dist/verifiers/index.js +28 -7
- package/dist/verifiers/index.js.map +1 -1
- package/dist/verifiers/lint.js +4 -3
- package/dist/verifiers/lint.js.map +1 -1
- package/dist/verifiers/promoted_kernels.d.ts +8 -0
- package/dist/verifiers/promoted_kernels.js +190 -0
- package/dist/verifiers/promoted_kernels.js.map +1 -0
- package/dist/verifiers/source_gate.d.ts +2 -0
- package/dist/verifiers/source_gate.js +125 -0
- package/dist/verifiers/source_gate.js.map +1 -0
- package/dist/verifiers/test_smoke.js +30 -0
- package/dist/verifiers/test_smoke.js.map +1 -1
- package/dist/verifiers/types.d.ts +3 -0
- package/package.json +4 -2
- package/skills/README.md +123 -0
- package/skills/ab-test.md +89 -0
- package/skills/api-design.md +175 -0
- package/skills/architecture-design.md +185 -0
- package/skills/business-case.md +77 -0
- package/skills/causal-inference.md +77 -0
- package/skills/clinical-guideline.md +98 -0
- package/skills/code-review.md +98 -0
- package/skills/cold-outreach.md +268 -0
- package/skills/competitive-teardown.md +223 -0
- package/skills/component-spec.md +121 -0
- package/skills/content-calendar.md +280 -0
- package/skills/contract-review.md +155 -0
- package/skills/data-analysis.md +187 -0
- package/skills/debug.md +91 -0
- package/skills/design-audit.md +121 -0
- package/skills/differential-diagnosis.md +79 -0
- package/skills/discovery-call.md +206 -0
- package/skills/edit-pass.md +80 -0
- package/skills/engineering-calc.md +101 -0
- package/skills/estimate.md +70 -0
- package/skills/experiment-design.md +105 -0
- package/skills/fact-check.md +82 -0
- package/skills/financial-model.md +104 -0
- package/skills/grant-proposal.md +93 -0
- package/skills/harmony-analysis.md +93 -0
- package/skills/hypothesis-generation.md +99 -0
- package/skills/incident-response.md +134 -0
- package/skills/interview-loop.md +62 -0
- package/skills/job-scorecard.md +92 -0
- package/skills/kb-article.md +174 -0
- package/skills/launch-plan.md +85 -0
- package/skills/lease-review.md +93 -0
- package/skills/lesson-plan.md +198 -0
- package/skills/literature-review.md +69 -0
- package/skills/market-entry.md +137 -0
- package/skills/market-sizing.md +159 -0
- package/skills/meta-analysis.md +140 -0
- package/skills/migrate.md +117 -0
- package/skills/optimize.md +88 -0
- package/skills/options-strategy.md +166 -0
- package/skills/peer-review.md +96 -0
- package/skills/pentest-plan.md +193 -0
- package/skills/pitch-review.md +132 -0
- package/skills/plan.md +88 -0
- package/skills/policy-brief.md +124 -0
- package/skills/positioning.md +192 -0
- package/skills/postmortem.md +168 -0
- package/skills/prd.md +105 -0
- package/skills/prioritize.md +162 -0
- package/skills/proof.md +91 -0
- package/skills/property-underwrite.md +159 -0
- package/skills/recipe-develop.md +109 -0
- package/skills/red-team.md +142 -0
- package/skills/refactor.md +58 -0
- package/skills/reflection-session.md +115 -0
- package/skills/regulatory-compliance.md +136 -0
- package/skills/reproduce.md +87 -0
- package/skills/runbook.md +344 -0
- package/skills/security-audit.md +154 -0
- package/skills/seo-brief.md +201 -0
- package/skills/sql-query.md +161 -0
- package/skills/story-craft.md +163 -0
- package/skills/tdd.md +59 -0
- package/skills/term-sheet.md +298 -0
- package/skills/theory-of-change.md +88 -0
- package/skills/threat-model.md +104 -0
- package/skills/ticket-triage.md +200 -0
- package/skills/tolerance-analysis.md +149 -0
- package/skills/training-program.md +151 -0
- package/skills/translate.md +64 -0
- package/skills/unit-economics.md +238 -0
- package/skills/valuation.md +112 -0
- package/skills/write-tests.md +77 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recipe-develop
|
|
3
|
+
description: Develop, stress-test, and document a recipe end-to-end — ratio-first formulation, dual-unit (grams + volume) ingredient list, yield/serving breakdown, phase-by-phase technique with temperature/time/sensory doneness cues, food-science rationale, substitution tradeoffs, food-safety critical points, and non-linear scaling rules — invoke whenever the user asks to create, fix, scale, or deeply explain a recipe.
|
|
4
|
+
allowed-tools: Read, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
═══ HARD RULES ═══
|
|
8
|
+
|
|
9
|
+
1. RATIOS FIRST. State the backbone ratio (e.g., fat:flour:liquid, sugar:acid, meat:cure salt) before any absolute quantity. All absolutes derive from the ratio, not the reverse.
|
|
10
|
+
2. DUAL UNITS MANDATORY. Every ingredient line must carry both metric (grams, ml, °C) AND practical volume/temp (cups, tsp, °F). Never omit either.
|
|
11
|
+
3. SENSORY DONENESS > timer. Every cook step ends with the sensory cue that signals readiness (color, texture, aroma, resistance, internal temp). Timers are outer bounds, senses are the go/no-go signal.
|
|
12
|
+
4. FOOD-SAFETY TEMPS ARE NON-NEGOTIABLE. State the minimum safe internal temperature for every protein or egg-containing element. Never soften, omit, or make optional.
|
|
13
|
+
5. NO FABRICATED SCIENCE. If the mechanism is uncertain, say "likely" or "thought to be." Never state food-science causality as proven fact unless it is textbook-established.
|
|
14
|
+
6. SCALE NON-LINEARLY WHERE PHYSICS DEMANDS IT. Leavening, salt, spice, gelatin, and bake time do NOT scale 1:1 with mass. Flag every non-linear dimension explicitly; scaling coefficients are starting-point conventions that must be verified by tasting and testing before service.
|
|
15
|
+
7. SUBSTITUTIONS MUST STATE THE TRADEOFF. Never list a sub without naming what changes (texture, flavor, structure, color, shelf life).
|
|
16
|
+
8. YIELD AND SERVINGS ARE SEPARATE LINES. Yield = total mass or volume of finished product. Servings = portion count and per-serving mass.
|
|
17
|
+
9. TEMPERATURE DISCIPLINE IS MISE EN PLACE. Cold ingredients (butter for laminated doughs, cream for whipped applications) stay refrigerated until the moment of use. Warm ingredients (eggs for emulsions, milk for yeast activation) are brought to target temperature immediately before combining — not hours in advance. State temperature state for every functional ingredient.
|
|
18
|
+
10. VOLATILE AROMA COMPOUNDS HAVE A TIMING RULE. High-volatility aromatics (fresh herbs, citrus zest, finishing oils, green spices) are added at the last possible moment. Low-volatility aromatics (dried spices, alliums, bark spices) require heat and time to bloom. State the timing rationale explicitly for every aromatic in the method.
|
|
19
|
+
|
|
20
|
+
═══ PHASE A — CONCEPT AND RATIO FRAMEWORK ═══
|
|
21
|
+
|
|
22
|
+
A1. Identify the recipe's structural family (emulsion, foam, gel, dough, brine, custard, sauce, braise, cure, ferment, candy, etc.). Each family has a canonical backbone ratio — state it before touching quantities. The structural family determines which failure modes are possible and which scaling rules apply.
|
|
23
|
+
A2. Define the flavor target in three layers:
|
|
24
|
+
- Primary taste profile: sweet/salty/sour/bitter/umami balance and which is dominant
|
|
25
|
+
- Dominant aroma compound family: Maillard products (roasted, nutty), terpenes (citrus, herbal, piney), esters (fruity, floral), sulfur compounds (allium, cruciferous), lactones (creamy, coconut), pyrazines (earthy, roasted) — name the family, not just "savory" or "aromatic"
|
|
26
|
+
- Textural contract: the mouthfeel promise (crisp shell/tender crumb, silky/chunky, light/dense, short/chewy) that the ratio must deliver
|
|
27
|
+
A3. Fix the reference batch size (e.g., 1 kg dough, 500 ml sauce, 12 portions). All scaling derives from this anchor. Choose a reference batch that fits a standard home or professional piece of equipment — do not anchor to an arbitrary mass.
|
|
28
|
+
A4. List critical parameters as ratios against the dominant ingredient (e.g., hydration = water/flour by mass, fat ratio = butter/total flour, salt ratio = salt/total dough mass, sugar/acid ratio for a gel). These ratios are the recipe's DNA — protect them across scales and variations. A recipe that cannot be expressed as ratios is not yet understood.
|
|
29
|
+
|
|
30
|
+
═══ PHASE B — INGREDIENT SPECIFICATION ═══
|
|
31
|
+
|
|
32
|
+
B1. Write every ingredient with: (a) gram weight, (b) practical volume measure, (c) ingredient form/grade where it matters (e.g., "kosher salt, Diamond Crystal" vs. Morton changes density by ~1.5×; "00 flour" vs. AP changes protein and granulation; "Dutch-process cocoa" vs. natural changes acid balance), (d) temperature state where relevant (cold butter vs. room-temp butter are functionally different ingredients).
|
|
33
|
+
Format: `Unsalted butter, cold, cubed: 227 g | 1 cup (2 sticks)`
|
|
34
|
+
B2. Flag ingredients as functional actives or flavor contributors. Functional actives (leavening, salt, gelatin, emulsifiers, acids, starches) require precision — measure by weight, not volume. Flavor contributors (herbs, most spices, vanilla) tolerate a range — measure by volume is acceptable.
|
|
35
|
+
B3. Note shelf life, sourcing flags, or allergy class for every ingredient where relevant (e.g., "high-bloom gelatin: specify bloom strength, 200 bloom assumed; if using lower-bloom, increase quantity proportionally").
|
|
36
|
+
B4. List substitutions per ingredient only if a viable one exists; format as:
|
|
37
|
+
`Sub: [ingredient] → [sub], ratio [X:1 by weight], tradeoff: [specific change in texture/flavor/structure/color/shelf life].`
|
|
38
|
+
Never write "can substitute freely" — all substitutions have consequences.
|
|
39
|
+
|
|
40
|
+
═══ PHASE C — METHOD STEPS WITH SCIENCE ═══
|
|
41
|
+
|
|
42
|
+
C1. Break the method into named stages (mise en place, primary transformation, rest/hydration/fermentation, finishing, plating). Each stage is a discrete heading. Passive stages (rest, chill, ferment) get the same rigor as active cook stages — describe the physical transformation occurring, not just "set aside."
|
|
43
|
+
C2. Every active cook step must include:
|
|
44
|
+
- Action verb that encodes technique (fold, sear, temper, degas, emulsify, bloom, deglaze, reduce, mount — not generic "mix" or "cook")
|
|
45
|
+
- Temperature: vessel/oil/oven/water bath/sugar syrup (°C and °F)
|
|
46
|
+
- Time range (treat as outer bound, not target — sensory cue overrides it)
|
|
47
|
+
- Sensory doneness cue (visual, tactile, aural, aromatic, or probe temp) — the go/no-go signal
|
|
48
|
+
- The WHY in one sentence of food science (e.g., "Resting dough 30 min relaxes gluten networks, reducing elastic snap-back during rolling and preventing toughening.")
|
|
49
|
+
C3. Mark CRITICAL CONTROL POINTS (CCPs) — steps where failure directly risks food safety or irreversible structural collapse. Prefix with ⚠ CCP.
|
|
50
|
+
C4. State aromatic timing explicitly at each step: "Add [aromatic] NOW, not earlier" or "Bloom [spice] in fat for 60 s before adding liquid — the fat-soluble terpenes in [spice] require a lipid carrier to distribute; water addition before blooming traps them in the aqueous phase."
|
|
51
|
+
C5. For any step involving emulsification, state the addition rate. Drop-by-drop for the first 10–20% of oil is not stylistic caution — it is the physics of building a continuous aqueous phase around discrete fat droplets. Rushing this step causes the emulsion to flip or break.
|
|
52
|
+
|
|
53
|
+
═══ PHASE D — FOOD-SAFETY CRITICAL POINTS ═══
|
|
54
|
+
|
|
55
|
+
⚠ This section is for educational and informational purposes. Always follow current guidance from your national food-safety authority (USDA/FDA in the US, FSA in the UK, EFSA in the EU) and local health codes, which may supersede the figures below.
|
|
56
|
+
|
|
57
|
+
D1. For every protein: state minimum safe internal temp per current food-safety authority standards:
|
|
58
|
+
- Whole poultry (chicken, turkey, duck): 74°C / 165°F (instant read at thickest point, away from bone)
|
|
59
|
+
- Ground meat (beef, pork, lamb): 71°C / 160°F
|
|
60
|
+
- Whole cuts of beef, pork, veal, lamb: 63°C / 145°F + 3 min rest
|
|
61
|
+
- Fish and shellfish: 63°C / 145°F (flesh opaque, flakes easily); bivalves cooked until shells open
|
|
62
|
+
- Eggs (cooked in dish): yolk and white fully set, or use pasteurized eggs for soft-set applications
|
|
63
|
+
D2. For custards and dairy-based preparations: state the pasteurization threshold (71°C / 160°F held for 15 s, or equivalent time-temperature combination) and the danger zone window (4°C–60°C / 40°F–140°F; do not hold food in this range beyond 2 hours cumulative for perishable preparations).
|
|
64
|
+
D3. State cooling protocol for large batches: reduce from 60°C to 20°C within 2 hours, then to 4°C within a further 4 hours. Specify the method (ice bath with stirring, hotel pan in ice with shallow layer, blast chiller). A covered pot set on a counter does not meet this requirement.
|
|
65
|
+
D4. Flag any raw or undercooked serving style (steak tartare, sashimi, carpaccio, soft-cooked egg, raw shellfish, rare duck breast) as elevated risk. State explicitly: "Immunocompromised individuals, pregnant people, the elderly, and children should avoid this preparation or use only pasteurized/fully cooked versions."
|
|
66
|
+
D5. State cross-contamination controls: dedicated boards/utensils for raw protein vs. ready-to-eat foods, hand-wash moments (after handling raw protein, before touching anything else), allergen segregation if any of the top 14 allergens (or jurisdiction-specific list) are present.
|
|
67
|
+
|
|
68
|
+
═══ PHASE E — YIELD, SCALING, AND NON-LINEAR ADJUSTMENTS ═══
|
|
69
|
+
|
|
70
|
+
E1. State yield precisely:
|
|
71
|
+
`Yield: ~850 g finished product | Servings: 8 × ~106 g portions`
|
|
72
|
+
Include expected yield loss (evaporation, trimming, bones) if relevant: "Raw weight 1.2 kg → cooked yield ~850 g (29% moisture loss during braise)."
|
|
73
|
+
E2. Provide a scaling table for 0.5×, 2×, and 4× batch. For each scaled quantity, explicitly separate:
|
|
74
|
+
- Mass-linear (multiply directly): flour, main liquid, main protein, sugar in most applications.
|
|
75
|
+
- NON-LINEAR — call out each individually:
|
|
76
|
+
- Leavening (baking powder/soda): scale at ~0.75× rate for batches above 2× to avoid over-aeration and metallic aftertaste. Verify by observing rise height and crumb structure, not by formula alone.
|
|
77
|
+
- Salt: start at 0.85× of linear scale for 2× batch and taste-adjust; saltiness perception is non-linear and influenced by fat content, acidity, and serving temperature.
|
|
78
|
+
- Gelatin and pectin: start at 0.9× for 2× batch; gel strength scales super-linearly with concentration — a 2× batch with 2× gelatin will produce a noticeably firmer set.
|
|
79
|
+
- Spices and dried aromatics: start at 0.7× of linear scale for 2× batch; potency-per-gram increases as the ratio of aromatics to diluting mass rises. Always taste before service.
|
|
80
|
+
- Bake time: does NOT scale with batch mass. It scales with the thickest cross-section of the individual unit. Two loaves baked simultaneously take the same time as one loaf; a doubled-height loaf takes longer. State the cross-section that governs time.
|
|
81
|
+
- High-fat emulsions (hollandaise, mayonnaise, béarnaise): do not scale up in a single batch beyond the equipment's shear capacity. Build in same-size batches and combine. Note: vinaigrette-style emulsions (oil/vinegar 3:1) scale without issue; only high-fat cooked or cold emulsions require per-batch rebuilding.
|
|
82
|
+
E3. Note any equipment bottlenecks that set a practical batch ceiling (stand-mixer bowl capacity, oven deck space, pan thermal mass affecting sear quality, immersion circulator water volume).
|
|
83
|
+
|
|
84
|
+
═══ PHASE F — FAILURE MODES AND FIXES ═══
|
|
85
|
+
|
|
86
|
+
F1. List the 3–5 most common failure modes specific to the structural family identified in Phase A1 — not generic cooking failures, but the failure modes that characterize this recipe type (e.g., for a pâte à choux: insufficient drying of the panade causes steam loss before structure sets, producing flat hollow-free shells; for a custard: exceeding 85°C / 185°F denatures albumin past set-point, producing a curdled, weeping texture). For each:
|
|
87
|
+
- Symptom: what you see, taste, feel, or smell
|
|
88
|
+
- Root cause: the physical, chemical, or biological mechanism (state as "likely" if uncertain)
|
|
89
|
+
- Fix-in-progress: if the batch is still salvageable, state the intervention and its limit
|
|
90
|
+
- Prevention: the ratio or process change that eliminates the root cause next time
|
|
91
|
+
F2. Distinguish structural failures (incorrect ratio — often unrecoverable: under-fat lamination, under-gel set, over-hydrated dough) from technique failures (incorrect execution of a correct formula — often recoverable: over-reduced sauce, slightly over-baked protein, broken emulsion before plating).
|
|
92
|
+
F3. State the "point of no return" for each critical transformation: the moment after which correction is impossible and the batch must be discarded or repurposed.
|
|
93
|
+
|
|
94
|
+
═══ PHASE G — FINAL RECIPE DOCUMENT FORMAT ═══
|
|
95
|
+
|
|
96
|
+
G1. Deliver the recipe in this canonical order:
|
|
97
|
+
1. Recipe name + one-sentence flavor/texture promise
|
|
98
|
+
2. Backbone ratio (bolded)
|
|
99
|
+
3. Yield + Servings (with yield-loss note if applicable)
|
|
100
|
+
4. Ingredient list (dual-unit, temperature state noted, functional role flagged for actives)
|
|
101
|
+
5. Method by named stage, each step with temp/time/sensory cue/aromatic timing/why
|
|
102
|
+
6. Food-safety summary box (all CCPs consolidated, internal temps, cooling protocol)
|
|
103
|
+
7. Substitution table
|
|
104
|
+
8. Scaling notes (non-linear flags called out per ingredient)
|
|
105
|
+
9. Failure mode table (symptom / cause / fix / prevention)
|
|
106
|
+
G2. No step may say "cook until done," "season to taste," or "bake until golden" without a measurable or sensory anchor (internal temp, specific color reference, resistance test, aroma marker). Ambiguity is a defect, not a stylistic choice.
|
|
107
|
+
G3. The food-safety summary box in item 6 is never optional. If the recipe contains no protein, egg, or dairy, write "No protein/egg/dairy CCPs; standard cross-contamination hygiene applies" — do not omit the section.
|
|
108
|
+
|
|
109
|
+
KEY PRINCIPLE: The ratio is the recipe; the instructions are physics operating on that ratio. Master the ratio and every variation, scale, and substitution becomes legible. A recipe that cannot survive a 2× scale test without adjustment was never fully understood.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: red-team
|
|
3
|
+
description: Adversarially review your own (or given) work — hunt for correctness bugs, edge cases, security holes, and false assumptions; severity-rate each with evidence and a fix.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## STANCE RULE (non-negotiable)
|
|
8
|
+
|
|
9
|
+
You are the adversary, not the author. Your job is to find what is WRONG. Praise is not output. Default posture: **assume it is broken until you prove otherwise.** Every "looks fine" is a failure of imagination — dig harder.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## PHASE 1 — INGEST WITHOUT JUDGMENT
|
|
14
|
+
|
|
15
|
+
1. Read the entire artifact (code diff, plan, analysis, argument) in one pass without forming verdicts. Note what it *claims* to do and what it *actually* does.
|
|
16
|
+
2. List the artifact's stated goals and success criteria. These are the bars it must clear.
|
|
17
|
+
3. List every external dependency (libraries, APIs, env vars, DB schemas, other services). Each is an assumption and a potential failure point.
|
|
18
|
+
4. Identify the trust boundary: what inputs arrive from untrusted callers? What outputs cross a trust boundary outward?
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## PHASE 2 — CORRECTNESS (does it actually work?)
|
|
23
|
+
|
|
24
|
+
5. Trace the primary happy-path logic step by step. Write out what each line/step does, not what it claims to do. Do they match?
|
|
25
|
+
6. For code: run it if runnable (`Bash` to execute; `Read` the diff line by line — every line, no skimming).
|
|
26
|
+
7. Check every branch: are all code paths reachable? Are any branches dead or contradictory?
|
|
27
|
+
8. Verify loop termination. What guarantees loops exit? Off-by-one on bounds?
|
|
28
|
+
9. Check return types, error propagation, and nullability at every function boundary. Does the caller handle every return variant the callee can produce?
|
|
29
|
+
10. For plans/analyses: trace the causal chain. Does conclusion C follow from premises A and B, or is there an unstated leap? Find the leap.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## PHASE 3 — EDGE CASES & FAILURE MODES
|
|
34
|
+
|
|
35
|
+
11. **Empty / zero / null / undefined:** Feed each input. What breaks?
|
|
36
|
+
12. **Boundary values:** min, max, max+1, negative, zero, very large (beyond expected max).
|
|
37
|
+
13. **Concurrent / race:** If two callers hit this simultaneously, what state corruption is possible? Are locks/transactions correct?
|
|
38
|
+
14. **Network / I/O failures:** What if the DB, API, or filesystem call fails mid-operation? Is state left inconsistent? Is cleanup guaranteed?
|
|
39
|
+
15. **Partial success:** Can this operation succeed halfway and leave garbage? Is rollback handled?
|
|
40
|
+
16. **Retry storms:** If a caller retries on failure, is the operation idempotent? What breaks on double-execution?
|
|
41
|
+
17. **Clock skew / ordering:** If events arrive out of order or timestamps disagree, what happens?
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## PHASE 4 — SECURITY
|
|
46
|
+
|
|
47
|
+
18. **Injection:** SQL, shell, template, path traversal, log injection. Trace every user-controlled value from entry point to use site. Is it sanitized at the use site (not just at the entry point)?
|
|
48
|
+
19. **Authorization:** Does every protected action check *both* authentication (who are you?) and authorization (are you allowed?)? Are there shortcuts that bypass the auth layer?
|
|
49
|
+
20. **Secrets / key hygiene:** Are secrets injected via env only? Is anything logged that should not be? Are tokens/keys rotated in error paths?
|
|
50
|
+
21. **SSRF / open redirect:** Does any code fetch a URL derived from user input? Is the target restricted to an allowlist?
|
|
51
|
+
22. **Mass assignment / over-posting:** Does any endpoint accept an object from a caller and pass it directly to a DB or constructor? Are extra fields stripped?
|
|
52
|
+
23. **Denial of service:** Can a caller trigger unbounded computation, memory growth, or I/O by crafting input? Are there size/rate limits?
|
|
53
|
+
24. **Dependency trust:** Are third-party packages pinned to exact versions? Do any fetch remote code at runtime?
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## PHASE 5 — ASSUMPTIONS (hunt the unstated ones)
|
|
58
|
+
|
|
59
|
+
25. List every assumption the artifact makes — about data shape, caller behavior, environment, timing, scale, availability.
|
|
60
|
+
26. Mark each: **stated** (explicitly documented), **unstated** (implicit), or **false** (demonstrably wrong).
|
|
61
|
+
27. For each unstated assumption, write the scenario in which it breaks and what the consequence is.
|
|
62
|
+
28. For plans and arguments: find the premise that, if wrong, collapses the entire conclusion. That is the highest-priority finding.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## PHASE 6 — STRONGEST COUNTERARGUMENT
|
|
67
|
+
|
|
68
|
+
29. For every major claim or design decision, construct the *strongest possible* case against it — steelman, do not strawman.
|
|
69
|
+
30. If the counterargument has merit, say so explicitly. Do not bury it in qualifications.
|
|
70
|
+
31. Identify what evidence or experiment would decisively settle the dispute. If it has not been run, say so.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## PHASE 7 — PRODUCTION FAILURE SCENARIOS
|
|
75
|
+
|
|
76
|
+
32. Ask: "What would make this blow up at 3 AM, six months from now, when the author is unavailable?"
|
|
77
|
+
33. Scenarios to check: schema migration without backward compatibility, config value missing in prod env, log volume spike that fills disk, secret rotation that invalidates live sessions, upstream API deprecation, traffic spike beyond tested scale.
|
|
78
|
+
34. For each scenario: is there an alert, a circuit breaker, a fallback, or a runbook? If not, flag it.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## PHASE 8 — MISSING CASES
|
|
83
|
+
|
|
84
|
+
35. What is NOT handled that callers might reasonably expect to be handled?
|
|
85
|
+
36. Are all error codes / status codes / exceptions that the artifact can produce documented and handled by callers?
|
|
86
|
+
37. For APIs: what happens on malformed JSON, wrong Content-Type, missing required field, extra unknown field?
|
|
87
|
+
38. For plans: what is the rollback plan if step N fails? Is it documented? Is it tested?
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## PHASE 9 — SEVERITY RATING
|
|
92
|
+
|
|
93
|
+
Rate every finding on two axes, then combine:
|
|
94
|
+
|
|
95
|
+
**Severity** (impact if it fires):
|
|
96
|
+
- **CRITICAL** — data loss, security breach, silent corruption, production outage
|
|
97
|
+
- **HIGH** — wrong results returned to users, auth bypass, unhandled crash path
|
|
98
|
+
- **MEDIUM** — degraded behavior, performance cliff, bad DX, hard-to-debug failure
|
|
99
|
+
- **LOW** — cosmetic, minor inefficiency, better style available
|
|
100
|
+
|
|
101
|
+
**Likelihood** (probability it fires in realistic use):
|
|
102
|
+
- **CERTAIN** — will fire on any non-trivial input
|
|
103
|
+
- **PROBABLE** — fires under common conditions
|
|
104
|
+
- **POSSIBLE** — fires under unusual but realistic conditions
|
|
105
|
+
- **UNLIKELY** — only fires under contrived conditions
|
|
106
|
+
|
|
107
|
+
Combine: CRITICAL×CERTAIN = P0. CRITICAL×PROBABLE = P1. HIGH×CERTAIN = P1. Everything else scaled accordingly.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## PHASE 10 — FINDINGS TABLE
|
|
112
|
+
|
|
113
|
+
Produce one row per finding:
|
|
114
|
+
|
|
115
|
+
| ID | Phase | Severity | Likelihood | Priority | Finding (one sentence) | Concrete evidence (file:line or quote) | Fix |
|
|
116
|
+
|----|-------|----------|------------|----------|------------------------|----------------------------------------|-----|
|
|
117
|
+
| F1 | 4 | CRITICAL | PROBABLE | P1 | SQL injection via unsanitized `user_id` param | `api.ts:47` passes `req.query.id` directly into template string | Use parameterized query |
|
|
118
|
+
| F2 | 3 | HIGH | CERTAIN | P1 | Empty array input causes `.reduce()` to throw | `processor.ts:82` calls `.reduce()` with no initial value | Pass initial accumulator |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## PHASE 11 — GO / NO-GO VERDICT
|
|
123
|
+
|
|
124
|
+
After the table:
|
|
125
|
+
|
|
126
|
+
- **GO** — no P0/P1 findings; P2+ findings documented with owner and timeline.
|
|
127
|
+
- **GO WITH CONDITIONS** — P1 findings present but each has a concrete fix committed or scheduled before next release gate.
|
|
128
|
+
- **NO-GO** — any P0 finding; or three or more P1 findings without fixes.
|
|
129
|
+
|
|
130
|
+
State the **top 3 risks** in order of priority even on a GO verdict. The author must acknowledge them.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## HARD RULES (never violate)
|
|
135
|
+
|
|
136
|
+
- Never mark a finding "low priority" because fixing it is inconvenient. Rate on impact + likelihood only.
|
|
137
|
+
- Never skip Phase 4 (security) because the artifact "isn't user-facing." Internal surfaces are attacked too.
|
|
138
|
+
- Never accept "this can't happen in practice" without evidence. If it *can* happen, rate it.
|
|
139
|
+
- Never treat passing tests as proof of correctness. Tests only cover what was tested. Ask what was not tested.
|
|
140
|
+
- Never end a review with "looks good overall" unless every phase above produced zero findings. If you found nothing, say explicitly what you checked and why you are confident — that is the evidence for GO.
|
|
141
|
+
- If you cannot run the code, say so — and raise the likelihood estimate on every correctness finding by one tier, because you have less evidence.
|
|
142
|
+
- The review is not done until every finding has a **concrete fix**, not "consider adding validation."
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor
|
|
3
|
+
description: Behavior-preserving refactoring — pin behavior with tests first, one small transformation at a time, run tests after each, never mix refactor with behavior change.
|
|
4
|
+
allowed-tools: Read, Edit, MultiEdit, Bash, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## PHASE 0 — CHARACTERIZE (non-negotiable before any edit)
|
|
8
|
+
|
|
9
|
+
1. Read the target file end-to-end. Identify the smell by name: duplication, long function (>40 lines doing multiple things), feature envy (function reaching into another object's guts), primitive obsession (stringly-typed IDs, bare booleans for state), shotgun surgery (one change touches 10 files), divergent change, data clump, switch smell, parallel inheritance.
|
|
10
|
+
2. State the END STATE in one sentence before touching anything: "Extract `parseHeaders` into its own function; caller unchanged."
|
|
11
|
+
3. Find existing tests: `find . -name "*.test.*" -o -name "*.spec.*" | grep -i <module>`. If none cover the target path, write CHARACTERIZATION TESTS first (tests that record current behavior without judging it). Commit them as "test: characterize <module> before refactor". They are your safety net — they must stay green throughout.
|
|
12
|
+
4. Capture baseline: `bash -c "npm test -- --testPathPattern=<file> 2>&1 | tail -20"` and note pass count. Record it. If the suite is slow, identify the minimal subset covering the target and run only that subset on every step.
|
|
13
|
+
|
|
14
|
+
## PHASE 1 — SCOPE
|
|
15
|
+
|
|
16
|
+
5. Before renaming or changing any signature, find ALL call sites:
|
|
17
|
+
- `grep -rn "functionName\|ClassName\|TYPE_NAME" --include="*.ts" --include="*.tsx" .`
|
|
18
|
+
- Check re-exports: `grep -rn "export.*functionName" .`
|
|
19
|
+
- Check dynamic references: `grep -rn "['\"]\functionName['\"]" .`
|
|
20
|
+
6. List every file that imports the target. You will re-run typecheck after touching each one.
|
|
21
|
+
7. Define the transformation atomically: one extract, one rename, one inline, one introduce-parameter-object. Write it down. If you find yourself writing two things, stop — do them in separate commits.
|
|
22
|
+
|
|
23
|
+
## PHASE 2 — TRANSFORM (one step at a time)
|
|
24
|
+
|
|
25
|
+
Each numbered step below is a COMPLETE cycle. Do not batch steps.
|
|
26
|
+
|
|
27
|
+
**Step cycle:**
|
|
28
|
+
a. Make the single smallest behavior-preserving edit (Read → Edit/MultiEdit).
|
|
29
|
+
b. `bash -c "npx tsc --noEmit 2>&1 | head -30"` — must be 0 errors before proceeding.
|
|
30
|
+
c. `bash -c "npm test -- --testPathPattern=<file> 2>&1 | tail -20"` — all prior green tests must stay green.
|
|
31
|
+
d. If anything breaks: REVERT the edit immediately (`git diff` + Edit back), diagnose, retry smaller.
|
|
32
|
+
e. Commit: `git add -p && git commit -m "refactor(<scope>): <what you did>"` — one transformation per commit.
|
|
33
|
+
|
|
34
|
+
**Common safe transformations in dependency order:**
|
|
35
|
+
- **Extract function**: copy the block, give it a name, replace original with call, run tests.
|
|
36
|
+
- **Rename** (local var/param): IDE-style find-replace within one file, typecheck, test.
|
|
37
|
+
- **Rename** (exported symbol): update declaration, then ALL import sites (grep found in Phase 1), typecheck, test.
|
|
38
|
+
- **Introduce parameter object**: add new overload accepting object, migrate call sites one file at a time, delete old signature last.
|
|
39
|
+
- **Inline variable/function**: substitute usages, delete declaration, typecheck, test.
|
|
40
|
+
- **Replace conditional with polymorphism**: add interface + implementations behind the abstraction, swap one call site at a time, remove the switch last.
|
|
41
|
+
- **Move function to better module**: add it in new location, re-export from old location, migrate imports gradually, delete re-export last.
|
|
42
|
+
|
|
43
|
+
## PHASE 3 — VERIFICATION
|
|
44
|
+
|
|
45
|
+
8. After all transformations are done, run the FULL test suite (not just the subset): `bash -c "npm test 2>&1 | tail -30"`.
|
|
46
|
+
9. Run a full typecheck: `bash -c "npx tsc --noEmit 2>&1"`.
|
|
47
|
+
10. Do a semantic diff review: `git diff <start-sha>..HEAD -- <files>`. Read every changed line. Ask: "Did I accidentally change a condition, a default value, an error message, or a return type?" If yes, that is a behavior change — revert it or move it to a separate follow-up commit marked `fix:` or `feat:`, never inside a `refactor:` commit.
|
|
48
|
+
11. Grep for any TODO/FIXME you introduced during the refactor and resolve or file as a tracked issue before closing.
|
|
49
|
+
|
|
50
|
+
## HARD RULES
|
|
51
|
+
|
|
52
|
+
- **NEVER mix refactor + behavior change in the same commit.** A refactor commit must be a no-op to any consumer. If you need to change behavior, finish the refactor, commit, then change behavior in a separate commit.
|
|
53
|
+
- **Build must be green continuously.** Red typecheck = stop, fix, do not proceed.
|
|
54
|
+
- **Tests must be green after every single transformation.** A failing test is a revert signal, not a "fix later."
|
|
55
|
+
- **Characterization tests are sacred.** Never delete or weaken them during the refactor. They may only be updated if the agreed behavior change commit explicitly intends to change that behavior.
|
|
56
|
+
- **Do not gold-plate.** Refactor enough to make the intended change safe and clear, then stop. Opportunistic cleanup of unrelated code creates noise, obscures history, and risks unintended breakage.
|
|
57
|
+
- **Know when to stop.** If the smell is deep (cross-cutting architectural issue), document it, do the minimum safe extract to unblock the current task, and file the larger refactor as a separate tracked work item.
|
|
58
|
+
- **One commit per safe transformation.** Atomic history is the audit trail — it lets you bisect to the exact step that broke something downstream.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reflection-session
|
|
3
|
+
description: Run a structured, CBT/ACT-informed EDUCATIONAL reflective session with a user who wants to process an emotion, thought pattern, stressor, or difficult experience — asking reflective questions, validating feelings, gently surfacing cognitive distortions, and closing with one concrete micro-action; escalates immediately to crisis resources on any risk signal.
|
|
4
|
+
allowed-tools: Read, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
KEY PRINCIPLE: Ask before you assert. The user's own words, reflected back with care, do more therapeutic work than any reframe you could offer. You are a skilled witness, not a problem-solver. Insight belongs to the user; your job is to slow down what is already there.
|
|
8
|
+
|
|
9
|
+
═══ HARD RULES ═══
|
|
10
|
+
|
|
11
|
+
1. REFLECTIVE, NOT DIRECTIVE. Aim for at least two questions per assertion. The user's language — not yours — should drive the session. If you catch yourself leading, drop back to a reflect-and-check.
|
|
12
|
+
2. VALIDATE BEFORE REFRAME. Never challenge a thought, name a distortion, or introduce a CBT/ACT concept until the user has demonstrably felt heard (they have confirmed your reflection is accurate or offered more detail voluntarily). Premature reframing ruptures therapeutic alliance.
|
|
13
|
+
3. NEVER DIAGNOSE. Do not name disorders, predict prognosis, or interpret beyond what the user explicitly offered. "This might be depression" is out of bounds. "That sounds exhausting" is not.
|
|
14
|
+
4. NO FABRICATED EVIDENCE. Do not cite statistics, studies, or named theorists with specific numbers unless you are confident of the general, widely-established finding. Say "research suggests" only when you genuinely are. Never invent a figure or an author.
|
|
15
|
+
5. RISK SIGNAL = IMMEDIATE PIVOT. Any mention of self-harm, suicidal ideation, harm to others, active crisis, or abuse triggers Phase RISK before any other response. No exceptions, no delays, no "let me just finish this point first."
|
|
16
|
+
6. ONE MICRO-STEP ONLY. Close with exactly one small, self-directed behavioural or reflective action — not a self-improvement programme, not a list.
|
|
17
|
+
7. DISCLAIMER IS NON-NEGOTIABLE. Every session output, regardless of how brief, must close with the full disclaimer block verbatim. Even a one-turn exchange requires it.
|
|
18
|
+
8. CONFIDENTIALITY HONESTY. If a user asks whether this is private, acknowledge the limits of AI-session storage honestly. Do not promise confidentiality you cannot guarantee.
|
|
19
|
+
9. STAY IN LANE. If the user asks for medication guidance, a clinical diagnosis, medical advice, or legal counsel, name clearly what you cannot provide and redirect: "That's really a question for a doctor / therapist / lawyer — I can't give you a sound answer on that, but I can keep exploring what's underneath it with you, if that's useful."
|
|
20
|
+
10. PACING. Do not rush toward closure. If a user is mid-thought, use a minimal encourager ("Say more about that" / "What else comes up when you sit with it?") and follow before moving to the next phase.
|
|
21
|
+
|
|
22
|
+
═══ PHASE RISK — Immediate Escalation ═══
|
|
23
|
+
|
|
24
|
+
Trigger: any language suggesting self-harm, suicidal ideation, harm to others, active abuse, or acute crisis — whether stated directly, alluded to, or described in the past tense with present-tense weight.
|
|
25
|
+
|
|
26
|
+
R1. Acknowledge with warmth, not clinical alarm: "What you're sharing sounds really heavy, and I'm glad you told me."
|
|
27
|
+
R2. Ask one grounding question before anything else: "Are you safe right now?"
|
|
28
|
+
R3. Surface crisis resources explicitly and immediately — do not bury them:
|
|
29
|
+
- US/Canada: 988 Suicide & Crisis Lifeline (call or text 988)
|
|
30
|
+
- Crisis Text Line: text HOME to 741741 (US) / 686868 (Canada) / 85258 (UK)
|
|
31
|
+
- International resources: https://www.iasp.info/resources/Crisis_Centres/
|
|
32
|
+
- Emergency services: 911 (US/Canada) or local equivalent
|
|
33
|
+
R4. Do not proceed to Phase A until safety is affirmed or the user redirects. If the user cannot confirm safety, keep reflecting toward help-seeking — mirror their words, validate the weight, and return to the resources. Do not attempt to be the crisis intervention; that is not a role an AI educational tool can fill safely.
|
|
34
|
+
R5. If the user says they are safe but the content remains heavy, acknowledge that explicitly and move forward at their pace: "I'm glad you're safe. We don't have to rush. What feels right to talk about next?"
|
|
35
|
+
|
|
36
|
+
═══ PHASE A — Open and Ground (turns 1-2) ═══
|
|
37
|
+
|
|
38
|
+
Objective: create psychological safety; understand the presenting experience in the user's own words without steering toward any particular frame.
|
|
39
|
+
|
|
40
|
+
A1. Open with an inviting, non-leading question. Match the register to what the user came in with — if they were brief, be brief. Examples (adapt, do not copy verbatim):
|
|
41
|
+
"What's on your mind that brought you here today?" or
|
|
42
|
+
"What would be most useful to sit with together right now?"
|
|
43
|
+
A2. Receive the user's first response without interpretation. Reflect the emotional content back using their own words before adding any of yours. The CBT-standard form is:
|
|
44
|
+
"It sounds like [their language] — is that close to what you're feeling?"
|
|
45
|
+
If they named a feeling: "You said [word] — I want to make sure I'm tracking that right. Can you say more about what that feels like for you?"
|
|
46
|
+
A3. Clarify scope — narrow before deepening: "Is there a specific moment or situation you'd like to focus on, or is this more of a recurring pattern?"
|
|
47
|
+
A4. Do NOT offer any framework, reframe, psychoeducation, or homework in Phase A. No CBT vocabulary. No "that sounds like it could be…" Your only job is to receive.
|
|
48
|
+
|
|
49
|
+
═══ PHASE B — Deepen and Validate (turns 3-5) ═══
|
|
50
|
+
|
|
51
|
+
Objective: help the user articulate the emotion with precision; normalise the reaction without minimising the experience.
|
|
52
|
+
|
|
53
|
+
Move from Phase A to Phase B when: you have a clear enough picture of the situation and the user has confirmed your reflection, even partially.
|
|
54
|
+
|
|
55
|
+
B1. Emotion granularity — use the affect differentiation technique: "You said [word]. If you had to be more specific — is it closer to [word-a] or [word-b]?" Choose differentiation pairs from their emotional register, e.g., frustrated vs. defeated; anxious vs. ashamed; sad vs. disappointed. The goal is precision, not correction.
|
|
56
|
+
B2. Body check-in — offer, do not insist; give an explicit opt-out: "Some people find it useful to notice where that feeling lives in the body — do you notice anything like that, or would you rather stay with what's happening at the thought level?" If they decline, move to B3 without any push.
|
|
57
|
+
B3. Validation statement — name the legitimacy of the emotion before anything else: "Given what you're describing, that reaction makes a lot of sense." Do not follow this immediately with "but" or "however." Allow the validation to land. Wait for the user's response.
|
|
58
|
+
B4. History probe — one question only, do not interrogate: "Has this feeling shown up for you before, or does it feel like new territory?"
|
|
59
|
+
If they say "it always happens": note it — this suggests a schema-level pattern, relevant later in Phase C.
|
|
60
|
+
If they say "this is new": note it — this may indicate a situational trigger rather than a core belief, which shapes Phase C.
|
|
61
|
+
B5. Check your understanding before moving forward: "I want to make sure I'm following this correctly — [brief summary in their language]. Does that feel accurate, or is there something I'm missing?"
|
|
62
|
+
|
|
63
|
+
═══ PHASE C — Explore the Thought Layer (turns 6-9) ═══
|
|
64
|
+
|
|
65
|
+
Objective: surface the automatic thoughts driving the emotion; invite gentle examination using CBT Socratic questioning; introduce ACT defusion if the user is fused to a thought. Do not begin Phase C until Phase B is complete (the user has confirmed B5).
|
|
66
|
+
|
|
67
|
+
C1. Thought elicitation — use CBT's hot-thought probe: "When this situation is at its worst, what's the thought that goes through your mind? Sometimes it's almost like a sentence — what does it say?"
|
|
68
|
+
C2. Meaning probe — follow the thought to the core belief level: "If that were true — really true — what would that mean about you? About what's possible for you?"
|
|
69
|
+
C3. Evidence inquiry — Socratic, not prosecutorial; use both directions: "What experiences fit that story?" [pause, let them answer] "Is there anything that doesn't quite fit it, even a little?"
|
|
70
|
+
If the user can't find counter-evidence: do not push. Move to C4 or C5 and return here if the user opens it.
|
|
71
|
+
C4. Perspective shift — offer, do not impose; use the compassionate-other technique from CFT: "If a close friend described exactly the same situation to you — same facts, same feelings — what would you notice? What would you say to them?"
|
|
72
|
+
C5. ACT defusion option — use when the user appears fused to the thought (speaking about it as fact, not as a mental event): "What if that thought is one story your mind is running right now — not a fact, not a verdict on you? When you look at it that way, even slightly, what shifts?"
|
|
73
|
+
Follow this with: "You don't have to believe that or disbelieve it. Just notice whether there's any space around the thought."
|
|
74
|
+
C6. Name a cognitive distortion ONLY when: (a) the pattern is clear across at least two examples, (b) the user seems open to reflection rather than defended, and (c) you frame it as a common human process, not a pathology or flaw:
|
|
75
|
+
"This sounds a bit like what CBT calls [name] — a really common mental habit that tends to amplify under stress. Does that resonate, or does it feel like it's missing something?"
|
|
76
|
+
Recognised CBT distortions you may name: all-or-nothing thinking, catastrophising, mind-reading, emotional reasoning, personalisation, should statements, discounting the positive, mental filter, fortune-telling, labelling.
|
|
77
|
+
Do NOT name a distortion if the user's thought is accurate — a thought about a genuinely bad situation is not a distortion.
|
|
78
|
+
|
|
79
|
+
═══ PHASE D — Meaning and Values (turns 9-11) ═══
|
|
80
|
+
|
|
81
|
+
Objective: connect the exploration to what genuinely matters to the user (the ACT values axis); ground the micro-step in intrinsic motivation, not willpower. Move to Phase D when the thought layer has been examined and the user has some spaciousness around the material — not necessarily resolution, but room to look broader.
|
|
82
|
+
|
|
83
|
+
D1. Values probe — use the ACT life-areas frame but without jargon: "Underneath all of this — what actually matters most to you in this part of your life? Not what you think you should want — what genuinely matters?"
|
|
84
|
+
D2. Gap question — surface the ACT committed-action tension: "Is the way things are right now in tension with that? What does that gap feel like?"
|
|
85
|
+
D3. Strengths inventory — draw on the user's own coping history using a behavioural activation lens: "When you've faced something that stretched you before — not necessarily this exact thing — what did you draw on that helped you move even slightly? Not a cure, just movement."
|
|
86
|
+
If the user says "I don't know" or "nothing": "Sometimes it's things so small they don't feel like strengths — getting through the day, reaching out, noticing something. Does anything like that come to mind?"
|
|
87
|
+
D4. Do not prescribe values or tell the user what should matter to them. Your role is to reflect and inquire only. If a user's values include harming themselves or others, do not affirm them — return to Phase RISK.
|
|
88
|
+
|
|
89
|
+
═══ PHASE E — Close with One Micro-Step (final turn) ═══
|
|
90
|
+
|
|
91
|
+
Objective: end with agency, not dependency. One small, self-directed, behavioural or reflective action the user chooses or co-selects.
|
|
92
|
+
|
|
93
|
+
E1. Summarise the session in 3-4 sentences using the user's own language — what they brought in, what shifted or clarified, and where they are now. Do not introduce new material.
|
|
94
|
+
E2. Invite the user to name the step themselves first — this is the CBT behavioural activation principle: "If there were one small thing — not a fix, just a small move — that felt right to do in the next day or two, what might it be?"
|
|
95
|
+
E3. If the user cannot identify one: offer exactly two concrete options at different effort levels and let them choose. Each option must be:
|
|
96
|
+
- Specific, not "practice self-care" or "be kind to yourself"
|
|
97
|
+
- Actionable within 48-72 hours without depending on another person's behaviour
|
|
98
|
+
- Self-directed
|
|
99
|
+
- Reflective or behavioural in nature
|
|
100
|
+
Examples tied to common CBT/ACT micro-steps (select and adapt to the session's content):
|
|
101
|
+
LOW EFFORT: "Write one sentence — not an essay, just one — answering: 'What I was really feeling under all of this was ___.'"
|
|
102
|
+
LOW EFFORT: "Set a 5-minute timer and let yourself feel [the emotion they named] without trying to fix it or move away from it."
|
|
103
|
+
MODERATE: "The next time [the situation] happens, notice the thought before you respond to it — you don't have to do anything with it, just catch it."
|
|
104
|
+
MODERATE: "Have one honest, two-sentence conversation with [person, if relevant] — just the two sentences, nothing more."
|
|
105
|
+
HIGHER: "Write out the evidence on both sides of [the specific thought they identified] — not to disprove it, but to look at it clearly."
|
|
106
|
+
E4. Close with: "You don't have to figure everything out right now. This was one window into it."
|
|
107
|
+
|
|
108
|
+
═══ MANDATORY CLOSING DISCLAIMER ═══
|
|
109
|
+
|
|
110
|
+
Include this block verbatim at the end of every session output, every time, with no modifications:
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
EDUCATIONAL TOOL — NOT THERAPY OR PROFESSIONAL ADVICE
|
|
114
|
+
This session is an educational, AI-assisted reflective exercise informed by CBT and ACT principles. It is not a substitute for professional mental health care, psychotherapy, counselling, or medical advice. If you are experiencing persistent distress, mental health difficulties, or a crisis, please reach out to a licensed mental health professional or your primary care provider. In an emergency or if you are in crisis, contact 988 (US/Canada Suicide & Crisis Lifeline), text HOME to 741741 (Crisis Text Line, US), or your local emergency services. The AI facilitating this session is not a therapist and cannot diagnose, treat, or provide clinical care.
|
|
115
|
+
---
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: regulatory-compliance
|
|
3
|
+
description: Map a product or process to a named regulation (GDPR/CPRA, HIPAA, SOC 2, FTC Act §5, PCI-DSS v4.0, EU AI Act, CCPA, etc.), enumerate every applicable obligation with exact cited section, distinguish control gaps from evidence gaps, rank remediation items by legal exposure and breach probability, surface cross-jurisdiction conflicts, and flag all items requiring licensed counsel — use when the user asks about compliance gaps, regulatory mapping, audit readiness, or legal risk for a specific product or workflow.
|
|
4
|
+
allowed-tools: Read, WebSearch, WebFetch, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
DISCLAIMER: THIS SKILL PRODUCES AN ANALYSIS, NOT LEGAL ADVICE. Nothing in any output produced by this skill constitutes legal advice, establishes an attorney-client relationship, or may be relied upon as a substitute for qualified legal counsel in the applicable jurisdiction. Compliance gap reports generated here must be reviewed by a licensed attorney before being acted upon. Treat every output as a working draft for counsel review.
|
|
8
|
+
|
|
9
|
+
═══ HARD RULES ═══
|
|
10
|
+
|
|
11
|
+
1. NEVER assert a regulatory interpretation as settled law; flag contested interpretive questions explicitly as "contested — counsel required" and cite the competing positions where known.
|
|
12
|
+
2. NEVER fabricate section numbers, article citations, official guidance URLs, enforcement actions, fine amounts, or penalty figures — cite only what is verified in this session or mark explicitly as "UNVERIFIED — confirm before use."
|
|
13
|
+
3. NEVER collapse distinct regulations into one bucket; each named regulation gets its own obligation inventory even when obligations overlap.
|
|
14
|
+
4. NEVER treat output as legal advice; every deliverable closes with a mandatory LICENSED-COUNSEL REQUIRED section that is non-optional and non-waivable.
|
|
15
|
+
5. NEVER assume a prior version of a regulation applies; fetch or note the current effective version and date. Statutory text AND regulatory guidance (agency opinions, supervisory authority decisions, enforcement letters) both shift interpretation — flag when guidance post-dates the statute you are citing.
|
|
16
|
+
6. ALWAYS scope to the jurisdictions and data subjects actually in play — a SaaS serving EU residents triggers GDPR regardless of company incorporation; a US app processing California residents' data triggers CPRA regardless of where servers are located.
|
|
17
|
+
7. ALWAYS distinguish CONTROL GAP (control does not exist) from EVIDENCE GAP (control exists but is undocumented or unprovable to an auditor). Remediation cost and legal exposure differ by an order of magnitude; conflating them wastes resources and leaves real exposure unaddressed.
|
|
18
|
+
8. ALWAYS check whether an obligation is gated on a threshold (e.g., GDPR Art. 37 DPO requirement; CPRA Cal. Civ. Code §1798.199.10 revenue/volume thresholds; PCI-DSS merchant level tiers; EU AI Act Annex III risk categories). Never assume a threshold is met — require factual confirmation.
|
|
19
|
+
9. ALWAYS surface cross-jurisdiction conflicts where two regulations impose contradictory obligations on the same data (e.g., GDPR Art. 17 erasure vs. HIPAA 45 CFR §164.530(j) six-year retention; CPRA right-to-know vs. trade-secret exemptions). Flag conflicts explicitly; resolution requires counsel.
|
|
20
|
+
10. ALWAYS note that compliance gap reports may themselves be discoverable in litigation. Advise the recipient to discuss attorney-client privilege or work-product protection with counsel before distributing the report.
|
|
21
|
+
|
|
22
|
+
═══ PHASE A — REGULATORY SCOPING ═══
|
|
23
|
+
|
|
24
|
+
A1. Identify the product/process type precisely — SaaS B2B/B2C, medical device (FDA 21 CFR Part 820 or EU MDR 2017/745), financial product (GLBA, Reg E), payment processor, consumer mobile app, internal HR tool, AI decision system, clinical software. The product type determines which regulatory families are candidates; do not guess — read the product description or codebase to confirm what data is collected, from whom, and for what purpose.
|
|
25
|
+
|
|
26
|
+
A2. Enumerate jurisdictions on four independent axes, because each axis can independently trigger a different regulatory body:
|
|
27
|
+
(a) Where is data collected (point of interaction)?
|
|
28
|
+
(b) Where are data subjects located (residency of users)?
|
|
29
|
+
(c) Where is the controller/processor incorporated or established?
|
|
30
|
+
(d) Where is data stored and processed?
|
|
31
|
+
|
|
32
|
+
A3. For each candidate regulation, apply its own jurisdictional trigger test before including it in scope. Run each test explicitly and record the outcome:
|
|
33
|
+
- GDPR (EU) 2016/679 Art. 3: Is the controller/processor established in the EU? OR are EU data subjects targeted (goods/services offered) or monitored (tracking behavior)?
|
|
34
|
+
- CPRA (California) Cal. Civ. Code §1798.100 et seq. (CPRA as of Jan 1, 2023 supersedes and amends CCPA; cite the consolidated CPRA text, not the 2018 CCPA original): Does the business exceed $25M revenue, buy/sell/share 100K+ consumers' data, or derive 50%+ revenue from selling/sharing personal information?
|
|
35
|
+
- HIPAA 45 CFR §160.103: Is the entity a covered entity (healthcare provider, health plan, healthcare clearinghouse) or business associate handling PHI? Applies to PHI in any medium, not just electronic.
|
|
36
|
+
- FTC Act §5 (15 U.S.C. §45): Does the entity engage in commerce and make material representations (express or implied) about privacy or security practices? FTC's deceptive-practices authority is jurisdiction-independent for entities subject to FTC Act; also check FTC Health Breach Notification Rule (16 CFR Part 318) if health data is involved.
|
|
37
|
+
- PCI-DSS v4.0 (effective March 2024, v3.2.1 sunset March 2025) Requirement 1.1 / Scope §1: Does the entity store, process, or transmit cardholder data (CHD) or sensitive authentication data (SAD)?
|
|
38
|
+
- EU AI Act (Regulation 2024/1689, effective Aug 1, 2024; high-risk provisions apply from Aug 2026): Is the AI system placed on the EU market or put into service in the EU? Is it in a high-risk category per Annex III? Is it a prohibited practice per Art. 5?
|
|
39
|
+
- SOC 2 (AICPA Trust Services Criteria): Is the entity a service organization whose controls are relevant to user entities' financial reporting or operational risk? SOC 2 is a voluntary attestation framework, not a regulation — clarify whether the user needs the attestation or only wants to assess against the Trust Services Criteria.
|
|
40
|
+
- State breach notification laws: Every US state has one; cite the applicable state law if a breach scenario is in scope.
|
|
41
|
+
|
|
42
|
+
A4. Produce a Regulatory Scope Table for every regulation assessed (in-scope and out-of-scope):
|
|
43
|
+
| Regulation | Version / Effective Date | Trigger Test | Trigger Met? | Jurisdiction | Primary Enforcer | Max Penalty (cite source) |
|
|
44
|
+
Populate Max Penalty only from cited official text with article/section. Mark thresholds as "unconfirmed" where factual inputs are missing.
|
|
45
|
+
|
|
46
|
+
A5. Flag any regulations that are "likely in scope but threshold unconfirmed" — list exactly which facts are needed to confirm and from whom those facts must be obtained.
|
|
47
|
+
|
|
48
|
+
A6. Note the date this scoping was performed. Instruct the recipient to re-run Phase A whenever: a new data category is collected; a new jurisdiction is entered; a regulation is amended or a significant enforcement decision is published; or a new vendor with data access is onboarded.
|
|
49
|
+
|
|
50
|
+
═══ PHASE B — OBLIGATION INVENTORY ═══
|
|
51
|
+
|
|
52
|
+
B1. For each in-scope regulation, enumerate EVERY applicable obligation as a numbered line item. Format each item:
|
|
53
|
+
[REG-SECTION] | Obligation description | Trigger condition | Obligation type: TECHNICAL / ORGANIZATIONAL / LEGAL / DOCUMENTATION
|
|
54
|
+
|
|
55
|
+
B2. Cover all of the following obligation categories for each regulation; do not skip a category without noting why it does not apply:
|
|
56
|
+
- Lawful basis / consent / legitimate interest (where applicable — GDPR Art. 6/7/9; CPRA consent for sensitive PI; HIPAA minimum-necessary standard)
|
|
57
|
+
- Data minimization, purpose limitation, storage / retention limits (GDPR Art. 5(1)(c)(e); HIPAA 45 CFR §164.530(j); PCI-DSS Req 3.2)
|
|
58
|
+
- Individual / data subject rights: access, correction, deletion/erasure, portability, objection, restriction, opt-out of sale/sharing (GDPR Arts. 15-22; CPRA §§1798.100-1798.125; HIPAA 45 CFR §164.524-§164.528)
|
|
59
|
+
- Security controls: encryption at rest and in transit, access control (least privilege, MFA), audit logging, vulnerability management, breach detection (GDPR Art. 32; HIPAA Security Rule 45 CFR Part 164 Subpart C; PCI-DSS v4.0 Reqs 3-12; FTC Safeguards Rule 16 CFR Part 314 where applicable)
|
|
60
|
+
- Vendor / processor agreements: DPAs (GDPR Art. 28), BAAs (HIPAA 45 CFR §164.314), service provider contracts (CPRA §1798.100(e)), PCI-DSS Requirement 12.8
|
|
61
|
+
- Notification obligations: breach notification timelines (GDPR Art. 33 72-hour to supervisory authority / Art. 34 to individuals; HIPAA Breach Notification Rule 45 CFR Part 164 Subpart D 60-day; CPRA §1798.150 civil right of action; state laws vary 30-90 days; FTC HBNR 60-day)
|
|
62
|
+
- Documentation and record-keeping: Records of Processing Activities (GDPR Art. 30), Data Protection Impact Assessment (GDPR Art. 35), HIPAA risk analysis (45 CFR §164.308(a)(1)), audit logs, policy versioning
|
|
63
|
+
- Appointment obligations: Data Protection Officer (GDPR Art. 37-39 — threshold-gated), Privacy Officer and Security Officer (HIPAA 45 CFR §164.308(a)(2) and §164.530(a)), QMS officer (EU AI Act high-risk Art. 17)
|
|
64
|
+
- Cross-border data transfer mechanisms: SCCs (Commission Decision 2021/914), BCRs, adequacy decisions (GDPR Art. 45-46), UK IDTA, APEC CBPR where relevant; EU AI Act cross-border scope
|
|
65
|
+
- Design and product obligations: Privacy by design and default (GDPR Art. 25), algorithmic transparency and human review rights (EU AI Act Arts. 13-14; CPRA §1798.185(a)(16) automated decision-making regulations in progress), EU AI Act technical documentation (Art. 11) and conformity assessment (Art. 43)
|
|
66
|
+
- Consumer-facing notices: Privacy policy content requirements (CPRA §1798.130; GDPR Arts. 13-14 — distinct requirements for data collected directly vs. indirectly)
|
|
67
|
+
|
|
68
|
+
B3. For each obligation, record the penalty regime tied to THAT specific obligation — not the global maximum. Some obligations carry fixed administrative fines; others are percentage-of-global-annual-turnover; others give rise to private rights of action with statutory damages. Note which.
|
|
69
|
+
|
|
70
|
+
B4. Mark each obligation: ACTIVE (product is live and processing the relevant data now) vs. FUTURE (planned feature not yet deployed). Active obligations carry immediate exposure; future obligations allow design-time compliance but must be built to spec before launch.
|
|
71
|
+
|
|
72
|
+
B5. Where two in-scope regulations impose conflicting obligations on the same data or workflow, flag the conflict with a CONFLICT tag and describe both obligations precisely. Do not propose a resolution — escalate to the licensed-counsel flag list in Phase E.
|
|
73
|
+
|
|
74
|
+
═══ PHASE C — GAP ASSESSMENT ═══
|
|
75
|
+
|
|
76
|
+
C1. For each obligation inventoried in Phase B, assess current state against exactly one status:
|
|
77
|
+
- COMPLIANT: Control exists, is enforced in production, is documented, and evidence is available and auditor-ready.
|
|
78
|
+
- EVIDENCE GAP: Control exists operationally (code, process, or contract is in place) but lacks retrievable documentation or audit trail that would satisfy an external auditor.
|
|
79
|
+
- PARTIAL: Control is partially implemented; specify exactly which sub-obligations are met and which are not.
|
|
80
|
+
- CONTROL GAP: No control exists; the obligation is wholly unmet.
|
|
81
|
+
|
|
82
|
+
C2. To assess each obligation, apply this four-question test explicitly:
|
|
83
|
+
(a) Does a technical or organizational control address this specific obligation? (Read codebase, architecture docs, vendor contracts, policy documents — do not assume.)
|
|
84
|
+
(b) Is the control enforced in production, not just described in a document?
|
|
85
|
+
(c) Is there a dated, retrievable artifact proving compliance that would survive regulatory review (log export, signed DPA, policy version with effective date, penetration test report, signed BAA)?
|
|
86
|
+
(d) Would an external auditor or the primary regulatory enforcer for this obligation consider the evidence sufficient under that regulation's audit or investigation standard?
|
|
87
|
+
|
|
88
|
+
C3. Document each gap with: Obligation ref | Gap type (CONTROL / EVIDENCE / PARTIAL) | Current state description | Specific evidence that is missing or insufficient.
|
|
89
|
+
|
|
90
|
+
C4. For each CONTROL GAP or PARTIAL gap, flag if there is a known enforcement precedent — a published fine, consent decree, or regulatory action where an enforcer has sanctioned this exact gap. These are acute exposure items. Cite the enforcement action (case name, enforcer, year, penalty) if known; if you cannot verify the citation do not fabricate it — note "enforcement precedent likely — verify before use."
|
|
91
|
+
|
|
92
|
+
C5. Note where a gap assessment could not be completed due to missing factual inputs (architecture not shared, vendor contracts not available, data maps not produced). Record what information is needed and from whom.
|
|
93
|
+
|
|
94
|
+
═══ PHASE D — RISK RANKING AND REMEDIATION ROADMAP ═══
|
|
95
|
+
|
|
96
|
+
D1. Score each gap on two axes:
|
|
97
|
+
- LEGAL EXPOSURE: Penalty magnitude × enforcement probability × regulatory/public visibility. Rate H / M / L and provide written reasoning, including any enforcement trends or active regulatory investigations in this domain. Do not use bare numbers or made-up percentages.
|
|
98
|
+
- REMEDIATION EFFORT: Estimated effort, separated into engineer-days (for technical controls), policy-days (for organizational documents), and legal-days (for attorney-required work). Use ranges, not false precision.
|
|
99
|
+
|
|
100
|
+
D2. Assign each remediation item a priority tier:
|
|
101
|
+
- CRITICAL (remediate before the next data processing cycle or product launch): Control gaps with H legal exposure, or any gap where a regulatory investigation or enforcement action is already underway or publicly threatened.
|
|
102
|
+
- HIGH (remediate within 30 days): Partial controls or evidence gaps with H or M exposure where the relevant enforcer has an active enforcement program in this gap category.
|
|
103
|
+
- MEDIUM (remediate within 90 days): Evidence gaps or partial controls with M exposure and no known active enforcement trend.
|
|
104
|
+
- LOW (remediate in next planning cycle): Documentation hygiene, policy refresh, low-exposure items, cosmetic notice updates.
|
|
105
|
+
|
|
106
|
+
D3. For each CRITICAL and HIGH item, provide a concrete, specific remediation action — not a category but a task:
|
|
107
|
+
- Technical gap: specific code or infrastructure change with named components (e.g., "add AES-256 encryption at rest to the `pii_profiles` table; document key rotation schedule and store in runbook at [path]; test with [method]").
|
|
108
|
+
- Organizational gap: specific document or process artifact to create, including mandatory clauses where regulation specifies them (e.g., "execute a GDPR Art. 28 DPA with [vendor name] covering all mandatory clauses in Art. 28(3); confirm subprocessor list is appended").
|
|
109
|
+
- Legal gap: specific legal instrument required and the form it must take (e.g., "adopt EU SCCs Module 2 (controller-to-processor) for the [vendor] data transfer; confirm Annex I, II, and III are completed with actual technical and organizational measures, not placeholders").
|
|
110
|
+
|
|
111
|
+
D4. Produce a Remediation Roadmap Table:
|
|
112
|
+
| # | Obligation Ref | Regulation + Section | Gap Type | Priority | Action | Owner Type (Eng / Legal / Ops / Exec) | Estimated Effort |
|
|
113
|
+
|
|
114
|
+
D5. Separately list items where remediation REQUIRES a licensed attorney in the relevant jurisdiction — not an engineer or compliance analyst alone:
|
|
115
|
+
- Negotiating, drafting, or reviewing DPAs, BAAs, SCCs, or data transfer agreements with enterprise vendors.
|
|
116
|
+
- Determining the correct lawful basis under GDPR Art. 6 where legitimate interest is contested or where the supervisory authority of the lead establishment has issued conflicting guidance.
|
|
117
|
+
- Responding to a regulatory investigation, supervisory authority inquiry, or enforcement letter.
|
|
118
|
+
- Drafting or reviewing a breach notification to a supervisory authority or to affected individuals.
|
|
119
|
+
- Assessing whether an AI system qualifies as high-risk under EU AI Act Annex III, or falls under a prohibited practice under Art. 5.
|
|
120
|
+
- Resolving any cross-jurisdiction conflict identified in Phase B (B5).
|
|
121
|
+
- Making a determination on attorney-client privilege or work-product protection for this gap report before it is distributed.
|
|
122
|
+
- Any situation where criminal liability (e.g., intentional HIPAA violation 42 U.S.C. §1320d-6; CPRA AG enforcement) is a plausible outcome.
|
|
123
|
+
|
|
124
|
+
═══ PHASE E — OUTPUT AND HANDOFF ═══
|
|
125
|
+
|
|
126
|
+
E1. Produce a single Compliance Gap Report containing, in order: Regulatory Scope Table (Phase A), Obligation Inventory (Phase B), Gap Assessment (Phase C), Risk-Ranked Remediation Roadmap (Phase D), Cross-Jurisdiction Conflicts list, and the Licensed-Counsel Required section. Do not omit any section.
|
|
127
|
+
|
|
128
|
+
E2. Every regulatory citation must include: regulation name, version/effective date, article/section/rule number, and — if fetched live — the URL and the date retrieved. Every enforcement action cited must include: case name or docket number, enforcing authority, year, and penalty. If any citation could not be verified in this session, mark it "UNVERIFIED — confirm with counsel before relying on this."
|
|
129
|
+
|
|
130
|
+
E3. Close the report with a LICENSED-COUNSEL REQUIRED section listing every item flagged in D5 and B5, plus the standing disclaimer that this report is not legal advice and must be reviewed by qualified counsel in each relevant jurisdiction before any action is taken or any representation is made to a regulator, customer, or counterparty.
|
|
131
|
+
|
|
132
|
+
E4. Add a REPORT SENSITIVITY notice: This compliance gap report documents identified weaknesses in the organization's regulatory posture. Distribution of this report may have legal consequences, including potential use in litigation or regulatory investigations. The recipient should consult legal counsel about privilege protection before distributing this report outside the legal and compliance team.
|
|
133
|
+
|
|
134
|
+
E5. Record the date of assessment and the specific product/process version or codebase commit that was reviewed. Instruct the recipient to re-run Phase A whenever: (a) a new category of personal or sensitive data is collected; (b) a new jurisdiction is entered or a new user population is targeted; (c) a regulation is amended, a new enforcement decision is published, or supervisory authority guidance material to this product is issued; (d) a new vendor with access to regulated data is onboarded; or (e) a material change is made to the product's data architecture or processing purpose.
|
|
135
|
+
|
|
136
|
+
KEY PRINCIPLE: Compliance is an obligation inventory matched to evidence — every gap is either a missing control or missing proof, and conflating the two wastes money and leaves real exposure unfixed. Regulations impose specific obligations with specific cures; treat each one as an engineering requirement with a named acceptance criterion, not a general standard to aspire toward.
|