AGENT SKILL

x-search-memory

Queries ai/memory/ for decisions, patterns, and anti-patterns across past epics

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
1

01 前言 Front Matter

name
x-search-memory
model
haiku
visibility
public
description
Queries ai/memory/ for decisions, patterns, and anti-patterns across past epics
allowed-tools
[ "Read", "Bash", "Grep", "Glob" ]
context-budget
light
user-invocable
true
requires-capabilities
[ "governance.ai-memory" ]

03 SKILL.md 正文

x-search-memory

Searches ai/memory/_index.yaml and the indexed summary files for decisions, patterns, anti-patterns, or epic context matching the given query.

Results are ranked by relevance (tag match → exact text match → full-text scan) and filtered by indexable: true unless --include-archived is passed.

Determinism contract: Given the same ai/memory/ contents and the same flags, output order is deterministic (alphabetical by epic-id within each relevance tier).

Triggers

/x-search-memory "auth decisions"
/x-search-memory --by-pattern capability-aware-skill-via-frontmatter
/x-search-memory --by-tag governance
/x-search-memory --by-epic EPIC-0064
/x-search-memory "hexagonal" --include-archived

Parameters

Flag Type Default Description
QUERY string — Positional. Free-text search against all summary sections
--by-tag TAG string — Filter by frontmatter tags: value (exact match)
--by-pattern ID string — Filter by patterns-introduced or antipatterns-rejected kebab-case ID
--by-epic EPIC-XXXX string — Return only the summary for that epic
--by-rule RULE-NN string — Filter by rules-affected (e.g. Rule 28)
--by-adr ADR-XXXX string — Filter by adrs-referenced
--by-capability ID string — Filter by capabilities-affected (exact or prefix match)
--include-archived bool false Include entries with archived: true or indexable: false
--format compact|full compact compact = one-line per result; full = full summary body
--limit N int 10 Maximum results to return

Exit Codes

Exit Code Condition
0 OK Results printed (may be empty)
1 INDEX_NOT_FOUND ai/memory/_index.yaml absent
2 INVALID_ARGS Mutually exclusive flags combined, or unknown flag

Execution Protocol

Step 1 — Load index

cat ai/memory/_index.yaml

Exit 1 INDEX_NOT_FOUND when absent.

Step 2 — Filter index entries

Apply filters in order (each narrows the candidate set):

  1. Unless --include-archived: keep only entries where indexable: true AND archived: false.
  2. --by-epic: keep only the matching epic-id.
  3. --by-tag: read each candidate summary; keep if tags: list contains the value.
  4. --by-pattern: keep if patterns-introduced or antipatterns-rejected contains the ID.
  5. --by-rule: keep if rules-affected contains the value.
  6. --by-adr: keep if adrs-referenced contains the value.
  7. --by-capability: keep if capabilities-affected contains the value (prefix match supported, e.g. governance.*).
  8. Free-text QUERY: grep full body of each candidate summary for the term.

Step 3 — Rank and limit

Sort candidates: exact frontmatter match first, then full-text hits, alphabetically by epic-id within each tier. Apply --limit.

Step 4 — Format and print

Compact (default):

EPIC-0064 [governance, capabilities, architecture] — Capability-Driven Composition Refactor
  → patterns: capability-aware-skill-via-frontmatter, requires-capabilities-universal-declaration

Full (--format full): Print the complete ai/memory/epic-XXXX-summary.md body for each result.

Integration Notes

  • Called interactively by operators during epic planning to surface prior decisions.
  • Called by x-plan-architecture to auto-inject relevant memory context into architecture plans (conditional: governance.ai-memory active).
  • Output is read-only; does not modify _index.yaml or any summary file.
  • Empty result set is a valid response (exit 0, no output).

Examples

# Find all governance decisions
/x-search-memory --by-tag governance

# Find who rejected inline-validation
/x-search-memory --by-pattern inline-validation-instead-of-hook

# Find all epics that reference Rule 28
/x-search-memory --by-rule "Rule 28"

# Full body for one epic
/x-search-memory --by-epic EPIC-0064 --format full

04 同仓库更多 Skills

review-bench
review-bench/edercnj_ia-dev-environment

x-parallel-eval

Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan / x-story-plan, applies the parallelism-heuristics knowledge pack (hard / regen / soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

parallelism-heuristics

Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard / regen / soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-watch-pr-ci

Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-validate-docs

Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared/auto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-system-architecture

Incrementally updates docs/architecture/system.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component/integration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-architecture

Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.

★ 0