8000 fix(kit): adopted kits admit the host files design:os writes by jangtrinh · Pull Request #380 · jangtrinh/design-os · GitHub
[go: up one dir, main page]

Skip to content

fix(kit): adopted kits admit the host files design:os writes - #380

Merged
jangtrinh merged 1 commit into
mainfrom
fix/adopted-kit-admits-design-os-host-files
Nov 5, 2026
Merged

jangtrinh merged 1 commit into
mainfrom
fix/adopted-kit-admits-design-os-host-files

Conversation

@jangtrinh
Copy link
Copy Markdown
Owner

Problem

In a project produced by ui ds kit adopt, running ui init or ui agents init made ui ds kit verify fail with DS_TAMPERED: kit integrity: Undeclared file: …: the integrity walk treated design:os's own adapter trees and agents as tampering. A glossary added at ontology/glossary.yaml after adoption hit the same wall, and ui init --json did not report the model-adapter wrapper script it writes.

Change

  • Kit integrity (src/core/ds-kit-host-files.ts, used by indexKitContent): an undeclared host file design:os generates may coexist with the kit — ui init trees for all runtimes (design:os-owned namespaces, so older/newer ui versions verify too), AGENTS.md only when it holds the ease-design sentinel block, .claude/agents/*.md only when it carries the design-os agent stamp. Declared kit content stays hash-bound (including host files a kit chose to declare); every other undeclared file still fails.
  • Glossary: ds guidelines build | check read design/knowledge/glossary.yaml (next to rulings) when the project root has no ontology/glossary.yaml. A root glossary added after adoption still fails integrity, and the error now names the path to use.
  • ui init --json: each adapters[] entry carries its wrapper; a new files array lists every file written (manifests, adapter tree, wrappers, --with-agents agents). adapters[].paths is unchanged.
  • Knowledge: knowledge/ds-kit-onboarding.md §5 + failure mode, knowledge/design-agents.md §4. CHANGELOG entry.

Verification

  • New tests/ds-kit-host-files.test.ts (12 tests): adopted kit + init --all + agents init → verify passes; editing a declared component still fails; five look-alikes (host setting, unstamped agent, sentinel-less AGENTS.md, off-namespace skill, stray source) still fail; glossary refusal names the path and the design/knowledge home feeds guidelines build; emitter/linter pairing — every artifact generateAdapter and agents init emit passes the predicate; init --json files equals the files on disk.
  • Mutation probes: disabling the exemption, ignoring the agent stamp, removing the glossary fallback, or dropping the wrapper from files each turns a test red.
  • npm run typecheck && npm run lint && npm run build && npm test → 365 files, 6381 passed, 12 skipped.
  • Live run on a copy of a real adopted kit: ui init --runtime claude / --all → ds kit verify stays verified.

Not covered

  • CONTEXT.md / CONVENTIONS.md added at the root after adoption still fail integrity (no design/ home yet).
  • A .claude/settings.local.json created by the host itself is still undeclared.
  • Kits that already declared generated agents keep them bound; re-rendering those needs a new adopted revision.

🤖 Generated with Claude Code

ui init and ui agents init in an adopted kit project made ds kit verify
fail with DS_TAMPERED (undeclared file). Kit integrity now lets an
undeclared design:os host file coexist with the kit: ui init adapter
trees for all runtimes, an AGENTS.md holding the ease-design sentinel,
and .claude/agents/*.md carrying the design-os agent stamp. Declared
content stays hash-bound; any other undeclared file still fails.

ds guidelines reads the ontology glossary from
design/knowledge/glossary.yaml when the root has none, and a root
glossary added after adoption fails with an error naming that path.

ui init --json now reports every file it writes (per-runtime wrapper
plus a flat files list).
@jangtrinh
jangtrinh merged commit 033a274 into main Nov 5, 2026
4 checks 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

0