Documentation
¶
Overview ¶
Package assemble is the context compiler. It does NOT retrieve memories — it *compiles* a structured ContextPack the way a human orients before touching code: which subsystem, what it depends on, the goals in play, recent activity, the files worth reading. The pack is a typed object (with provenance on every item) so the future agent runtime consumes the same thing the CLI renders.
v1 is fully deterministic: topology + objectives + git recency + a Go-native content search. No model calls, no embeddings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Budget ¶
type Budget struct {
Limit int `json:"limit"`
Estimated int `json:"estimated"`
Truncated bool `json:"truncated"`
}
Budget reports the rough token cost of the recommended reads.
type ContextPack ¶
type ContextPack struct {
Target string `json:"target"`
Subsystem string `json:"subsystem,omitempty"`
Ecosystem string `json:"ecosystem,omitempty"`
Objectives []Item `json:"objectives"`
Dependencies []Item `json:"dependencies"`
RelevantFiles []Item `json:"relevant_files"`
RecentEvents []Item `json:"recent_events"`
Constraints []Item `json:"constraints"`
RecommendedReads []Item `json:"recommended_reads"`
RankingReasons []string `json:"ranking_reasons"`
TokenBudget Budget `json:"token_budget"`
}
ContextPack is the structured output of the compiler — consumed by both the CLI renderer and (later) the agent's orient step.
type Item ¶
type Item struct {
Ref string `json:"ref"` // path / subsystem key / objective id / commit hash
Label string `json:"label,omitempty"` // human text (title, commit subject, …)
Reason string `json:"reason"` // provenance: why this was included
Score int `json:"score,omitempty"` // ranking score (higher = more relevant)
}
Item is one included piece of context, always carrying the reason it's here.