Files
Tabish Bidiwale 702c163048 proposal: add instruction loader and schema restructure (Slice 3)
Adds two change proposals for implementing Slice 3 of the artifact POC:

1. restructure-schema-directories
   - Move schemas from embedded TS objects to self-contained directories
   - Each schema becomes a directory with schema.yaml + templates/
   - Enables co-located templates for user extensibility
   - 2-level resolution: user override → package built-in

2. add-instruction-loader (depends on #1)
   - Load templates from schema directories
   - Enrich templates with change context (dependencies, next steps)
   - Format change status for CLI output
   - New instruction-loader capability

These proposals complete Slice 3 from docs/artifact_poc.md.
2025-12-26 23:13:13 +11:00

956 B

Why

Currently, built-in schemas are embedded as TypeScript objects in builtin-schemas.ts. This works for schemas but doesn't support co-located templates. To enable self-contained schema packages (schema + templates together), we need to restructure schemas as directories.

What Changes

  • BREAKING (internal): Move built-in schemas from embedded TS objects to actual directory structure
  • Schemas become directories containing schema.yaml + templates/
  • Update resolveSchema() to load from directory structure
  • Remove builtin-schemas.ts (replaced by file-based schemas)
  • Update resolution to check user dir → package dir

Impact

  • Affected specs: artifact-graph (schema resolution changes)
  • Affected code:
    • Remove src/core/artifact-graph/builtin-schemas.ts
    • Update src/core/artifact-graph/resolver.ts
    • Add schemas/ directory at package root
  • No external API changes (resolution still returns SchemaYaml)