This commit is contained in:
eddiesoehnel committed 2026-08-12 16:41:20 -06:00
1 parent 87cc362513
commit 2a0d6aa2bf
1029 files changed
+106050 -14573

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# Insights Hub Skills
This folder contains the repository-local AI skill that operates the six-stage Future Map Insights Hub workflow. Read [`process-future-map-insights/SKILL.md`](process-future-map-insights/SKILL.md) before performing corpus-grounded enrichment.
Deterministic scripts remain in [`../scripts/`](../scripts/). The skill calls those scripts instead of duplicating exact transformation logic.
+12
View File
@@ -0,0 +1,12 @@
{
"schema_version": "1.0",
"skills": [
{
"name": "process-future-map-insights",
"path": "process-future-map-insights/SKILL.md",
"shape": "system",
"purpose": "Prepare, enrich, validate, review, and publish corpus-grounded Future Map signals."
}
]
}
@@ -0,0 +1,27 @@
schema_version: "1.0"
default_route:
deterministic:
- source selection
- HTML-to-text normalization
- link extraction and cleaning
- media copying and hashing
- schema validation
- index and Markdown rendering
reasoning:
capability: "strong corpus synthesis and structured-output adherence"
effort: "medium"
batch_size: 10
escalation:
high_effort_when:
- "the signal materially contradicts a core document"
- "several Future Map concepts interact"
- "source content is ambiguous but strategically important"
human_review_when:
- "privacy or confidentiality gate triggers"
- "a new taxonomy term is required"
- "a core document change is proposed"
stop_when:
- "relevant corpus context is unavailable"
- "source facts and inference cannot be separated"
- "schema validation fails after one repair attempt"
@@ -0,0 +1,153 @@
---
name: process-future-map-insights
description: Prepare, enrich, validate, review, and publish Future Map Insights Hub records as corpus-grounded public signal artifacts. Use when an agent must process exact-tag Future Map source JSON, reason about a signal against the curated Future Map corpus, classify it, link it to core documents, update pending or stale enrichment records, validate connected media and links, or operate the contained data/insights-hub workflow.
---
# Process Future Map Insights
## Skill Shape
- `system`: coordinate deterministic preparation with corpus-grounded reasoning and validated publication.
## Contract
Preserve source facts, distinguish reasoning from source content, enrich each signal against the Future Map corpus, publish connected files under the repository owner's declared policy, and leave schema-valid outputs and a durable receipt.
## Requires
- Read access to the private source hrecords and files for deterministic preparation.
- Read access to `content-index.json` and relevant files under `core-docs/` for enrichment.
- Write access only within `data/insights-hub/` unless separately authorized.
- Human authority for changing publication policy, taxonomy, schema, or core documents.
## Ensures
- Source JSON remains unchanged.
- Public hrecords conform to `../../schemas/future-map-signal.schema.json`.
- Original summary and normalized notes remain labeled as source content.
- Analysis, implications, claims, classifications, and relationships remain labeled as reasoning.
- Pending, stale, failed, and complete states remain explicit.
- Connected files and links remain attached when available.
- Validation and a run receipt complete before reporting success.
## Inputs
- Exact-tag source records selected by deterministic scripts.
- `review/pending.jsonl` or user-selected record IDs.
- Repository `content-index.json` and relevant core documents.
- `references/reasoning-rubric.md` and `references/publication-policy.md`.
## Outputs
- Enrichment patch JSON for each processed record.
- Updated derivative hrecord through `scripts/future_map_pipeline.py apply-reasoning`.
- Refreshed digest, indexes, review queue, manifest, and receipt.
## Capabilities And State
- Use deterministic scripts for selection, extraction, copying, merging, rendering, and validation.
- Use model reasoning only for interpretation and cross-corpus relationships.
- Use project-scoped state under `data/insights-hub/`.
- Do not publish, commit, push, edit private source data, or modify `core-docs/` without separate authorization.
## Workflow
### 1. Ingest And Sanitize
Run:
```text
python data/insights-hub/scripts/future_map_pipeline.py sync
```
Confirm the exact `Future Map` tag filter, source availability, copied media, pending/stale counts, and validation result. Stop if source folders are unavailable or deterministic validation fails.
### 2. Select A Bounded Batch
Read `review/pending.jsonl`. Process a small explicit batch. Do not load all records and all core documents into one prompt.
### 3. Retrieve Corpus Context
Read repository `content-index.json`. Always consider foundational methodologies when relevant, then load only core documents whose titles, descriptions, concepts, or sections plausibly relate to the signal. Record which documents were consulted.
### 4. Enrich
Follow `references/reasoning-rubric.md`. Create a patch matching `../../schemas/reasoning-patch.schema.json`.
Keep these boundaries:
- `summary` and `notes` are source-derived.
- `analysis`, `implications`, `claims`, `classification`, `related_documents`, and `related_signals` are reasoned.
- Related-signal links must name an existing `fm-signal-*` record and describe whether it supports, challenges, updates, illustrates, warns about, contradicts, or supersedes the current signal.
- Never invent source, rights, dates, authors, publishers, URLs, or media provenance.
- Use `unknown`, an empty list, or a lower confidence when evidence is insufficient.
### 5. Apply And Validate
Apply each patch through the deterministic merge command:
```text
python data/insights-hub/scripts/future_map_pipeline.py apply-reasoning --record-id fm-signal-ID --patch PATH
```
Then run:
```text
python data/insights-hub/scripts/future_map_pipeline.py validate
```
Do not hand-edit generated indexes, queues, manifest, or digest.
### 6. Review And Publish
Inspect validation warnings and the affected Markdown entry. Publication means writing local generated artifacts only. Git commit, push, external publication, and core-document promotion require separate authorization.
Write a receipt under `runtime/receipts/` using `../../templates/run-receipt.json` as the shape. Do not include private absolute source paths, credentials, or raw protected content in receipts.
## Test Surface
- Static: skill validation and unresolved-placeholder scan.
- Schema: public signals, reasoning patches, manifest, and receipt.
- Invariants: exact tag, stable ID, source hash, source/reasoning separation, local media existence.
- Fixtures: missing title, HTML notes, remote links, duplicate media, stale reasoning, malformed JSON.
- Behavioral: use deterministic merging; report uncertainty; never overwrite source facts with inference.
- Routing: deterministic preparation first, model reasoning only for enrichment, human authority for publication-policy and core-document changes.
## Edge Cases
- Preserve complete reasoning when the source fingerprint is unchanged.
- Mark reasoning `stale` when source JSON or connected media changes.
- Keep missing media as a warning and explicit media status.
- Normalize legacy control characters without changing the private source file.
- Treat absent rights data as `unknown`; apply the declared publish-with-attribution policy without inventing permission.
- Exclude raw contact identifiers from public output; retain only a deterministic reference count.
## Anti-Patterns
Do not:
- Copy raw source JSON into public hrecords.
- Treat source notes as AI analysis.
- Replace original summaries with generated summaries.
- Infer redistribution rights from payment, access, or availability.
- classify a record without consulting relevant corpus context.
- edit generated output indexes manually.
- call a model from the unattended daily deterministic task.
## Ratchet And Regression Rules
Convert every important failure into a fixture, validator, schema rule, routing case, or explicit STOP gate. Rerun deterministic tests and skill validation after changing a guardrail.
## Validation
Before finishing:
1. Run the pipeline test suite.
2. Validate the skill folder.
3. Run pipeline validation.
4. Run the repository audit and `git diff --check`.
5. Report pending/stale/complete counts and anything not tested.
## Final Report
Report records prepared or enriched, files copied or missing, validation results, receipts written, unresolved review items, and whether Git or external publication occurred.
@@ -0,0 +1,4 @@
interface:
display_name: "Process Future Map Insights"
short_description: "Enrich and publish Future Map signals"
default_prompt: "Use $process-future-map-insights to process pending Future Map signals against the curated corpus."
@@ -0,0 +1,26 @@
# Publication Policy
## Declared policy
The repository owner has directed the workflow to publish connected files even when redistribution rights are absent or unknown and accepts that risk.
Represent this decision accurately:
- Never claim that payment, public availability, or possession grants redistribution rights.
- Use `rights_status: unknown` unless deterministic source metadata establishes another status.
- Use `publication_policy: publish-with-attribution`.
- Use `publication_decision: publish` unless a security, privacy, confidentiality, malware, or explicit do-not-publish gate applies.
- Preserve source links and attribution when deterministically available.
## Blocking gates
Quarantine rather than publish when content contains:
- credentials, private keys, tokens, or authentication material;
- direct personal contact information not intentionally public;
- clearly confidential or explicitly non-distributable material;
- malware or unsafe executable content;
- an explicit source-record instruction not to publish.
Rights uncertainty alone is informational under this policy and does not block connected-file copying.
@@ -0,0 +1,38 @@
# Future Map Signal Reasoning Rubric
## Required reasoning sequence
1. Read the complete derivative signal, including original summary, normalized notes, links, and media metadata.
2. Read `content-index.json` and retrieve relevant complete core documents.
3. State what the source record directly provides before interpreting it.
4. Explain why the signal matters in the context of the Future Map corpus.
5. Produce practical implications at the individual, family, career, company, industry, or policy level only when supported.
6. Classify with the controlled taxonomy and link to specific core documents when a real relationship exists.
7. Assign confidence based on evidence and fit, not rhetorical certainty.
## Field rules
- `analysis`: concise synthesis of what the signal means within the corpus. Do not restate the summary.
- `implications`: discrete, actionable consequences. Avoid generic advice.
- `claims`: separate reported facts, interpretation, prediction, opinion, and recommendation.
- `classification.signal_types`: choose one primary type and at most two supporting types.
- `classification.topics`: use controlled topics where possible; add a new term only when no existing term fits.
- `classification.future_map_concepts`: use only concepts materially supported by the record and corpus.
- `related_documents`: identify the relationship as supports, challenges, updates, illustrates, early-warning, contradicts, or supersedes.
- `novelty`: distinguish a new signal from repetition or reinforcement of an established thesis.
## Confidence
- `high`: direct evidence, strong source grounding, and clear corpus relationship.
- `medium`: reasonable interpretation with incomplete evidence or indirect relationship.
- `low`: plausible but ambiguous, weakly sourced, or highly inferential.
## Stop conditions
Do not complete enrichment when:
- the record has no understandable source content;
- relevant corpus documents cannot be accessed;
- source and inference cannot be separated;
- the proposed patch fails schema or invariant validation.
@@ -0,0 +1,5 @@
{"case_id":"deterministic-sync","request":"Refresh records and connected files from the private source.","expected_method":"deterministic","expected_skill":"process-future-map-insights"}
{"case_id":"reason-one-signal","request":"Explain how pending signal 6068 fits the Future Map corpus.","expected_method":"reasoning","expected_skill":"process-future-map-insights"}
{"case_id":"core-doc-change","request":"Insert this signal directly into Critical States.","expected_method":"human-approval","expected_skill":"process-future-map-insights"}
{"case_id":"rights-unknown","request":"Publish the connected chart with unknown rights under the repository policy.","expected_method":"deterministic-with-policy","expected_skill":"process-future-map-insights"}