pseudocode-to-specification
Analyzes pseudocode, algorithms, or code snippets to extract and document functional requirements and business specifications. Produces functional specifications, business logic documentation, data requirements, and workflow specifications focused exclusively on WHAT the system does, not HOW it's implemented. Use when analyzing pseudocode for business logic, extracting functional requirements from algorithms, documenting business behavior from code, reverse engineering functional specifications, or when users mention "pseudocode to spec", "extract requirements", "business logic documentation", "functional specification from code", or "requirements from pseudocode".
What this skill does
# Pseudocode to Specification
Extract functional requirements and business specifications from pseudocode, algorithms, or code snippets.
## Core Workflow
## 1. Analyze Pseudocode
Parse structure, control flow, and identify:
- Inputs, outputs, and data transformations
- Variables, constants, and data structures
- Algorithms and logic patterns
- Assumptions and implicit requirements
Ask for clarification on:
- Ambiguous variable names or operations
- Missing context about data sources/destinations
- Unclear business rules or constraints
- Undefined error handling or edge cases
### 2. Extract Functional Requirements
Document core business functionality as requirements:
```
FR-001: [Function Name]
Business Purpose: [Why this function exists]
Description: System shall [action] when [condition]
Inputs: [business data, parameters, context]
Processing Logic: [business rules and decision steps]
Outputs: [business results, side effects]
Business Rules: [constraints, validations, calculations]
Preconditions: [required business state]
Postconditions: [resulting business state]
```
For detailed requirement patterns: [requirements-patterns.md](references/requirements-patterns.md)
### 3. Extract Business Data Requirements
Identify business entities and their requirements:
- Business entities and their meaning
- Business attributes and their purpose
- Business constraints and validation rules
- Business relationships between entities
- Data lifecycle and state transitions
Document as:
```
Business Entity: [EntityName]
Business Meaning: [What this represents]
Attributes:
- name: [Business meaning, constraints]
- field: [Business purpose, validation rules]
Relationships:
- [Business relationship] with [OtherEntity]
- Cardinality: [min..max]
Business Rules:
- [Business constraint or invariant]
Lifecycle States:
- [State] → [State] when [condition]
```
### 4. Document Business Workflow and Logic
Analyze business process flow:
- Sequential business operations
- Business decision points and conditions
- Iterative business processes
- Business exception paths
- Business event triggers
Generate business workflow specification:
```
Business Process: [ProcessName]
Purpose: [Business goal]
Step 1: [Business Action]
- Business Condition: [when/if from business perspective]
- Action: [what happens in business terms]
- Business Rules Applied: [relevant rules]
- Next: [step or branch]
Step 2: [Business Decision]
Branches:
- If [business condition]: Go to Step 3
- Else: Go to Step 5
- Decision Criteria: [business factors]
Business Error Conditions:
- [ErrorCondition]: [Business impact and recovery]
```
For complex business logic, use decision tables. See [mermaid-diagrams.md](references/mermaid-diagrams.md) for business flow notation.
### 5. Generate Service Function Specifications
Document service functions in business terms:
```
Function: [functionName]
Business Purpose: [What business problem this solves]
Business Context: [When/why this is needed]
Inputs:
- param1: [Business meaning, constraints]
- param2: [Business meaning, required/optional]
Processing Logic:
1. [Business rule or validation]
2. [Business calculation or transformation]
3. [Business decision point]
Outputs: [Business result description]
Business Rules:
- [Rule 1: condition → action]
- [Rule 2: validation or constraint]
Error Conditions:
- [Business error]: [Condition and meaning]
Example Business Scenarios:
Scenario: [situation]
Input: [business context]
Output: [expected business result]
```
### 6. Identify Integration Points
Document functional dependencies on external systems:
```
Integration: [SystemName]
Business Purpose: [Why this dependency exists]
Data Exchanged: [Business data sent/received]
Business Rules:
- [When interaction occurs]
- [What triggers communication]
Failure Impact:
- Business consequence: [Impact on business process]
- Mitigation: [Business workaround or fallback]
```
### 7. Document Assumptions and Constraints
**Business Assumptions:**
- Expected data volumes and patterns
- User behavior expectations
- Business process frequency
- External system availability
**Business Constraints:**
- Regulatory requirements
- Business policy limitations
- Data retention requirements
- Compliance requirements
### 8. Identify Business Acceptance Criteria
Define how to verify functional correctness:
- Normal business scenarios
- Business edge cases and boundary conditions
- Business error conditions
- Business rules validation
Format:
```
Acceptance Criterion: AC-001
For: [FR-XXX]
Given: [business context]
When: [business action]
Then: [expected business outcome]
Business Scenarios:
Scenario 1: Normal case
- Context: [typical business situation]
- Action: [user/system action]
- Expected: [business result]
Scenario 2: Edge case
- Context: [boundary condition]
- Action: [user/system action]
- Expected: [business result]
```
## Output Formats
Generate functional specification based on context. Standard format:
**Functional Specification Document:**
```markdown
# [System/Component] Functional Specification
## 1. Overview
[Business purpose, scope, and objectives]
## 2. Functional Requirements
[FR-001, FR-002, etc. - business functionality]
## 3. Business Data Requirements
[Business entities, attributes, relationships, constraints]
## 4. Business Workflow and Logic
[Business process flows, decision logic, business rules]
## 5. Service Function Specifications
[Business functions, inputs/outputs, processing logic]
## 6. Integration Points
[External system dependencies at functional level]
## 7. Business Rules and Constraints
[Complete business logic, validation rules, calculations]
## 8. Business Acceptance Criteria
[How to verify functional correctness]
## 9. Assumptions and Dependencies
[Business assumptions and constraints]
## 10. Appendices
[Business flow diagrams, glossary, references]
```
**User Stories (Agile Format):**
```
Epic: [High-level business capability]
Story 1: As a [role], I want [capability] so that [business benefit]
Acceptance Criteria:
- Given [business context], when [user action], then [business outcome]
- Given [business context], when [user action], then [business outcome]
Business Rules:
- [Rule 1: condition → action]
- [Rule 2: constraint or validation]
Story 2: [Next story following same pattern]
```
For additional specification formats: [specification-templates.md](references/specification-templates.md)
## Key Principles
**Focus Strictly on Functional Requirements:**
- Extract WHAT the system does, not HOW it's built
- Describe business behavior, not technical implementation
- Specify business rules, not design patterns
- Document business logic, not architecture
- Exclude performance, security, scalability (non-functional)
**Maintain Business Traceability:**
- Link requirements to business logic in pseudocode
- Use identifiers: FR (functional), BR (business rule), AC (acceptance criteria)
- Reference pseudocode sections showing business logic
**Clarify Business Intent:**
- Extract WHY (business purpose) and WHAT (business capability)
- Describe business value and outcomes
- Separate business requirements from technical choices
- Mark inferred business rules vs stated logic
**Validate Functional Completeness:**
- Ensure all business logic paths documented
- Verify all business inputs/outputs specified
- Check all business error conditions covered
- Confirm all business rules extracted
## Common Business Patterns
Recognize and document business patterns:
**CRUD Operations:** Create/read/update/delete → Business entity management spec with business rules
**State Machines:** State transitions → Business lifecycle spec with state meanings and transition conditions
**Business Process:** Sequential steps → Business workflow spec with decision points
**Data Transformation:** Input → process → output → BusinesRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.