feat: redesign .museignore as TOML with domain-scoped sections (#100)
* feat: redesign .museignore as TOML with domain-scoped sections
Replace the flat gitignore-style .museignore with a TOML format that has [global] and [domain.<name>] sections. Global patterns apply to every domain; domain-specific sections are loaded only when the active plugin matches, keeping each plugin's ignore rules isolated from every other. The is_ignored() and _matches() functions are unchanged — callers now use load_ignore_config() + resolve_patterns(config, domain) instead of load_patterns().
Also adds from __future__ import annotations to all muse/ modules that were missing it, fixing pre-existing forward-reference NameErrors in TypedDicts (PatchOp/DomainOp, MapSchema/ElementSchema) and dataclasses (AWMap, GCounter, TreeNode, etc.) that broke test collection.
* feat: complete .museignore TOML integration across codebase
- muse init now generates a domain-aware .museignore TOML template alongside .museattributes; template includes [global] + [domain.<name>] sections pre-filled for the chosen domain (midi/code/genomics/simulation/ spatial; generic stub for unknown domains).
- ScaffoldPlugin.snapshot() now honours .museignore via load_ignore_config + resolve_patterns — the reference template for new plugin authors now demonstrates the correct ignore contract.
- Docstrings updated in provenance.py, manifest.py, entity.py to reference the TOML format and correct sections ([global] for keys, [domain.midi] for rebuildable caches).
- Docs updated: architecture/muse-vcs.md, reference/type-contracts.md, reference/muse-attributes.md, agent-provenance.md, entity-identity.md all now describe the TOML format and include concrete examples.
- Tests: 8 new init tests (valid TOML, global section, domain section for midi/code, no-overwrite on reinit, parseable by load_ignore_config); 8 new scaffold plugin snapshot tests (global ignore, domain-specific, cross-domain isolation, negation, domain negation overrides global).
---------
Co-authored-by: Gabriel Cardona <gabriel@tellurstori.com>
Comments
0No comments yet. Be the first to start the discussion.