ai-prompt-guide-mcp 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,124 @@
1
+ ---
2
+ title: "Develop"
3
+ description: "🔨 DEVELOP: Simple development with anti-pattern detection and regression prevention"
4
+ whenToUse: "Single-file or small scope features without needing multi-agent coordination, especially frontend work"
5
+ ---
6
+
7
+ # Workflow: Simple Development with Best Practices
8
+
9
+ ⚠️ **CRITICAL REQUIREMENTS - You MUST follow these instructions:**
10
+
11
+ **Task Management:**
12
+ - ✅ **REQUIRED:** Use `coordinator_task` tool for your TODO list
13
+ - 🚫 **FORBIDDEN:** DO NOT use TodoWrite tool (this workflow replaces it)
14
+
15
+ 1. [Agent] Analyze requirements and write out your understanding:
16
+ • What is the goal? (feature, enhancement, modification)
17
+ • What is the expected behavior?
18
+ • What files/components will be affected?
19
+ • What should NOT change?
20
+
21
+ 2. [Agent] Define scope boundaries explicitly:
22
+ • List files that WILL change
23
+ • List files that will NOT change (but might be related)
24
+ • Identify dependencies between components
25
+ • Document change scope limits
26
+
27
+ 3. [Agent] Scan existing code in change area for anti-patterns:
28
+ • Check against anti-pattern categories (see below)
29
+ • Note any problematic patterns found
30
+ • Flag for potential refactoring (if in scope)
31
+
32
+ 4. [Agent] IF multiple implementation approaches exist:
33
+ • Use decide workflow to evaluate approaches
34
+ • Prioritize: correctness > best practices > simplicity
35
+ • Select approach that aligns with existing patterns
36
+ ELSE:
37
+ • Proceed with single clear approach
38
+
39
+ 5. [Agent] Use coordinator_task to create TODO list:
40
+ • Break work into specific, testable steps
41
+ • Each task should be verifiable
42
+ • Keep scope aligned with step 2 boundaries
43
+
44
+ 6. [Agent] Implement changes following best practices:
45
+ • Follow existing code conventions
46
+ • Apply anti-pattern avoidance (see below)
47
+ • Add clear comments for complex logic
48
+ • Keep changes minimal and focused
49
+
50
+ 7. [Agent] Verify implementation:
51
+ • Test the new/changed functionality works correctly
52
+ • Test related functionality still works (regression check)
53
+ • Verify unchanged areas remain unchanged
54
+ • Check for edge cases and error handling
55
+
56
+ 8. [Agent] Add clarifying comments to code:
57
+ • Document non-obvious patterns or logic
58
+ • Explain WHY certain approaches were chosen
59
+ • Note edge cases or constraints
60
+ • Help prevent future regression when code is modified
61
+
62
+ 9. [Agent] Document findings:
63
+ • List any anti-patterns discovered
64
+ • Note any technical debt created/removed
65
+ • Suggest architecture improvements if design issues found
66
+ • Recommend follow-up improvements (outside current scope)
67
+
68
+ 10. [Agent] Report completion:
69
+ • Summary of changes made
70
+ • Files modified
71
+ • Anti-patterns addressed/flagged
72
+ • Regression test results
73
+ • Suggested improvements for future
74
+
75
+ ## Anti-Pattern Detection
76
+
77
+ **Common Anti-Patterns:**
78
+
79
+ *Code Organization:*
80
+ - ❌ Magic numbers/strings, copy-paste code, deep nesting (>3 levels), multi-purpose functions
81
+ - ✅ Named constants, DRY principle, flat logic, single responsibility
82
+
83
+ *State & Data:*
84
+ - ❌ State in wrong location, duplicate state, mutable shared state, implicit dependencies
85
+ - ✅ State at appropriate level, single source of truth, immutable updates, explicit dependencies
86
+
87
+ *Error Handling:*
88
+ - ❌ Silent failures, generic messages, missing edge case handling, unchecked null/undefined
89
+ - ✅ Explicit handling, clear messages, defensive programming
90
+
91
+ *Side Effects & Timing:*
92
+ - ❌ Side effects in wrong places, missing cleanup, race conditions, resource leaks
93
+ - ✅ Proper lifecycle management, cleanup, synchronization handling
94
+
95
+ *Component/Module Design:*
96
+ - ❌ God objects, tight coupling, mixed responsibilities, unclear boundaries
97
+ - ✅ Single responsibility, loose coupling, clear separation of concerns
98
+
99
+ ## Regression Prevention
100
+
101
+ **Test Scope:**
102
+ 1. **Primary:** Changed functionality works as expected
103
+ 2. **Secondary:** Related functionality still works
104
+ 3. **Tertiary:** Adjacent features unaffected
105
+ 4. **Boundary:** Edge cases and error conditions handled
106
+
107
+ ## Scope Management
108
+
109
+ **Minimal Change Principle:**
110
+ - Only modify what's necessary to achieve the goal
111
+ - Resist urge to refactor unrelated code
112
+ - Keep changes focused and verifiable
113
+ - Document broader improvements for future work
114
+
115
+ **Change Boundary Definition:**
116
+ - **In Scope:** Direct requirements, related fixes, necessary updates
117
+ - **Out of Scope:** Nice-to-have improvements, unrelated refactoring, performance optimizations (unless required)
118
+ - **Adjacent:** Closely related code that may need updates for consistency
119
+
120
+ **Impact Analysis:**
121
+ - What depends on what you're changing?
122
+ - What uses the modified functionality?
123
+ - What side effects might occur?
124
+ - What tests/validations are needed?
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: "Review"
3
+ description: "🔍 REVIEW: Targeted review of specific changes, PRs, or components"
4
+ whenToUse: "Reviewing pull requests, specific changes, or individual modules before merge"
5
+ ---
6
+
7
+ # Workflow: Code Review
8
+
9
+ 1. [Reviewer] Define review scope:
10
+ • Pull request or commit range
11
+ • Specific files or modules
12
+ • Focused area or component
13
+
14
+ 2. [Reviewer] Review across quality dimensions:
15
+ • Correctness: logic accuracy, edge cases, error handling
16
+ • Code Quality: readability, maintainability, naming
17
+ • Testing: coverage, assertions, edge cases
18
+ • Security: validation, auth, sensitive data handling
19
+ • Performance: efficiency, resource usage
20
+ • Pattern Consistency: aligns with codebase conventions
21
+
22
+ 3. [Reviewer] Identify issues by severity:
23
+ • Critical: security vulnerabilities, data loss risks, breaking changes
24
+ • High: performance issues, major logic errors, missing critical tests
25
+ • Medium: code smells, moderate improvements, minor bugs
26
+ • Low: style inconsistencies, minor optimizations, naming
27
+
28
+ 4. [Reviewer] Provide actionable feedback per finding:
29
+ • Location (file:line)
30
+ • Clear description and impact
31
+ • Concrete recommendation
32
+ • Code examples (if applicable)
33
+
34
+ 5. [Reviewer] Summarize findings:
35
+ • Overall assessment (approve/request changes/comment)
36
+ • Count by severity
37
+ • Priority recommendations
38
+ • Blocking vs non-blocking items
39
+
40
+ ## Review Focus
41
+
42
+ **Prioritize:**
43
+ - Correctness and security
44
+ - Maintainability impact
45
+ - Changed code (not unchanged)
46
+
47
+ **Provide:**
48
+ - Specific, actionable feedback
49
+ - Explain "why" behind suggestions
50
+ - Acknowledge good practices
51
+ - Timely feedback
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "Spec External"
3
+ description: "📋 SPEC: Document 3rd party APIs/components from official sources"
4
+ whenToUse: "Integrating SDKs, webhooks, auth flows, or documenting external service contracts"
5
+ ---
6
+
7
+ # Workflow: Document External API Specification
8
+
9
+ 1. [Agent] Identify authoritative sources:
10
+ • Official documentation, API references, RFCs
11
+ • Versions relevant to runtime/environment
12
+ • Verify current and accurate (not third-party tutorials)
13
+
14
+ 2. [Agent] Extract complete API contract:
15
+ • Capabilities: supported features, limitations
16
+ • Invariants: must-hold conditions
17
+ • Limits: rate limits, size limits, timeouts
18
+ • Error semantics: codes, formats, retry policies
19
+ • Version gates: feature availability per version
20
+ • Authentication/authorization requirements
21
+
22
+ 3. [Agent] Use create_document to create specification document
23
+
24
+ 4. [Agent] Use section tool to add specification sections:
25
+ • Endpoints/methods with full signatures
26
+ • Request/response formats with examples
27
+ • Error conditions and handling
28
+ • Rate limits and quotas
29
+ • Authentication flows
30
+ • Version compatibility matrix
31
+
32
+ 5. [Agent] Document integration acceptance criteria:
33
+ • Happy path: normal expected behavior
34
+ • Edge cases: boundaries, limits, unusual inputs
35
+ • Error handling: all specified error conditions
36
+ • Performance boundaries: latency/throughput requirements
37
+
38
+ ## Specification Principles
39
+
40
+ **Correctness Priority:**
41
+ - Official documentation is source of truth
42
+ - Spec compliance before simplicity
43
+ - Test against specification, not assumptions
44
+ - Verify examples from official docs
45
+
46
+ **Documentation Quality:**
47
+ - Complete API surface coverage
48
+ - Clear examples for common use cases
49
+ - Comprehensive error documentation
50
+ - Version-specific notes where applicable
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: "Spec Feature"
3
+ description: "📋 SPEC: Document internal feature specification"
4
+ whenToUse: "Defining requirements, API contracts, or acceptance criteria for new internal features"
5
+ ---
6
+
7
+ # Workflow: Document Internal Feature Specification
8
+
9
+ 1. [Agent] Gather initial requirements from user:
10
+ • Feature purpose and goals
11
+ • User-facing behavior expectations
12
+ • Key use cases
13
+ • Priorities
14
+
15
+ 2. [Agent] Analyze requirements for gaps and ambiguities:
16
+ • Unclear user flows or interactions
17
+ • Missing UX details (inputs, outputs, feedback)
18
+ • Undefined edge cases or error scenarios
19
+ • Ambiguous feature scope or boundaries
20
+
21
+ **LOOP: While gaps or ambiguities exist**
22
+ ├─ 3. [Agent] Ask user clarifying questions:
23
+ │ • UX details: How should users interact with this?
24
+ │ • Requirements: What happens when X occurs?
25
+ │ • Edge cases: How should system handle Y?
26
+ │ • Priorities: Which aspects are most critical?
27
+ ├─ 4. [Agent] Use decide workflow for technical decisions:
28
+ │ • Implementation approach
29
+ │ • Data structures and storage
30
+ │ • Integration patterns
31
+ │ • Performance and security requirements
32
+ │ • Technical trade-offs
33
+ ├─ 5. [Agent] Update requirements understanding
34
+ └─ 6. IF gaps remain: GOTO step 3
35
+
36
+ 7. [Agent] Use create_document to create specification document
37
+
38
+ 8. [Agent] Use section tool to add complete specification:
39
+ • Feature overview and rationale
40
+ • Detailed functionality description
41
+ • API endpoints/methods with signatures
42
+ • Request/response formats with examples
43
+ • Error conditions and messages
44
+ • Edge cases and boundary conditions
45
+ • Performance and security requirements
46
+ • Add @references to external API specs (if integrating third-party services)
47
+ Format: @/docs/specs/external-api-name or @/docs/specs/external-api#endpoint
48
+
49
+ 9. [Agent] Document acceptance criteria:
50
+ • Happy path: normal expected behavior
51
+ • Edge cases: boundaries, limits, unusual inputs
52
+ • Error handling: all error conditions
53
+ • Performance boundaries: latency/throughput requirements
54
+ • Security requirements: authentication, authorization, validation
55
+
56
+ 10. [Agent] Document selected implementation approach from decide workflow
57
+
58
+ ## Specification Principles
59
+
60
+ **Gap Analysis:**
61
+ - Identify unclear or missing requirements early
62
+ - Ask questions to avoid assumptions
63
+ - Clarify UX and user expectations with user
64
+ - Make technical decisions independently using decide workflow
65
+
66
+ **User vs Agent Decisions:**
67
+ - User decides: UX, feature scope, priorities, business rules
68
+ - Agent decides: Implementation, data structures, patterns, performance, security, technical trade-offs
69
+
70
+ **Clarity:**
71
+ - Clear, unambiguous requirements
72
+ - Complete coverage of functionality
73
+ - Specific, measurable acceptance criteria
74
+ - No assumptions without validation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-prompt-guide-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for markdown CRUD operations on specification documents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,6 +45,8 @@
45
45
  },
46
46
  "files": [
47
47
  "dist",
48
+ ".ai-prompt-guide/workflows",
49
+ ".ai-prompt-guide/guides",
48
50
  "README.md",
49
51
  "LICENSE",
50
52
  "package.json"