Documentation
¶
Overview ¶
Package rules is the in-repo alias shim for the project/user rule discovery adapter that lives in the importable engine module (engine/adapter/rulesfs, issue #329). The discovery, parsing, and resolution bodies live once, in rulesfs; this package re-exports them via thin type/func/const aliases so the composition layer (internal/app) and the cmd mains reference a stable import path. There is no second copy to drift. See the rulesfs package for the real contract.
Index ¶
Constants ¶
const ProjectDirClaude = rulesfs.ProjectDirClaude
ProjectDirClaude is the Claude-Code-compatible project-level rules dir. See rulesfs.ProjectDirClaude.
const ProjectDirMecatl = rulesfs.ProjectDirMecatl
ProjectDirMecatl is the project-level rules dir under the workspace. See rulesfs.ProjectDirMecatl.
const RuleFileExt = rulesfs.RuleFileExt
RuleFileExt is the conventional extension of a rule file. See rulesfs.RuleFileExt.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover(dir string) ([]Discovered, []SkipError, error)
Discover scans dir for rules. See rulesfs.Discover.
func NewFSSource ¶
NewFSSource resolves the given sources ONCE and returns the snapshot source plus the aggregated discovery diagnostics. See rulesfs.NewFSSource.
Types ¶
type DirSource ¶
DirSource is the local-OS-filesystem implementation of RuleSource. See rulesfs.DirSource.
type Discovered ¶
type Discovered = rulesfs.Discovered
Discovered is one discovered rule together with its adapter-private locator string. See rulesfs.Discovered.
type FSSource ¶
FSSource is the FILESYSTEM implementation of the prompt.RulesSource port. See rulesfs.FSSource.
type MultiSource ¶
type MultiSource = rulesfs.MultiSource
MultiSource composes an ORDERED list of Sources into one. See rulesfs.MultiSource.
func NewMultiSource ¶
func NewMultiSource(sources ...RuleSource) MultiSource
NewMultiSource builds a MultiSource over the given ordered sources. See rulesfs.NewMultiSource.
type ResolveOptions ¶
type ResolveOptions = rulesfs.ResolveOptions
ResolveOptions configures the known-path resolver. See rulesfs.ResolveOptions.
type Rule ¶
Rule is the pure value object for one rule (the engine/prompt.Rule value object, re-aliased through rulesfs). See prompt.Rule.
type RuleSource ¶
type RuleSource = rulesfs.RuleSource
RuleSource is the pluggable EXTENSIBILITY POINT for where rules come from. See rulesfs.RuleSource.
func ResolveSources ¶
func ResolveSources(opts ResolveOptions) []RuleSource
ResolveSources builds the ORDERED, highest-precedence-first Source list from the conventional locations. See rulesfs.ResolveSources.