catalog

package
v0.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package catalog is the compile-time Go value declaring the standard's skills, agents, and docs.

Index

Constants

This section is empty.

Variables

View Source
var Standard = &Catalog{
	Skills: map[string]SkillSpec{
		"repository-context": {Sections: []string{"orient", "explore", "challenge"}},
		"brainstorming":      {Sections: []string{"procedure"}},
		"effort-workflow": {Sections: []string{
			"continuity-and-resident", "execution-and-checkpoints", "integration-and-recovery", "close",
		}},
		"planning":         {Sections: []string{"shape"}},
		"implementing":     {Sections: []string{"ownership", "procedure", "review-handoff"}},
		"reviewing":        {Sections: []string{"brief"}},
		"debugging":        {Sections: []string{"oracle-and-handoff"}},
		"decision-records": {Sections: []string{"format"}},
		"current-state":    {Sections: []string{"claims"}},
		"using-awf":        {Sections: []string{"generated-documents", "upgrades"}},
		"refactor-scope":   {Sections: []string{"inventory"}},
	},
	Agents: map[string]AgentSpec{
		"explorer": {
			Name:        "explorer",
			Description: "Read-only explorer for one bounded {{ .prefix }} repository question.\nReturns an evidence-grounded answer with searched boundary and uncertainty.",
			Sections:    []string{"scope", "report"},
		},
		"premise-checker": {
			Name:        "premise-checker",
			Description: "Read-only adversarial checker for consequential {{ .prefix }} repository premises.\nReturns supported, revise, or unresolved with evidence.",
			Sections:    []string{"procedure", "report"},
		},
		"implementer": {
			Name:        "implementer",
			Description: "Commit-disabled implementation child for assigned {{ .prefix }} paths.\nReturns changed files, checks, deviations, blockers, and checkout state.",
			Sections:    []string{"authority", "work", "receipt"},
		},
		"reviewer": {
			Name:        "reviewer",
			Description: "Fresh report-only reviewer of supplied {{ .prefix }} decision, state, implementation, integration, and verification context.",
			Sections:    []string{"review", "report"},
		},
	},
	DomainDoc: TargetSpec{Sections: []string{"current-state"}},
	Docs: map[string]DocEntry{

		"architecture": {Title: "Architecture", Desc: "system shape, packages, key components, dependencies", Sections: []string{"overview", "components", "data-flow", "dependencies"}, TID: "docs/architecture.md.tmpl"},
		"testing":      {Title: "Testing", Desc: "gate tiers, test layout, what each tier covers", Sections: []string{"gate", "tiers", "layout"}, TID: "docs/testing.md.tmpl"},
		"development":  {Title: "Development", Desc: "local setup, the command runner, dependency reference", Sections: []string{"setup", "command-runner", "dependencies"}, TID: "docs/development.md.tmpl"},
		"debugging":    {Title: "Debugging", Desc: "recipes for common failure modes", Sections: []string{"surfaces", "recipes"}, TID: "docs/debugging.md.tmpl"},
		"pitfalls":     {Title: "Pitfalls", Desc: "recurring bugs and tricky areas", Sections: []string{"prepend", "append"}, TID: "docs/pitfalls.md.tmpl"},
		"releasing":    {Title: "Releasing", Desc: "how to cut a release: versioning, artifacts, and the publish process", Sections: []string{"content"}, TID: "docs/releasing.md.tmpl"},

		"glossary": {Title: "Glossary", Desc: "project jargon and the awf vocabulary it ships", Sections: []string{"prepend", "append"}, TID: "docs/glossary.md.tmpl", Data: map[string]any{
			"standardTerms": []any{
				map[string]any{"term": "effort", "meaning": "One active slugged unit of continuity, owning a working-memory file when multi-step work, likely continuation, coordination, delegation, or durable observations make continuity materially useful. Work without that need uses none."},
				map[string]any{"term": "managed effort worktree", "meaning": "The checkout an effort creates alongside itself, on its own branch, as the default place its work executes. Integrated and removed explicitly when the effort finishes."},
				map[string]any{"term": "working memory", "meaning": "The file an effort owns for in-flight context: its brief, settled decisions, observations, and handoff log. One writer; finish archives the complete resident, and nothing others must honour lives there alone."},
				map[string]any{"term": "current-state topic", "meaning": "A domain-owned document of prose plus a closing claims section. Its claims, not the decision-record corpus, are what tooling reads for the rules in force now."},
				map[string]any{"term": "claim", "meaning": "One statement of what holds today, declared in a current-state topic and carrying its provenance. An invariant claim is additionally backed, by a test or by stated reasoning."},
				map[string]any{"term": "invariant backing", "meaning": "What makes an invariant claim checkable: either a proof marker on a test, or a written verification procedure where no test can bear it. The two forms are enforced symmetrically."},
				map[string]any{"term": "drift", "meaning": "Divergence between a generated file and what the config would produce now, or between a declaration and reality. The check command is the oracle, and drift fails it."},
				map[string]any{"term": "resident root", "meaning": "A directory inside the config tree holding local machine-owned state rather than rendered output, so the closed-tree sweep leaves it alone instead of reporting it as a stray."},
				map[string]any{"term": "stub", "meaning": "A rendered section still carrying only its placeholder text. Stubs raise a non-failing advisory so unwritten content stays visible instead of passing as authored."},
				map[string]any{"term": "check-in", "meaning": "A deliberate stop for user attention: it names the issue, the options, a recommendation, and the blocked next action, then waits."},
				map[string]any{"term": "mandatory approval check-in", "meaning": "The pre-artifact stop for explicit brainstorming outline approval when a material decision is unresolved. Effort creation is not an approval boundary."},
				map[string]any{"term": "routine checkpoint", "meaning": "The boundary protocol between phases: update working memory, decide whether user attention is required, then either raise a check-in or state a continuity notice and continue."},
				map[string]any{"term": "continuity notice", "meaning": "The routine checkpoint's one-line summary on the clear branch, naming the completed phase and the immediate next action. Informational, never a stop."},
				map[string]any{"term": "retrospective", "meaning": "The terminal step of an effort: capture durable lessons, confirm no managed topology remains, and finish the effort last."},
				map[string]any{"term": "promotion ladder", "meaning": "The path a recurring finding takes from prose guidance toward a deterministic check, so a lesson stops depending on anyone remembering it."},
			},
		}},
		"roadmap": {Title: "Roadmap", Desc: "uncommitted ideas and future phases", Sections: []string{"ideas", "deferred"}, TID: "docs/roadmap.md.tmpl"},

		"agents-doc": {Mandatory: true, AgentsDoc: true, TID: "agents-doc/AGENTS.md.tmpl", Sections: []string{
			"awf-setup", "you-and-this-project", "identity", "invariants", "workflow", "working-memory", "commands", "document-map",
		}},
		"maintainable-code-design": {Mandatory: true, DocumentMap: true, Title: "Maintainable Code Design", Desc: "decision framework for cohesive models, explicit boundaries, dependencies, refactoring, and testable design", Path: "maintainable-code-design.md", TemplateKey: "maintainableCodeDesign", TID: "docs/maintainable-code-design.md.tmpl", Sections: []string{"decision-posture", "contextual-heuristics", "semantic-modeling", "readability", "boundaries-and-dependencies", "pattern-toolbox", "preparatory-refactoring", "failure-modes"}},
		"workflow": {Mandatory: true, DocumentMap: true, Title: "Workflow", Desc: "principles, conditional capabilities, continuity, review, and commit discipline", Path: "workflow.md", TemplateKey: "workflowRef", TID: "docs/workflow.md.tmpl", Sections: []string{
			"principles", "chain", "working-memory", "commit-discipline", "doc-currency", "composing-the-gate", "local-hooks", "ci",
		}},
		"doc-standard":       {Mandatory: true, DocumentMap: true, Title: "Documentation Standard", Desc: "how-to-write rules for all awf-managed prose", Path: "doc-standard.md", TemplateKey: "docStandard", TID: "docs/doc-standard.md.tmpl", Sections: []string{"principles", "rules", "structure"}},
		"agents-md-standard": {Mandatory: true, DocumentMap: true, Title: "Authoring AGENTS.md", Desc: "layout, content, and rules for the agent guide", Path: "agents-md-standard.md", TemplateKey: "agentsMdStandard", TID: "docs/agents-md-standard.md.tmpl", Sections: []string{"layout", "content", "rules"}},
		"working-with-awf": {Mandatory: true, DocumentMap: true, Title: "Working with awf", Desc: "day-to-day usage: commands, overrides, placeholders, and the sync/check loop", Path: "working-with-awf.md", TemplateKey: "workingWithAwf", TID: "docs/working-with-awf.md.tmpl", Sections: []string{
			"overview", "commands", "config-and-overrides", "model-selection", "placeholders", "sync-and-drift", "upgrading",
		}},
		"pi-runtime-reference": {Mandatory: true, DocumentMap: true, Title: "Pi Runtime Reference", Desc: "Pi-only runtime, subagent, model-routing, and handoff protocol", Path: "pi-runtime-reference.md", TemplateKey: "piRuntimeReference", TID: "docs/pi-runtime-reference.md.tmpl"},
		"config-reference":     {Mandatory: true, Generated: true, DocumentMap: true, Title: "Configuration Reference", Desc: "every .awf config key, var, sidecar field, and data key: descriptions, defaults, availability, and this project's live state", Path: "config-reference.md", TemplateKey: "configReference", TID: "docs/config-reference.md.tmpl", Sections: []string{"intro"}},
	},
	Vars: []VarDescriptor{
		{Key: "gateCmd", Kind: "string", Description: "Command that runs the fast pre-commit gate.", Default: "", Options: []string{"make gate", "go test ./..."}},
		{Key: "checkCmd", Kind: "string", Description: "Command that checks rendered output for drift. Leave empty to run through the always-rendered `./awf` wrapper.", Default: "", Options: []string{"./awf check", "make check"}},
		{Key: "testCmd", Kind: "string", Description: "Command that runs the test suite.", Default: "", Options: []string{"go test ./...", "npm test", "make test"}},
	},
}

