Skip to content

Add the v1.3 Design Intelligence catalog foundation - #4

Merged
kuker24 merged 6 commits into
mainfrom
v1.3.0-design-intelligence-foundation
Aug 17, 2026
Merged

Add the v1.3 Design Intelligence catalog foundation#4
kuker24 merged 6 commits into
mainfrom
v1.3.0-design-intelligence-foundation

Conversation

@kuker24

@kuker24 kuker24 commented Aug 17, 2026

Copy link
Copy Markdown
Owner

What this adds

A catalog foundation for Design Intelligence. GrokBestFriend can inspect, import, rebuild, search, and doctor local Open Design packs without activating them.

  • Schemas and policy under vendor/design-intelligence/
  • Stdlib indexer in lib/design_intelligence/
  • CLI: python3 scripts/design-intelligence.py
  • Tests and a CI step
  • Docs: docs/design-intelligence.md

VERSION remains 1.2.0.

active_version          = 1.2.0
candidate_feature       = DESIGN_INTELLIGENCE_FOUNDATION
routing_integration     = NOT_ACTIVE
specialist_activation   = NOT_ACTIVE

What is deliberately off

  • No change to 00-routing.md or routing eval (163 cases still green)
  • No Impeccable new-work change
  • No found-this-design / GROK_DESIGN_BANK change
  • No lib/doctor.sh, docs/inventory.md, or THIRD_PARTY_NOTICES.md change
  • No specialist activation
  • No raw ZIP in git
  • No VERSION bump
  • No merge / auto-merge

PR B (Impeccable retrieval) is blocked until a human reviews and merges this PR.

Four-ZIP audit (hashes match od-packs-2026-07-20)

Static zipfile only. Nothing executed.

Check Result
design systems (manifest.json+DESIGN.md+tokens.css) 151
origin Open Design curated bundled fixture 150
origin GitHub URL (tom-modern) 1 — still E1 + inspiration-only
template folders 114
template-owned LICENSE (MIT) 35
templates without LICENSE 79
skill folders 162
catalogue stubs 85
open-design.json 479
plugin-root SKILL.md 250
community skill-bearing plugins 7
unsafe paths / symlinks / encrypted 0 / 0 / 0

Import of the four packs into a temp bank:

items=906 systems=151 structures=114 specialists=162 recipes=479
aliases=256 (143 official design-system plugins + 113 matching examples)
duplicates=0 stubs=85 quarantined=7
home_path_leaks=0
packages_loaded_during_search=0
doctor=DEGRADED

Security model

  • Archives are untrusted. Traversal, absolute paths, symlinks, encryption, and compression abuse fail closed.
  • Members are never executed.
  • Catalog identity is archive bytes only. Host probes are not stored in catalog.jsonl.
  • ZIP prose is sanitized (length, controls, code/HTML, install commands, instruction tells, secret redaction) before sqlite/jsonl write.
  • catalog.lock.json is the generational commit pointer and is written last.

License / provenance limits

Unknown license is local-only reference, never allowed. Brand-named fixtures are E1 inspiration-only. _official is not GrokBestFriend trust. Community plugins are quarantined. Catalogue stubs are not specialists.

Test plan

Always on:

  • existing suite (routing 163, overlay, MCP, source integrity, secrets, gitleaks, doctor dry-run, snapshot, node preflight, design-bank)
  • tests/test-design-intelligence-*.py except the optional audit

Optional (env only):

GROK_DESIGN_INTELLIGENCE_ARCHIVES

CI does not set that env. The optional test prints SKIP_OPTIONAL_ARCHIVE_AUDIT reason=env-not-set.

Relationship to PR B

PR B may call this catalog from Impeccable new-work and write .impeccable/design-intelligence-selection.json. That file is not a DESIGN.md. Do not start PR B until this PR is merged by a human.

Rollback

Revert the four commits or delete the branch. No installer migration. ~/Design is untouched.

Known limitations

  • Four current packs are DEGRADED (unknown licenses, stubs, quarantine, missing od/Figma).
  • Lexical search only.
  • FTS5 is optional; fallback always exists.
  • Catalog is unused by routing until PR B.

