com um clique
discover-subsystems
Discover and document subsystems from code analysis
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Discover and document subsystems from code analysis
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Collaboratively refine a high-level ambition into a set of chunk prompts.
Migrate the project's ACTIVE chunks to the present-tense, intent-owning standard. Audits each chunk's goal against the code it claims to govern; rewrites retrospective framing inline; logs over-claims that need operator triage; historicalizes chunks with no enduring intent. Designed for full-corpus migrations — fans out across many parallel sub-agents at 5 chunks per agent.
Create a new chunk of work and refine its goal. Use when the operator wants to start new intent-bearing work, chunk something, define a piece of work, or break work into a chunk.
Update code references in the current chunk and move both the PLAN.md and the GOAL.md to the ACTIVE state.
Wake an entity by loading its identity, memories, and operational context
Set up a project steward via interactive interview
| name | discover-subsystems |
| description | Discover and document subsystems from code analysis |
Discovery-specific tips:
ve migration status to check progress at any timeve migration pause to pause from CLI (or say "pause" during the workflow)The operator has provided the following input:
$ARGUMENTS
First, check if a discovery is already in progress:
ve migration status subsystem_discovery
If discovery exists: The command shows the current status. Go to Resuming Discovery section below.
If no discovery exists: The command reports "not found". Continue to Step 2: Initialize Discovery.
The ve migration status command from Step 1 shows the current status. Handle based on that status:
Create the discovery using the CLI:
ve migration create subsystem_discovery
This command will:
The template includes <!-- GUIDANCE: --> blocks explaining each section. Keep these
comments until discovery reaches COMPLETED status - they help agents understand the
artifact structure when resuming.
Read the created MIGRATION.md to understand:
Follow the domain-oriented bootstrap workflow at:
docs/investigations/bidirectional_doc_code_sync/prototypes/domain_oriented_bootstrap_workflow.md
Execute the workflow phases, saving outputs to the analysis/ directory.
analysis/phaseN_[name].mdDuring analysis, watch for these signals that need operator input:
| Signal | Question Type | Example |
|---|---|---|
| Overlapping responsibilities | BOUNDARY | "Should logging be part of core or infrastructure?" |
| Ambiguous naming | NAMING | "Is 'task_management' or 'workflow_engine' clearer?" |
| Unclear scope inclusion | SCOPE_IN | "Is error handling part of this subsystem?" |
| Multiple valid groupings | MERGE/SPLIT | "Should these be one or two subsystems?" |
After Phase 6 completes:
Generate subsystem proposals in proposals/ directory:
proposals/[subsystem_name]/OVERVIEW.md for each proposed subsystemGenerate pending questions in questions/ directory:
questions/pending_questions.md if questions existUpdate MIGRATION.md:
Go to Step 4: Refinement Loop
Present proposed subsystems to operator and gather input.
IMPORTANT: When presenting questions to the operator, you MUST use the AskUserQuestion tool. Do NOT output questions as plain text. The AskUserQuestion tool provides a better user experience by:
For each subsystem with pending questions, use the AskUserQuestion tool with:
header: Short label like "Boundary" or "Scope"question: The specific question about the subsystemoptions: 2-4 concrete options with descriptions and implicationsExample tool usage for a boundary question:
{
"questions": [
{
"header": "Boundary",
"question": "Should logging functionality be part of the core subsystem or infrastructure?",
"options": [
{"label": "Core subsystem", "description": "Logging is tightly coupled to business logic and benefits from shared context"},
{"label": "Infrastructure", "description": "Logging is a cross-cutting concern that should be independent"},
{"label": "Split", "description": "Business logging in core, technical logging in infrastructure"}
],
"multiSelect": false
}
]
}
First, provide a summary of your findings, then use AskUserQuestion for any questions:
I've analyzed your codebase and identified [N] subsystems. Here's what I found:
## Proposed Subsystems
### 1. [Subsystem Name] (Confidence: X%)
**What it does**: [Intent summary from analysis]
**Includes**:
- [capability]
- [capability]
**Key invariants**:
- [inferred rule]
- [inferred rule]
### 2. [Next subsystem]...
---
After presenting the summary, use AskUserQuestion to ask about next steps AND any pending subsystem questions. You can ask up to 4 questions at once, so batch questions when possible:
{
"questions": [
{
"header": "Next step",
"question": "How would you like to proceed with the discovery?",
"options": [
{"label": "Answer questions", "description": "I'll answer questions about subsystem boundaries and scope"},
{"label": "See details", "description": "Show me more detail about a specific subsystem"},
{"label": "Pause for team", "description": "Pause discovery so my team can review the proposals"},
{"label": "Approve all", "description": "Skip remaining questions and approve all proposals as-is"}
],
"multiSelect": false
},
{
"header": "Boundary",
"question": "[First pending question about subsystem boundaries]",
"options": [/* 2-4 options */],
"multiSelect": false
}
]
}
If operator answers a question:
If operator requests pause:
questions/pending_questions.md with all pending questionsDiscovery paused.
**Current state**:
- Phases completed: 1-6
- Subsystems proposed: [N]
- Subsystems approved: [M]
- Questions pending: [P]
**For team review**, see:
- `docs/migrations/subsystem_discovery/MIGRATION.md` - Status
- `docs/migrations/subsystem_discovery/questions/pending_questions.md` - Questions
- `docs/migrations/subsystem_discovery/proposals/` - Subsystem drafts
**To resume**: Run `/discover-subsystems`
If operator approves all:
If operator wants more detail:
Exit when ALL of:
Then: Update MIGRATION.md status to EXECUTING, go to Step 5
Create the final subsystem documentation.
docs/subsystems/[name]/Verify:
Set final state:
status: COMPLETED
completed: [timestamp]
Discovery complete!
## Summary
- Subsystems created: [N]
## What Was Created
- New subsystems in docs/subsystems/:
- [subsystem_name] - [brief intent]
- [subsystem_name] - [brief intent]
## Human Review Needed
[If any [NEEDS_HUMAN] items remain in subsystems]
- [subsystem]/OVERVIEW.md: [section] needs human input
## Next Steps
- Use /subsystem-discover to create additional subsystems
- Add code backreferences: `# Subsystem: docs/subsystems/[name]`
- Consider using /chunk-create for implementation work
The full discovery log is in docs/migrations/subsystem_discovery/MIGRATION.md
At any point, if operator says "pause", "stop", "wait", "let me think", or similar: