Summary
map-framework has Jinja-based template rendering (single-source, golden tests, make check-render) which is cleaner than competitors. But it lacks preset composition — the ability to layer organizational customizations without forking. SpecKit's 4-tier resolution stack with prepend/append/wrap/replace strategies enables team-specific modifications while keeping upstream updatable.
What SpecKit does
4-tier template resolution stack
- Project overrides: .specify/templates/overrides/{name}.md — highest priority
- Installed presets: .specify/presets/{preset-id}/templates/{name}.md (sorted by priority)
- Extensions: .specify/extensions/{ext-id}/templates/{name}.md
- Core templates: .specify/templates/{name}.md — base
Composition strategies
replace — highest-priority wins, lower layers irrelevant (fork)
prepend — layer content inserted ABOVE base content
append — layer content inserted BELOW base content
wrap — layer wraps base via {CORE_TEMPLATE} placeholder (most flexible)
Extension ecosystem
- Pluggable extensions (git, bug-tracker, agent-context, selftest)
- Declarative hook registration:
before_command / after_command
- Mandatory/optional hooks, condition-based execution
- Extension registry + catalog for discovery
Preset management
specify preset add <id> — install from URL or local path
specify preset remove <id> — uninstall
specify preset enable/disable — toggle without uninstalling
specify preset set-priority <id> <N> — reorder stack
specify preset resolve <template> — show which layer wins for a template
Current map-framework state
- Jinja-based rendering from templates_src/**/*.jinja → templates/, .claude/, .codex/
- Single-source-of-truth, no composition layers
- Customization requires editing .jinja source or generated files
- No extension system with hooks
- No preset catalog or registry
Proposed design
Layered resolution for .jinja templates
Config section in .map/config.yaml:
presets:
resolution_order:
- my-org-conventions # priority: 100
- security-hardening # priority: 50
strategies:
my-org-conventions:
"workflows/map-efficient.md.jinja": "prepend" # Add org header
"agents/actor.md.jinja": "append" # Add org conventions
security-hardening:
"agents/monitor.md.jinja": "wrap" # CORE_TEMPLATE in security wrapper
Composition engine
render-template <name> resolves through layers, applies strategies
render-template --resolve <name> shows which layers contribute (debug)
make check-render verifies all layers compose without conflicts
Preset management (mapify preset)
mapify preset add <name> --from <url|path>
mapify preset remove <name>
mapify preset enable/disable <name>
mapify preset set-priority <name> <N>
mapify preset resolve <template-name>
mapify preset list
Extension hooks
- .map/extensions/{name}/hooks.yaml with before/after lifecycle hooks, mandatory/optional, condition-based execution
Preset catalog
mapify preset catalog — list available presets from registry
mapify preset catalog add <url> — add community registry
- Shipped presets: lean (simplified workflow), enterprise (full gates), security (additional checks)
References
- SpecKit: src/specify_cli/presets.py, scripts/bash/common.sh (lines 279-582), templates/
- SpecKit preset resolution: specify preset resolve command
Acceptance criteria
Summary
map-framework has Jinja-based template rendering (single-source, golden tests, make check-render) which is cleaner than competitors. But it lacks preset composition — the ability to layer organizational customizations without forking. SpecKit's 4-tier resolution stack with prepend/append/wrap/replace strategies enables team-specific modifications while keeping upstream updatable.
What SpecKit does
4-tier template resolution stack
Composition strategies
replace— highest-priority wins, lower layers irrelevant (fork)prepend— layer content inserted ABOVE base contentappend— layer content inserted BELOW base contentwrap— layer wraps base via{CORE_TEMPLATE}placeholder (most flexible)Extension ecosystem
before_command/after_commandPreset management
specify preset add <id>— install from URL or local pathspecify preset remove <id>— uninstallspecify preset enable/disable— toggle without uninstallingspecify preset set-priority <id> <N>— reorder stackspecify preset resolve <template>— show which layer wins for a templateCurrent map-framework state
Proposed design
Layered resolution for .jinja templates
Config section in .map/config.yaml:
Composition engine
render-template <name>resolves through layers, applies strategiesrender-template --resolve <name>shows which layers contribute (debug)make check-renderverifies all layers compose without conflictsPreset management (mapify preset)
Extension hooks
Preset catalog
mapify preset catalog— list available presets from registrymapify preset catalog add <url>— add community registryReferences
Acceptance criteria