All commands

Harness Component — Command

Learn Follow

Guided reading of code or wiki to extract patterns

Runtimeclaude-code
Intentbuild

Definition

<purpose> Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks. </purpose> <context> $ARGUMENTS — target and optional flags.

Target resolution (auto-detected):

InputResolution
File path (contains / or \)Read source file
Wiki ID (<type>-<slug>)maestro wiki get <id>
Topic stringmaestro search "<topic>" → top result; fallback: Grep src/

Flags:

  • --depth shallow (default): key patterns and structure only
  • --depth deep: every function, every branch, every assumption
  • --save-wiki: create wiki note entry with reading notes
  • -y: Skip confirmation prompts for knowhow/spec writes

Storage read: target file + wiki forward/backlinks + coding-conventions.md + .workflow/specs/learnings.md (dedup) Storage write: .workflow/knowhow/KNW-follow-{slug}-{date}.md + append .workflow/specs/learnings.md </context>

<state_machine>

<states> S_RESOLVE — 解析 target (file/wiki/topic) PERSIST: — S_CONTEXT — 构建 1-hop 上下文邻域 PERSIST: — S_ORDER — 确定阅读顺序 PERSIST: — S_READ — 逐节应用 forcing questions PERSIST: — S_EXTRACT — 提取 patterns、cross-ref conventions PERSIST: — S_PERSIST — 写 understanding map + spec-entry 块 PERSIST: knowhow files </states> <transitions>

S_RESOLVE: → S_CONTEXT WHEN: target resolved → S_RESOLVE WHEN: unresolvable DO: AskUserQuestion with suggestions

S_CONTEXT: → S_ORDER DO: A_BUILD_CONTEXT_WEB

S_ORDER: → S_READ DO: A_BUILD_READING_ORDER

S_READ: → S_EXTRACT DO: A_GUIDED_READ (apply 4 forcing questions per section)

S_EXTRACT: → S_PERSIST DO: A_EXTRACT_PATTERNS

S_PERSIST: → END GATE: unless -y, AskUser

View full source (4,430 chars) on GitHub

More from catlog22/maestro-flow