Loading...
Loading...
Navigates C3 architecture docs and explores corresponding code to answer architecture questions. Use when the user asks: - "where is X", "how does X work", "explain X", "show me the architecture" - "find component", "what handles X", "diagram of X", "visualize X" - "describe X", "list components", "trace X", "flow of X" - References C3 IDs (c3-0, c3-1, adr-*) <example> Context: Project with .c3/ directory user: "explain what c3-101 does and how it connects to other components" assistant: "Using c3-query to navigate the architecture docs." </example> <example> Context: Project with .c3/ directory user: "show me a diagram of the C3 architecture" assistant: "Using c3-query to generate an architecture overview." </example> DO NOT use for changes (route to c3-change). DO NOT use for pattern artifact management — listing, creating, updating refs (route to c3-ref). Requires .c3/ to exist.
npx skill4agent add lagz0ne/c3-skill c3-queryc3-navigatornpx -y @lagz0ne/c3x list --jsonThis project doesn't have C3 docs yet. Use the c3-onboard skill to create documentation first.
references/skill-harness.mdreferences/layer-navigation.mdreferences/constraint-chain.mdQuery → Load Topology (CLI) → Clarify Intent → Navigate Layers → Extract References → Explore Code
│
└── Use AskUserQuestion if ambiguousQuery Progress:
- [ ] Step 0a: Topology loaded via `npx -y @lagz0ne/c3x list --json`
- [ ] Step 0b: Intent clarified (or skipped if specific)
- [ ] Step 1: Context navigated (found relevant container/component from JSON)
- [ ] Step 2: References extracted (code paths, symbols — Read docs for body content)
- [ ] Step 3: Code explored (verified against docs)
- [ ] Response delivered with layer, refs, insightsnpx -y @lagz0ne/c3x list --jsonnpx -y @lagz0ne/c3x list --json.c3/## Code References| Doc Section | Extract For Code |
|---|---|
| Component name | Class/module names |
| Direct file paths, symbols |
| Technology | Framework patterns |
| Entry points | Main files, handlers |
## Code References## Related Refsref-*src/auth/**/*.ts## Code References| Type | User Says | Response |
|---|---|---|
| Docs | "where is X", "explain X" | Docs + suggest code exploration |
| Code | "show me code for X" | Full flow through code |
| Deep | "explore X thoroughly" | Docs + Code + Related |
| Constraints | "what rules/constraints apply to X" | Full constraint chain |
references/constraint-chain.md| Situation | Action |
|---|---|
| Topic not in C3 docs | Search code directly, suggest documenting if significant |
| Spans multiple containers | List all affected containers, explain relationships |
| Docs seem stale | Note discrepancy, suggest running c3-audit or c3-change skill to fix |
User: "Where is authentication handled?"
Step 0a: Run `npx -y @lagz0ne/c3x list --json` → JSON shows c3-2-api container, c3-201-auth-middleware component with title "Auth Middleware"
Step 1: Match "authentication" → c3-201-auth-middleware (from JSON relationships + title)
Step 2: Read .c3/c3-2-api/c3-201-auth-middleware.md → Get code refs (need body content)
Response:
**Layer:** c3-201 (Auth Middleware)
Authentication is handled by the AuthMiddleware component in the API container.
**Code References:**
- `src/api/middleware/auth.ts` - JWT validation
- `src/api/middleware/session.ts` - Session management
**Key Insights:**
Uses RS256 for JWT signing. Sessions stored in Redis.
**Related:** See c3-202-user-service for user lookupUser: "How does error handling work?"
Step 0a: Run `npx -y @lagz0ne/c3x list --json` → JSON shows ref-error-handling entity, cited by c3-201, c3-203, c3-205
Step 1: Match "error handling" → ref-error-handling (from JSON title + relationships)
Response:
**Pattern:** ref-error-handling
Error handling follows a centralized pattern documented in refs.
**Pattern Summary:**
- All errors extend BaseError class
- HTTP errors map to status codes via errorToStatus()
- Logged with correlation ID
**Used By:** c3-201, c3-203, c3-205**Layer:** <c3-id> (<name>)
<Architecture from docs>
**Code References:**
- `path/file.ts` - <role>
**Key Insights:**
<Observations from code>
**Related:** <navigation hints>references/constraint-chain.md