Standard is the compile-time catalog: awf's static description of the standard (skills, agents, docs, singletons, the domain-doc spec, and the fillable vars). Its default Data bags retain map[string]any, []any, and scalar shapes compatible with yaml.v3 output, so each per-file ConfigHash stays byte-identical (ADR-0060).

Functions

func NameDerivedDocNames added in v0.32.0

func NameDerivedDocNames(c *Catalog) []string

NameDerivedDocNames returns c's sorted non-singleton document names.

func SingletonKinds added in v0.6.0

func SingletonKinds() []string

SingletonKinds returns every structural singleton kind: the root agent guide and entries that declare their own output Path. It is derived from the one doc collection; internal/config.IsSingletonKind reads it for sidecar and part path classification.

func SingletonKindsFor added in v0.38.0

func SingletonKindsFor(c *Catalog) []string

SingletonKindsFor returns c's sorted structural singleton kinds.

Types

type AgentSpec added in v0.18.0

type AgentSpec struct {
	Name        string
	Description string
	Sections    []string       `yaml:"sections"`
	Data        map[string]any `yaml:"data"`
}

AgentSpec declares an output-format-neutral agent. Name is literal while Description is a normally rendered template fragment; the instruction body comes from the section-rendered agent template.

type Catalog

type Catalog struct {
	Skills    map[string]SkillSpec `yaml:"skills"`
	Agents    map[string]AgentSpec `yaml:"agents"`
	DomainDoc TargetSpec           `yaml:"domainDoc"`
	Docs      map[string]DocEntry  `yaml:"docs"`
	Vars      []VarDescriptor      `yaml:"vars"`
}

type DocEntry added in v0.9.0

type DocEntry struct {
	Title       string
	Desc        string
	Sections    []string
	Data        map[string]any
	Mandatory   bool
	Path        string
	TemplateKey string
	TID         string
	DocumentMap bool
	AgentsDoc   bool
	// Generated marks a Mandatory doc rendered outside the ordinary render pass from computed
	// project state (the config reference): excluded from plainSingletons and
	// hash checking, regeneration-checked like INDEX.md and topic navigation.
	Generated bool
}

DocEntry is one entry in the unified doc collection. Every entry renders; Path distinguishes structural singleton outputs from name-derived docs (empty for agents-doc, which renders to root AGENTS.md). Mandatory remains the sidecar-location discriminator. TemplateKey is its .layout camelCase key (empty when not layout-exposed); TID is the embedded template id; DocumentMap marks entries the AGENTS.md document map lists via .layout.*; AgentsDoc flags the one root-output special case. Title/Desc/Sections/Data are as before.

type SkillSpec

type SkillSpec struct {
	Sections []string       `yaml:"sections"`
	Data     map[string]any `yaml:"data"`
}

SkillSpec declares a skill's render sections and default data.

type TargetSpec

type TargetSpec struct {
	Sections []string       `yaml:"sections"`
	Data     map[string]any `yaml:"data"`
}

TargetSpec declares the render sections of a target that has no further per-target configuration (the domain doc). Data carries the artifact's default render data; sidecars override it per top-level key (ADR-0045).

type VarDescriptor

type VarDescriptor struct {
	Key         string   `yaml:"key" json:"key"`
	Kind        string   `yaml:"kind" json:"kind"`
	Description string   `yaml:"description" json:"description"`
	Default     string   `yaml:"default" json:"default"`
	Options     []string `yaml:"options" json:"options"`
	Target      string   `yaml:"target" json:"target"`
}

VarDescriptor describes one fillable init value: a config var, or (via Target) a non-var routing target for audit scopes. Kind is string or enum. Target is "", "var", or "audit-scopes"; "" means a plain config var. Default pre-fills interactive prompts and appears in `awf init --describe`; it is never applied on the silent non-interactive path (ADR-0029).

type View added in v0.38.0

type View struct {
	// contains filtered or unexported fields
}

View is the immutable catalog snapshot one composition root gives to a project.

func CompleteView added in v0.38.0

func CompleteView() View

CompleteView returns the standard catalog snapshot.

func NewView added in v0.38.0

func NewView(c *Catalog) View

NewView returns an immutable snapshot of c.

func (View) Catalog added in v0.38.0

func (v View) Catalog() *Catalog

Catalog returns a defensive snapshot of the view. Callers may retain or mutate that snapshot without changing the View or another caller's project.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL