Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
]
}
}
9 changes: 9 additions & 0 deletions plugins/dt-workspace/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
127 changes: 127 additions & 0 deletions plugins/dt-workspace/README.md
Original file line number Diff line number Diff line change
@@ -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
├── <platform>/
│ ├── timeline.md # Development sequence
│ └── <module>/
│ ├── 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/<preset>/` for editing.

## Agents

- **sow-analyzer**: Analyzes SOW documents and extracts modules
- **doc-completer**: Fills documentation placeholders with detailed content

## Author

Deepak Tiwari <deepaktiwari3020@gmail.com>

## License

MIT
102 changes: 102 additions & 0 deletions plugins/dt-workspace/agents/doc-completer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
model: sonnet
tools: ["Read", "Write", "Glob", "Grep"]
whenToUse: |
Use this agent to fill documentation placeholders with detailed, context-aware content.
<example>
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'
</example>
<example>
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'
</example>
---

# 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
93 changes: 93 additions & 0 deletions plugins/dt-workspace/agents/sow-analyzer.md
Original file line number Diff line number Diff line change
@@ -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.
<example>
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'
</example>
<example>
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'
</example>
---

# 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)
Loading