PackagedAssetLoader class

Loads grid_assets' bundled rubric/prompt assets from extension/.

Constructors

PackagedAssetLoader({String? root})
Creates a loader. root explicitly points at the extension/ dir (tests inject it); absent ⇒ the dir is discovered via the package config (with a cwd walk-up fallback — see _resolveRoot).

Properties

hashCode → int
The hash code for this object.
no setterinherited
root → String
The resolved extension/ directory this loader reads from — exposed so a sibling caller that must build a path relative to it (the station_overlay materialization wire, bead pow-kzx) reuses this ONE resolution (package-config first, cwd walk-up fallback) instead of re-deriving it. Throws (via _resolveRoot) when no extension/ can be located at all — the same fail-loud packaging-bug posture every other read here holds.
no setter
rubricSource → String Function(String)
A RubricSource tear-off bound to this loader — the RAW packaged prose, template holes intact. Any rubric that carries a station-arg hole must be read through boundRubricSource before it reaches an agent.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

boundRubricSource({required Map<String, String> args}) → String Function(String)
A RubricSource whose station-arg holes are BOUND from args — the composing station's rubric source, wired once by buildCodeRegistry and injected into every capability that renders rubric prose into a prompt.
loadPromptTemplate(String promptId) → String
The mustache-templated prompt body for promptId (extension/prompts/<id>.md).
loadRubric(String rubricId) → String
The prose bands for rubricId (extension/rubrics/<id>.md). Throws an ArgumentError for an unknown rubric (fail-loud — a missing rubric is a packaging bug, never a silent empty prompt).
loadSkillTemplate(String skillId) → String
The mustache-templated SKILL.md body for skillId (extension/station_overlay/claude/skills/<skillId>/SKILL.md — the ROOT-RELATIVE vended-asset overlay format: the tree mirrors the target repo root, so it already carries the harness's own .claude/skills/ layout). Throws an ArgumentError for an unknown skill (fail-loud — a missing skill is a packaging bug, never a silent empty install).
loadStationOverlaySource() → StationOverlaySource
This package's overlay source plus manifest-declared mappings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderCriticPrompt(String rubricId, Bead bead) → String
Renders the critic prompt template for rubricId + bead — substitutes {{rubric}}, {{rubricText}} (the loaded rubric bands), and {{bead}} (the full work bead). The format-faithful mirror of buildCriticPrompt.
renderDiscoveryPrompt(String lens, String lensBrief, String evidence) → String
Renders the discovery prompt template for lens + lensBrief + the lens's evidence projection — the discovery circuit's portable mirror (of DiscoveryLensCapability.buildLensPrompt).
renderReadinessPrompt(String rubricId, Bead bead) → String
Renders the readiness prompt template for rubricId + bead — the spec-readiness INTAKE lens's portable mirror (of ReadinessCriticCapability.buildReadinessPrompt, bead pow-q7n); same three substitutions as renderCriticPrompt. Its own template, not spec-critic's: the lens grades the BEAD, where the spec critics grade a SPEC and the code critics a DIFF — three prompt SHAPES, three mirrors.
renderSkill(String skillId, {required Map<String, String> args}) → String
Renders the SKILL.md for skillId, substituting every {{key}} from args (the manifest's declared skill args — e.g. runner, gridHome for discover). The composing station's delivery leg calls this at materialization time.
renderSpecCriticPrompt(String rubricId, Bead bead) → String
Renders the spec-critic prompt template for rubricId + bead — the spec-readiness committee's portable mirror (of buildSpecCriticPrompt, bead pow-6ao); same three substitutions as renderCriticPrompt.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

beadBlock(Bead bead) → String
Renders the full work bead into a prompt block (title/task/design/ acceptance/notes) — the {{bead}} substitution.