observe
Start a focused observation session to analyze specific patterns in the codebase. Watches a domain or file pattern and records findings for future /learn runs.
- License 许可
- MIT
- 最近更新
- 2026-08-25
- Stars
- ★ 8
- Forks
- 1
01 前言 Front Matter
- name
- observe
- description
- Start a focused observation session to analyze specific patterns in the codebase. Watches a domain or file pattern and records findings for future /learn runs.
03 SKILL.md 正文
/observe — Targeted Pattern Analysis
Run a focused observation session on a specific domain, file pattern, or question. Unlike /learn which broadly scans recent work, /observe lets you zoom in on a specific area.
When to Use
- When you want to understand how a specific pattern is used across the codebase
- When you suspect an inconsistency and want data
- When onboarding to a new area of the code
- When you want to document "how we do X here"
Execution Flow
Step 1: Determine Focus
If the user provides a focus topic, use it. Otherwise ask:
What should I observe? Examples:
- "error handling" — how errors are wrapped, propagated, and reported
- "test patterns" — how tests are structured and organized
- "naming conventions" — variable, function, and file naming
- "src/api/**" — patterns in a specific directory
- "imports" — how dependencies are organized
Step 2: Gather Evidence
Based on the focus, run targeted analysis:
For code pattern focus:
- Search for relevant code patterns using grep/glob
- Sample 10-20 representative files
- Look for consistency and deviations
- Check git blame for when patterns were established
For directory focus:
- List all files in the target path
- Analyze file organization and naming
- Read representative files for patterns
- Check for README or documentation
For workflow focus:
- Read
.atv/observations.jsonlfor relevant tool use - Check git log for commit patterns
- Look at CI/CD configuration
- Check for scripts or Makefiles
Step 3: Analyze Findings
For each observation, evaluate:
| Question | Why |
|---|---|
| Is this pattern consistent? | Consistency = high confidence instinct |
| How many files follow it? | Volume = evidence strength |
| Are there deviations? | Deviations = either evolution or mistakes |
| When was it established? | Age = stability indicator |
| Is it documented anywhere? | Documentation = intentional choice |
Step 4: Record Results
Append findings to .atv/observations.jsonl with a special observation type:
{
"ts": "2026-04-06T10:30:00Z",
"hook": "manual-observe",
"focus": "error handling",
"findings": [
"All errors wrapped with fmt.Errorf %w in 18/20 files",
"Two files use bare error returns (legacy code from 2024)",
"Custom error types in pkg/errors/ for domain errors",
"No panic() usage found — errors always returned"
],
"suggested_instincts": [
{
"id": "always-wrap-errors",
"trigger": "when returning an error from a function",
"behavior": "wrap with fmt.Errorf using %w verb"
}
]
}
Step 5: Report
Observation: [focus topic]
Findings:
1. [Pattern] — found in N/M files examined (X% consistent)
2. [Pattern] — found in N/M files examined (X% consistent)
3. [Deviation] — N files deviate from the dominant pattern
Suggested instincts (run /learn to formalize):
+ [instinct-id] — "[behavior]" (evidence: N files)
+ [instinct-id] — "[behavior]" (evidence: N files)
Existing instincts affected:
↑ [instinct-id] — additional evidence found (+N observations)
? [instinct-id] — contradictory evidence found (N deviations)
Next steps:
- Run /learn to incorporate these findings into instincts
- Run /observe "[related topic]" to dig deeper
- Review deviations — they may be intentional or need fixing
Quick Observations
For rapid pattern checks without full analysis:
/observe --quick "how do we handle auth?"
Quick mode:
- Searches for relevant files (auth, middleware, session, token)
- Reads the most relevant 3-5 files
- Summarizes the pattern in 3-5 bullet points
- Does NOT write to observations.jsonl
Notes
- Observations are raw data — run
/learnto turn them into instincts - Manual observations have higher signal than automatic hook observations
- The
manual-observehook type in observations.jsonl lets/learnweight these higher - Observations are additive — run multiple times on different topics
04 同仓库更多 Skills
kevin-review
Review a diff and emit concise, evidence-backed findings.
kevin-merit
Audit a diff for over-engineering and report it as a corporate merit cycle. Satire; the subject is the code, never a person.
kevin-help
Show Kevin modes, commands, and runtime controls.
kevin-enlighten
Explain a topic to someone with no background as a self-contained HTML picture explainer.
kevin-compress
Compress an answer without losing required information or safety warnings.
kevin-commit
Generate a terse Conventional Commits message from the staged diff.