@vfarcic/dot-ai 0.4.9 → 0.5.1
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.
- package/.claude/commands/context-load.md +11 -0
- package/.claude/commands/context-save.md +16 -0
- package/.claude/commands/prd-done.md +115 -0
- package/.claude/commands/prd-get.md +25 -0
- package/.claude/commands/prd-start.md +87 -0
- package/.claude/commands/task-done.md +77 -0
- package/.claude/commands/tests-reminder.md +32 -0
- package/.claude/settings.local.json +20 -0
- package/.eslintrc.json +25 -0
- package/.github/workflows/ci.yml +170 -0
- package/.prettierrc.json +10 -0
- package/.teller.yml +8 -0
- package/CLAUDE.md +162 -0
- package/assets/images/logo.png +0 -0
- package/bin/dot-ai.ts +47 -0
- package/destroy.sh +45 -0
- package/devbox.json +13 -0
- package/devbox.lock +225 -0
- package/docs/API.md +449 -0
- package/docs/CONTEXT.md +49 -0
- package/docs/DEVELOPMENT.md +203 -0
- package/docs/NEXT_STEPS.md +97 -0
- package/docs/STAGE_BASED_API.md +97 -0
- package/docs/cli-guide.md +798 -0
- package/docs/design.md +750 -0
- package/docs/discovery-engine.md +515 -0
- package/docs/error-handling.md +429 -0
- package/docs/function-registration.md +157 -0
- package/docs/mcp-guide.md +416 -0
- package/package.json +2 -123
- package/renovate.json +51 -0
- package/setup.sh +111 -0
- package/{dist/cli.js → src/cli.ts} +26 -19
- package/src/core/claude.ts +280 -0
- package/src/core/deploy-operation.ts +127 -0
- package/src/core/discovery.ts +900 -0
- package/src/core/error-handling.ts +562 -0
- package/src/core/index.ts +143 -0
- package/src/core/kubernetes-utils.ts +218 -0
- package/src/core/memory.ts +148 -0
- package/src/core/schema.ts +830 -0
- package/src/core/session-utils.ts +97 -0
- package/src/core/workflow.ts +234 -0
- package/src/index.ts +18 -0
- package/src/interfaces/cli.ts +872 -0
- package/src/interfaces/mcp.ts +183 -0
- package/src/mcp/server.ts +131 -0
- package/src/tools/answer-question.ts +807 -0
- package/src/tools/choose-solution.ts +169 -0
- package/src/tools/deploy-manifests.ts +94 -0
- package/src/tools/generate-manifests.ts +502 -0
- package/src/tools/index.ts +41 -0
- package/src/tools/recommend.ts +370 -0
- package/tests/__mocks__/@kubernetes/client-node.ts +106 -0
- package/tests/build-system.test.ts +345 -0
- package/tests/configuration.test.ts +226 -0
- package/tests/core/deploy-operation.test.ts +38 -0
- package/tests/core/discovery.test.ts +1648 -0
- package/tests/core/error-handling.test.ts +632 -0
- package/tests/core/schema.test.ts +1658 -0
- package/tests/core/session-utils.test.ts +245 -0
- package/tests/core.test.ts +439 -0
- package/tests/fixtures/configmap-no-labels.yaml +8 -0
- package/tests/fixtures/crossplane-app-configuration.yaml +6 -0
- package/tests/fixtures/crossplane-providers.yaml +45 -0
- package/tests/fixtures/crossplane-rbac.yaml +48 -0
- package/tests/fixtures/invalid-configmap.yaml +8 -0
- package/tests/fixtures/invalid-deployment.yaml +17 -0
- package/tests/fixtures/test-deployment.yaml +28 -0
- package/tests/fixtures/valid-configmap.yaml +15 -0
- package/tests/infrastructure.test.ts +426 -0
- package/tests/interfaces/cli.test.ts +1036 -0
- package/tests/interfaces/mcp.test.ts +139 -0
- package/tests/kubernetes-utils.test.ts +200 -0
- package/tests/mcp/server.test.ts +126 -0
- package/tests/setup.ts +31 -0
- package/tests/tools/answer-question.test.ts +367 -0
- package/tests/tools/choose-solution.test.ts +481 -0
- package/tests/tools/deploy-manifests.test.ts +185 -0
- package/tests/tools/generate-manifests.test.ts +441 -0
- package/tests/tools/index.test.ts +111 -0
- package/tests/tools/recommend.test.ts +180 -0
- package/tsconfig.json +34 -0
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/core/claude.d.ts +0 -42
- package/dist/core/claude.d.ts.map +0 -1
- package/dist/core/claude.js +0 -229
- package/dist/core/deploy-operation.d.ts +0 -38
- package/dist/core/deploy-operation.d.ts.map +0 -1
- package/dist/core/deploy-operation.js +0 -101
- package/dist/core/discovery.d.ts +0 -162
- package/dist/core/discovery.d.ts.map +0 -1
- package/dist/core/discovery.js +0 -758
- package/dist/core/error-handling.d.ts +0 -167
- package/dist/core/error-handling.d.ts.map +0 -1
- package/dist/core/error-handling.js +0 -399
- package/dist/core/index.d.ts +0 -42
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -123
- package/dist/core/kubernetes-utils.d.ts +0 -38
- package/dist/core/kubernetes-utils.d.ts.map +0 -1
- package/dist/core/kubernetes-utils.js +0 -177
- package/dist/core/memory.d.ts +0 -45
- package/dist/core/memory.d.ts.map +0 -1
- package/dist/core/memory.js +0 -113
- package/dist/core/schema.d.ts +0 -187
- package/dist/core/schema.d.ts.map +0 -1
- package/dist/core/schema.js +0 -655
- package/dist/core/session-utils.d.ts +0 -29
- package/dist/core/session-utils.d.ts.map +0 -1
- package/dist/core/session-utils.js +0 -121
- package/dist/core/workflow.d.ts +0 -70
- package/dist/core/workflow.d.ts.map +0 -1
- package/dist/core/workflow.js +0 -161
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -32
- package/dist/interfaces/cli.d.ts +0 -74
- package/dist/interfaces/cli.d.ts.map +0 -1
- package/dist/interfaces/cli.js +0 -769
- package/dist/interfaces/mcp.d.ts +0 -30
- package/dist/interfaces/mcp.d.ts.map +0 -1
- package/dist/interfaces/mcp.js +0 -105
- package/dist/mcp/server.d.ts +0 -9
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -151
- package/dist/tools/answer-question.d.ts +0 -27
- package/dist/tools/answer-question.d.ts.map +0 -1
- package/dist/tools/answer-question.js +0 -696
- package/dist/tools/choose-solution.d.ts +0 -23
- package/dist/tools/choose-solution.d.ts.map +0 -1
- package/dist/tools/choose-solution.js +0 -171
- package/dist/tools/deploy-manifests.d.ts +0 -25
- package/dist/tools/deploy-manifests.d.ts.map +0 -1
- package/dist/tools/deploy-manifests.js +0 -74
- package/dist/tools/generate-manifests.d.ts +0 -23
- package/dist/tools/generate-manifests.d.ts.map +0 -1
- package/dist/tools/generate-manifests.js +0 -424
- package/dist/tools/index.d.ts +0 -11
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -34
- package/dist/tools/recommend.d.ts +0 -23
- package/dist/tools/recommend.d.ts.map +0 -1
- package/dist/tools/recommend.js +0 -332
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Load context from tmp/context.md to continue previous work session.
|
|
2
|
+
|
|
3
|
+
Steps:
|
|
4
|
+
1. Read the context file from `tmp/context.md`
|
|
5
|
+
2. Analyze the saved context to understand:
|
|
6
|
+
- What work was completed previously
|
|
7
|
+
- Current status and next steps
|
|
8
|
+
- Available test data and file locations
|
|
9
|
+
- Technical implementation details
|
|
10
|
+
3. Provide a brief summary of the loaded context
|
|
11
|
+
4. Ask the user how they'd like to proceed based on the context
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Save current context to tmp/context.md for session continuity.
|
|
2
|
+
|
|
3
|
+
Steps:
|
|
4
|
+
1. Clear existing context: Delete or empty tmp/context.md if it exists to ensure fresh state
|
|
5
|
+
2. Analyze the current state of work, tasks completed, and next steps
|
|
6
|
+
3. Create a comprehensive context summary including:
|
|
7
|
+
- Current status and what was accomplished
|
|
8
|
+
- Technical implementation details
|
|
9
|
+
- Test data and file locations
|
|
10
|
+
- Manual testing instructions
|
|
11
|
+
- Expected results and next steps
|
|
12
|
+
- Design decisions and architecture notes
|
|
13
|
+
4. Save the fresh context to `tmp/context.md`
|
|
14
|
+
5. Confirm the context has been saved successfully
|
|
15
|
+
|
|
16
|
+
This ensures each context save represents only the current session state, preventing confusion from stale information and keeping context files manageable.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# PRD Done - Cleanup and Close Issue
|
|
2
|
+
|
|
3
|
+
This command provides instructions for completing a PRD (Product Requirements Document) implementation by cleaning up tasks and closing the associated GitHub issue.
|
|
4
|
+
|
|
5
|
+
## Instructions
|
|
6
|
+
|
|
7
|
+
### 1. Remove Taskmaster Tasks
|
|
8
|
+
|
|
9
|
+
I'll use MCP tools to clean up completed tasks from the current PRD:
|
|
10
|
+
|
|
11
|
+
**Option A: Remove all completed tasks (recommended)**
|
|
12
|
+
```
|
|
13
|
+
Use mcp__taskmaster__get_tasks with status="done" to list completed tasks, then use mcp__taskmaster__remove_task for each completed task ID.
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Option B: Remove all tasks if project is complete**
|
|
17
|
+
```
|
|
18
|
+
Use mcp__taskmaster__get_tasks to list all tasks, then use mcp__taskmaster__remove_task to remove each task ID.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Option C: Remove specific tasks**
|
|
22
|
+
```
|
|
23
|
+
Use mcp__taskmaster__remove_task with specific task IDs that are no longer needed.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Close Associated GitHub Issue
|
|
27
|
+
|
|
28
|
+
Use the GitHub CLI to close the issue where the PRD originated:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Close the issue with a completion comment
|
|
32
|
+
gh issue close <issue-number> --comment "✅ PRD implementation completed successfully.
|
|
33
|
+
|
|
34
|
+
**Completed Features:**
|
|
35
|
+
- [Brief summary of implemented features]
|
|
36
|
+
|
|
37
|
+
**Deliverables:**
|
|
38
|
+
- [List key deliverables like packages, workflows, etc.]
|
|
39
|
+
|
|
40
|
+
**Status:** Ready for production use.
|
|
41
|
+
|
|
42
|
+
🤖 Generated with [Claude Code](https://claude.ai/code)"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. Optional: Create Summary Comment
|
|
46
|
+
|
|
47
|
+
Before closing, optionally add a detailed summary:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
gh issue comment <issue-number> --body "## PRD Implementation Summary
|
|
51
|
+
|
|
52
|
+
### ✅ Completed Tasks
|
|
53
|
+
- Task 1: [Description]
|
|
54
|
+
- Task 2: [Description]
|
|
55
|
+
- Task N: [Description]
|
|
56
|
+
|
|
57
|
+
### 📦 Deliverables
|
|
58
|
+
- [Package/Feature 1]: Available at [link/version]
|
|
59
|
+
- [Package/Feature 2]: [Description]
|
|
60
|
+
|
|
61
|
+
### 🔗 Related Resources
|
|
62
|
+
- Documentation: [link]
|
|
63
|
+
- Repository: [link]
|
|
64
|
+
- CI/CD Pipeline: [link]
|
|
65
|
+
|
|
66
|
+
### 🚀 Next Steps
|
|
67
|
+
- [Any follow-up items or related PRDs]
|
|
68
|
+
|
|
69
|
+
Implementation completed successfully! 🎉"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Example Workflow
|
|
73
|
+
|
|
74
|
+
For PRD issue #11 (npm package distribution):
|
|
75
|
+
|
|
76
|
+
1. **Clean up taskmaster tasks using MCP tools**
|
|
77
|
+
2. **Add completion summary to GitHub issue**
|
|
78
|
+
3. **Close the GitHub issue**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
gh issue comment 11 --body "## ✅ NPM Package Distribution - Implementation Complete
|
|
82
|
+
|
|
83
|
+
### Deliverables
|
|
84
|
+
- **Package**: @vfarcic/dot-ai@0.3.0 published to npm
|
|
85
|
+
- **Global Install**: \`npm install -g @vfarcic/dot-ai\`
|
|
86
|
+
- **npx Support**: \`npx @vfarcic/dot-ai --version\`
|
|
87
|
+
- **CI/CD**: Automated minor version increments and publishing
|
|
88
|
+
- **Security**: CodeQL analysis and dependency audits
|
|
89
|
+
|
|
90
|
+
### Testing Verified
|
|
91
|
+
- ✅ 385 tests passing (75 skipped integration tests)
|
|
92
|
+
- ✅ npm package distribution working
|
|
93
|
+
- ✅ MCP server compatibility maintained
|
|
94
|
+
- ✅ CLI functionality preserved
|
|
95
|
+
|
|
96
|
+
Ready for production use! 🚀"
|
|
97
|
+
|
|
98
|
+
gh issue close 11 --comment "PRD #11 implementation completed and deployed successfully. Package available at https://www.npmjs.com/package/@vfarcic/dot-ai"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Tips
|
|
102
|
+
|
|
103
|
+
- **Always verify completion** before closing issues
|
|
104
|
+
- **Use MCP tools** for task management instead of CLI commands
|
|
105
|
+
- **Document deliverables** clearly for future reference
|
|
106
|
+
- **Link to deployed resources** (packages, docs, etc.)
|
|
107
|
+
- **Mention any follow-up work** or related PRDs
|
|
108
|
+
- **Use consistent formatting** for professional appearance
|
|
109
|
+
|
|
110
|
+
## Related Commands
|
|
111
|
+
|
|
112
|
+
- `/prd-start` - Start working on a PRD issue
|
|
113
|
+
- Use MCP `mcp__taskmaster__get_tasks` - View current taskmaster tasks
|
|
114
|
+
- `gh issue list` - List open issues
|
|
115
|
+
- `gh issue view <number>` - View specific issue details
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Fetch Open GitHub Issues with PRD Label"
|
|
3
|
+
description: "Fetch all open GitHub issues from this project that have the 'PRD' label"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fetch Open GitHub Issues with PRD Label
|
|
7
|
+
|
|
8
|
+
Please fetch all open GitHub issues from this project repository that have the label "PRD".
|
|
9
|
+
|
|
10
|
+
Use the `gh` command to:
|
|
11
|
+
1. Get the current repository information
|
|
12
|
+
2. List all open issues with the "PRD" label
|
|
13
|
+
3. Display the results in a readable format showing:
|
|
14
|
+
- Issue number
|
|
15
|
+
- Title
|
|
16
|
+
- Created date
|
|
17
|
+
- Author
|
|
18
|
+
|
|
19
|
+
Commands to run:
|
|
20
|
+
```bash
|
|
21
|
+
!gh repo view --json owner,name
|
|
22
|
+
!gh issue list --label "PRD" --state open --json number,title,createdAt,author
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Format the output in a clear, readable way for easy review of all open PRD-related issues.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Start Working on a PRD"
|
|
3
|
+
description: "Interactive workflow to start working on a Product Requirements Document (PRD) issue using Taskmaster MCP for task management"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Start Working on a PRD
|
|
7
|
+
|
|
8
|
+
Interactive workflow to start working on a Product Requirements Document (PRD) issue with structured design discussion, GitHub issue management, and Taskmaster MCP task breakdown.
|
|
9
|
+
|
|
10
|
+
## Workflow Steps:
|
|
11
|
+
|
|
12
|
+
### 1. PRD Selection
|
|
13
|
+
- Ask user which PRD issue they want to work on (provide issue number)
|
|
14
|
+
- Fetch the selected PRD issue details using: `gh issue view <issue_number> --json title,body,number,url`
|
|
15
|
+
- Display the PRD content for review
|
|
16
|
+
|
|
17
|
+
### 2. Design Discussion
|
|
18
|
+
- Engage in detailed design discussion about the PRD
|
|
19
|
+
- Explore technical approaches, architecture decisions, and implementation strategies
|
|
20
|
+
- Discuss trade-offs, dependencies, and potential challenges
|
|
21
|
+
- Clarify requirements and acceptance criteria
|
|
22
|
+
- Document key design decisions
|
|
23
|
+
|
|
24
|
+
### 3. GitHub Issue Update
|
|
25
|
+
- Update the GitHub issue body with design decisions and approach
|
|
26
|
+
- Replace or enhance the original PRD content with current decisions
|
|
27
|
+
- Keep PRDs up-to-date with architectural changes and design decisions
|
|
28
|
+
- Use: `gh issue edit <issue_number> --body "Updated PRD content with design decisions"`
|
|
29
|
+
- Rationale: Issue body should be single source of truth, not scattered in comments
|
|
30
|
+
|
|
31
|
+
### 4. Task Breakdown Decision
|
|
32
|
+
- Ask user: "Should we break this PRD into smaller tasks or work on it directly?"
|
|
33
|
+
- If tasks are needed: proceed to Taskmaster task creation workflow
|
|
34
|
+
- If working directly: skip to implementation phase
|
|
35
|
+
|
|
36
|
+
### 5. Taskmaster Task Creation (if chosen)
|
|
37
|
+
- Create a Taskmaster project for the PRD: `PRD-{issue_number}: {title}`
|
|
38
|
+
- Collaborate with user to identify specific tasks/subtasks
|
|
39
|
+
- For each task, discuss:
|
|
40
|
+
- Task description and scope
|
|
41
|
+
- Acceptance criteria
|
|
42
|
+
- Dependencies on other tasks
|
|
43
|
+
- Estimated complexity
|
|
44
|
+
- Create tasks in Taskmaster with proper hierarchy and dependencies
|
|
45
|
+
- Link tasks to the parent PRD GitHub issue in task descriptions
|
|
46
|
+
|
|
47
|
+
### 6. Implementation Planning
|
|
48
|
+
- If no tasks: plan direct implementation approach
|
|
49
|
+
- If tasks exist: discuss which task to start with first using Taskmaster task management
|
|
50
|
+
- Set up todo list for tracking progress
|
|
51
|
+
- Establish success criteria and testing approach
|
|
52
|
+
|
|
53
|
+
### 7. Begin Work
|
|
54
|
+
- Start implementation (either on full PRD or first Taskmaster task)
|
|
55
|
+
- Use Taskmaster to track task progress and dependencies
|
|
56
|
+
- Use TodoWrite to track implementation progress within tasks
|
|
57
|
+
- Follow test-driven development principles
|
|
58
|
+
- Regular check-ins on progress using Taskmaster status updates
|
|
59
|
+
|
|
60
|
+
## Implementation Guidelines:
|
|
61
|
+
|
|
62
|
+
- **Always follow CLAUDE.md instructions** for testing and validation
|
|
63
|
+
- **Write tests first** before implementation
|
|
64
|
+
- **Update documentation** as features are developed
|
|
65
|
+
- **Use Taskmaster** to track task progress and dependencies
|
|
66
|
+
- **Use TodoWrite** to track implementation progress within tasks
|
|
67
|
+
- **Mark Taskmaster tasks as done** when completed
|
|
68
|
+
- **Update GitHub PRD issue** with final implementation status
|
|
69
|
+
- **Commit frequently** with descriptive messages
|
|
70
|
+
|
|
71
|
+
## Exit Conditions:
|
|
72
|
+
|
|
73
|
+
- PRD is fully implemented and tested
|
|
74
|
+
- All Taskmaster tasks (if any) are completed and closed
|
|
75
|
+
- GitHub PRD issue is updated with final status
|
|
76
|
+
- Documentation is updated
|
|
77
|
+
- All tests pass
|
|
78
|
+
- Code is committed and pushed
|
|
79
|
+
|
|
80
|
+
## Notes:
|
|
81
|
+
|
|
82
|
+
- This workflow ensures structured approach to PRD development
|
|
83
|
+
- Maintains clear communication through GitHub issue tracking for PRDs
|
|
84
|
+
- Uses Taskmaster MCP for hierarchical task management and dependencies
|
|
85
|
+
- Supports both direct implementation and task-based breakdown
|
|
86
|
+
- Follows project quality standards and testing requirements
|
|
87
|
+
- Separates concerns: GitHub for PRD management, Taskmaster for task execution
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Task Done - Complete Task Validation and Submission
|
|
2
|
+
|
|
3
|
+
Validate that the current development task is complete and ready for submission.
|
|
4
|
+
|
|
5
|
+
## Steps:
|
|
6
|
+
|
|
7
|
+
1. **Get Current Task**:
|
|
8
|
+
- Identify the current task being worked on from user context
|
|
9
|
+
- If unclear, ask user which task they want to validate as complete
|
|
10
|
+
|
|
11
|
+
2. **Validate Task Completion**:
|
|
12
|
+
- Review the task requirements and implementation details
|
|
13
|
+
- Verify all acceptance criteria are met
|
|
14
|
+
- Check that implementation matches the task description
|
|
15
|
+
|
|
16
|
+
3. **Ensure Test Coverage**:
|
|
17
|
+
- Identify all code files that were modified for this task
|
|
18
|
+
- Verify that tests exist for all new/modified functionality
|
|
19
|
+
- Check test file organization matches source code structure
|
|
20
|
+
- If tests are missing, write them before proceeding
|
|
21
|
+
|
|
22
|
+
4. **Update All Relevant Documentation**:
|
|
23
|
+
- **README.md**: CLI commands, workflow examples, installation steps
|
|
24
|
+
- **docs/API.md**: New interfaces, MCP tools, TypeScript examples
|
|
25
|
+
- **docs/cli-guide.md**: CLI usage examples and troubleshooting
|
|
26
|
+
- **docs/mcp-guide.md**: MCP integration and setup procedures
|
|
27
|
+
- **docs/STAGE_BASED_API.md**: Workflow changes, API updates
|
|
28
|
+
- **docs/DEVELOPMENT.md**: Architecture updates, new components
|
|
29
|
+
- **Other docs**: Context, design, next steps as applicable
|
|
30
|
+
- Never skip documentation updates for new functionality
|
|
31
|
+
|
|
32
|
+
5. **Run Full Test Suite**:
|
|
33
|
+
- Execute `npm test` (unit tests) - ALL tests must pass
|
|
34
|
+
- Execute `npm run test:integration` (integration tests) - ALL tests must pass
|
|
35
|
+
- If any tests fail, fix them before proceeding
|
|
36
|
+
|
|
37
|
+
6. **Mark Task Complete**:
|
|
38
|
+
- Update task status in your project management system
|
|
39
|
+
- Update any subtasks that are also complete
|
|
40
|
+
|
|
41
|
+
7. **Commit and Push Changes**:
|
|
42
|
+
- Run `git status` to see all changes
|
|
43
|
+
- Run `git diff` to review changes
|
|
44
|
+
- Create a descriptive commit message referencing the task
|
|
45
|
+
- Commit all changes with proper message format
|
|
46
|
+
- Push changes to GitHub
|
|
47
|
+
|
|
48
|
+
8. **Summary Report**:
|
|
49
|
+
- Provide summary of what was completed
|
|
50
|
+
- List files modified, tests added, and documentation updated
|
|
51
|
+
- Confirm task is marked as done
|
|
52
|
+
- Confirm changes are pushed to GitHub
|
|
53
|
+
|
|
54
|
+
## Validation Criteria:
|
|
55
|
+
|
|
56
|
+
- ✅ Task requirements fully implemented
|
|
57
|
+
- ✅ All new/modified code has test coverage
|
|
58
|
+
- ✅ All relevant documentation updated
|
|
59
|
+
- ✅ All unit tests pass (npm test)
|
|
60
|
+
- ✅ All integration tests pass (npm run test:integration)
|
|
61
|
+
- ✅ Task marked as done
|
|
62
|
+
- ✅ Changes committed and pushed to GitHub
|
|
63
|
+
|
|
64
|
+
## Exit Conditions:
|
|
65
|
+
|
|
66
|
+
- If task is not actually complete, provide specific feedback on what needs to be finished
|
|
67
|
+
- If tests are failing, fix the failures before marking task as done
|
|
68
|
+
- If critical functionality is missing tests, write tests before proceeding
|
|
69
|
+
- If documentation is outdated or missing for new functionality, update all relevant docs
|
|
70
|
+
- Never mark a task as done if any validation criteria are not met
|
|
71
|
+
|
|
72
|
+
## Notes:
|
|
73
|
+
|
|
74
|
+
- This command ensures comprehensive task completion following CLAUDE.md guidelines
|
|
75
|
+
- Maintains the high quality standards established in the project
|
|
76
|
+
- Follows the test-driven development approach required by the project
|
|
77
|
+
- Ensures proper task tracking and version control practices
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Tests Reminder
|
|
2
|
+
|
|
3
|
+
Remind Claude about testing requirements when making code changes.
|
|
4
|
+
|
|
5
|
+
## Reminder for Claude
|
|
6
|
+
|
|
7
|
+
**🔴 BEFORE MARKING ANY TASK/SUBTASK AS COMPLETE:**
|
|
8
|
+
|
|
9
|
+
□ **Tests Written**: Have you written tests for new functionality?
|
|
10
|
+
□ **All Tests Pass**: Have you run `npm test` to ensure all 562+ tests pass?
|
|
11
|
+
□ **No Test Failures**: Are there any failing tests that need to be fixed?
|
|
12
|
+
|
|
13
|
+
**❌ TASK IS NOT COMPLETE IF:**
|
|
14
|
+
- Any tests are failing
|
|
15
|
+
- New code lacks test coverage
|
|
16
|
+
- You haven't run `npm test` to verify
|
|
17
|
+
|
|
18
|
+
## Required Actions
|
|
19
|
+
|
|
20
|
+
1. **Write/Update Tests**: For any new functionality or code changes
|
|
21
|
+
2. **Run All Tests**: Execute `npm test` to verify everything passes
|
|
22
|
+
3. **Fix Failures**: Address any test failures before proceeding
|
|
23
|
+
4. **Update CLAUDE.md**: Check if documentation needs updates
|
|
24
|
+
|
|
25
|
+
## Testing Commands
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm test # Run all tests (562+ tests across 21 suites)
|
|
29
|
+
npm run build # Build project
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Remember**: Changes are only considered successful when validated by passing tests!
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"WebFetch(domain:modelcontextprotocol.io)",
|
|
5
|
+
"WebFetch(domain:modelcontextprotocol.io)",
|
|
6
|
+
"WebFetch(domain:modelcontextprotocol.io)",
|
|
7
|
+
"Bash(rg:*)",
|
|
8
|
+
"Bash(npm run build:*)",
|
|
9
|
+
"Bash(npm test)",
|
|
10
|
+
"Bash(grep:*)",
|
|
11
|
+
"Bash(gh repo view:*)",
|
|
12
|
+
"Bash(gh issue list:*)",
|
|
13
|
+
"Bash(gh run view:*)"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"enableAllProjectMcpServers": true,
|
|
17
|
+
"enabledMcpjsonServers": [
|
|
18
|
+
"dot-ai"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true,
|
|
5
|
+
"node": true,
|
|
6
|
+
"jest": true
|
|
7
|
+
},
|
|
8
|
+
"extends": [
|
|
9
|
+
"eslint:recommended"
|
|
10
|
+
],
|
|
11
|
+
"parser": "@typescript-eslint/parser",
|
|
12
|
+
"parserOptions": {
|
|
13
|
+
"ecmaVersion": "latest",
|
|
14
|
+
"sourceType": "module"
|
|
15
|
+
},
|
|
16
|
+
"plugins": [
|
|
17
|
+
"@typescript-eslint"
|
|
18
|
+
],
|
|
19
|
+
"rules": {
|
|
20
|
+
"no-unused-vars": "off",
|
|
21
|
+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
|
22
|
+
"no-console": "warn"
|
|
23
|
+
},
|
|
24
|
+
"ignorePatterns": ["dist/", "node_modules/", "coverage/"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
name: CI Pipeline, Security & Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
release:
|
|
9
|
+
types: [ published ]
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
actions: read
|
|
13
|
+
contents: write
|
|
14
|
+
security-events: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Setup Node.js
|
|
26
|
+
uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: '20.x'
|
|
29
|
+
cache: 'npm'
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: npm ci
|
|
33
|
+
|
|
34
|
+
- name: Create mock kubeconfig for tests
|
|
35
|
+
run: |
|
|
36
|
+
cat > kubeconfig.yaml << 'EOF'
|
|
37
|
+
apiVersion: v1
|
|
38
|
+
kind: Config
|
|
39
|
+
clusters:
|
|
40
|
+
- cluster:
|
|
41
|
+
server: https://test-cluster.example.com
|
|
42
|
+
name: test-cluster
|
|
43
|
+
contexts:
|
|
44
|
+
- context:
|
|
45
|
+
cluster: test-cluster
|
|
46
|
+
user: test-user
|
|
47
|
+
name: test-context
|
|
48
|
+
current-context: test-context
|
|
49
|
+
users:
|
|
50
|
+
- name: test-user
|
|
51
|
+
user:
|
|
52
|
+
token: fake-token
|
|
53
|
+
EOF
|
|
54
|
+
|
|
55
|
+
- name: Run linter
|
|
56
|
+
run: npm run lint
|
|
57
|
+
|
|
58
|
+
- name: Build project
|
|
59
|
+
run: npm run build
|
|
60
|
+
|
|
61
|
+
- name: Run tests
|
|
62
|
+
run: npm test
|
|
63
|
+
|
|
64
|
+
security:
|
|
65
|
+
name: Security Analysis
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- name: Checkout code
|
|
70
|
+
uses: actions/checkout@v4
|
|
71
|
+
|
|
72
|
+
- name: Initialize CodeQL
|
|
73
|
+
uses: github/codeql-action/init@v3
|
|
74
|
+
with:
|
|
75
|
+
languages: typescript
|
|
76
|
+
|
|
77
|
+
- name: Setup Node.js
|
|
78
|
+
uses: actions/setup-node@v4
|
|
79
|
+
with:
|
|
80
|
+
node-version: '20.x'
|
|
81
|
+
cache: 'npm'
|
|
82
|
+
|
|
83
|
+
- name: Install dependencies
|
|
84
|
+
run: npm ci
|
|
85
|
+
|
|
86
|
+
- name: Build project
|
|
87
|
+
run: npm run build
|
|
88
|
+
|
|
89
|
+
- name: Run dependency security audit
|
|
90
|
+
run: npm audit --audit-level moderate
|
|
91
|
+
|
|
92
|
+
- name: Perform CodeQL Analysis
|
|
93
|
+
uses: github/codeql-action/analyze@v3
|
|
94
|
+
|
|
95
|
+
publish:
|
|
96
|
+
needs: [test, security]
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
99
|
+
|
|
100
|
+
steps:
|
|
101
|
+
- name: Checkout code
|
|
102
|
+
uses: actions/checkout@v4
|
|
103
|
+
with:
|
|
104
|
+
fetch-depth: 0
|
|
105
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
106
|
+
|
|
107
|
+
- name: Setup Node.js
|
|
108
|
+
uses: actions/setup-node@v4
|
|
109
|
+
with:
|
|
110
|
+
node-version: '20.x'
|
|
111
|
+
registry-url: 'https://registry.npmjs.org'
|
|
112
|
+
cache: 'npm'
|
|
113
|
+
|
|
114
|
+
- name: Install dependencies
|
|
115
|
+
run: npm ci
|
|
116
|
+
|
|
117
|
+
- name: Build project
|
|
118
|
+
run: npm run build
|
|
119
|
+
|
|
120
|
+
- name: Auto-increment version and check for changes
|
|
121
|
+
id: version-check
|
|
122
|
+
run: |
|
|
123
|
+
PUBLISHED_VERSION=$(npm view @vfarcic/dot-ai version 2>/dev/null || echo "0.0.0")
|
|
124
|
+
echo "published-version=$PUBLISHED_VERSION" >> $GITHUB_OUTPUT
|
|
125
|
+
|
|
126
|
+
# Auto-increment minor version
|
|
127
|
+
npm version minor --no-git-tag-version
|
|
128
|
+
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
129
|
+
echo "new-version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
130
|
+
echo "Version incremented from $PUBLISHED_VERSION to $NEW_VERSION"
|
|
131
|
+
echo "version-changed=true" >> $GITHUB_OUTPUT
|
|
132
|
+
|
|
133
|
+
- name: Publish to npm
|
|
134
|
+
if: steps.version-check.outputs.version-changed == 'true'
|
|
135
|
+
run: npm publish --access public
|
|
136
|
+
env:
|
|
137
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
138
|
+
|
|
139
|
+
- name: Commit version bump and create Git tag
|
|
140
|
+
if: steps.version-check.outputs.version-changed == 'true'
|
|
141
|
+
run: |
|
|
142
|
+
VERSION=${{ steps.version-check.outputs.new-version }}
|
|
143
|
+
git config --local user.email "action@github.com"
|
|
144
|
+
git config --local user.name "GitHub Action"
|
|
145
|
+
git add package.json
|
|
146
|
+
git commit -m "chore: bump version to $VERSION [skip ci]"
|
|
147
|
+
git tag -a "v$VERSION" -m "Release version $VERSION"
|
|
148
|
+
git push origin main
|
|
149
|
+
git push origin "v$VERSION"
|
|
150
|
+
|
|
151
|
+
- name: Generate release notes
|
|
152
|
+
if: steps.version-check.outputs.version-changed == 'true'
|
|
153
|
+
run: |
|
|
154
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
155
|
+
echo "# Release v$VERSION" > RELEASE_NOTES.md
|
|
156
|
+
echo "" >> RELEASE_NOTES.md
|
|
157
|
+
echo "## Changes" >> RELEASE_NOTES.md
|
|
158
|
+
git log --oneline $(git describe --tags --abbrev=0 HEAD~1)..HEAD >> RELEASE_NOTES.md 2>/dev/null || echo "Initial release" >> RELEASE_NOTES.md
|
|
159
|
+
|
|
160
|
+
- name: Create GitHub Release
|
|
161
|
+
if: steps.version-check.outputs.version-changed == 'true'
|
|
162
|
+
uses: actions/create-release@v1
|
|
163
|
+
env:
|
|
164
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
165
|
+
with:
|
|
166
|
+
tag_name: v${{ steps.version-check.outputs.new-version }}
|
|
167
|
+
release_name: Release v${{ steps.version-check.outputs.new-version }}
|
|
168
|
+
body_path: RELEASE_NOTES.md
|
|
169
|
+
draft: false
|
|
170
|
+
prerelease: false
|
package/.prettierrc.json
ADDED