Skip to content
aurora-context-generator logo

From the YAML, extract

aurora-context-generator

Generates CONTEXT.md documentation for bounded contexts by exploring existing code and YAML definitions. Trigger: When user asks to document a bounded context, generate CONTEXT.md, or analyze a domain.

SKILL.md

Full skill instructions

When to Use

  • User wants to generate/​update CONTEXT.md for a bounded context
  • User needs to document an existing domain based on code
  • Analyzing a bounded context structure

Critical Patterns

1. Exploration First

Before generating, ALWAYS explore the bounded context:

1. Find all .aurora.yaml files in cliter/​{context}/
2. Read each YAML to extract modules, fields, relationships
3. Explore src/​@api/​{context}/ for resolvers, controllers, DTOs
4. Explore src/​@apps/​{context}/ for handlers, services, domain logic
5. Identify business rules from code patterns (guards, validators, handlers)

2. Information Sources

SourceWhat to Extract
cliter/​{context}/​*.aurora.yamlModules, fields, relationships, aggregates
src/​@api/​{context}/API endpoints, resolvers, DTOs
src/​@apps/​{context}/​*/​application/Commands, queries, handlers, use cases
src/​@apps/​{context}/​*/​domain/Value objects, entities, business rules
src/​@apps/​{context}/​*/​infrastructure/Repositories, external integrations

3. Module Discovery from YAML

Read .aurora.yaml files and extract:

# From the YAML, extract:
boundedContextName: business-partner-portal # Context name
moduleName: partner # Module name
moduleNames: partners # Plural
aggregateName: Partner # Aggregate

# From properties, infer:
# - Field types and relationships
# - Required fields (business rules)
# - Indexes (query patterns)

4. Business Rules Discovery

Look for patterns in code:

Code PatternBusiness Rule Type
@Guards() decoratorsAccess control rules
Validators in handlersData validation rules
if/​throw in domainDomain invariants
Value ObjectsData constraints
Saga/​EventsProcess rules

Generation Process

  1. Receive bounded context name from user

  2. Explore code structure:

    # Find all YAML definitions
    glob: cliter/​{context}/​*.aurora.yaml
    
    # Find application handlers
    glob: src/​@apps/​{context}/​**/​handlers/​**/​*.handler.ts
    
    # Find domain entities and value objects
    glob: src/​@apps/​{context}/​**/​domain/​**/​*.ts
    
  3. Read and analyze each found file

  4. Extract information:

    • Modules from YAML files
    • Business flows from handlers (commands/​queries)
    • Business rules from validators and guards
    • Dependencies from imports
  5. Generate CONTEXT.md with discovered information

  6. Write to cliter/​{context}/​CONTEXT.md

Output Structure

# {Bounded Context Name}

## Purpose

{Inferred from module descriptions and aggregate names}

## Modules

| Module   | Responsibility                       |
| -------- | ------------------------------------ |
| {module} | {Inferred from aggregate and fields} |

## Key Business Rules

{Extracted from code analysis}

- Rule from guards/​validators
- Rule from domain invariants
- Rule from value object constraints

## Main Flows

{Extracted from command/​query handlers}

1. **{CommandName}**: {Description from handler}
2. **{QueryName}**: {Description from handler}

## Dependencies

- **Uses**: {From imports analysis}
- **Used by**: {From reverse dependency search}

## Technical Notes

- Aggregate roots identified
- Event patterns found
- Integration points discovered

Example Exploration

For business-partner-portal:

# Step 1: Find YAMLs
glob: cliter/​business-partner-portal/​*.aurora.yaml

# Step 2: Read each YAML
read: cliter/​business-partner-portal/​partner.aurora.yaml

# Step 3: Find handlers
glob: src/​@apps/​business-partner-portal/​**/​handlers/​**/​*.ts

# Step 4: Find domain logic
glob: src/​@apps/​business-partner-portal/​**/​domain/​**/​*.ts

# Step 5: Analyze imports for dependencies
grep: "from '@api/" in src/​@apps/​business-partner-portal/

Commands

# Explore bounded context structure
eza -T cliter/​{context}/
eza -T src/​@apps/​{context}/

# Find all modules
fd ".aurora.yaml" cliter/​{context}/

# Find all handlers
fd "handler.ts" src/​@apps/​{context}/

User Interaction

If code exploration reveals ambiguity, ask user:

  1. Purpose clarification: "Based on the modules found ({list}), is this context about {inferred purpose}?"
  2. Missing information: "I couldn't find business rules in code. Can you describe the key constraints?"
  3. Dependencies: "I found imports from {contexts}. Are there other dependencies?"

Resources

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View