feat(artifacts): generic engine + 8 extended categories (manifest 0.2)#29
Merged
Conversation
Introduces a generic artifact engine for the extended pack mechanism.
Manifest format 0.2 (additive) unlocks a new optional [pack.data]
section listing artifact slugs per category. Format 0.1 packs continue
to work unchanged.
Core additions:
- streamtex/core/artifacts/{spec,discovery,validation,loaders}.py —
ArtifactKind enum, DiscoveredArtifact dataclass, generic
discover_artifacts / resolve_artifact / validate_artifact /
load_artifact functions.
- streamtex/core/artifacts/palette.py — Palette dataclass + Color
atoms with as_style(), validators PAV001-PAV010, JSON-canonical
schema.
- streamtex/core/artifacts/ai_prompt.py — AIPrompt dataclass with
compose(orientation, scene), validators APV001-APV006, convention
ai_prompts/<name>/{prefix,suffix-*}.txt.
- contracts.PackManifest gains optional PackDataSection (TypedDict).
- core/__init__.py re-exports the artifacts subpackage.
CLI:
- New `stx artifact list|show|validate [--kind <k>] [--pack <p>]`
with per-kind rendering (palette swatches table, ai_prompt
prefix+suffixes). Backward compatible with the existing pack /
component / ds / kit CLIs.
Backward compatibility:
- Existing 0.1 packs work unchanged — no [pack.data] section means
no data-first artifacts to enumerate.
- 2192 existing tests pass without modification.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nt, asset, integration Extends the manifest-0.2 generic engine with all remaining categories declared in the RFC. Each follows the same pattern: per-kind module under streamtex/core/artifacts/, plugged into the validation and loader dispatch tables, with kind-specific Python view types. New per-kind modules: - archetype.py — markdown + YAML frontmatter (name, description, orientation, status, tags, extrapolable, since, palette_refs). Validators ARV001-ARV007. - guideline.py — markdown + YAML frontmatter (name, description, rules, applies_to, since). R-rule pattern check. Validators GLV001-GLV006. - skill.py — Claude Code skill (name + description frontmatter). Namespaced filename <pack_slug>__<name>.md to avoid collisions across packs. Validators SKV001-SKV004. - agent.py — same shape as skill, for Claude Code agents. Validators AGV001-AGV004. - asset.py — _manifest.toml + binary files, with kind / license / optional sha256 per entry. Validators ASV001-ASV005. - integration.py — open contract: <pack>/integrations/<framework>/ with a README.md. Validators INV001-INV003. Shared infrastructure: - _frontmatter.py — minimal YAML subset parser (scalars + inline / indented lists) so the engine has zero PyYAML runtime dependency. - install.py — install_claude_artifact() copies pack-shipped skills / agents into <project>/.claude/custom/<subdir>/ with namespaced filename. Symmetric uninstall_claude_artifact(). Implements EAR-4 (confirmation prompt default, --yes to skip). CLI: - New `stx artifact install <name> --kind skill|agent [--pack <p>] [--yes] [--overwrite]` command surface for the install hook. - show_cmd now renders archetype, guideline, skill, agent with category-specific formatting. Test coverage: 2192 existing tests pass unchanged. The dispatch tables in validation.py and loaders.py now cover all 8 ArtifactKind values. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a generic artifact engine in
streamtex.core.artifactsthatunlocks 8 new categories of pack artifacts under an additive
[pack.data]section in
_pack_manifest.toml(format 0.2):.claude/custom/)_manifest.toml+ binary files with license trackingEach category ships:
CLI: new
stx artifact list|show|validate|install [--kind <k>] [--pack <p>],backward compatible with existing
stx pack/component/ds/kitsurface.Test plan
stx artifact listenumerates 17 artifacts instreamtex-pack-gse v2.0.0(palette + ai_prompt + 11 archetypes + 2 guidelines + 1 skill + 1 integration)stx artifact validatereturns OK on all 17 with this branchBackward compatibility
pack-design v0.3.0,pack-manuals v0.2.0) unaffected.[pack.data]section in a 0.2 pack = behaves exactly like a 0.1 pack.Sister PRs
streamtex-packs— pack-gse v2.0 migration consuming the new enginestreamtex-claude— reuse-architecture skill documenting the 8 categoriesRFC
Local document
documentation/maintenance/design-packs/RFC-extended-artifacts.mdrecords 10 design decisions (EAR-1 … EAR-10). Not in repo (gitignored
maintenance dir).
🤖 Generated with Claude Code