From fed92973efe92b6da9b8cdbb6fadc0d5ede688ca Mon Sep 17 00:00:00 2001 From: deepak tiwari Date: Tue, 16 Dec 2025 21:54:29 +0530 Subject: [PATCH] feat: add dt-workspace plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI-powered workflow documentation generator from SOW documents. Features: - 8 commands (init, scaffold, populate, export, sync, diagram, clean, presets) - 2 agents (sow-analyzer, doc-completer) - 1 skill with comprehensive references - Support for 9 architecture presets (microservices, serverless, monolith, etc.) Generates complete project documentation: - BDD feature files - API contracts - Database schemas - Technical specs - User flows - Security specs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude-plugin/marketplace.json | 24 ++- .../dt-workspace/.claude-plugin/plugin.json | 9 + plugins/dt-workspace/README.md | 127 ++++++++++++ plugins/dt-workspace/agents/doc-completer.md | 102 ++++++++++ plugins/dt-workspace/agents/sow-analyzer.md | 93 +++++++++ plugins/dt-workspace/commands/clean.md | 84 ++++++++ plugins/dt-workspace/commands/diagram.md | 121 ++++++++++++ plugins/dt-workspace/commands/export.md | 105 ++++++++++ plugins/dt-workspace/commands/init.md | 56 ++++++ plugins/dt-workspace/commands/populate.md | 109 ++++++++++ plugins/dt-workspace/commands/presets.md | 76 +++++++ plugins/dt-workspace/commands/scaffold.md | 126 ++++++++++++ plugins/dt-workspace/commands/sync.md | 99 ++++++++++ .../skills/workflow-generator/SKILL.md | 167 ++++++++++++++++ .../workflow-generator/references/presets.md | 186 ++++++++++++++++++ .../references/sow-format.md | 151 ++++++++++++++ .../references/templates.md | 180 +++++++++++++++++ 17 files changed, 1814 insertions(+), 1 deletion(-) create mode 100644 plugins/dt-workspace/.claude-plugin/plugin.json create mode 100644 plugins/dt-workspace/README.md create mode 100644 plugins/dt-workspace/agents/doc-completer.md create mode 100644 plugins/dt-workspace/agents/sow-analyzer.md create mode 100644 plugins/dt-workspace/commands/clean.md create mode 100644 plugins/dt-workspace/commands/diagram.md create mode 100644 plugins/dt-workspace/commands/export.md create mode 100644 plugins/dt-workspace/commands/init.md create mode 100644 plugins/dt-workspace/commands/populate.md create mode 100644 plugins/dt-workspace/commands/presets.md create mode 100644 plugins/dt-workspace/commands/scaffold.md create mode 100644 plugins/dt-workspace/commands/sync.md create mode 100644 plugins/dt-workspace/skills/workflow-generator/SKILL.md create mode 100644 plugins/dt-workspace/skills/workflow-generator/references/presets.md create mode 100644 plugins/dt-workspace/skills/workflow-generator/references/sow-format.md create mode 100644 plugins/dt-workspace/skills/workflow-generator/references/templates.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 6f29b6b..72496dc 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1670,6 +1670,28 @@ "security", "compliance" ] + }, + { + "name": "dt-workspace", + "source": "./plugins/dt-workspace", + "description": "AI-powered workflow documentation generator from SOW documents - generates comprehensive project docs with BDD features, API contracts, database schemas for 9 architecture presets", + "version": "1.0.0", + "author": { + "name": "Deepak Tiwari", + "url": "https://github.com/deepaktiwari09" + }, + "category": "Documentation", + "homepage": "https://github.com/deepaktiwari09/dt-workspace-plugin", + "keywords": [ + "sow", + "documentation", + "workflow", + "bdd", + "api", + "scaffold", + "microservices", + "serverless" + ] } ] -} \ No newline at end of file +} diff --git a/plugins/dt-workspace/.claude-plugin/plugin.json b/plugins/dt-workspace/.claude-plugin/plugin.json new file mode 100644 index 0000000..e54cd92 --- /dev/null +++ b/plugins/dt-workspace/.claude-plugin/plugin.json @@ -0,0 +1,9 @@ +{ + "name": "dt-workspace", + "version": "1.0.0", + "description": "AI-powered workflow documentation generator from SOW documents - generates comprehensive project documentation with BDD features, API contracts, database schemas, and more", + "author": { + "name": "Deepak Tiwari", + "email": "deepaktiwari3020@gmail.com" + } +} diff --git a/plugins/dt-workspace/README.md b/plugins/dt-workspace/README.md new file mode 100644 index 0000000..52a5a97 --- /dev/null +++ b/plugins/dt-workspace/README.md @@ -0,0 +1,127 @@ +# DT-Workspace Plugin + +AI-powered workflow documentation generator for Claude Code. Generate comprehensive project documentation from Statement of Work (SOW) documents. + +## Features + +- **SOW Analysis**: Extract structured module definitions from requirements documents +- **Multi-Preset Support**: 9 architecture presets (microservices, serverless, monolith, etc.) +- **Complete Documentation**: API contracts, database schemas, BDD features, and more +- **AI Completion**: Fill documentation placeholders with context-aware content +- **ER Diagrams**: Generate entity-relationship diagrams in multiple formats + +## Installation + +### Option 1: Plugin Directory +```bash +claude --plugin-dir /path/to/dt-workspace-plugin +``` + +### Option 2: Copy to Project +```bash +cp -r dt-workspace-plugin/.claude-plugin your-project/ +``` + +## Commands + +| Command | Description | +|---------|-------------| +| `/dt-workspace:init` | Initialize project configuration | +| `/dt-workspace:scaffold` | Generate documentation from SOW | +| `/dt-workspace:populate` | Fill placeholders with AI content | +| `/dt-workspace:export` | Export templates for customization | +| `/dt-workspace:sync` | Rebuild config from filesystem | +| `/dt-workspace:diagram` | Generate ER diagrams | +| `/dt-workspace:clean` | Delete generated documentation | +| `/dt-workspace:presets` | List available presets | + +## Quick Start + +1. **Initialize project**: + ``` + /dt-workspace:init + ``` + +2. **Create SOW file** (`sow.md`) with your requirements + +3. **Generate documentation**: + ``` + /dt-workspace:scaffold + ``` + +4. **Complete placeholders**: + ``` + /dt-workspace:populate + ``` + +## Available Presets + +| Preset | Architecture | +|--------|--------------| +| `microservices` | NestJS with Kafka, WebSocket, PostgreSQL | +| `monolith` | Layered architecture, shared database | +| `serverless` | AWS Lambda, API Gateway, DynamoDB | +| `supabase` | Supabase with PostgreSQL, Auth, Storage | +| `firebase` | Firebase/Firestore, Cloud Functions | +| `nextjs-fullstack` | Next.js App Router, Server Components | +| `graphql-federation` | Apollo Federation with subgraphs | +| `kubernetes` | K8s deployments, Helm charts | +| `event-sourcing` | CQRS with event store | + +## Generated Structure + +``` +workflows/ +├── README.md # Project index +├── / +│ ├── timeline.md # Development sequence +│ └── / +│ ├── README.md # Module overview +│ ├── user-flows/ # User journeys +│ ├── technical-specs.md # Architecture +│ ├── api-contracts.md # API documentation +│ ├── database-schema.md # Data models +│ ├── security-specs.md # Security controls +│ ├── error-handling.md # Error codes +│ └── features/ # BDD Gherkin files +``` + +## Configuration + +The `.dt-workspace` config file: + +```json +{ + "version": "1.0.0", + "projectName": "My Project", + "sowPath": "./sow.md", + "defaultPreset": "microservices", + "outputDirectory": "./workflows", + "generatedPaths": { + "platforms": {} + } +} +``` + +## Template Customization + +Export and customize templates: + +``` +/dt-workspace:export --preset microservices +``` + +Templates saved to `.dt-templates//` for editing. + +## Agents + +- **sow-analyzer**: Analyzes SOW documents and extracts modules +- **doc-completer**: Fills documentation placeholders with detailed content + +## Author + +Deepak Tiwari + +## License + +MIT diff --git a/plugins/dt-workspace/agents/doc-completer.md b/plugins/dt-workspace/agents/doc-completer.md new file mode 100644 index 0000000..171ba91 --- /dev/null +++ b/plugins/dt-workspace/agents/doc-completer.md @@ -0,0 +1,102 @@ +--- +model: sonnet +tools: ["Read", "Write", "Glob", "Grep"] +whenToUse: | + Use this agent to fill documentation placeholders with detailed, context-aware content. + + Context: User has generated documentation with placeholders + user: 'Fill in the placeholders in my API contracts document' + assistant: 'I'll use the doc-completer agent to analyze your documentation and fill in the [To be documented] sections' + + + Context: User wants to complete specific documentation + user: 'Complete the database schema documentation for the user module' + assistant: 'Let me use the doc-completer agent to generate detailed database schema content' + +--- + +# Documentation Completer Agent + +You are an expert technical writer who fills documentation placeholders with detailed, production-ready content. + +## Your Task + +Read documentation files with placeholders like `[To be documented]` and replace them with comprehensive, context-appropriate content. + +## Process + +1. **Gather Context**: + - Read the SOW file for requirements + - Read module README for context + - Understand the preset/architecture being used + - Note related modules and dependencies + +2. **Identify Placeholders**: + - `[To be documented]` + - `[API endpoints to be documented]` + - `[Schema to be documented here]` + - Any `[text]` indicating incomplete content + +3. **Generate Content** based on document type: + +### API Contracts +- REST endpoints with methods, paths, descriptions +- Request/response schemas with types +- Authentication requirements +- Error responses with codes +- Example requests/responses + +### Database Schema +- Table definitions with all columns +- Data types and constraints +- Primary/foreign key relationships +- Indexes for performance +- Migration scripts + +### Technical Specs +- Architecture overview with diagrams (Mermaid) +- Service interactions and data flow +- Technology stack justification +- Scalability considerations +- Performance requirements + +### User Flows +- Step-by-step user journeys +- Decision points and branches +- Error handling paths +- Success criteria +- UI/UX considerations + +### Real-time Events +- Event names and schemas +- Kafka topic configurations +- WebSocket event patterns +- Event ordering and delivery guarantees + +### Security Specs +- Authentication mechanisms +- Authorization rules (RBAC/ABAC) +- Data encryption (at rest/in transit) +- Input validation +- OWASP compliance + +### Error Handling +- Error code taxonomy +- HTTP status code mapping +- User-friendly messages +- Logging and monitoring +- Recovery strategies + +## Output Guidelines + +- **Be specific** - Use realistic names, types, and values +- **Be consistent** - Follow patterns established in existing docs +- **Be complete** - Fill ALL placeholders, don't leave any +- **Be practical** - Generate production-ready content +- **Maintain format** - Preserve markdown structure and headings + +## After Completion + +1. Create backup of original file (`file.md.backup`) +2. Write completed content to original file +3. Report what was filled and any concerns diff --git a/plugins/dt-workspace/agents/sow-analyzer.md b/plugins/dt-workspace/agents/sow-analyzer.md new file mode 100644 index 0000000..7e09b20 --- /dev/null +++ b/plugins/dt-workspace/agents/sow-analyzer.md @@ -0,0 +1,93 @@ +--- +model: sonnet +tools: ["Read", "Write", "Glob", "Grep"] +whenToUse: | + Use this agent to analyze Statement of Work (SOW) documents and extract structured module definitions. + + Context: User has a SOW document and wants to understand its structure + user: 'Analyze my SOW file and extract the modules' + assistant: 'I'll use the sow-analyzer agent to parse your SOW document and extract module definitions' + + + Context: User wants to see what modules are in their requirements + user: 'What modules are defined in sow.md?' + assistant: 'Let me use the sow-analyzer agent to analyze your SOW and identify all modules' + +--- + +# SOW Analyzer Agent + +You are an expert at analyzing Statement of Work (SOW) documents and extracting structured module definitions for software projects. + +## Your Task + +Analyze SOW markdown documents and extract comprehensive module definitions that can be used for documentation generation. + +## Analysis Process + +1. **Read the SOW document** thoroughly +2. **Identify project metadata**: + - Project name + - Target platforms (web, mobile, admin, etc.) + - Overall scope and goals + +3. **Extract modules** - For each distinct module/feature area: + - Create kebab-case ID from name + - Determine which platform(s) it belongs to + - Write concise description (1-2 sentences) + - List all features within the module + - Identify technical components + +4. **Map technical requirements**: + - Backend services needed + - Database types and purposes + - Message queue topics (Kafka/RabbitMQ) + - Real-time events (WebSocket/SSE) + - Cloud services (AWS/GCP/Azure) + - External integrations + +## Output Format + +Return a JSON object with this exact structure: + +```json +{ + "projectName": "Project Name from SOW", + "platforms": ["web-application", "mobile-app", "admin-panel"], + "modules": [ + { + "id": "user-authentication", + "name": "User Authentication", + "platform": "web-application", + "description": "Handle user registration, login, and session management", + "features": [ + "User Registration", + "Email Verification", + "Login/Logout", + "Password Reset", + "Social Login" + ], + "services": ["auth-service", "email-service"], + "databases": ["PostgreSQL (user data)", "Redis (sessions)"], + "kafkaTopics": ["user.registered", "user.verified"], + "websocketEvents": ["session.expired"], + "awsServices": ["SES", "Cognito"] + } + ] +} +``` + +## Guidelines + +- **Be comprehensive** but don't invent features not mentioned in SOW +- **Use consistent naming**: kebab-case for IDs, Title Case for names +- **Group related features** into logical modules +- **Identify cross-platform modules** - same module may appear on multiple platforms +- **Extract implicit requirements** - if SOW mentions "real-time updates", include WebSocket +- **Map to appropriate services** - payment features need payment service, etc. + +## After Analysis + +1. Display a summary of findings +2. Save the JSON to `.dt-workspace-analysis.json` if requested +3. Suggest next steps (run scaffold command) diff --git a/plugins/dt-workspace/commands/clean.md b/plugins/dt-workspace/commands/clean.md new file mode 100644 index 0000000..08b8b82 --- /dev/null +++ b/plugins/dt-workspace/commands/clean.md @@ -0,0 +1,84 @@ +--- +description: "Delete generated documentation and reset config. Removes output directory and clears generatedPaths." +argument-hint: "[--force]" +allowed-tools: ["Read", "Write", "Bash", "Glob"] +--- + +# Clean Generated Documentation + +Delete all generated documentation and reset the configuration. + +## Steps + +### 1. Load Configuration + +Read `.dt-workspace` config to get output directory and generated paths. + +### 2. Show What Will Be Deleted + +Display summary of what will be removed: +``` +Files to be deleted: +- /README.md +- /web-application/ (X modules, Y files) +- /mobile-app/ (Z modules, W files) + +Total: N files in M directories +``` + +### 3. Confirm Deletion + +Unless --force flag is provided, ask for confirmation: +- "This will permanently delete all generated documentation. Continue? (y/N)" + +### 4. Delete Files + +Remove the output directory and all contents: +```bash +rm -rf +``` + +### 5. Update Configuration + +Reset generatedPaths in `.dt-workspace`: +```json +{ + "generatedPaths": { + "platforms": {} + }, + "lastGenerated": null +} +``` + +### 6. Display Summary + +``` +CLEAN COMPLETE + +Deleted: / +Files removed: X +Directories removed: Y + +Config updated: .dt-workspace +- generatedPaths cleared +- lastGenerated reset + +To regenerate: +1. Ensure SOW file exists +2. Run /dt-workspace:scaffold +``` + +## Safety Features + +- Requires explicit confirmation (unless --force) +- Only deletes configured output directory +- Preserves .dt-workspace config file +- Preserves .dt-templates custom templates +- Preserves SOW file + +## Use Cases + +1. **Fresh start**: Regenerate all documentation from scratch +2. **Preset change**: Clean before switching to different preset +3. **SOW update**: After major SOW changes, regenerate everything +4. **Cleanup**: Remove generated docs from version control diff --git a/plugins/dt-workspace/commands/diagram.md b/plugins/dt-workspace/commands/diagram.md new file mode 100644 index 0000000..b3b8421 --- /dev/null +++ b/plugins/dt-workspace/commands/diagram.md @@ -0,0 +1,121 @@ +--- +description: "Generate ER diagrams from database schemas. Creates Mermaid, PlantUML, or ASCII diagrams." +argument-hint: "[--format ] [--platform ] [--module ]" +allowed-tools: ["Read", "Write", "Glob", "Grep"] +--- + +# Generate ER Diagrams + +Generate Entity-Relationship diagrams from database schema documentation. + +## Steps + +### 1. Load Configuration + +Read `.dt-workspace` config and validate generatedPaths exists. + +### 2. Select Target + +If arguments provided, use them. Otherwise, use AskUserQuestion: +1. Select platform +2. Select module (or "all" for entire platform) + +### 3. Select Format + +If --format provided, use it. Otherwise, ask: +- **mermaid** (default) - GitHub/GitLab compatible +- **plantuml** - PlantUML syntax +- **ascii** - Text-based diagram + +### 4. Read Database Schemas + +For each selected module: +1. Read `database-schema.md` +2. Extract table definitions, columns, relationships + +### 5. Generate Diagram + +**Mermaid Format**: +```mermaid +erDiagram + USER { + uuid id PK + string email UK + string password_hash + timestamp created_at + } + ORDER { + uuid id PK + uuid user_id FK + decimal total + string status + } + USER ||--o{ ORDER : places +``` + +**PlantUML Format**: +```plantuml +@startuml +entity User { + * id : UUID <> + -- + * email : VARCHAR(255) <> + * password_hash : VARCHAR(255) + created_at : TIMESTAMP +} +entity Order { + * id : UUID <> + -- + * user_id : UUID <> + * total : DECIMAL + status : VARCHAR(50) +} +User ||--o{ Order +@enduml +``` + +**ASCII Format**: +``` ++----------------+ +----------------+ +| USER | | ORDER | ++----------------+ +----------------+ +| id (PK) |<----->| id (PK) | +| email (UK) | | user_id (FK) | +| password_hash | | total | +| created_at | | status | ++----------------+ +----------------+ +``` + +### 6. Write Output + +Create diagram file: +- `/er-diagram.md` (contains diagram code block) +- Or append to existing `database-schema.md` + +### 7. Display Summary + +``` +ER DIAGRAM GENERATED + +Format: +Module: +Output: /er-diagram.md + +Tables: X +Relationships: Y + +To view: +- Mermaid: Render in GitHub/GitLab or mermaid.live +- PlantUML: Use plantuml.com or IDE plugin +- ASCII: View directly in any text editor +``` + +## Diagram Conversion + +To convert between formats, specify source and target: + +``` +/dt-workspace:diagram --convert --from mermaid --to plantuml +``` + +Reads existing diagram and converts to new format. diff --git a/plugins/dt-workspace/commands/export.md b/plugins/dt-workspace/commands/export.md new file mode 100644 index 0000000..9595f2f --- /dev/null +++ b/plugins/dt-workspace/commands/export.md @@ -0,0 +1,105 @@ +--- +description: "Export built-in templates for customization. Creates .dt-templates directory with Handlebars templates." +argument-hint: "[--preset ]" +allowed-tools: ["Read", "Write", "Bash", "Glob"] +--- + +# Export Templates + +Export built-in Handlebars templates to `.dt-templates/` for customization. + +## Steps + +### 1. Select Preset + +If --preset argument provided, use it. Otherwise, use AskUserQuestion: +- microservices +- monolith +- serverless +- supabase +- firebase +- nextjs-fullstack +- graphql-federation +- kubernetes +- event-sourcing +- all (export all presets) + +### 2. Check Existing Templates + +Check if `.dt-templates//` exists: +- If exists, ask for confirmation to overwrite +- If --force flag, skip confirmation + +### 3. Create Template Directory + +```bash +mkdir -p .dt-templates/ +``` + +### 4. Generate Template Files + +Create Handlebars templates for the preset. Each preset needs: + +**template.config.json**: +```json +{ + "preset": "", + "description": "Preset description", + "documentTypes": [...], + "platformDocumentTypes": [...], + "featureTemplate": "feature-file.hbs", + "mainReadmeTemplate": "main-readme.hbs" +} +``` + +**Common templates**: +- module-readme.hbs +- user-flows-index.hbs +- user-flows-single.hbs +- technical-specs.hbs +- api-contracts.hbs +- database-schema.hbs +- security-specs.hbs +- testing-strategy.hbs +- error-handling.hbs +- feature-file.hbs +- main-readme.hbs +- platform-timeline.hbs + +**Preset-specific templates**: +- realtime-events.hbs (microservices) +- module-interactions.hbs (monolith) +- event-sources.hbs, iam-policies.hbs (serverless) +- etc. + +### 5. Display Summary + +``` +TEMPLATES EXPORTED + +Location: .dt-templates// +Files: X templates + +Template files: +- template.config.json +- module-readme.hbs +- api-contracts.hbs +- ... + +Usage: +1. Edit templates in .dt-templates// +2. Run /dt-workspace:scaffold - custom templates auto-used +3. Only override templates you need to change +``` + +## Template Customization + +Templates use Handlebars syntax with variables: +- `{{module.id}}`, `{{module.name}}`, `{{module.description}}` +- `{{module.features}}`, `{{module.services}}`, `{{module.databases}}` +- `{{preset}}`, `{{projectName}}` + +Helpers: +- `{{capitalize text}}` - kebab-case to Title Case +- `{{add index 1}}` - arithmetic +- `{{#if}}`, `{{#each}}`, `{{#eq}}` - conditionals diff --git a/plugins/dt-workspace/commands/init.md b/plugins/dt-workspace/commands/init.md new file mode 100644 index 0000000..ac06051 --- /dev/null +++ b/plugins/dt-workspace/commands/init.md @@ -0,0 +1,56 @@ +--- +description: "Initialize dt-workspace project configuration. Creates .dt-workspace config file with project settings." +argument-hint: "[project-name]" +allowed-tools: ["Read", "Write", "Glob", "Bash"] +--- + +# Initialize DT-Workspace Project + +Initialize a new dt-workspace configuration for documentation generation. + +## Steps + +1. **Check for existing config**: Look for `.dt-workspace` file in current directory +2. **If exists**: Ask user if they want to overwrite +3. **Gather information** using AskUserQuestion: + - Project name (default: directory name or argument) + - SOW file path (default: ./sow.md) + - Preset selection (microservices/monolith/serverless/supabase/firebase/nextjs-fullstack/graphql-federation/kubernetes/event-sourcing) + - Output directory (default: ./workflows) + +4. **Create .dt-workspace file**: +```json +{ + "version": "1.0.0", + "projectName": "", + "sowPath": "", + "defaultPreset": "", + "outputDirectory": "", + "generatedAt": "", + "generatedPaths": { + "platforms": {} + } +} +``` + +5. **Verify SOW file exists**: Check if sowPath file exists, warn if not + +6. **Display summary**: + - Configuration created + - Next steps: ensure SOW file exists, run scaffold command + +## Output Format + +``` +DT-WORKSPACE INITIALIZED + +Configuration: .dt-workspace +Project: +SOW Path: +Preset: +Output: + +Next steps: +1. Ensure SOW file exists at +2. Run /dt-workspace:scaffold to generate documentation +``` diff --git a/plugins/dt-workspace/commands/populate.md b/plugins/dt-workspace/commands/populate.md new file mode 100644 index 0000000..4e6f8c0 --- /dev/null +++ b/plugins/dt-workspace/commands/populate.md @@ -0,0 +1,109 @@ +--- +description: "Fill documentation placeholders with AI-generated content. Completes [To be documented] sections in generated files." +argument-hint: "[--platform ] [--module ]" +allowed-tools: ["Read", "Write", "Glob", "Grep"] +--- + +# Populate Documentation Placeholders + +Fill `[To be documented]` placeholders in generated documentation with detailed, context-aware content. + +## Prerequisites + +- `.dt-workspace` config with `generatedPaths` +- Generated documentation (run `/dt-workspace:scaffold` first) + +## Steps + +### 1. Load Configuration + +Read `.dt-workspace` and validate `generatedPaths.platforms` exists. + +### 2. Select Target + +If arguments provided, use them. Otherwise, use AskUserQuestion: + +1. **Select Platform**: List available platforms from config +2. **Select Module**: List modules in selected platform +3. **Select Files**: Checkbox for which files to complete: + - user-flows/*.md + - technical-specs.md + - api-contracts.md + - database-schema.md + - realtime-events.md (if exists) + - security-specs.md + - error-handling.md + +### 3. Read Context + +For each selected file: +1. Read SOW file (config.sowPath) +2. Read module README.md for context +3. Read current file content + +### 4. Detect Placeholders + +Look for patterns: +- `[To be documented]` +- `[...to be documented...]` +- `[...to be filled...]` +- Any `[text]` indicating incomplete content (not markdown links) + +### 5. Fill Placeholders + +For each file with placeholders: + +1. **Create backup**: `.backup` +2. **Generate content**: Replace placeholders with detailed content based on: + - SOW requirements + - Module context (features, services, databases) + - File type (API contracts need endpoints, database-schema needs tables) + - Preset patterns +3. **Write updated file** + +### 6. Display Summary + +``` +COMPLETION SUMMARY + +Platform: +Module: + +✓ Processed: X files +○ Skipped: Y files (no placeholders) +✗ Errors: Z files + +Backup files created with .backup extension +Module location: + +Next steps: +1. Review completed documentation +2. Remove .backup files if satisfied +3. Commit changes +``` + +## Placeholder Filling Guidelines + +### API Contracts +- Generate realistic REST endpoints +- Include request/response schemas +- Add authentication requirements +- Document error responses + +### Database Schema +- Create table definitions with columns +- Add relationships and foreign keys +- Include indexes and constraints +- Document migrations + +### Technical Specs +- Architecture diagrams (mermaid) +- Service interactions +- Data flow descriptions +- Technology choices + +### User Flows +- Step-by-step user journeys +- Decision points +- Error scenarios +- Success criteria diff --git a/plugins/dt-workspace/commands/presets.md b/plugins/dt-workspace/commands/presets.md new file mode 100644 index 0000000..6881e72 --- /dev/null +++ b/plugins/dt-workspace/commands/presets.md @@ -0,0 +1,76 @@ +--- +description: "List available template presets with descriptions. Shows all supported architecture patterns." +allowed-tools: ["Read"] +--- + +# List Available Presets + +Display all available template presets with their descriptions and use cases. + +## Output + +``` +DT-WORKSPACE PRESETS + +Available template presets for documentation generation: + +┌─────────────────────┬────────────────────────────────────────────────────────┐ +│ Preset │ Description │ +├─────────────────────┼────────────────────────────────────────────────────────┤ +│ microservices │ NestJS microservices with Kafka, WebSocket, PostgreSQL │ +│ monolith │ Single application with layered architecture │ +│ serverless │ AWS Lambda, API Gateway, DynamoDB │ +│ supabase │ Supabase with PostgreSQL, Auth, Storage, Edge Funcs │ +│ firebase │ Firebase/Firestore with Cloud Functions │ +│ nextjs-fullstack │ Next.js App Router with Server Components, Prisma │ +│ graphql-federation │ Apollo Federation with subgraphs │ +│ kubernetes │ K8s deployments with Helm charts │ +│ event-sourcing │ Event-sourced architecture with CQRS │ +└─────────────────────┴────────────────────────────────────────────────────────┘ + +Usage: + /dt-workspace:init # Select preset during init + /dt-workspace:scaffold --preset # Override default preset + +Custom presets: + Export templates: /dt-workspace:export --preset + Edit in: .dt-templates// +``` + +## Preset Details + +### microservices (default) +Best for: Distributed systems, high scalability needs +Documents: Kafka events, WebSocket specs, service boundaries + +### monolith +Best for: Startups, MVPs, simpler deployments +Documents: Module interactions, layered architecture, shared resources + +### serverless +Best for: Event-driven, pay-per-use, auto-scaling needs +Documents: Lambda specs, IAM policies, event sources + +### supabase +Best for: Rapid development, real-time apps, PostgreSQL preference +Documents: RLS policies, Edge Functions, Realtime subscriptions + +### firebase +Best for: Mobile-first, real-time sync, Google ecosystem +Documents: Firestore rules, Cloud Functions, Auth flows + +### nextjs-fullstack +Best for: React apps, SSR/SSG, modern web development +Documents: Server Components, Server Actions, caching strategies + +### graphql-federation +Best for: Large teams, domain-driven design, unified API +Documents: Subgraph boundaries, federation directives, gateway config + +### kubernetes +Best for: Container orchestration, cloud-native apps +Documents: K8s resources, Helm charts, networking, observability + +### event-sourcing +Best for: Audit trails, temporal queries, complex domains +Documents: Event schemas, aggregates, projections, sagas diff --git a/plugins/dt-workspace/commands/scaffold.md b/plugins/dt-workspace/commands/scaffold.md new file mode 100644 index 0000000..5eff2e5 --- /dev/null +++ b/plugins/dt-workspace/commands/scaffold.md @@ -0,0 +1,126 @@ +--- +description: "Generate workflow documentation from SOW file. Creates organized project documentation with BDD features, API specs, database schemas." +argument-hint: "[sow-file] [--preset ]" +allowed-tools: ["Read", "Write", "Glob", "Bash", "Grep"] +--- + +# Scaffold Workflow Documentation + +Generate comprehensive workflow documentation from a Statement of Work (SOW) document. + +## Prerequisites + +- `.dt-workspace` config file must exist (run `/dt-workspace:init` first) +- SOW markdown file must exist + +## Steps + +### 1. Load Configuration + +Read `.dt-workspace` config file. If not found, instruct user to run init first. + +### 2. Determine Settings + +- SOW file: argument > config.sowPath +- Preset: --preset argument > config.defaultPreset > "microservices" +- Output: config.outputDirectory > "./workflows" + +### 3. Read and Analyze SOW + +Read the SOW file and extract structured module definitions: + +```json +{ + "projectName": "From SOW", + "platforms": ["web-application", "mobile-app"], + "modules": [ + { + "id": "module-id", + "name": "Module Name", + "platform": "web-application", + "description": "Description", + "features": ["feature-1", "feature-2"], + "services": ["service-name"], + "databases": ["PostgreSQL"], + "kafkaTopics": ["topic.name"], + "websocketEvents": ["event.name"], + "awsServices": ["S3"] + } + ] +} +``` + +### 4. Generate Documentation Structure + +For each platform and module, create: + +``` +/ +├── README.md # Main index with all modules +├── / +│ ├── timeline.md # Platform development timeline +│ └── / +│ ├── README.md # Module overview +│ ├── user-flows/ # User journey scenarios +│ │ ├── index.md +│ │ └── .md +│ ├── technical-specs.md +│ ├── api-contracts.md +│ ├── database-schema.md +│ ├── [preset-specific].md # realtime-events, etc. +│ ├── security-specs.md +│ ├── testing-strategy.md +│ ├── error-handling.md +│ └── features/ +│ └── .feature +``` + +### 5. Generate Content + +For each document, generate content based on preset templates with placeholders: +- Use `[To be documented]` for sections needing AI completion +- Include module context (features, services, databases) +- Follow preset-specific patterns + +### 6. Update Config + +Update `.dt-workspace` with generated paths: + +```json +{ + "lastGenerated": "", + "generatedPaths": { + "platforms": { + "web-application": { + "path": "./workflows/web-application", + "modules": [ + {"id": "module-id", "name": "Module Name", "path": "./workflows/web-application/module-id"} + ] + } + } + } +} +``` + +### 7. Display Summary + +``` +GENERATION COMPLETE + +Project: +Preset: +Location: + +Modules: X +Files: Y +Directories: Z + +Next steps: +1. Review generated files +2. Run /dt-workspace:populate to fill placeholders +3. Update BDD scenarios with specific test cases +``` + +## Preset Templates + +Based on selected preset, generate appropriate documents. See skill references for preset details. diff --git a/plugins/dt-workspace/commands/sync.md b/plugins/dt-workspace/commands/sync.md new file mode 100644 index 0000000..f5b3c6e --- /dev/null +++ b/plugins/dt-workspace/commands/sync.md @@ -0,0 +1,99 @@ +--- +description: "Rebuild .dt-workspace config from existing documentation. Scans output directory and reconstructs generatedPaths." +allowed-tools: ["Read", "Write", "Glob", "Bash"] +--- + +# Sync Configuration + +Scan the output directory and rebuild `generatedPaths` in `.dt-workspace` config. Useful when: +- Config was lost or corrupted +- Documentation was manually reorganized +- Migrating from another setup + +## Steps + +### 1. Load Configuration + +Read `.dt-workspace` config. If not found, create minimal config first. + +### 2. Scan Output Directory + +Scan `config.outputDirectory` (default: ./workflows) for: + +``` +/ +├── README.md +├── / +│ ├── timeline.md +│ └── / +│ └── README.md +│ └── / +│ └── README.md +├── / +│ └── ... +``` + +### 3. Detect Platforms + +Find all directories in output that contain module subdirectories: +- Platform directories have `timeline.md` or module subdirectories +- Module directories have `README.md` + +### 4. Extract Module Information + +For each module directory: +1. Read `README.md` to extract module name +2. Use directory name as module ID +3. Record path relative to project root + +### 5. Rebuild generatedPaths + +```json +{ + "generatedPaths": { + "platforms": { + "": { + "path": ".//", + "modules": [ + { + "id": "", + "name": "", + "path": ".///" + } + ] + } + } + } +} +``` + +### 6. Update Config + +Write updated config to `.dt-workspace`: +- Preserve existing settings (projectName, sowPath, preset, etc.) +- Update generatedPaths +- Update lastGenerated timestamp + +### 7. Display Summary + +``` +SYNC COMPLETE + +Output Directory: + +Platforms Found: X +├── web-application (Y modules) +├── mobile-app (Z modules) +└── admin-panel (W modules) + +Total Modules: N + +Config updated: .dt-workspace +``` + +## Use Cases + +1. **Lost config**: Recreate `.dt-workspace` from existing docs +2. **Manual changes**: After reorganizing documentation structure +3. **Migration**: After moving documentation to new location +4. **Verification**: Ensure config matches actual file structure diff --git a/plugins/dt-workspace/skills/workflow-generator/SKILL.md b/plugins/dt-workspace/skills/workflow-generator/SKILL.md new file mode 100644 index 0000000..c3d9731 --- /dev/null +++ b/plugins/dt-workspace/skills/workflow-generator/SKILL.md @@ -0,0 +1,167 @@ +--- +description: "Use this skill when user asks to generate workflow documentation, analyze SOW files, create project structure from requirements, scaffold documentation, or work with dt-workspace features. Triggers on: 'generate documentation', 'analyze SOW', 'scaffold project', 'create workflow docs', 'dt-workspace', 'from SOW file', 'module documentation'." +--- + +# Workflow Documentation Generator + +Generate comprehensive workflow documentation from Statement of Work (SOW) documents. This skill enables creating organized project documentation including BDD feature files, API contracts, database schemas, and technical specifications. + +## Core Workflow + +### 1. Initialize Project Configuration + +Before generating documentation, create a `.dt-workspace` config file: + +```json +{ + "version": "1.0.0", + "projectName": "Project Name", + "sowPath": "./sow.md", + "defaultPreset": "microservices", + "outputDirectory": "./workflows", + "generatedAt": "ISO timestamp", + "generatedPaths": { + "platforms": {} + } +} +``` + +### 2. Analyze SOW Document + +Extract structured module definitions from SOW markdown. Return JSON with: + +```json +{ + "projectName": "From SOW", + "platforms": ["web-application", "mobile-app", "admin-panel"], + "modules": [ + { + "id": "kebab-case-id", + "name": "Human Readable Name", + "platform": "web-application", + "description": "Module purpose", + "features": ["feature-1", "feature-2"], + "services": ["service-name"], + "databases": ["PostgreSQL (purpose)"], + "kafkaTopics": ["topic.name"], + "websocketEvents": ["event.name"], + "awsServices": ["S3", "Lambda"] + } + ] +} +``` + +### 3. Generate Documentation Structure + +Create organized output: + +``` +workflows/ +├── README.md # Main index +├── / +│ ├── timeline.md # Development sequence +│ └── / +│ ├── README.md # Module overview +│ ├── user-flows/ # User journey scenarios +│ ├── technical-specs.md # Architecture specs +│ ├── api-contracts.md # API documentation +│ ├── database-schema.md # Data models +│ ├── realtime-events.md # Events (microservices) +│ ├── security-specs.md # Security controls +│ ├── testing-strategy.md # Test approach +│ ├── error-handling.md # Error codes +│ └── features/ # BDD Gherkin files +│ └── .feature +``` + +## Available Presets + +Select preset based on architecture: + +| Preset | Use Case | +|--------|----------| +| `microservices` | NestJS microservices with Kafka, WebSocket, PostgreSQL | +| `monolith` | Single application with layered architecture | +| `serverless` | AWS Lambda, API Gateway, DynamoDB | +| `supabase` | Supabase backend with PostgreSQL, Auth, Storage | +| `firebase` | Firebase/Firestore with Cloud Functions | +| `nextjs-fullstack` | Next.js with App Router, Server Actions | +| `graphql-federation` | Apollo Federation with subgraphs | +| `kubernetes` | K8s deployments with Helm charts | +| `event-sourcing` | Event-sourced architecture with CQRS | + +## SOW Analysis Prompt + +Use this prompt to analyze SOW documents: + +``` +Analyze this Statement of Work (SOW) to extract structured module definitions. + +For each module, extract: +- Module ID (kebab-case) +- Module name (title case) +- Description (1-2 sentences) +- Features list +- Technical components: + * Backend services + * Databases (type and purpose) + * Message queues (Kafka/RabbitMQ topics) + * Real-time events (WebSocket/SSE) + * Cloud services (AWS/GCP/Azure) + +Return ONLY valid JSON with structure: +{ + "projectName": "string", + "platforms": ["string"], + "modules": [{ + "id": "string", + "name": "string", + "platform": "string", + "description": "string", + "features": ["string"], + "services": ["string"], + "databases": ["string"], + "kafkaTopics": ["string"], + "websocketEvents": ["string"], + "awsServices": ["string"] + }] +} + +Be comprehensive but don't invent features not in the SOW. +``` + +## Document Templates + +Each preset generates specific documents. See `references/presets.md` for details. + +### Common Documents (All Presets) +- **README.md** - Module overview with features +- **user-flows/** - User journey scenarios (split by feature) +- **technical-specs.md** - Architecture specifications +- **api-contracts.md** - REST/GraphQL API documentation +- **database-schema.md** - Data models and relationships +- **error-handling.md** - Error codes and handling + +### Preset-Specific Documents +- **realtime-events.md** (microservices) - Kafka/WebSocket events +- **module-interactions.md** (monolith) - Internal module communication +- **event-sources.md** (serverless) - Lambda triggers +- **iam-policies.md** (serverless) - IAM roles and permissions + +## Placeholder Pattern + +Generated docs use placeholders for AI completion: + +```markdown +[To be documented] +[API endpoints to be documented] +[Schema to be documented here] +``` + +Use the populate command to fill these with AI-generated content. + +## Reference Files + +- `references/presets.md` - Detailed preset configurations +- `references/sow-format.md` - SOW document format guide +- `references/templates.md` - Template customization guide diff --git a/plugins/dt-workspace/skills/workflow-generator/references/presets.md b/plugins/dt-workspace/skills/workflow-generator/references/presets.md new file mode 100644 index 0000000..cfb6568 --- /dev/null +++ b/plugins/dt-workspace/skills/workflow-generator/references/presets.md @@ -0,0 +1,186 @@ +# Template Presets Reference + +## Microservices Preset + +**Architecture**: NestJS microservices with Kafka, WebSocket, PostgreSQL, MongoDB, AWS + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview with features and technical components | +| user-flows/ | Detailed user journey scenarios (split by feature) | +| technical-specs.md | NestJS microservices architecture and specifications | +| api-contracts.md | Complete API endpoint specifications with OpenAPI format | +| database-schema.md | Database models, migrations, and relationships | +| realtime-events.md | Kafka topics, WebSocket events, and event schemas | +| security-specs.md | Authentication, authorization, and security controls | +| testing-strategy.md | Unit, integration, and E2E testing approach | +| error-handling.md | Error codes, handling strategies, and monitoring | +| features/*.feature | BDD Gherkin feature files | +| timeline.md | Platform-level development timeline | + +--- + +## Monolith Preset + +**Architecture**: Single application with layered architecture (Presentation/Business/Data) + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Layered architecture specifications | +| api-contracts.md | API documentation | +| database-schema.md | Shared database models | +| module-interactions.md | Internal module communication patterns | +| security-specs.md | Security controls | +| testing-strategy.md | Testing approach | +| error-handling.md | Error handling | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Serverless Preset + +**Architecture**: AWS Lambda, API Gateway, DynamoDB, S3, SQS, EventBridge + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Lambda function specifications | +| api-contracts.md | API Gateway endpoints | +| database-schema.md | DynamoDB table designs | +| event-sources.md | S3, SQS, EventBridge, DynamoDB Stream triggers | +| iam-policies.md | Lambda IAM roles and policies | +| security-specs.md | Security controls | +| testing-strategy.md | Testing approach (including local testing) | +| error-handling.md | Error handling with cold start considerations | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Supabase Preset + +**Architecture**: Supabase with PostgreSQL, Auth, Storage, Edge Functions + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Supabase architecture | +| api-contracts.md | REST API and RPC functions | +| database-schema.md | PostgreSQL with RLS policies | +| auth-flows.md | Supabase Auth integration | +| storage-specs.md | Supabase Storage buckets | +| realtime-specs.md | Supabase Realtime subscriptions | +| edge-functions.md | Deno Edge Functions | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Firebase Preset + +**Architecture**: Firebase/Firestore with Cloud Functions, Auth, Storage + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Firebase architecture | +| api-contracts.md | Callable functions and REST endpoints | +| database-schema.md | Firestore collections and security rules | +| auth-flows.md | Firebase Auth integration | +| storage-specs.md | Cloud Storage rules | +| cloud-functions.md | Cloud Functions specifications | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Next.js Fullstack Preset + +**Architecture**: Next.js App Router with Server Components, Server Actions, Prisma + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Next.js architecture (RSC, Server Actions) | +| api-contracts.md | Route handlers and Server Actions | +| database-schema.md | Prisma schema | +| component-specs.md | React component specifications | +| state-management.md | Client/server state patterns | +| caching-strategy.md | Next.js caching and revalidation | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## GraphQL Federation Preset + +**Architecture**: Apollo Federation with subgraphs, gateway, and distributed schema + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Federation architecture | +| schema-specs.md | GraphQL schema with federation directives | +| resolver-specs.md | Resolver implementations | +| database-schema.md | Database models | +| subgraph-specs.md | Subgraph boundaries and entities | +| gateway-specs.md | Gateway configuration | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Kubernetes Preset + +**Architecture**: Kubernetes deployments with Helm charts, services, ingress + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | Service architecture | +| api-contracts.md | API documentation | +| database-schema.md | Database models | +| k8s-resources.md | Deployment, Service, ConfigMap, Secret specs | +| helm-charts.md | Helm chart structure and values | +| networking.md | Ingress, Service Mesh configurations | +| observability.md | Logging, metrics, tracing | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | + +--- + +## Event Sourcing Preset + +**Architecture**: Event-sourced architecture with CQRS, event store, projections + +**Documents Generated**: +| Document | Description | +|----------|-------------| +| README.md | Module overview | +| user-flows/ | User journey scenarios | +| technical-specs.md | CQRS/ES architecture | +| api-contracts.md | Command and Query APIs | +| event-schema.md | Domain events and versioning | +| aggregate-specs.md | Aggregate root specifications | +| projection-specs.md | Read model projections | +| saga-specs.md | Process managers and sagas | +| event-store.md | Event store configuration | +| features/*.feature | BDD feature files | +| timeline.md | Development timeline | diff --git a/plugins/dt-workspace/skills/workflow-generator/references/sow-format.md b/plugins/dt-workspace/skills/workflow-generator/references/sow-format.md new file mode 100644 index 0000000..71ef867 --- /dev/null +++ b/plugins/dt-workspace/skills/workflow-generator/references/sow-format.md @@ -0,0 +1,151 @@ +# SOW Document Format Guide + +## Recommended Structure + +A well-structured SOW document helps generate better documentation. Follow this format: + +```markdown +# Project Name + +## Overview +Brief project description and goals. + +## Platforms +- Web Application +- Mobile App (iOS/Android) +- Admin Panel + +## Modules + +### 1. User Management +**Platform**: Web Application, Mobile App + +**Description**: Handle user registration, authentication, and profile management. + +**Features**: +- User Registration +- Email Verification +- Login/Logout +- Password Reset +- Profile Management +- Social Login (Google, Apple) + +**Technical Requirements**: +- JWT authentication +- OAuth 2.0 integration +- PostgreSQL for user data +- Redis for session management +- Email service integration (SendGrid) + +### 2. Product Catalog +**Platform**: Web Application, Mobile App, Admin Panel + +**Description**: Manage product listings, categories, and inventory. + +**Features**: +- Product Listing +- Category Management +- Search & Filters +- Product Details +- Inventory Tracking + +**Technical Requirements**: +- Elasticsearch for search +- PostgreSQL for product data +- S3 for product images +- Redis caching + +### 3. Order Management +... + +## Non-Functional Requirements +- Performance: Response time < 200ms +- Scalability: Support 10,000 concurrent users +- Availability: 99.9% uptime +- Security: OWASP compliance + +## Integration Points +- Payment Gateway: Stripe +- Email Service: SendGrid +- SMS Service: Twilio +- Analytics: Mixpanel +``` + +## Key Elements for Analysis + +### Module Definition +Each module should include: +1. **Clear name** - Descriptive, action-oriented +2. **Platform assignment** - Which platforms use this module +3. **Description** - 1-2 sentences explaining purpose +4. **Features list** - Specific capabilities +5. **Technical requirements** - Databases, services, integrations + +### Feature Naming +Use consistent, descriptive feature names: +- Good: "User Registration", "Password Reset", "Order Checkout" +- Bad: "Feature 1", "Login stuff", "Handle orders" + +### Technical Components +Explicitly mention: +- **Databases**: PostgreSQL, MongoDB, Redis, Elasticsearch +- **Message Queues**: Kafka topics, RabbitMQ queues +- **Real-time**: WebSocket events, SSE streams +- **Cloud Services**: AWS S3, Lambda, SQS, etc. +- **External APIs**: Payment, email, SMS services + +## Example SOW Snippets + +### E-commerce Module +```markdown +### Shopping Cart +**Platform**: Web Application, Mobile App + +**Description**: Real-time shopping cart with persistent storage and promotions. + +**Features**: +- Add/Remove Items +- Quantity Updates +- Save for Later +- Promo Code Application +- Cart Persistence +- Real-time Price Updates + +**Technical Requirements**: +- Redis for cart storage +- PostgreSQL for saved carts +- Kafka for inventory updates +- WebSocket for real-time sync +``` + +### Real-time Messaging Module +```markdown +### Chat System +**Platform**: Mobile App + +**Description**: Real-time messaging between users with media support. + +**Features**: +- Direct Messaging +- Group Chats +- Media Sharing +- Read Receipts +- Typing Indicators +- Push Notifications + +**Technical Requirements**: +- WebSocket for real-time +- MongoDB for message storage +- S3 for media files +- Redis for presence +- Kafka for event streaming +- FCM/APNS for push notifications +``` + +## Tips for Better Analysis + +1. **Be specific** - Instead of "database", specify "PostgreSQL for users, MongoDB for logs" +2. **Group related features** - Keep related functionality in same module +3. **Define boundaries** - Clear separation between modules +4. **Include integrations** - External services and APIs +5. **Mention real-time needs** - WebSocket, SSE, polling requirements diff --git a/plugins/dt-workspace/skills/workflow-generator/references/templates.md b/plugins/dt-workspace/skills/workflow-generator/references/templates.md new file mode 100644 index 0000000..a181824 --- /dev/null +++ b/plugins/dt-workspace/skills/workflow-generator/references/templates.md @@ -0,0 +1,180 @@ +# Template Customization Guide + +## Template Override System + +Custom templates are stored in `.dt-templates//` directory: + +``` +.dt-templates/ +├── microservices/ +│ ├── template.config.json +│ ├── module-readme.hbs +│ ├── api-contracts.hbs +│ └── ... (other templates) +└── monolith/ + └── ... +``` + +## Template Resolution Order + +1. User templates: `.dt-templates//