Help us shape the future of Go! Take the 2026 Go Developer Survey

rules

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

View Source
const ProjectDirClaude = rulesfs.ProjectDirClaude

ProjectDirClaude is the Claude-Code-compatible project-level rules dir. See rulesfs.ProjectDirClaude.

View Source
const ProjectDirMecatl = rulesfs.ProjectDirMecatl

ProjectDirMecatl is the project-level rules dir under the workspace. See rulesfs.ProjectDirMecatl.

View Source
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

func NewFSSource(ctx context.Context, sources ...RuleSource) (*FSSource, []SkipError, error)

NewFSSource resolves the given sources ONCE and returns the snapshot source plus the aggregated discovery diagnostics. See rulesfs.NewFSSource.

Types

type DirSource

type DirSource = rulesfs.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

type FSSource = rulesfs.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

type Rule = prompt.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.

type SkipError

type SkipError = rulesfs.SkipError

SkipError records one diagnostic from discovery. See rulesfs.SkipError.

Jump to

Keyboard shortcuts

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