| name | 00-context |
| description | Recommended entry for every work session. Classifies session type (greenfield, feature, hotfix, integration, new_service, ops, process), allocates SNNN-slug, writes session-brief and routing-plan, sets active_session. Also gathers context: project mode writes docs/context-brief.md; scoped mode writes docs/context/<slug>.md. Re-invokable for mid-project discovery. Use before requirements, features, live E2E, integrations, or evolve cycles.
|
00 — Context Gathering
Open sessions and produce context briefs for downstream skills.
Protocol: protocol-card.md
Detail: reference.md (Phase 1A–1C detail, ecosystem scan, templates)
Routing: docs/skill-routing.md
Plan ↔ Agent: plan-mode-loop.md — Agent-only producer; seed Goal/Out of scope for the 04 Build Plan Card (no SwitchMode here).
Corpus first
| Mode | Open |
|---|
| Session / routing | docs/CORPUS.md + existing feature-list / spec if present |
| Scoped feature | product + system-spec rows for touched Fn only |
| Project greenfield | Full discovery; template via template-registry.md |
Do not dump docs/domain/** unless the scope is domain mining.
Invocation modes
| Mode | When | Output |
|---|
| session (default) | Any bounded work | docs/sessions/SNNN-slug/ + optional context |
| project | Greenfield / first brief | docs/context-brief.md |
| scoped | Feature / evolve / mid-project | docs/context/<slug>.md |
| resume | active_session exists | Continue routing-plan |
Session type → orchestrator
Routing presets (AskQuestion)
Default for existing apps: Lean.
| Preset | Stages |
|---|
| Lean | 00 → 16 → 01 → 02 → 10 → 13 (+ hotfix/ops overrides) |
| Standard | Lean + 04 → 07 → 08 → 09 → 11 → 12 |
| Full | Standard + 03 / 05 / 06 / greenfield extras |
Record choice + skip rationale in routing-plan.md.
Phase 0 — Session open
- If
active_session exists: AskQuestion — resume / close+new / abandon.
- Classify session type;
open_session → S{NNN}-{slug}.
- Write
session-brief.md + propose routing-plan.md (preset above).
Include a one-sentence Goal and explicit Out of scope — these seed the later
Build Plan Card (plan-mode-loop.md).
- AskQuestion — approve/edit plan; set
active_session; create branch.
- Hand off to orchestrator / first stage. When routing includes 04→07 or 16, Plan
mode is used in those skills; this stage stays in Agent.
UI preview offer (non-deployed)
When session scope includes or may touch a browser UI (frontend, workbench, admin),
AskQuestion once during session open or early scoped discovery:
prompt: "UI reference (non-deployed): Would you like to preview the current UI on a
local / non-deployed instance to ground this session?
This is not staging or production — local or in-repo only. Deployed URLs are for
later verify/deploy stages (12/13), not this context pass."
options:
1. "Yes — show non-deployed / local UI"
2. "No — proceed from docs/repo only"
3. "N/A — no UI in this session"
4. "Let me explain / provide more context"
- If Yes: start or point at the local frontend (dev server / existing local URL).
State explicitly in the reply and session-brief that the instance is non-deployed.
- Do not default to staging/production URLs for this offer.
- Note the choice in
session-brief.md (and scoped brief when used).
Context phases (abbreviated)
| Phase | Project | Scoped |
|---|
| 1A agents | paper/repo/docs as needed | subset for scope |
| 1B ecosystem | optional — reference.md | skip unless cross-repo |
| 1C template | classify — reference.md | skip (use existing) |
| 2–3 issues | cross-ref + AskQuestion | scope-only |
| 4 brief | context-brief.md | docs/context/<slug>.md + index |
Anti-bloat: never append scoped findings into docs/context-brief.md.
State
- Stage key:
stages.00-context; batch updates per protocol-card.
- 00 opens sessions — does not require pre-existing
active_session.
Exit criteria