com um clique
subsystem-discover
Guide collaborative discovery of an emergent subsystem.
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
Guide collaborative discovery of an emergent subsystem.
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 | subsystem-discover |
| description | Guide collaborative discovery of an emergent subsystem. |
The operator has provided the following input:
$ARGUMENTS
Examine $ARGUMENTS to determine whether this is:
Existing subsystem (continuing discovery): If $ARGUMENTS matches pattern
docs/subsystems/<short_name> or just <short_name> (e.g., validation,
docs/subsystems/frontmatter), this is a request to continue discovery
on an existing subsystem. Skip to the Resuming Discovery section below.
New subsystem (starting discovery): Otherwise, treat $ARGUMENTS as a
high-level description of a subsystem pattern to discover. Continue with
Phase 0: Name Derivation below.
If continuing an existing subsystem:
"This subsystem is in DISCOVERING status. Here's what's been captured so far:
- Intent: [populated/empty]
- Scope: [populated/empty]
- Invariants: [populated/empty]
- Code references: [count]
- Chunk relationships: [count]"
When $ARGUMENTS is a new description, derive and confirm a short name:
Analyze the description and propose a short name:
frontmatter_handling, test_scaffolding)error_accumulation over error_handling)Present the proposed name to the operator:
"Based on your description, I propose the name
<proposed_name>. This captures [rationale for the name choice]. Does this name work, or would you prefer something different?"
Accept confirmation or adjustment from the operator
Register the subsystem:
ve subsystem discover <confirmed_name>
Note the created directory path (e.g., docs/subsystems/frontmatter_handling).
We'll refer to this as <subsystem_directory> below.
Use the operator's description to bootstrap codebase exploration.
Apply these principles to extract actionable investigation paths:
Extract action verbs as function patterns:
parse_, read_, load_Extract domain nouns as type/module patterns:
BaseModel, *Model, validateIdentify enumerated concerns as scope anchors:
"Should" and "consistently" signal inconsistencies:
"End state" descriptions reveal invariants:
Grouping language defines boundaries:
Generate 3-5 search patterns from the description decomposition:
parse.*frontmatter, frontmatter.*parsevalidate.*frontmatter, frontmatter.*valid*frontmatter*.py, *yaml*.pyExecute searches and review results
Categorize findings:
Present findings to operator:
"Based on your description, I found these implementations:
Likely Canonical:
src/frontmatter.py#parse_frontmatter- Uses consistent pattern XPotential Deviations:
src/legacy/parser.py#read_header- Uses different approachUnclear:
src/utils.py#extract_metadata- Related but uncertain if in scopeDoes this match your understanding?"
Refine based on feedback - adjust searches or recategorize as needed
Exit Criteria: Operator confirms the identified implementations match their mental model of the subsystem.
Clarify what's in scope and what's explicitly out.
Ask the operator these questions (from the template's Scope section):
For each discovered implementation, ask: "Is this part of the subsystem?"
Search for related patterns that might be distinct:
Document scope determinations in three categories:
Update the OVERVIEW.md with the Scope section content:
Exit Criteria: Operator confirms scope boundaries; In Scope and Out of Scope
sections are populated in <subsystem_directory>/OVERVIEW.md.
Identify what must always be true about this subsystem.
Ask the operator (from the template's Invariants section):
Hard Invariants: Must never be violated
Soft Conventions: Strongly preferred but flexible in edge cases
Analyze discovered implementations for common patterns that suggest invariants
Ask the operator about requirements vs conventions
Document in OVERVIEW.md:
Exit Criteria: At least one hard invariant or soft convention documented with
rationale in <subsystem_directory>/OVERVIEW.md.
Populate the code_references frontmatter with discovered implementations.
For each discovered implementation, classify its compliance:
When in doubt, mark as PARTIAL and ask the operator.
For each implementation from Phase 1, determine compliance level
Format as symbolic reference: {file_path}#{symbol_path}
:: as nesting separator for nested symbolssrc/validation.py#Validator::validateAdd to frontmatter code_references array:
code_references:
- ref: src/frontmatter.py#parse_frontmatter
implements: "Core parsing logic"
compliance: COMPLIANT
- ref: src/legacy/parser.py#read_header
implements: "Legacy header parsing"
compliance: NON_COMPLIANT
Document NON_COMPLIANT and PARTIAL entries in the Known Deviations section:
Update Implementation Locations section with prose context for COMPLIANT references - explain why they're canonical
Exit Criteria: At least one code_reference in frontmatter; any deviations documented in Known Deviations section.
Find chunks that relate to this subsystem.
Search chunks for references to discovered implementations:
# Search chunk GOAL.md files for file paths
grep -r "src/frontmatter.py" docs/chunks/*/GOAL.md
# Search chunk code_references for overlapping files
grep -r "frontmatter" docs/chunks/*/GOAL.md
Search chunk code_references for overlapping files/symbols
For each relevant chunk, classify relationship:
Update subsystem's chunks frontmatter array:
chunks:
- chunk_id: "validation_enhancements"
relationship: implements
- chunk_id: "chunk_completion"
relationship: uses
Populate Chunk Relationships section with prose:
Exit Criteria: chunks array populated; Chunk Relationships section has at least one entry (or explicitly notes "no related chunks found").
If NON_COMPLIANT references were found, plan for migration.
If no NON_COMPLIANT code_references exist, note this and skip to Phase 7.
For each NON_COMPLIANT reference, draft a consolidation chunk prompt:
/chunk-createUpdate Consolidation Chunks section in OVERVIEW.md:
Ask the operator if any consolidation chunks should be created immediately:
"I've identified [N] non-compliant implementations that could be consolidated. Would you like to create any of these as chunks now, or leave them documented for future work?"
Exit Criteria: Consolidation Chunks section populated for any NON_COMPLIANT code (or section notes "no consolidation needed").
Review completeness and consider transitioning from DISCOVERING to DOCUMENTED.
Review the populated sections:
DISCOVERING → DOCUMENTED: When Intent, Scope, and Invariants are populated and confirmed by the operator.
If all core sections are populated:
"The subsystem documentation is now comprehensive:
- Intent: [summary]
- Scope: [in/out items]
- Invariants: [count] documented
- Code references: [count]
I recommend transitioning status from DISCOVERING to DOCUMENTED. This signals that the core patterns are captured and agents should track any new deviations they discover."
If the operator agrees:
ve subsystem status <subsystem_id> DOCUMENTED
If sections remain incomplete:
"Some sections still need content:
- [list incomplete sections]
The subsystem remains in DISCOVERING status. You can continue discovery later by running
/subsystem-discover <subsystem_id>."
After completing all phases, provide a summary:
"Subsystem discovery complete for
<subsystem_name>:Status: [DISCOVERING/DOCUMENTED] Location:
<subsystem_directory>/OVERVIEW.mdWhat was captured:
- Intent: [brief summary]
- Scope: [N] in-scope, [M] out-of-scope items
- Invariants: [N] hard, [M] soft
- Code references: [N] total ([X] compliant, [Y] partial, [Z] non-compliant)
- Chunk relationships: [N] chunks
- Consolidation items: [N] pending
Next steps:
- [If DISCOVERING] Continue discovery with
/subsystem-discover <id>- [If DOCUMENTED] Subsystem will be referenced as agents work on related code
- [If consolidation items] Create consolidation chunks with
/chunk-create"