PackagedAssetLoader class
Loads grid_assets' bundled rubric/prompt assets from extension/.
Constructors
- PackagedAssetLoader({String? root})
-
Creates a loader.
rootexplicitly points at theextension/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, beadpow-kzx) reuses this ONE resolution (package-config first, cwd walk-up fallback) instead of re-deriving it. Throws (via_resolveRoot) when noextension/can be located at all — the same fail-loud packaging-bug posture every other read here holds.no setter - rubricSource → String Function(String)
-
A
RubricSourcetear-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
RubricSourcewhose station-arg holes are BOUND fromargs— the composing station's rubric source, wired once bybuildCodeRegistryand 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
criticprompt template forrubricId+bead— substitutes{{rubric}},{{rubricText}}(the loaded rubric bands), and{{bead}}(the full work bead). The format-faithful mirror ofbuildCriticPrompt. -
renderDiscoveryPrompt(
String lens, String lensBrief, String evidence) → String -
Renders the
discoveryprompt template forlens+lensBrief+ the lens'sevidenceprojection — the discovery circuit's portable mirror (ofDiscoveryLensCapability.buildLensPrompt). -
renderReadinessPrompt(
String rubricId, Bead bead) → String -
Renders the
readinessprompt template forrubricId+bead— the spec-readiness INTAKE lens's portable mirror (ofReadinessCriticCapability.buildReadinessPrompt, beadpow-q7n); same three substitutions as renderCriticPrompt. Its own template, notspec-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}}fromargs(the manifest's declared skill args — e.g.runner,gridHomefordiscover). The composing station's delivery leg calls this at materialization time. -
renderSpecCriticPrompt(
String rubricId, Bead bead) → String -
Renders the
spec-criticprompt template forrubricId+bead— the spec-readiness committee's portable mirror (ofbuildSpecCriticPrompt, beadpow-6ao); same three substitutions as renderCriticPrompt. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited