This commit is contained in:
2026-04-12 01:06:31 +07:00
commit 10d660cbcb
1066 changed files with 228596 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
# Init Workflow
## Phase 1: Parallel Codebase Scouting
1. Scan the codebase and calculate the number of files with LOC in each directory (skip credentials, cache or external modules directories, such as `.claude`, `.opencode`, `.git`, `tests`, `node_modules`, `__pycache__`, `secrets`, etc.)
2. Target directories **that actually exist** - adapt to project structure, don't hardcode paths
3. Activate `ck:scout` skill to explore the code base and return detailed summary reports to the main agent
4. Merge scout reports into context summary
## Phase 2: Documentation Creation (docs-manager Agent)
**CRITICAL:** You MUST spawn `docs-manager` agent via Task tool with merged reports. Do not wait for user input.
Pass the gathered context to docs-manager agent to create initial documentation:
- `README.md`: Update README with initial documentation (keep it under 300 lines)
- `docs/project-overview-pdr.md`: Project overview and PDR (Product Development Requirements)
- `docs/codebase-summary.md`: Codebase summary
- `docs/code-standards.md`: Codebase structure and code standards
- `docs/system-architecture.md`: System architecture
- `docs/project-roadmap.md`: Project roadmap
- `docs/deployment-guide.md` [optional]: Deployment guide
- `docs/design-guidelines.md` [optional]: Design guidelines
## Phase 3: Size Check (Post-Generation)
After docs-manager completes:
1. Run `wc -l docs/*.md 2>/dev/null | sort -rn` to check LOC
2. Use `docs.maxLoc` from session context (default: 800)
3. For files exceeding limit:
- Report which files exceed and by how much
- docs-manager should have already split proactively
- If still oversized, ask user: split now or accept as-is?

View File

@@ -0,0 +1,18 @@
# Summarize Workflow
Activate `ck:scout` skill to analyze the codebase and update `docs/codebase-summary.md` and respond with a summary report.
## Arguments
$1: Focused topics (default: all)
$2: Should scan codebase (`Boolean`, default: `false`)
## Focused Topics
<focused_topics>$1</focused_topics>
## Should Scan Codebase
<should_scan_codebase>$2</should_scan_codebase>
## Important
- Use `docs/` directory as the source of truth for documentation.
- Do not scan the entire codebase unless the user explicitly requests it.
- **Do not** start implementing.

View File

@@ -0,0 +1,59 @@
# Update Workflow
## Phase 1: Parallel Codebase Scouting
1. Scan the codebase and calculate the number of files with LOC in each directory (skip `.claude`, `.opencode`, `.git`, `tests`, `node_modules`, `__pycache__`, `secrets`, etc.)
2. Target directories **that actually exist** - adapt to project structure
3. Activate `ck:scout` skill to explore the code base and return detailed summary reports
4. Merge scout reports into context summary
## Phase 1.5: Parallel Documentation Reading
**You (main agent) must spawn readers** - subagents cannot spawn subagents.
1. Count docs: `ls docs/*.md 2>/dev/null | wc -l`
2. Get LOC: `wc -l docs/*.md 2>/dev/null | sort -rn`
3. Strategy:
- 1-3 files: Skip parallel reading, docs-manager reads directly
- 4-6 files: Spawn 2-3 `Explore` agents
- 7+ files: Spawn 4-5 `Explore` agents (max 5)
4. Distribute files by LOC (larger files get dedicated agent)
5. Each agent prompt: "Read these docs, extract: purpose, key sections, areas needing update. Files: {list}"
6. Merge results into context for docs-manager
## Phase 2: Documentation Update (docs-manager Agent)
**CRITICAL:** You MUST spawn `docs-manager` agent via Task tool with merged reports and doc readings.
Pass the gathered context to docs-manager agent to update documentation:
- `README.md`: Update README (keep it under 300 lines)
- `docs/project-overview-pdr.md`: Update project overview and PDR
- `docs/codebase-summary.md`: Update codebase summary
- `docs/code-standards.md`: Update codebase structure and code standards
- `docs/system-architecture.md`: Update system architecture
- `docs/project-roadmap.md`: Update project roadmap
- `docs/deployment-guide.md` [optional]: Update deployment guide
- `docs/design-guidelines.md` [optional]: Update design guidelines
## Additional requests
<additional_requests>
$ARGUMENTS
</additional_requests>
## Phase 3: Size Check (Post-Update)
After docs-manager completes:
1. Run `wc -l docs/*.md 2>/dev/null | sort -rn` to check LOC
2. Use `docs.maxLoc` from session context (default: 800)
3. For files exceeding limit: report and ask user
## Phase 4: Documentation Validation (Post-Update)
Run validation to detect potential hallucinations:
1. Run: `node .opencode/scripts/validate-docs.cjs docs/`
2. Display validation report (warnings only, non-blocking)
3. Checks: code references, internal links, config keys
## Important
- Use `docs/` directory as the source of truth.
- **Do not** start implementing.