Introduce the catalog contract, taxonomy, known-source snapshots, and
operator references. This is policy only: routing, Impeccable, and
VERSION stay on 1.2.0.
Index untrusted ZIP packs with static zipfile reads, framed content
hashes, kind extractors, and a generational lock. Catalog identity is
archive bytes only; host probes are not stored.
Provide kind-specific eligibility, lexical search with an FTS5 fallback,
an intent-aware authority resolver, and a doctor CLI. Search never opens
full design packages.
Cover archive safety, lineage, classification, search bounds, authority,
and doctor statuses. Optional live-archive audit runs only when
GROK_DESIGN_INTELLIGENCE_ARCHIVES is set.
…e checks

Keep PR A as a draft catalog foundation. Persist only sanitized strings, require exact known-snapshot set equality, drop zero-score search hits, fail rebuilds on schema or missing lock artifacts, match licenses by canonical signatures, and quarantine unknown archive families.
@kuker24

kuker24 commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

Review-fix commit (not merged)

Pushed 3221e5d onto this draft. Scope is still PR A only. VERSION stays 1.2.0. Routing, Impeccable, lib/doctor.sh, docs/inventory.md, and THIRD_PARTY_NOTICES.md are unchanged.

Blocker Change
P0 sanitization Policy-driven secret patterns now redact the assignment and the value. Every persisted string is recursively sanitized. Canaries in manifest, DESIGN.md, template bullets, frontmatter, and open-design.json are tested.
P0 snapshot snapshot_for_hashes is exact set equality. One known archive plus one extra archive is no longer a known snapshot.
P1 search score <= 0 and scores below min_score are dropped. quantum-banana-xyz returns results: [].
P1 catalog integrity Schema errors fail rebuild and keep the last healthy lock. generation_id includes framed input hashes. Both lock artifacts must exist and match. Doctor re-validates the lock and every row.
P1 license Canonical required/any_of/forbidden signatures. Decoy Apache text is not allowed. Declared-vs-file conflict is blocked.
P2 unknown family UNSUPPORTED_ARCHIVE_FAMILY is quarantined. It is not imported as plugins.

Live re-audit of the four known packs (temp bank, not committed): 151 / 114 / 162 / 479, 85 stubs, 7 quarantined, doctor DEGRADED, archive_hashes = od-packs-2026-07-20, no-match search empty.

This PR stays draft. Not merged. PR B stays blocked until a human reviews this again.

Sanitize and reject dynamic dict keys, skip prose cleanup only by full field path, and validate identity, URL, path, version, and archive-name fields. Make check_item match the catalog-item schema, reject duplicate logical names after (N) stripping, and require exact SPDX equality after explicit aliases.
@kuker24

kuker24 commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

Hardening commit 3061a54 is on this draft. It does not merge.

Closed from the last review

  • Keys: sanitize_tree / walk_strings now cover dict keys. Skip lists use full field paths (source.path, source.url, identity ids), not bare names like path. Dynamic keys that look like secrets or fail the safe-key pattern become [rejected-key]. Canary: od.capabilities with XAI_API_KEY=<value> plus "path": "ignore previous instructions" does not persist the secret or the instruction.
  • Schema: check_item now matches catalog-item.schema.json: additional properties, required source/license fields, string/boolean/array-item types, and typed identity/url/path/version/archive-name checks. Invalid rows still fail the rebuild and keep the last lock.
  • Provenance: design-systems.zip and design-systems(1).zip share a logical name. The second import is quarantined as DUPLICATE_LOGICAL_NAME. A bank that already has both fails rebuild and writes no lock.
  • SPDX: declared vs file is exact after explicit license_aliases. MIT file + MIT-0 declared is conflicting/blocked. Apache-2 aliases to Apache-2.0 only because it is registered.

Unchanged

  • Draft, not merged.
  • VERSION 1.2.0.
  • Routing and Impeccable untouched.
  • PR B stays blocked.

Live re-import of the four known packs: 906 items, doctor DEGRADED (stubs/unknown license + missing connectors), archive_hashes exact od-packs-2026-07-20, no /home or secret-assignment leak.

@kuker24
kuker24 marked this pull request as ready for review August 17, 2026 03:07
@kuker24
kuker24 merged commit 389b247 into main Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant