Documentation
ΒΆ
Index ΒΆ
- func FormatFilesList(fileGroups map[string][]*storage.Token) string
- func FormatGrepResults(tokens []*storage.Token) string
- func FormatGrepResultsByRequirement(tokens []*storage.Token) string
- func FormatTokensTable(tokens []*storage.Token, groupBy string) string
- func GrepTokens(db *storage.DB, projectID, pattern string, limit int) ([]*storage.Token, error)
- func GroupTokens(tokens []*storage.Token, groupBy string) map[string][]*storage.Token
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func FormatFilesList ΒΆ
FormatFilesList converts fileGroups (map[file][]tokens) into a human-readable summary grouped by aspect.
func FormatGrepResults ΒΆ
FormatGrepResults returns human readable list output for grep tokens.
func FormatGrepResultsByRequirement ΒΆ
FormatGrepResultsByRequirement groups grep tokens by requirement.
func FormatTokensTable ΒΆ
FormatTokensTable renders grouped tokens (used by show command).
func GrepTokens ΒΆ
CANARY: REQ=ENG-4323; FEATURE="ContextCaps"; ASPECT=API; STATUS=IMPL; UPDATED=2026-08-28 GrepTokens returns tokens whose feature/file/test/bench/reqID match pattern (case-insensitive substring), bounded by limit (<=0 uses the storage layer's own small default; see storage.DefaultSearchLimit).
NOTE: SearchTokens' SQL already matches keywords, feature, req_id, file_path, test, and bench columns (bounded by LIMIT), so a single bounded call covers every column this function's contract advertises. Previously this loaded the entire token table via db.ListTokens to catch file/test/bench matches that the old (narrower) SearchTokens couldn't produce; that full-table union is no longer needed now that SearchTokens covers those columns itself. projectID scopes the search; "" spans every project in the database.
Types ΒΆ
This section is empty.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
canary
command
CANARY: REQ=CBIN-CLI-104; FEATURE="CanaryCLI"; ASPECT=CLI; STATUS=IMPL; OWNER=canary; UPDATED=2025-10-16
|
CANARY: REQ=CBIN-CLI-104; FEATURE="CanaryCLI"; ASPECT=CLI; STATUS=IMPL; OWNER=canary; UPDATED=2025-10-16 |
|
pkg
|
|
|
canaryscan
CANARY: REQ=CP-268; FEATURE="MermaidRefs"; ASPECT=Engine; STATUS=TESTED; TEST=TestCANARY_CBIN_202_ExtractDiagramRefs,TestCANARY_CBIN_202_ScanDiagramRefsSkipsOversizedFile; UPDATED=2026-08-30
|
CANARY: REQ=CP-268; FEATURE="MermaidRefs"; ASPECT=Engine; STATUS=TESTED; TEST=TestCANARY_CBIN_202_ExtractDiagramRefs,TestCANARY_CBIN_202_ScanDiagramRefsSkipsOversizedFile; UPDATED=2026-08-30 |
|
cmds/drift
Package drift wires the pkg/drift engine into `canary drift`: it reads the token index built by `canary index` and reports, per requirement, whether the tree still matches the baseline β CURRENT, DRIFTED, or UNKNOWN β decided by content hash and git availability, never by a token's UPDATED= date.
|
Package drift wires the pkg/drift engine into `canary drift`: it reads the token index built by `canary index` and reports, per requirement, whether the tree still matches the baseline β CURRENT, DRIFTED, or UNKNOWN β decided by content hash and git availability, never by a token's UPDATED= date. |
|
cmds/evidence
Package evidence implements `canary evidence`: the commands that produce and accumulate the passing-test records `canary verify` consumes.
|
Package evidence implements `canary evidence`: the commands that produce and accumulate the passing-test records `canary verify` consumes. |
|
cmds/gap
CANARY: REQ=ENG-4317; FEATURE="GapCLI"; ASPECT=CLI; STATUS=IMPL; UPDATED=2025-10-17
|
CANARY: REQ=ENG-4317; FEATURE="GapCLI"; ASPECT=CLI; STATUS=IMPL; UPDATED=2025-10-17 |
|
cmds/implement
CANARY: REQ=CP-253; FEATURE="RequirementLookup"; ASPECT=API; STATUS=TESTED; UPDATED=2026-08-29
|
CANARY: REQ=CP-253; FEATURE="RequirementLookup"; ASPECT=API; STATUS=TESTED; UPDATED=2026-08-29 |
|
cmds/next
CANARY: REQ=CP-252; FEATURE="NextPriorityCommand"; ASPECT=CLI; STATUS=BENCHED; TEST=TestCANARY_CBIN_132_CLI_NextPrioritySelection,TestCANARY_CBIN_132_CLI_DBAndScanAgreeOnOrder,TestCANARY_CBIN_132_CLI_Candidate51IsFound,TestCANARY_CBIN_132_CLI_PromptResolvesUnderRoot; BENCH=BenchmarkCANARY_CBIN_132_CLI_PriorityQuery; OWNER=canary; UPDATED=2026-08-31
|
CANARY: REQ=CP-252; FEATURE="NextPriorityCommand"; ASPECT=CLI; STATUS=BENCHED; TEST=TestCANARY_CBIN_132_CLI_NextPrioritySelection,TestCANARY_CBIN_132_CLI_DBAndScanAgreeOnOrder,TestCANARY_CBIN_132_CLI_Candidate51IsFound,TestCANARY_CBIN_132_CLI_PromptResolvesUnderRoot; BENCH=BenchmarkCANARY_CBIN_132_CLI_PriorityQuery; OWNER=canary; UPDATED=2026-08-31 |
|
cmds/onboard
Package onboard analyzes a codebase that has few or no CANARY tokens and produces the agent hand-off needed to begin adoption: a language histogram, top-level directory layout, best-effort entry-point detection, any existing CANARY tokens, pre-seeded CANARY:MIGRATE guidance, the configured requirement-ID sources, the next available flatfile ID, and a next_steps checklist.
|
Package onboard analyzes a codebase that has few or no CANARY tokens and produces the agent hand-off needed to begin adoption: a language histogram, top-level directory layout, best-effort entry-point detection, any existing CANARY tokens, pre-seeded CANARY:MIGRATE guidance, the configured requirement-ID sources, the next available flatfile ID, and a next_steps checklist. |
|
cmds/project
CANARY: REQ=ENG-4319; FEATURE="ProjectCLI"; ASPECT=CLI; STATUS=IMPL; UPDATED=2025-10-18
|
CANARY: REQ=ENG-4319; FEATURE="ProjectCLI"; ASPECT=CLI; STATUS=IMPL; UPDATED=2025-10-18 |
|
cmds/specify
CANARY: REQ=ENG-4314; FEATURE="SpecModification"; ASPECT=CLI; STATUS=IMPL; DOC=user:docs/user/spec-modification-guide.md; DOC_HASH=676eb2a18c9d002a; UPDATED=2025-10-17
|
CANARY: REQ=ENG-4314; FEATURE="SpecModification"; ASPECT=CLI; STATUS=IMPL; DOC=user:docs/user/spec-modification-guide.md; DOC_HASH=676eb2a18c9d002a; UPDATED=2025-10-17 |
|
cmds/ticket
Package ticket wires pkg/ticket into `canary ticket sync`: computing a codified ticket-source synchronization plan from indexed tokens and the configured `sources:` registry, and β only when JIRA credentials are present and --apply is set β applying it via the JIRA REST client and writing a completed plan plus a remap map for `canary upgrade --map`.
|
Package ticket wires pkg/ticket into `canary ticket sync`: computing a codified ticket-source synchronization plan from indexed tokens and the configured `sources:` registry, and β only when JIRA credentials are present and --apply is set β applying it via the JIRA REST client and writing a completed plan plus a remap map for `canary upgrade --map`. |
|
cmds/upgrade
Package upgrade wires the pkg/upgrade legacy-token rewriter into the CLI.
|
Package upgrade wires the pkg/upgrade legacy-token rewriter into the CLI. |
|
cmds/verify
Package verify implements `canary verify`: the evidence-backed answer to "are this project's claims true right now?".
|
Package verify implements `canary verify`: the evidence-backed answer to "are this project's claims true right now?". |
|
cmds/view
Package view aggregates everything known about one requirement β tokens, files, tests, dependencies, spec/plan, diagrams, ticket link β into one bounded, agent-friendly answer.
|
Package view aggregates everything known about one requirement β tokens, files, tests, dependencies, spec/plan, diagrams, ticket link β into one bounded, agent-friendly answer. |
|
config
CANARY: REQ=ENG-4317; FEATURE="ProjectConfig"; ASPECT=Storage; STATUS=IMPL; UPDATED=2026-08-30
|
CANARY: REQ=ENG-4317; FEATURE="ProjectConfig"; ASPECT=Storage; STATUS=IMPL; UPDATED=2026-08-30 |
|
contract
Package contract carries the two facts a refused CLI contract needs on both sides of the command boundary: the sentinel a command returns once it has printed its JSON refusal, and the exit status main gives it.
|
Package contract carries the two facts a refused CLI contract needs on both sides of the command boundary: the sentinel a command returns once it has printed its JSON refusal, and the exit status main gives it. |
|
drift
Package drift decides, per requirement, whether the tree in front of it still matches the index baseline `canary index` recorded.
|
Package drift decides, per requirement, whether the tree in front of it still matches the index baseline `canary index` recorded. |
|
evidence
Package evidence holds strict parsing of CANARY evidence records and the single completion function ("has every claimed requirement been proven at the current commit") that downstream verification consumes.
|
Package evidence holds strict parsing of CANARY evidence records and the single completion function ("has every claimed requirement been proven at the current commit") that downstream verification consumes. |
|
external
Package external resolves whether a CANARY requirement ID is satisfied as an external dependency β one owned by a ticket-source (e.g.
|
Package external resolves whether a CANARY requirement ID is satisfied as an external dependency β one owned by a ticket-source (e.g. |
|
gap
CANARY: REQ=ENG-4317; FEATURE="GapService"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-17
|
CANARY: REQ=ENG-4317; FEATURE="GapService"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-17 |
|
matcher
CANARY: REQ=CP-253; FEATURE="FuzzyMatcher"; ASPECT=Engine; STATUS=TESTED; TEST=TestCANARY_CBIN_133_Engine_Levenshtein; OWNER=canary; UPDATED=2026-08-29
|
CANARY: REQ=CP-253; FEATURE="FuzzyMatcher"; ASPECT=Engine; STATUS=TESTED; TEST=TestCANARY_CBIN_133_Engine_Levenshtein; OWNER=canary; UPDATED=2026-08-29 |
|
migrate
CANARY: REQ=ENG-4313; FEATURE="MigrateFrom"; ASPECT=CLI; STATUS=IMPL; OWNER=canary; UPDATED=2025-10-16
|
CANARY: REQ=ENG-4313; FEATURE="MigrateFrom"; ASPECT=CLI; STATUS=IMPL; OWNER=canary; UPDATED=2025-10-16 |
|
reqid
CANARY: REQ=ENG-4316; FEATURE="AspectIDGenerator"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-16
|
CANARY: REQ=ENG-4316; FEATURE="AspectIDGenerator"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-16 |
|
safewrite
Package safewrite is the single way this tool replaces a file on disk.
|
Package safewrite is the single way this tool replaces a file on disk. |
|
sources
Package sources resolves requirement-ID prefixes to their origin: a local flatfile series (e.g.
|
Package sources resolves requirement-ID prefixes to their origin: a local flatfile series (e.g. |
|
specs
CANARY: REQ=ENG-4314; FEATURE="ExactIDLookup"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-16
|
CANARY: REQ=ENG-4314; FEATURE="ExactIDLookup"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-16 |
|
storage
CANARY: REQ=ENG-4319; FEATURE="ContextManagement"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-18
|
CANARY: REQ=ENG-4319; FEATURE="ContextManagement"; ASPECT=Engine; STATUS=IMPL; UPDATED=2025-10-18 |
|
storage/testutil
CANARY: REQ=ENG-4319; FEATURE="TestInfrastructure"; ASPECT=Storage; STATUS=IMPL; UPDATED=2025-10-18
|
CANARY: REQ=ENG-4319; FEATURE="TestInfrastructure"; ASPECT=Storage; STATUS=IMPL; UPDATED=2025-10-18 |
|
ticket
Package ticket computes and applies ticket-source synchronization plans: comparing a requirement's rollup CANARY status against its owning non-flatfile source's remote status (proposing "transition" actions), and codifying flatfile-to-ticket promotion as paired "create_issue" + "remap" actions.
|
Package ticket computes and applies ticket-source synchronization plans: comparing a requirement's rollup CANARY status against its owning non-flatfile source's remote status (proposing "transition" actions), and codifying flatfile-to-ticket promotion as paired "create_issue" + "remap" actions. |
|
upgrade
Package upgrade rewrites legacy on-disk CANARY token shapes into the current parseable form: unicode hyphens inside IDs into ASCII hyphens, unpadded flatfile IDs into zero-padded IDs, bare legacy ID segments into keyed REQ= tokens, bug tokens missing FEATURE= into scan-parseable single lines, STATUS=FIXED into STATUS=REMOVED, missing UPDATED= into stamped tokens, the old multi-line bug-create continuation shape into one line, and (when an ID map is supplied) old requirement IDs into new ones across both CANARY tokens and GAP_ANALYSIS.md "β
<ID>" claim lines.
|
Package upgrade rewrites legacy on-disk CANARY token shapes into the current parseable form: unicode hyphens inside IDs into ASCII hyphens, unpadded flatfile IDs into zero-padded IDs, bare legacy ID segments into keyed REQ= tokens, bug tokens missing FEATURE= into scan-parseable single lines, STATUS=FIXED into STATUS=REMOVED, missing UPDATED= into stamped tokens, the old multi-line bug-create continuation shape into one line, and (when an ID map is supplied) old requirement IDs into new ones across both CANARY tokens and GAP_ANALYSIS.md "β <ID>" claim lines. |
|
tools
|
|
|
canary
command
|