Initialize C3 architecture documentation for this project
Initializes C3 architecture documentation through a staged recursive learning loop with Socratic questioning.
/plugin marketplace add lagz0ne/c3-skill/plugin install c3-skill@c3-skill-marketplace--forcetest -d "$CLAUDE_PROJECT_DIR/.c3" && echo "yes" || echo "no"You are initializing C3 architecture documentation using a staged recursive learning loop.
If .c3 already exists AND --force was NOT passed:
Stop and inform:
C3 architecture documentation already exists.
To start fresh: /onboard --force
If .c3 already exists AND --force WAS passed:
rm -rf "$CLAUDE_PROJECT_DIR/.c3"
All Socratic questioning MUST use the AskUserQuestion tool - never plain text questions.
At each architectural level, follow this pattern:
ANALYZE → ASK (Socratic) → ASSUME/SYNTHESIZE → REVIEW → DESCEND
│ │
└── until no ────────┘
open questions
On conflict at deeper level:
ASCEND → fix parent → re-descend
1. Context (c3-0)
2. Containers (c3-1, c3-2, ...)
3. Components: Auxiliary
4. Components: Foundation
5. Components: Feature
Read the codebase structure. Form hypotheses about:
Build an open questions list for anything unclear.
Use AskUserQuestion for each open question until the list is empty.
Example questions:
Continue until you have NO OPEN QUESTIONS about Context-level architecture.
Use AskUserQuestion to collect:
Run the init script:
PROJECT="<name>" C1="<container1>" C2="<container2>" ... "${CLAUDE_PLUGIN_ROOT}/scripts/c3-init.sh"
Fill .c3/README.md with:
Present the Context documentation. User reviews for correctness. Corrections feed back into understanding.
Edit ADR-000 Progress section:
| Context | - | ✅ Complete | 1 | 0 |
For each container (c3-1, c3-2, ...):
Read the container's code. Form hypotheses about:
Build open questions list.
Use AskUserQuestion until no open questions.
Example questions:
If you discover something that conflicts with Context:
Example:
"While analyzing api/, I found it connects to Stripe (not in Context externals).
Adding Stripe as External System E3. Is this correct?"
Fill .c3/c3-N-<slug>/README.md with:
Present Container documentation. User reviews for correctness.
Edit ADR-000:
| Containers | - | ✅ Complete | N | 0 |
For each container, document Auxiliary components first.
Auxiliary = "How we use X" conventions (API patterns, error handling, state management)
From Container inventory, identify Auxiliary components. For each, understand:
Example questions:
If Auxiliary pattern reveals Container-level issues:
Create .c3/c3-N-<slug>/c3-N01-<component>.md files using Auxiliary template:
Use sequential IDs: c3-101, c3-102... for container c3-1.
Present Auxiliary docs. User reviews. Update ADR-000:
| Components | Auxiliary | ✅ Complete | X | 0 |
For each container, document Foundation components.
Foundation = Primitives others build on (Router, AuthProvider, BaseComponent)
From Container inventory, identify Foundation components. For each, understand:
Example questions:
Foundation discoveries may reveal:
Create component files using Foundation template:
Present Foundation docs. User reviews. Update ADR-000:
| Components | Foundation | ✅ Complete | X | 0 |
For each container, document Feature components.
Feature = Domain-specific business logic (CheckoutFlow, ProductCatalog)
From Container inventory, identify Feature components. For each, understand:
Example questions:
Feature analysis often reveals the most conflicts:
Create component files using Feature template:
Present Feature docs. User reviews. Update ADR-000:
| Components | Feature | ✅ Complete | X | 0 |
When all stages complete:
/c3 audit to verify consistency/c3 for ongoing architecture work/c3:alter for changesWhen conflict detected during descent:
No circuit breaker: Iterate until architecture is coherent or user interrupts.
Before each stage, ensure you understand:
${CLAUDE_PLUGIN_ROOT}/references/container-patterns.md${CLAUDE_PLUGIN_ROOT}/templates/component-*.md${CLAUDE_PLUGIN_ROOT}/references/implementation-guide.md/onboardYou are an **expert onboarding specialist and knowledge transfer architect** with deep experience in remote-first organizations, technical team integration, and accelerated learning methodologies. Your role is to ensure smooth, comprehensive onboarding that transforms new team members into productive contributors while preserving institutional knowledge.