You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: experiments/napkin_math/.claude/skills/extract-parameters-from-digest/system-prompt.txt
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -221,6 +221,17 @@ If you would naturally write "x_gap = expected - capacity" with threshold "<= 0"
221
221
222
222
Apply this rule even when the underlying source phrasing is "the gap is X". The source text is allowed to use "gap"; the calculation output id is not.
223
223
224
+
Contractual-gate naming:
225
+
226
+
When a calculated window, margin, or trigger represents a contractual gate enforced by a specific counterparty (sponsor, lender, regulator, agency, court, investor, grantor, prime contractor), prefix the id with the counterparty so the gate's contractual — rather than operational — nature is visible to downstream consumers. Examples:
The prefix tells the next reader that failing this gate is a contract-validity failure, not an operational shortfall — different remediation paths apply. When the source plan does not name a specific counterparty, use the neutral non-prefixed form.
234
+
224
235
Derive coupled stressors instead of sampling them independently:
225
236
226
237
If a stressor variable (a shortfall, deficit, overrun, drain, leakage) is mechanically derivable from quantities the model already covers, declare it as a calculation. Do not put it in missing_values_to_estimate as if it were an independent input. Sampling a derived stressor independently:
@@ -835,6 +846,32 @@ When a formula requires a missing input, include that input in missing_values_to
835
846
836
847
Avoid formula_hint variables that are semantically different from the extracted id. For example, do not use registered_population if the extracted value is target_population unless both are declared.
837
848
849
+
Unmodelled existential gates (optional but recommended):
850
+
851
+
Some plans depend on gates the deterministic Python model cannot evaluate — legal/political authorization, regulatory approval, compliance infrastructure (AML/KYC, certifications, licences), an external actor's binding commitment treated as a fixed input. These gates have no quantifiable threshold the Monte Carlo can test, but their failure would shut the plan down independently of any financial or operational threshold the model evaluates.
852
+
853
+
When the source digest (typically the Premortem, Expert Criticism, Risks, or Selected Scenario sections) names such a gate, declare it in `unmodelled_gates`. This tells downstream consumers that the simulation is a partial feasibility assessment, not a full one.
854
+
855
+
Hard limit: at most 5 unmodelled_gates.
856
+
857
+
For each unmodelled gate, return:
858
+
- id: stable snake_case identifier ending in `_gate`
859
+
- label: short human-readable name
860
+
- why_it_matters: one or two sentences explaining the gate's role
861
+
- source_anchor: which source section the gate is named in (one of: executive_summary, project_plan, selected_scenario, assumptions, review_plan, premortem, expert_criticism, data_collection)
862
+
- consequence_if_false: what happens to the plan if this gate fails
863
+
864
+
When to populate unmodelled_gates:
865
+
- The plan depends on regulatory approval or post-facto authorization the model does not test.
866
+
- The plan requires political acceptance, legitimacy, non-reversal, or social licence that no input represents.
867
+
- The plan needs compliance infrastructure (AML/KYC banking partners, safety certifications, operating licences) the model treats as given.
868
+
- The plan depends on an external actor's binding commitment (a grid operator, banking consortium, agency, court) that the model treats as a fixed input rather than a probabilistic gate.
869
+
870
+
When to leave it empty (omit the field or use `[]`):
871
+
- Every viability claim the source plan makes can be expressed as a formula tested against a quantifiable threshold.
872
+
873
+
Do not use unmodelled_gates as a dumping ground for risks. Only include gates whose failure would end the plan independently of the financial or operational thresholds the model tests.
874
+
838
875
Return this exact JSON shape:
839
876
840
877
{
@@ -892,5 +929,14 @@ Return this exact JSON shape:
Copy file name to clipboardExpand all lines: experiments/napkin_math/.claude/skills/extract-parameters-from-full/system-prompt.txt
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,17 @@ If you would naturally write "x_gap = expected - capacity" with threshold "<= 0"
184
184
185
185
Apply this rule even when the underlying source phrasing is "the gap is X". The source text is allowed to use "gap"; the calculation output id is not.
186
186
187
+
Contractual-gate naming:
188
+
189
+
When a calculated window, margin, or trigger represents a contractual gate enforced by a specific counterparty (sponsor, lender, regulator, agency, court, investor, grantor, prime contractor), prefix the id with the counterparty so the gate's contractual — rather than operational — nature is visible to downstream consumers. Examples:
The prefix tells the next reader that failing this gate is a contract-validity failure, not an operational shortfall — different remediation paths apply. When the source plan does not name a specific counterparty, use the neutral non-prefixed form.
197
+
187
198
Derive coupled stressors instead of sampling them independently:
188
199
189
200
If a stressor variable (a shortfall, deficit, overrun, drain, leakage) is mechanically derivable from quantities the model already covers, declare it as a calculation. Do not put it in missing_values_to_estimate as if it were an independent input. Sampling a derived stressor independently:
@@ -794,6 +805,32 @@ When a formula requires a missing input, include that input in missing_values_to
794
805
795
806
Avoid formula_hint variables that are semantically different from the extracted id. For example, do not use registered_population if the extracted value is target_population unless both are declared.
796
807
808
+
Unmodelled existential gates (optional but recommended):
809
+
810
+
Some plans depend on gates the deterministic Python model cannot evaluate — legal/political authorization, regulatory approval, compliance infrastructure (AML/KYC, certifications, licences), an external actor's binding commitment treated as a fixed input. These gates have no quantifiable threshold the Monte Carlo can test, but their failure would shut the plan down independently of any financial or operational threshold the model evaluates.
811
+
812
+
When the source report names such a gate (typically in risk register, executive summary, or expert review sections), declare it in `unmodelled_gates`. This tells downstream consumers that the simulation is a partial feasibility assessment, not a full one.
813
+
814
+
Hard limit: at most 5 unmodelled_gates.
815
+
816
+
For each unmodelled gate, return:
817
+
- id: stable snake_case identifier ending in `_gate`
818
+
- label: short human-readable name
819
+
- why_it_matters: one or two sentences explaining the gate's role
820
+
- source_anchor: which source section the gate is named in (one of: executive_summary, project_plan, selected_scenario, assumptions, review_plan, premortem, expert_criticism, data_collection)
821
+
- consequence_if_false: what happens to the plan if this gate fails
822
+
823
+
When to populate unmodelled_gates:
824
+
- The plan depends on regulatory approval or post-facto authorization the model does not test.
825
+
- The plan requires political acceptance, legitimacy, non-reversal, or social licence that no input represents.
826
+
- The plan needs compliance infrastructure (AML/KYC banking partners, safety certifications, operating licences) the model treats as given.
827
+
- The plan depends on an external actor's binding commitment (a grid operator, banking consortium, agency, court) that the model treats as a fixed input rather than a probabilistic gate.
828
+
829
+
When to leave it empty (omit the field or use `[]`):
830
+
- Every viability claim the source plan makes can be expressed as a formula tested against a quantifiable threshold.
831
+
832
+
Do not use unmodelled_gates as a dumping ground for risks. Only include gates whose failure would end the plan independently of the financial or operational thresholds the model tests.
833
+
797
834
Return this exact JSON shape:
798
835
799
836
{
@@ -851,5 +888,14 @@ Return this exact JSON shape:
Copy file name to clipboardExpand all lines: experiments/napkin_math/.claude/skills/summarize-assessment/SKILL.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,11 +92,12 @@ Order is deliberate. Stable section names — programmatic consumers retrieve by
92
92
93
93
-**`# Assessment: <plan name>`** — title plus a 2-line frontmatter (type, primary goal).
94
94
-**`## Artifact contract`** — declares what this file is (an interpretation layer over the simulation artifacts) and what it is not (a copy of the raw simulation data, an external feasibility proof, a probability calibration).
95
-
- **`## Machine summary`** — a JSON code block with the compact manifest: `assessment_schema_version` (currently `4`), `artifact_type`, `plan_name`, `artifact_set` (`version` / `plan_slug` / `relative_dir` — the portable identifier), `source_plan_dir` (absolute path; local-only), `primary_model_result` (a structured object: `overall_risk_band` ∈ doom/fragile/marginal/viable/unknown, `basis` — a one-line disclaimer that the band reflects the worst declared gate's pass-rate band and is not a calibrated whole-plan probability, `reason`, `worst_gate`, `worst_gate_pass_rate`), `validation_status`, `simulation` (n_runs/seed/distribution_default), `primary_failed_gates`, `primary_uncertainty_drivers`, `do_not_treat_as`, `schema_notes` (allowed enums for `overall_risk_band`, `verdict`, `basis`, `threshold_basis`, plus the `primary_model_result_semantics` disclaimer). The `basis_enum` is intentionally wider than what the current pipeline emits (`report_derived`, `model_assumption`) — it reserves `report_explicit`, `report_inferred`, `external_reference`, `manual_override`, `unknown` for future provenance types. JSON, not YAML — that is intentional.
95
+
- **`## Machine summary`** — a JSON code block with the compact manifest: `assessment_schema_version` (currently `6`), `artifact_type`, `plan_name`, `artifact_set` (`version` / `plan_slug` / `relative_dir` — the portable identifier), `source_plan_dir` (absolute path; local-only), `primary_model_result` (a structured object: `overall_risk_band` ∈ doom/fragile/marginal/viable/unknown, `basis` — a one-line disclaimer that the band reflects the worst declared gate's pass-rate band and is not a calibrated whole-plan probability, `reason`, `worst_gate`, `worst_gate_pass_rate`), `validation_status`, `simulation` (n_runs/seed/distribution_default), `primary_failed_gates`, `primary_uncertainty_drivers`, `known_unmodelled_existential_gates` (flat list of ids the extractor flagged as existential but unmodelable; empty when none), `assessment_scope_warning` (string when the unmodelled list is non-empty, null when empty — a one-line warning to programmatic consumers that the simulation is partial), `do_not_treat_as`, `schema_notes` (allowed enums for `overall_risk_band`, `verdict`, `basis`, `threshold_basis`, plus the `primary_model_result_semantics` disclaimer). The `basis_enum` is intentionally wider than what the current pipeline emits (`report_derived`, `model_assumption`) — it reserves `report_explicit`, `report_inferred`, `external_reference`, `manual_override`, `unknown` for future provenance types. JSON, not YAML — that is intentional.
96
96
-**`## Provenance map`** — table listing every intermediary file with its role and "open when" guidance. The first row points at `extract_parameters_input.md`, then parameters/bounds/calculations/scenarios/scenario_outputs/montecarlo_settings/montecarlo/validation.
97
-
-**`## Modelling frame`** — the source plan's own statement of what the model is testing, lifted verbatim from `parameters.plan_summary.modelling_frame`.
97
+
-**`## Modelling frame`** — the source plan's own statement of what the model is testing, lifted verbatim from `parameters.plan_summary.modelling_frame`. When `parameters.unmodelled_gates` is non-empty, this section gains a bold **Note** caveat naming the count of unmodelled existential gates and telling the reader the gate-verdict pass rates are conditional on those gates holding.
98
+
-**`## Known unmodelled existential gates`** — table of gates the extractor flagged as existential to the plan but unmodelable by deterministic Python (legal authorization, political reversal, AML/banking compliance, external-actor commitments). Columns: Gate, Why it matters, Source anchor (which source section names it), Consequence if false. Section omitted entirely when `parameters.unmodelled_gates` is empty or absent.
-**`## Critical findings`** — bullets in severity order: DOOM gates, FRAGILE gates, scenario warnings, numbers the model could not compute (≥5% blank runs), still-missing inputs. Section omitted entirely when nothing qualifies.
100
+
-**`## Critical findings`** — bullets in severity order. When `parameters.unmodelled_gates` is non-empty, a **SCOPE WARNING** bullet leads the section naming the unmodelled gate labels and pointing at the dedicated section. Then: DOOM gates, FRAGILE gates, scenario warnings, numbers the model could not compute (≥5% blank runs), still-missing inputs. Section omitted entirely when nothing qualifies.
100
101
-**`## Gate verdicts`** — every declared threshold, worst-first, with the `min` marker on aggregate gates. Columns: marker, output, condition, **threshold basis** (`report_explicit` / `report_inferred` / `model_defined` / `unknown` — derived from the corresponding key_value's `value_type`), pass rate, verdict, meaning. Includes an `### Aggregation warning` sub-section when the thresholds use incompatible units and the plan declares no `min()` aggregate.
101
102
-**`## Decision implications`** — one row per gate with verdict in DOOM/FRAGILE/MARGINAL. Five columns: Gate, Verdict, **Planning consequence** (templated by verdict), **Structural lever** (the top driver from `quartile_analysis` with the direction implied by its sign of Δ-pp), **Gate meaning** (the gate's own rationale lifted from `parameters.recommended_first_calculations[].why_first` or `derived_questions[].why_it_matters`, plus the threshold parameter the formula tests against). The Gate-meaning column surfaces plan-specific framing without inventing tactical advice; concrete revisions should be derived by reading the source report and the relevant intermediary artifacts.
102
103
-**`## Failure drivers`** — one row per failing gate (DOOM or FRAGILE): top driver from `quartile_analysis` (max abs Δ-pp) and the conditional input restriction from `required_input_thresholds` that would lift the gate to 80%. Binding-gate frequencies for aggregates appear as bullets below the table.
0 commit comments