Usar para exploración abierta cuando el usuario quiere investigar, aprender, o mapear un dominio que no entiende completamente todavía. Gestiona líneas de investigación con ciclos Plan-Act-Observe-Reflect, grounded theory, y conexiones de conocimiento entre temas. Usar este skill siempre que el usuario exprese curiosidad sobre un tema, quiera explorar o investigar algo, haga preguntas abiertas y amplias, mencione iniciar una nueva investigación, o quiera documentar observaciones y patrones — incluso si no dice "discover" ni "nueva línea", incluso si la pregunta parece simple de responder directamente, e incluso si solo dice "quiero investigar sobre X" o "I want to look into Y." (No para: evaluar claims específicos = hypothesize, planificar tareas = roadmap.)
Parse $ARGUMENTS to determine subcommand. First token = subcommand, rest = args.
| Input | Subcommand | Args |
|---|---|---|
| (empty) | → status | — |
init my-project | → init | my-project |
new-line topic-name | → new-line | topic-name |
cycle line-name | → cycle | line-name |
reflect line-name | → reflect | line-name |
theory theory-name | → theory | theory-name |
status | → status |
| — |
update-map | → update-map | — |
interlink | → interlink | — |
review-patterns | → review-patterns | — |
research topic [--deep] | → research | topic [--deep] |
resume line-name | → resume | line-name |
@path/to/file | → intake | file path (without @) |
@ detection: If $ARGUMENTS starts with @, strip the @ prefix and route to intake with the remaining path as the file argument.
Fork detector: Not a subcommand — it's a behavior. Claude should proactively detect forks during any subcommand (see "Fork Detection" section at the end).
Requerida para queries, validacion y grafos. NO requerida para creating/editing markdown files directly.
Instalacion:
curl -fsSL https://raw.githubusercontent.com/pablontiv/rootline/master/install.sh | bash
Gate check: Antes de ejecutar comandos rootline, verificar:
command -v rootline
Si no esta disponible -> informar al usuario:
rootlineno esta instalado. Es requerido para queries y validacion en discover. Instalar con:curl -fsSL https://raw.githubusercontent.com/pablontiv/rootline/master/install.sh | bash
Alcance del gate: Solo bloquea operaciones que ejecutan rootline (validate, query, tree, graph). La creacion y edicion directa de archivos .md (new-line, cycle, theory) puede proceder sin rootline — solo las validaciones post-creacion y las queries requieren rootline.
Rootline is the data layer for discover. It reads YAML frontmatter from .md files, validates against .stem schemas, and supports structured queries.
.stem schemas exist in each discover directory: lines/.stem, closed/.stem, paused/.stem, theories/.stem, backlog/.stem, intake/.stem. These define required frontmatter fields per directory.
isIndex field: Rootline's built-in field distinguishes index records (README.md) from content records. Use isIndex == false to query only content documents.
YAML frontmatter: All documents have frontmatter with at minimum a tipo field:
tipo: question — QUESTION.md files in lines/paused/tipo: field-log — FIELD-LOG.md filestipo: closure — CLOSURE.md files in closed/tipo: theory — theory documents in theories/tipo: backlog-question — backlog entriesestado, fecha_inicio, linea, ciclos_registrados, confianza, etc.Use rootline commands instead of manual grep/file scanning:
rootline query <path> --where "expr" --output table — search records by frontmatterrootline tree <path> --output table|json — hierarchical view with countsrootline validate <path> — check document against .stem schemarootline validate --all <path> — validate all documents in a directoryrootline graph <path> --format mermaid — connection/link graphrootline graph <path> --check — validate wikilinks and detect broken/orphaned linkscurrent-state.md and connections.md are kept — they serve as rules files loaded into Claude's context. Rootline queries supplement but don't replace context injection.
Initialize an R&D project in the current directory. Creates directory structure (intake/, backlog/, lines/, theories/, paused/, closed/, shared/), copies templates, generates MAP.md and state files.
Args: [project-name] — optional.
See ref-init.md for the full procedure.
Create a new line of inquiry with anti-presupposition process.
Args: [name] — kebab-case name for the line.
lines/1.5. Prior work check (si command -v backscroll >/dev/null 2>&1):
backscroll search "[line-topic]" --robot --max-tokens 2000
Si hay resultados, mostrar al usuario: sesiones previas discutieron este tema. Preguntar: referenciar esos hallazgos o empezar desde cero?
Create structure: lines/[name]/ with:
QUESTION.md — from shared/templates/QUESTION.mdFIELD-LOG.md — from shared/templates/FIELD-LOG.mdGuide QUESTION.md completion:
Anti-presupposition process: Detect presuppositions, reformulate observationally, generate alternatives. See anti-presupposition.md — "In new-line" section (full process). Document results in QUESTION.md: presuppositions, alternatives, reformulated question.
Validate with rootline (if available):
rootline validate lines/[name]/QUESTION.md lines/[name]/FIELD-LOG.md
Update system: Update .claude/rules/current-state.md. MAP.md update deferred to /discover update-map.
Document a Plan-Act-Observe-Reflect cycle for a line.
Args: [line-name] — name of line in lines/.
Prepare: Open lines/[name]/FIELD-LOG.md, determine cycle number, create section ## Cycle N — [today's date].
PLAN phase: Ask what they'll do and what they expect. Document in ### Cycle intention.
Presupposition validation: Check if QUESTION.md has anti-presupposition sections and review/update. See anti-presupposition.md — "In cycle" section.
ACT phase: Document concrete actions, references, code, decisions in ### What I did.
command -v backscroll >/dev/null 2>&1, buscar observaciones previas: backscroll search "TOPIC" --robot --max-tokens 2000 para evitar re-recorrer terreno cubierto en sesiones pasadas.OBSERVE phase: Ask what happened, what surprised, what wasn't understood. Document in ### Observations.
REFLECT phase: Ask what was learned, what it means for the central question, what patterns emerge. Document in ### Reflection.
Closure: Document emerging questions in ### Emerging questions. Ask: next cycle, reflection point, or pause? Document in ### Next cycle.
Update system: Update .claude/rules/current-state.md and connections.md if connections emerge.
Structured reflection to evaluate continue/pause/close a line.
Args: [line-name] — if omitted, check active lines and ask.
Read state: Open FIELD-LOG.md, count cycles, review latest reflections.
Guide reflection:
Present decisions:
| Decision | When | Action |
|---|---|---|
| CONTINUE | More to explore | Next cycle |
| PAUSE | Low energy or urgent | Move to paused/ |
| CLOSE | Saturation reached | Theory review → document → move to closed/ |
| FORK | New question emerged | Run /discover new-line |
Execute:
paused/, update state. To resume later: /discover resume [name]closed/, update state. Then validate with rootline (if available):
rootline validate closed/[name]/CLOSURE.md
rootline validate --all closed/[name]/
Check if any intake/ files referenced by this line should graduate to /hypothesize or /roadmap — suggest next step for each.Validations: Line must exist. Don't allow closing without at least 2 cycles (unless explicit).
Document an emergent theory in theories/.
Args: [theory-name] — kebab-case.
Create theories/[name].md from THEORY.md template.
Guide documentation:
Confidence level: Emergent / Developing / Consolidated
Update system: Update connections.md, link from originating line(s).
Show system state. Read-only.
Read state: .claude/rules/current-state.md for context injection, then query rootline for live data:
# Active lines
rootline query lines/ --where 'tipo == "question"' --output table
# Paused lines
rootline query paused/ --where 'tipo == "question"' --output table
# Closed lines
rootline query closed/ --where 'tipo == "closure"' --output table
# Theories
rootline query theories/ --output table
# Backlog count
rootline query backlog/ --count
# Full tree view
rootline tree lines/ --output table
If rootline unavailable, fall back to reading .claude/rules/current-state.md + MAP.md manually.
Display:
## Discover — System Status
### Active Lines
[List with name and current cycle]
### Backlog
[Count]
### Theories
[Count]
### Workflow
/discover status → /discover new-line → [inquire] → /discover cycle → /discover reflect
│
┌──────────────────────────────────┼────────────────────┐
│ │ │
CONTINUE PAUSE CLOSE
(back to inquire) (/discover theory if pattern)
### Last Session
[Summary]
Additional: Report paused lines, emergent patterns, inconsistencies (>3 active lines).
Sync rule: Only /discover update-map touches MAP.md. Other subcommands update current-state.md and connections.md.
Scan entire system and regenerate MAP.md.
Scan via rootline (if available):
# Generate full system view (content docs only, excludes README.md index files)
rootline tree . --where 'isIndex == false' --output table
# Check connections via graph
rootline graph . --format mermaid
# Validate all schemas across the project
rootline validate --all
If rootline unavailable, fall back to manually scanning: intake/ (reference docs), backlog/ (questions), lines/ (active + cycles), theories/ (confidence), paused/ (reasons), closed/ (dates + theories), shared/ (artifacts).
Connections: Use rootline graph . --check to detect wikilinks and broken references. Supplement with connections.md review.
Regenerate MAP.md with data from rootline queries.
When to run: After new-line, cycle, reflect (PAUSE/CLOSE), theory, or at start of long sessions.
Intake audit: During update-map, check for intake/ files not referenced by any active line or backlog item. Report orphaned files and suggest: graduate to /hypothesize or /roadmap, attach to an existing line, or archive.
See ref-analysis.md for the full procedures for these less-used subcommands.
Resume a paused line of inquiry.
Args: [line-name] — name of line in paused/.
Validate: Check that paused/[name]/ exists. If not, list available paused lines.
Move: Move paused/[name]/ back to lines/[name]/.
Check capacity: If already 3 active lines, warn and ask which to pause first.
Review state: Read QUESTION.md and latest cycle in FIELD-LOG.md. Present a summary so the user can re-orient.
4.5. Session history (si command -v backscroll >/dev/null 2>&1):
backscroll search "[line-name]" --robot --max-tokens 2000
Mostrar hallazgos relevantes junto con el review de QUESTION.md/FIELD-LOG.md.
Update system: Update .claude/rules/current-state.md — move line from "Paused" to "Active".
Next step: Ask: "Ready for a new cycle? (/discover cycle [name])" or "Want to review the question first?"
Research a topic using web search and synthesize.
Args: [topic] [--deep] — --deep = 8-10 sources, default = 3-5.
Presupposition validation: Analyze topic for presuppositions, propose broader reformulation, generate alternative queries. See anti-presupposition.md — "In research" section.
Execute search: WebSearch for each query. Filter by relevance and authority.
Synthesize:
## Research: [topic]
**Sources consulted:** [N]
### Definition/Concept
### Key Points
### Applications/Examples
### Limitations/Criticisms
### Connection with central question
### Topic presuppositions
### Sources
Document: If active line exists, add "### Lateral research" in FIELD-LOG.md.
Next step: "Does this change your understanding?" / "Explore further?" / "Continue with cycle?"
When Claude can offer: User mentions not understanding something, conceptual gap blocking progress, during reflect when saturated.
Analyze an external file (@path/to/file) and classify it into the appropriate flow entry point (discover line, backlog, hypothesize, roadmap). Extracts 7 signals, runs anti-presupposition scan, suggests adaptations.
Trigger: $ARGUMENTS starts with @. Strip the @ to get the file path.
See ref-intake.md for the full procedure, output format, and edge cases.
Not a subcommand — Claude applies this during any interaction. When responding about a topic NOT the central question, or a new concept/question emerges that deserves its own exploration, detect the fork.
See ref-analysis.md — "Fork Detection" section for the full diagnostic process, Glaser test, and presentation template.