This commit is contained in:
eddiesoehnel committed 2026-08-19 17:39:51 -06:00
1 parent b177acda37
commit c04ca92c13
1021 files changed
+33110 -4026

No files matched your search

@@ -0,0 +1,348 @@
---
name: index-future-map-sections
description: Build and maintain a stable machine-readable index of Future Map core documents, Markdown sections, and presentation slides or chapters; detect corpus changes; preserve document and section identifiers; validate Insights Hub related-document targets; and queue ambiguous renames, removals, or repairs for human review. Use after files under core-docs are added, edited, renamed, moved, or removed, before enrichment batches, or whenever Future Map signal-to-corpus links need validation or repair.
---
# Index Future Map Sections
## Skill Shape
- `system`: detect corpus changes, extract structure, preserve stable identifiers, enrich changed sections, validate relationship targets, and leave an auditable receipt.
- Modes: `build` by default; `apply-repairs` only with explicit human approval.
- Trigger: manual for the initial implementation. Do not create or enable a scheduler.
## Contract
Create a reliable address book for the Future Map corpus. Make every core document and addressable section discoverable by a stable identifier, and verify that every Insights Hub `related_documents` relationship points to a real target. Never silently rewrite ambiguous or broken relationships.
## Requires
- Read access to:
- `../../../../core-docs/`
- `../../../../content-index.json`
- `../../hrecords/`
- `../../schemas/future-map-signal.schema.json`
- The previous section index, change report, repair queue, and receipts when present.
- Write access under `data/insights-hub/` for index artifacts, reports, receipts, and explicitly approved repairs.
- A tool capable of reading each in-scope format.
- Explicit repository-owner approval naming the accepted repair mappings before `apply-repairs`.
## Ensures
- Every current core document has one canonical `document_id`.
- Every addressable Markdown section and presentation slide or chapter has one stable `section_id` within its document.
- Unchanged targets retain their identifiers across rebuilds.
- New documents and sections receive collision-free identifiers.
- Removed identifiers are never reused.
- Every signal relationship is checked against the current index.
- Ambiguous renames, removals, splits, merges, and target repairs enter a human-review queue.
- The index is not rewritten when the corpus fingerprint is unchanged.
- No core document, source record, commit, push, publication, or schedule is changed without separate authorization.
## Inputs
- Optional mode: `build` or `apply-repairs`; default to `build`.
- Optional document paths for a bounded rebuild; default to all supported files under `core-docs/`.
- For `apply-repairs`: an approved repair-queue path plus exact accepted repair IDs or mappings.
## Outputs
Build mode may create or update:
- `../../indexes/core-document-sections.json`
- `../../review/section-index-changes.json`
- `../../review/relationship-target-issues.jsonl`
- `../../runtime/receipts/section-index-TIMESTAMP.json`
Apply-repairs mode may additionally update affected derivative hrecords through the existing controlled merge or update path and refresh generated Insights Hub outputs.
Do not create scripts, schemas, automation, or extra documentation unless separately authorized.
## Canonical Index Shape
Use one index with this logical structure:
```json
{
"schema_version": "1.0",
"generated_at": "ISO-8601 timestamp",
"corpus_fingerprint": "sha256:...",
"documents": [
{
"document_id": "exponential-growth-strategies",
"title": "Exponential Growth Strategies",
"path": "core-docs/Exponential-Growth-Strategies.md",
"format": "markdown",
"content_hash": "sha256:...",
"status": "current",
"sections": [
{
"section_id": "automation-autonomous-agents",
"heading": "Automation & Autonomous Agents",
"kind": "heading",
"level": 2,
"ordinal": 12,
"locator": "#automation--autonomous-agents",
"content_hash": "sha256:...",
"status": "current"
}
]
}
],
"retired_targets": []
}
```
An implementation may add section summaries, taxonomy concepts, topics, confidence, and provenance when they materially improve retrieval. Preserve reasoning-derived fields for unchanged sections and regenerate them only for new or materially changed content.
## Identifier Rules
### Document IDs
1. Reuse a canonical ID from the previous section index or authoritative content index.
2. Preserve the ID when a file moves or is renamed but continuity is exact or human-approved.
3. For a new document, derive a lowercase hyphenated ID from its stable title.
4. Add the shortest deterministic collision suffix only when necessary.
5. Never derive a new ID merely because capitalization, punctuation, spacing, or the path changed.
6. Never reuse a retired ID for different content.
### Markdown Section IDs
1. Index meaningful headings, preserving hierarchy and document order.
2. Reuse the prior ID when the heading and structural context are unchanged.
3. Treat a heading rename as a continuity decision, not an automatic new identity.
4. Use normalized heading text for a new section ID; add a deterministic collision suffix for repeated headings.
5. Store the rendered Markdown anchor separately because the anchor may change while the stable section ID does not.
6. Exclude generated tables of contents, empty formatting headings, and image-only artifacts unless they are intentional retrieval targets.
### Presentation Section IDs
1. Inspect every slide in each local presentation.
2. Index each meaningful slide and, when evident, its enclosing chapter or named section.
3. Store slide number, slide title, and slide content fingerprint as locators and matching evidence.
4. On the first build, create a stable ID from the slide title plus the minimum collision suffix.
5. On later builds, match prior slides using exact fingerprints first, then title, neighboring slides, chapter, and content similarity.
6. Do not change an established ID because a slide was reordered.
7. Queue ambiguous slide matches, split slides, merged slides, deleted slides, and conflicting titles for review.
8. Do not edit or visually restyle presentation files while indexing them.
## Workflow
### 1. Inventory The Corpus
Enumerate supported core files deterministically. Include Markdown and local PowerPoint formats already present in the corpus. Record normalized repository-relative paths, file sizes, modification times as diagnostics, and SHA-256 content hashes.
Do not use timestamps alone to decide whether content changed.
### 2. Compute The Corpus Fingerprint
Sort entries by normalized repository-relative path. Compute a fingerprint from path, format, and content hash.
If it matches the latest successful receipt and current index:
- Validate the existing index and relationship targets.
- Write a no-change receipt.
- Do not regenerate summaries, identifiers, or the index.
### 3. Load Previous Identity State
Read the previous index, authoritative content index, prior change reports, repair decisions, and retired targets. Treat this state as the continuity baseline.
If the index is missing, run an explicit first-build bootstrap and report that all identifiers are newly established.
If the index is malformed or its fingerprint conflicts with the receipt, stop and request review rather than replacing it.
### 4. Extract Structure
For Markdown:
- Parse heading level, heading text, source order, parent heading, anchor, and bounded section content.
- Preserve code blocks, escaped headings, and duplicate headings correctly.
For PowerPoint:
- Read every slide.
- Extract slide number, title, visible text, speaker-note text when available, and chapter evidence.
- Generate a content fingerprint that excludes volatile package metadata.
- Use visual inspection only when structure or title extraction is ambiguous.
Keep extraction deterministic. Use model reasoning only for ambiguous continuity, section summaries, taxonomy annotation, and chapter interpretation.
### 5. Match Current Structure To Stable IDs
Classify each document and section as:
- `unchanged`
- `added`
- `modified`
- `renamed`
- `moved`
- `removed`
- `split`
- `merged`
- `ambiguous`
Automatically preserve IDs only for exact or high-certainty deterministic continuity, such as unchanged hashes, unchanged structural keys, or a pure path move with identical content.
Queue reasoned or ambiguous continuity proposals with old target, proposed target, evidence, confidence, and `human-review-required`.
### 6. Build The Index
Write current documents and sections in deterministic order. Preserve retired target tombstones so identifiers cannot be reassigned and historical references remain explainable.
For each current section, retain enough context to support retrieval:
- Canonical IDs and display labels.
- Repository-relative document path.
- Heading hierarchy or presentation chapter.
- Markdown anchor or presentation slide locator.
- Content fingerprint.
- Current or retired status.
- Optional summary and taxonomy annotations with reasoning provenance.
### 7. Validate Relationship Targets
For every public hrecord:
1. Read each `reasoning.related_documents[]` entry.
2. Confirm `document_id` exists and is current.
3. If `section_id` is non-null, confirm it exists under that exact document and is current.
4. If `section_id` is null, validate only the document and optionally warn when a more precise target appears available.
5. Confirm any stored path or locator resolves when the record format includes one.
Use these issue classes:
- `unknown-document`
- `unknown-section`
- `section-under-wrong-document`
- `retired-document`
- `retired-section`
- `ambiguous-continuity`
- `missing-locator`
- `imprecise-document-only-target`
Write one JSONL issue per affected relationship with signal ID, relationship position, current target, issue class, candidate replacement targets, evidence, confidence, and review status.
### 8. Stop For Review
Build mode may automatically index straightforward additions and exact continuity. It must not rewrite signal relationships.
Stop and request human review for:
- Ambiguous document or section continuity.
- Removed targets with existing inbound relationships.
- Splits and merges.
- Competing replacement targets.
- Any migration that changes an established ID.
### 9. Apply Approved Repairs
In `apply-repairs` mode:
1. Require the approved queue path and exact repair IDs or mappings.
2. Re-read the current index and detect intervening changes.
3. Refuse stale, conflicting, unapproved, or low-evidence mappings.
4. Update only the approved derivative relationships.
5. Preserve the prior target in repair provenance.
6. Use the repository's controlled merge or regeneration path; do not hand-edit generated indexes or digests.
7. Revalidate the entire relationship graph.
Never delete a relationship merely because its target disappeared. Preserve it as unresolved until an approved replacement or explicit removal exists.
## Validation
Validate:
- JSON syntax and required index fields.
- Unique document IDs.
- Unique section IDs within each document.
- Unique active target pairs `document_id + section_id`.
- No reuse of retired identifiers.
- Current paths and locators resolve.
- Markdown anchors correspond to current headings.
- Presentation slide locators remain within the slide count.
- Every relationship issue is reproducible from the current index and hrecord.
- All valid existing relationships remain valid after a rebuild.
- The corpus fingerprint matches the indexed source files.
After approved repairs, also run:
```text
python data/insights-hub/scripts/future_map_pipeline.py validate
python -m unittest discover -s data/insights-hub/tests -v
git diff --check
```
Do not report success when a required check fails.
## Receipt
Write a machine-readable receipt containing:
- `workflow`: `index-future-map-sections`
- `mode`
- `status`: `success`, `partial`, or `failed`
- `started_at` and `completed_at`
- Previous and current corpus fingerprints
- Document and section counts by format
- Added, changed, moved, renamed, removed, split, merged, and ambiguous counts
- Relationships checked, valid, warned, and invalid
- Index, report, and queue paths
- Approved repairs applied
- Files changed
- Validation commands and results
- Warnings, failures, and unresolved decisions
- Framework provenance: local template version `0.3.1` and files used
A partial or failed run must not become the continuity baseline.
## Model And Method Routing
- Use deterministic processing for inventory, hashing, Markdown parsing, PowerPoint package extraction, ordering, exact matching, ID collision checks, and relationship validation.
- Use presentation-reading capabilities for complete slide inspection when PowerPoint structure is involved.
- Use model reasoning for ambiguous continuity, section summaries, chapter inference, taxonomy annotations, and replacement ranking.
- Use human authority for migrations, destructive changes, split or merge resolution, and relationship repairs.
- Stop safely when source formats cannot be read, prior identity state is inconsistent, or approval evidence is missing.
## Routing Evaluation Cases
- An unchanged corpus must produce a no-change run and stable IDs.
- A new Markdown document must receive a new document ID and indexed headings.
- A renamed Markdown heading with unchanged body and neighbors must retain its ID only when continuity is exact or approved.
- A moved file with an identical hash must retain its document ID.
- A reordered presentation slide must retain its ID when matching evidence is unambiguous.
- A deleted section with inbound relationships must create issues and preserve a tombstone.
- An invented `section_id` in a signal must fail relationship validation.
- A null `section_id` with a valid document must remain valid but may receive a precision warning.
## Edge Cases
- Disambiguate repeated headings under different parents.
- Preserve IDs across punctuation, capitalization, and Markdown-anchor changes when identity is clear.
- Treat wholesale rewrites as possible replacement rather than automatic continuity.
- Flag duplicate files with different paths.
- Ignore image and asset folders unless an asset is an intentional indexed document.
- Preserve source-relative links but do not treat image links as sections.
- Treat unreadable or password-protected files as blockers for a complete build.
- Preserve presentation speaker notes as retrieval context without making them separate public sections unless requested.
## Anti-Patterns
Do not:
- Generate IDs solely from current filenames on every run.
- Renumber slide IDs after slide reordering.
- Replace ambiguous targets by nearest-title similarity alone.
- Delete tombstones or historical repair decisions.
- Load every full document into one reasoning prompt.
- Rewrite unchanged summaries or taxonomy annotations.
- Edit core documents while indexing them.
- Commit, push, publish, or schedule this workflow without separate authorization.
## Ratchet Rules
Turn every recurring extraction, continuity, or validation failure into a normalization rule, deterministic check, fixture recommendation, STOP gate, or routing case. Never weaken stable-ID preservation, full-slide coverage, relationship validation, or human approval requirements to make a run pass.
## Final Report
Report the corpus fingerprint change, documents and sections indexed, stable IDs preserved, additions and removals, ambiguous continuity decisions, relationship validation totals, issue and repair queues, approved repairs, validation results, receipt path, unresolved blockers, and whether Git, publishing, or scheduling occurred.
@@ -0,0 +1,4 @@
interface:
display_name: "Index Future Map Sections"
short_description: "Build and validate core-document section links"
default_prompt: "Use $index-future-map-sections to rebuild the Future Map section index and validate signal relationship targets."
@@ -0,0 +1,265 @@
---
name: review-future-map-taxonomy
description: Review newly added Future Map Insights Hub records against the controlled taxonomy, core corpus, identity-document interests, and prior taxonomy decisions; aggregate missing-term candidates; produce monthly evidence-backed proposals; or apply explicitly approved additions while synchronizing schemas and validation. Use for recurring or on-demand taxonomy maintenance, taxonomy drift review, candidate-term triage, alias or merge recommendations, and approved taxonomy updates under data/insights-hub.
---
# Review Future Map Taxonomy
## Skill Shape
- `system`: govern incremental taxonomy discovery, proposal, approval, application, validation, and receipts.
- Modes: `proposal` by default; `apply` only with explicit human approval.
## Contract
Keep the Future Map vocabulary adaptive without allowing uncontrolled growth. Discover missing terms automatically, ground recommendations in the corpus, preserve prior valid labels, and require human authority before mutating the taxonomy or schema.
## Requires
- Read access to:
- `../../config/taxonomy.json`
- `../../schemas/future-map-signal.schema.json`
- `../../hrecords/`
- `../../review/` and `../../runtime/receipts/`
- `../../../../content-index.json` and `../../../../core-docs/`
- `C:\projects\es\eddie-soehnel-portable-identity-document-OPEN\eddie-soehnel-portable-identity-document.md`, especially **My Interests and Focus Across Personal and Professional Domains**
- Write access under `data/insights-hub/` for proposals, receipts, and explicitly approved updates.
- Explicit repository-owner approval naming the proposal or accepted terms before `apply` mode.
## Ensures
- Default execution creates proposals only.
- The review begins after the latest successful taxonomy-review receipt.
- Existing canonical terms remain valid unless an approved migration exists.
- Concepts remain reusable interpretive mechanisms; topics remain durable subject domains.
- Synonyms, spelling variants, products, vendors, and file formats do not become competing canonical terms without a documented reason.
- Applied concept additions appear identically in the taxonomy and schema enum.
- Validation and a successful receipt complete before reporting an applied update.
- No commit, push, scheduling, publishing, or private-source mutation occurs without separate authorization.
## Inputs
- Optional mode: `proposal` or `apply`; default to `proposal`.
- Optional review end date; default to the current run time.
- For `apply`: an approved proposal path plus the exact accepted recommendation IDs or canonical terms.
- Optional user-supplied strategic candidates that may bypass frequency thresholds but not human review.
## Outputs
Proposal mode may create:
- `../../review/taxonomy-candidates.jsonl`
- `../../review/taxonomy-proposals/YYYY-MM-taxonomy-review.json`
- `../../review/taxonomy-proposals/YYYY-MM-taxonomy-review.md`
- `../../runtime/receipts/taxonomy-review-TIMESTAMP.json`
Apply mode may additionally update:
- `../../config/taxonomy.json`
- `../../schemas/future-map-signal.schema.json`
- `../../review/taxonomy-backfill-candidates.jsonl`
Do not hand-edit generated Insights Hub records or indexes while applying taxonomy changes.
## Classification Boundary
Use `future_map_concepts` for reusable lenses, mechanisms, transitions, or causal patterns that help explain multiple signals. Examples include `tipping-point`, `barbellization`, `network-effects`, and `legacy-to-emergent-transition`.
Use `core_topics` for durable areas of subject matter that improve retrieval and grouping. Examples include `computer vision`, `industrial policy`, `citizen science`, and `kayaking and paddlesports`.
Use an alias recommendation when a phrase is a synonym, acronym, spelling variant, singular/plural variant, or narrower wording already represented by a canonical term.
Do not promote:
- A company, vendor, product, protocol implementation, file format, or transient headline unless it is a durable tracking domain.
- A term that merely repeats a title or source wording.
- A concept supported only by frequency but lacking reusable explanatory value.
- A topic whose retrieval value is adequately served by an existing canonical term.
## Workflow
### 1. Resolve The Review Window
Find the newest successful receipt whose `workflow` is `review-future-map-taxonomy`. Start after its recorded `review_window.end` and end at the requested time or current run time.
If no successful receipt exists, do not silently scan the full history. Ask the user for a start date or explicit approval for a full-corpus bootstrap.
Record the exact boundaries and selected record IDs before reasoning.
### 2. Load Authoritative Context
Read the current taxonomy and schema enum. Read previous candidate entries, proposals, accepted decisions, rejected decisions, and deferrals when present.
Use `content-index.json` to retrieve only relevant core documents. Consult the identity document's Interest and Focus section as a durable attention map, not as proof that every listed word must become a canonical term.
### 3. Discover Candidates Deterministically
Extract recurring nouns, noun phrases, named frameworks, mechanisms, and classification language from records in the review window. Normalize case, whitespace, punctuation, hyphenation, and singular/plural forms. Group exact and likely variants before counting.
For each candidate, retain:
- Proposed term and taxonomy section.
- First and last observation dates.
- Independent supporting record IDs and count.
- Representative evidence snippets or field references.
- Closest existing terms.
- Likely aliases.
- Whether the term also appears in core documents or the Interest and Focus section.
- Initial status and confidence.
Do not send private absolute source paths, credentials, contact identifiers, or unrelated paid-source text into proposal artifacts.
### 4. Apply Evidence Thresholds
- One independent record: retain as a candidate.
- Three independent records: present for monthly review.
- Five or more independent records: mark as a strong addition candidate.
- Strategically important missing concepts may be proposed below the frequency threshold when the proposal states why they materially improve the Future Map system.
Frequency is evidence, not an automatic approval rule. Count independent records, not repeated uses within one record.
### 5. Reason Against The Corpus
For every reviewable candidate, compare its meaning and retrieval value with the taxonomy, relevant core-document sections, identity interests, existing signals, and prior decisions.
Assign exactly one recommendation:
- `add-concept`
- `add-topic`
- `add-alias`
- `merge-with-existing`
- `defer`
- `reject`
Include:
- `candidate_id`
- `candidate`
- `recommendation`
- `canonical_term`
- `taxonomy_section`
- `aliases`
- `supporting_record_ids`
- `supporting_record_count`
- `closest_existing_terms`
- `corpus_evidence`
- `reason`
- `confidence`
- `review_status`
Use `human-review-required` for every proposed mutation.
### 6. Write The Review Package
Write a structured JSON proposal and a concise Markdown rendering of the same decisions. The Markdown report must show candidate, recommendation, evidence count, corpus grounding, existing overlap, reason, confidence, and approval status.
Keep candidate history append-only where practical. Do not erase rejected or deferred decisions; they prevent repeated rediscovery.
### 7. Stop For Approval
In `proposal` mode, stop after validation and receipt creation. Clearly state that no taxonomy mutation occurred.
Do not infer approval from a request to review, summarize, schedule, or automate. Apply only when the repository owner explicitly identifies the proposal and accepted recommendation IDs or terms.
### 8. Apply Approved Decisions
In `apply` mode:
1. Re-read the approved proposal and current taxonomy.
2. Refuse recommendations not explicitly approved.
3. Detect intervening taxonomy changes and re-evaluate conflicts.
4. Add approved canonical terms in normalized alphabetical order.
5. Synchronize every new `future_map_concepts` value with the schema enum.
6. Do not add an alias structure when none exists; keep approved aliases in the proposal and request separate approval for an alias-registry design.
7. Never delete or rename an existing term without an approved migration and backfill plan.
8. Generate backfill candidates for historical records likely to benefit from new canonical terms.
### 9. Validate
After proposal mode, verify:
- Review-window boundaries and record counts are reproducible.
- Every recommendation references evidence.
- Candidate and recommendation IDs are unique.
- No proposal artifact contains prohibited private data.
- The receipt accurately states that no taxonomy mutation occurred.
After apply mode, also verify:
- Both JSON files parse.
- No canonical concept or topic is duplicated.
- Every prior canonical term remains unless an approved migration says otherwise.
- Taxonomy concepts and the schema concept enum match exactly.
- All derivative records validate.
- The Insights Hub tests pass.
- `git diff --check` passes.
- The receipt lists every changed file and approved decision.
Use:
```text
python data/insights-hub/scripts/future_map_pipeline.py validate
python -m unittest discover -s data/insights-hub/tests -v
git diff --check
```
Do not report success when a required check fails.
## Receipt
Write a machine-readable receipt containing:
- `workflow`: `review-future-map-taxonomy`
- `mode`
- `status`: `success`, `partial`, or `failed`
- `started_at` and `completed_at`
- `review_window.start` and `review_window.end`
- Selected record IDs and count
- Candidate, reviewable, proposed, accepted, deferred, and rejected counts
- Authoritative sources consulted
- Proposal and backfill paths
- Files changed
- Approval evidence for apply mode
- Validation commands and results
- Warnings, failures, and unresolved questions
- Framework provenance: local template version `0.3.1` and files used
A failed or partial receipt must not advance the next review window.
## Model And Method Routing
- Use deterministic processing for date selection, record enumeration, normalization, counting, sorting, duplicate checks, JSON parsing, schema comparison, and validation.
- Use model reasoning for semantic grouping, concept-versus-topic decisions, strategic exceptions, corpus interpretation, aliases, merges, and rejection rationale.
- Escalate ambiguous migrations, broad merges, strategic exceptions, and changes that could invalidate historical records to human review.
- Stop safely when required inputs, approval evidence, or validation capabilities are unavailable.
## Edge Cases
- Treat a changed or deleted prior receipt as an audit warning.
- Do not advance the review window after an incomplete run.
- Merge repeated mentions from one record into one independent observation.
- Preserve conflicting candidate interpretations in the proposal rather than forcing consensus.
- Re-evaluate a previously rejected term only when new evidence or changed meaning is documented.
- Treat identity-document interests as durable context, not automatic taxonomy entries.
- Treat newly added core documents as corpus evidence but not as automatic approval.
- Flag a term that plausibly belongs in both sections; recommend the primary placement and explain whether dual placement improves retrieval.
## Anti-Patterns
Do not:
- Add every frequent word.
- Let a monthly automation approve its own proposal.
- Use frequency as the sole decision rule.
- create near-duplicate canonical terms to preserve source phrasing.
- Rewrite historical records automatically after adding a term.
- Change signal types, audiences, rights policy, publication policy, or unrelated schemas.
- Commit, push, publish, or schedule the workflow without separate authorization.
## Ratchet Rules
Turn repeated mistakes into a durable candidate rule, normalization rule, edge case, validation check, or test recommendation. Never weaken approval gates, prior-term preservation, privacy boundaries, or schema synchronization to make a run pass.
## Final Report
Report the review window, records examined, candidates retained, recommendations by type, strategic exceptions, proposal paths, approvals applied, taxonomy and schema changes, backfill candidates, validation results, receipt path, unresolved issues, and whether Git, publishing, or scheduling occurred.
@@ -0,0 +1,4 @@
interface:
display_name: "Review Future Map Taxonomy"
short_description: "Govern monthly Future Map taxonomy updates"
default_prompt: "Use $review-future-map-taxonomy to review new Future Map signals and propose controlled taxonomy updates."