Process Specification Skill
Overview
Create comprehensive process specifications for the system which will be used as a requirements document for development team. The output is a structured markdown document following a standardized template that covers all aspects of a business process.
When to Use
- Designing a new process for the system
- Describing existing process
- Preparing technical documentation for development
Workflow
Step 1: Gather Requirements
Before starting, collect the following information from the user:
- Process name and purpose - what the process does and why, what is the name and ID
- Update of existing or creation of new process - are we designing new process or updating existing one
- Data sources - where data comes from (API, files, database)
- Target systems - where data goes
- Trigger type - automatic (CRON) / manual / event-driven
- User roles - who works with the process
- Existing documentation - Confluence pages, existing code references
Ask clarifying questions as below so you understand properly the need:
- "What is the main business goal of this process?"
- "Is there any process documentation?"
- "Do you aim to optimize existing process?"
- "What are the regular exceptions, edge cases and manual interventions in the process?"
- "How is the process triggered - automatically on schedule, manually, or by an event?"
- "What external systems does this process integrate with?"
- "Who are the users and what are their roles?"
Step 2: Analyze Existing Implementation
If describing existing process within the applications, search codebase for relevant implementation:
- Use
Grep to find related classes and functions
- Use
Read to understand existing business logic
- Use
Glob to find related files
Step 3: Fetch Documentation
Ask user if any documentation exists and use tools to retrieve relevant documentation:
- Ask user if there is any domain dictionary
- Ask user if there is any existing process documentation
Step 4: Create Specification
Produce the markdown document following the template structure in references/process-template.md.
Step 5: Save Document
Save to docs/ directory with naming convention: {process-ID}-{process-name}.md
Output Document Structure
1. Business Goal
- 1.1 Process Purpose - bullet points describing what the process ensures
- 1.2 Business Context - explanation of why the process exists, types of processed data
- 1.3 Key Stakeholders - table of roles and responsibilities
2. Input and Output Data
- API endpoints, DB tables or files which are used as input for the process
- 2.1 Input Data - tables: Name, Source, Description
- 2.2 Output Data - tables: Name, Type, Target, Description
- 2.3 Data Dependencies - ASCII diagram of data flows
3. Data Validation
- 3.1 Input Validation - Field, Rule, Error Message
- 3.2 Business Validation - Validation, Condition, Action on Failure
- 3.3 Permission Checks - permissions for operations, always use three level description in format {module}.{mainAggregate}.{action}, e.g. contracts.contract.detailview
4. Operations Description
- 4.1 Operations Overview - table listing all operations (automatic and manual)
- 4.2 Operation Details - for each operation provide:
- Purpose - what the operation does
- Trigger - what starts the operation (CRON, user action, event)
- Executor - who/what executes the operation (system, user role)
- Required permission - for manual operations
- Input/Output data - tables with Source/Target, Data, Description
- API calls - only endpoints used, DO NOT include examples of request and response bodies
- Validation rules - table with Rule, Action on failure
- Exception handling - table with Exception, Automatic resolution, Manual resolution
- Retry strategy - number of attempts, intervals (if applicable)
- Specific error codes - defined codes like UNKNOWN_PRODUCT, MISSING_HIERARCHY
- 4.3 State Diagram - ASCII state diagram showing all states and transitions
5. UI Description
- 5.1 Screens Overview - table: Screen name, Purpose
- 5.2 Screen Details - for each screen provide:
- Purpose - what the screen does and when user uses it
- Form fields - if applicable, table with Field, Type, Validation
- Workflow - numbered steps describing how user interacts with the screen
- 5.3 UI Components - component details with visibility conditions
- 5.4 User Actions - Action, Element, Backend endpoint, Notes
6. Process Exceptions
- 6.1 Expected Exceptions - common errors and resolution
- 6.2 Error States - technical errors
- 6.3 Rollback / Cancellation - behavior on failure
7. Integration with Existing System
- 7.1 Affected Modules - overview of integrations
- 7.2 Database Tables - table names only (no SQL)
- 7.3 API Endpoints - external and internal APIs
- 7.4 External Systems - external dependencies
8. BPMN Diagram
- Placeholder section to add link to BPMN diagram
9. Specifics (optional)
- Process-specific aspects (e.g., AML processing, currency conversion)
Rules
DO:
- Structure document according to the template
- Use tables for clarity
- Describe input/output data for each operation
- Define validations and error messages
- Describe exception handling (automatic and manual)
- Include retry strategies where applicable (number of attempts, intervals)
- Define specific error codes for different failure scenarios
- Use ASCII diagrams for visualization
- For each UI screen, describe its purpose, form fields, and user workflow
- Ask about uncertainties before documenting
- Update based on user feedback
- Refer to examples in
examples/ directory for expected level of detail
DO NOT:
- DO NOT write SQL queries - only list proposed table names
- DO NOT invent API call examples - only include them if the source documentation clearly specifies the API format
- DO NOT create new internal API endpoints if not explicitly asked for
- Do not describe BPMN process, it will be linked from another app
- Do not invent business rules - ask the user
- Do not assume technical details without verification
- Do not skip sections - mark as "N/A" if not relevant
- Do not include URL paths in UI screen descriptions
Formatting:
- Document version in header (Version, Date, Author, Status)
- Markdown tables for structured data
- Code blocks for API examples and diagrams
- Blockquotes (
>) for important notes
- Maximum 3 heading levels - use bold text or tables for further breakdown
Example Interaction
User: I need to describe the process of importing contracts from external system XYZ to ABC.
Response: To prepare the process specification, clarify the following:
- Data source: How does XYZ provide data? (API, files, other)
- Contract types: What types of contracts are imported?
- Trigger: Should the import be automatic (how often) or manual?
- Reference data: Where do code lists come from (products, advisors)?
- Error states: Who resolves import errors?
- Existing documentation: Is there a Confluence page or existing code?
User: [provides answers]
Response: [Creates structured document according to the template]
Resources
references/
Contains the process specification template:
process-template.md - standardized template for process specifications
examples/
Contains example process specifications:
process-example.md - example documentation showing the expected level of detail and formatting
1---2name: process-spec3description: This skill creates detailed process specifications for business processes. This skill should be used when designing new processes, documenting existing processes, or brainstorming about possible process improvements. The skill produces structured markdown documents describing business processes, operations, data flows, validations, and integration points.4---56# Process Specification Skill78## Overview910Create comprehensive process specifications for the system which will be used as a requirements document for development team. The output is a structured markdown document following a standardized template that covers all aspects of a business process.1112## When to Use1314- Designing a new process for the system15- Describing existing process16- Preparing technical documentation for development1718## Workflow1920### Step 1: Gather Requirements2122Before starting, collect the following information from the user:23241. **Process name and purpose** - what the process does and why, what is the name and ID252. **Update of existing or creation of new process** - are we designing new process or updating existing one263. **Data sources** - where data comes from (API, files, database)274. **Target systems** - where data goes285. **Trigger type** - automatic (CRON) / manual / event-driven296. **User roles** - who works with the process307. **Existing documentation** - Confluence pages, existing code references3132Ask clarifying questions as below so you understand properly the need:3334- "What is the main business goal of this process?"35- "Is there any process documentation?"36- "Do you aim to optimize existing process?"37- "What are the regular exceptions, edge cases and manual interventions in the process?"38- "How is the process triggered - automatically on schedule, manually, or by an event?"39- "What external systems does this process integrate with?"40- "Who are the users and what are their roles?"4142### Step 2: Analyze Existing Implementation4344If describing existing process within the applications, search codebase for relevant implementation:4546- Use `Grep` to find related classes and functions47- Use `Read` to understand existing business logic48- Use `Glob` to find related files4950### Step 3: Fetch Documentation5152Ask user if any documentation exists and use tools to retrieve relevant documentation:5354- Ask user if there is any domain dictionary55- Ask user if there is any existing process documentation5657### Step 4: Create Specification5859Produce the markdown document following the template structure in `references/process-template.md`.6061### Step 5: Save Document6263Save to `docs/` directory with naming convention: `{process-ID}-{process-name}.md`6465## Output Document Structure6667### 1. Business Goal6869- **1.1 Process Purpose** - bullet points describing what the process ensures70- **1.2 Business Context** - explanation of why the process exists, types of processed data71- **1.3 Key Stakeholders** - table of roles and responsibilities7273### 2. Input and Output Data7475- API endpoints, DB tables or files which are used as input for the process76- **2.1 Input Data** - tables: Name, Source, Description77- **2.2 Output Data** - tables: Name, Type, Target, Description78- **2.3 Data Dependencies** - ASCII diagram of data flows7980### 3. Data Validation8182- **3.1 Input Validation** - Field, Rule, Error Message83- **3.2 Business Validation** - Validation, Condition, Action on Failure84- **3.3 Permission Checks** - permissions for operations, always use three level description in format {module}.{mainAggregate}.{action}, e.g. contracts.contract.detailview8586### 4. Operations Description8788- **4.1 Operations Overview** - table listing all operations (automatic and manual)89- **4.2 Operation Details** - for each operation provide:90 - **Purpose** - what the operation does91 - **Trigger** - what starts the operation (CRON, user action, event)92 - **Executor** - who/what executes the operation (system, user role)93 - **Required permission** - for manual operations94 - **Input/Output data** - tables with Source/Target, Data, Description95 - **API calls** - only endpoints used, DO NOT include examples of request and response bodies96 - **Validation rules** - table with Rule, Action on failure97 - **Exception handling** - table with Exception, Automatic resolution, Manual resolution98 - **Retry strategy** - number of attempts, intervals (if applicable)99 - **Specific error codes** - defined codes like UNKNOWN_PRODUCT, MISSING_HIERARCHY100- **4.3 State Diagram** - ASCII state diagram showing all states and transitions101102### 5. UI Description103104- **5.1 Screens Overview** - table: Screen name, Purpose105- **5.2 Screen Details** - for each screen provide:106 - **Purpose** - what the screen does and when user uses it107 - **Form fields** - if applicable, table with Field, Type, Validation108 - **Workflow** - numbered steps describing how user interacts with the screen109- **5.3 UI Components** - component details with visibility conditions110- **5.4 User Actions** - Action, Element, Backend endpoint, Notes111112### 6. Process Exceptions113114- **6.1 Expected Exceptions** - common errors and resolution115- **6.2 Error States** - technical errors116- **6.3 Rollback / Cancellation** - behavior on failure117118### 7. Integration with Existing System119120- **7.1 Affected Modules** - overview of integrations121- **7.2 Database Tables** - table names only (no SQL)122- **7.3 API Endpoints** - external and internal APIs123- **7.4 External Systems** - external dependencies124125### 8. BPMN Diagram126127- Placeholder section to add link to BPMN diagram128129### 9. Specifics (optional)130131- Process-specific aspects (e.g., AML processing, currency conversion)132133## Rules134135### DO:136137- Structure document according to the template138- Use tables for clarity139- Describe input/output data for each operation140- Define validations and error messages141- Describe exception handling (automatic and manual)142- Include retry strategies where applicable (number of attempts, intervals)143- Define specific error codes for different failure scenarios144- Use ASCII diagrams for visualization145- For each UI screen, describe its purpose, form fields, and user workflow146- Ask about uncertainties before documenting147- Update based on user feedback148- Refer to examples in `examples/` directory for expected level of detail149150### DO NOT:151152- **DO NOT write SQL queries** - only list proposed table names153- **DO NOT invent API call examples** - only include them if the source documentation clearly specifies the API format154- **DO NOT create new internal API endpoints** if not explicitly asked for155- Do not describe BPMN process, it will be linked from another app156- Do not invent business rules - ask the user157- Do not assume technical details without verification158- Do not skip sections - mark as "N/A" if not relevant159- Do not include URL paths in UI screen descriptions160161### Formatting:162163- Document version in header (Version, Date, Author, Status)164- Markdown tables for structured data165- Code blocks for API examples and diagrams166- Blockquotes (`>`) for important notes167- **Maximum 3 heading levels** - use **bold text** or tables for further breakdown168169## Example Interaction170171**User:** I need to describe the process of importing contracts from external system XYZ to ABC.172173**Response:** To prepare the process specification, clarify the following:1741751. **Data source:** How does XYZ provide data? (API, files, other)1762. **Contract types:** What types of contracts are imported?1773. **Trigger:** Should the import be automatic (how often) or manual?1784. **Reference data:** Where do code lists come from (products, advisors)?1795. **Error states:** Who resolves import errors?1806. **Existing documentation:** Is there a Confluence page or existing code?181182**User:** [provides answers]183184**Response:** [Creates structured document according to the template]185186## Resources187188### references/189190Contains the process specification template:191192- `process-template.md` - standardized template for process specifications193194### examples/195196Contains example process specifications:197198- `process-example.md` - example documentation showing the expected level of detail and formatting