metacoding 1.4.2 → 1.5.0
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/CHANGELOG.md +86 -0
- package/README.md +183 -42
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +15 -13
- package/lib/cli.js.map +1 -1
- package/lib/commands/init.d.ts +7 -0
- package/lib/commands/init.d.ts.map +1 -1
- package/lib/commands/init.js +282 -34
- package/lib/commands/init.js.map +1 -1
- package/lib/services/assistant-adapter.d.ts +18 -0
- package/lib/services/assistant-adapter.d.ts.map +1 -0
- package/lib/services/assistant-adapter.js +246 -0
- package/lib/services/assistant-adapter.js.map +1 -0
- package/lib/services/template-manager.d.ts.map +1 -1
- package/lib/services/template-manager.js +4 -0
- package/lib/services/template-manager.js.map +1 -1
- package/lib/types/index.d.ts +11 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/assistants/AGENTS.md +203 -0
- package/templates/assistants/CLAUDE.md +156 -0
- package/templates/assistants/GEMINI.md +193 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Development Guidelines for Claude Code
|
|
2
|
+
|
|
3
|
+
This file provides project instructions for Claude Code to ensure consistent development practices and workflow adherence.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
{{PROJECT_DESCRIPTION}}
|
|
8
|
+
|
|
9
|
+
**Project Goals:**
|
|
10
|
+
|
|
11
|
+
- Provide robust development workflow and best practices
|
|
12
|
+
- Ensure code quality and maintainability standards
|
|
13
|
+
- Enable efficient team collaboration and knowledge sharing
|
|
14
|
+
|
|
15
|
+
**Tech Stack:** {{TECH_STACK}}
|
|
16
|
+
|
|
17
|
+
## Development Environment
|
|
18
|
+
|
|
19
|
+
**Working in:** {{ENVIRONMENT_TYPE}} environment
|
|
20
|
+
**Project Type:** {{PROJECT_DOMAIN}} development
|
|
21
|
+
|
|
22
|
+
## Core Development Workflow
|
|
23
|
+
|
|
24
|
+
**CRITICAL: Follow this strict 7-step workflow for ALL development tasks.**
|
|
25
|
+
|
|
26
|
+
### Step 1: Task Understanding and Planning
|
|
27
|
+
|
|
28
|
+
- Begin by thoroughly reading project documentation and exploring the codebase
|
|
29
|
+
- Measure your uncertainty level (scale 1.0 to 0.1) before proceeding
|
|
30
|
+
- If uncertainty > 0.1, continue research before asking clarifying questions
|
|
31
|
+
- Present implementation outline and get explicit user confirmation
|
|
32
|
+
- **Documentation-first principle:** No implementation until documentation is complete
|
|
33
|
+
|
|
34
|
+
### Step 2: Task Management
|
|
35
|
+
|
|
36
|
+
- Add all tasks to `/_meta/project-task-list.md` BEFORE implementation
|
|
37
|
+
- Use standardized naming: `[AREA]-TASK-[NUMBER]` format
|
|
38
|
+
- Mark tasks "In Progress" with clear descriptions
|
|
39
|
+
- Break complex tasks into smaller, manageable subtasks
|
|
40
|
+
|
|
41
|
+
### Step 3: Test-Driven Development (TDD)
|
|
42
|
+
|
|
43
|
+
- Document test cases in `/test/test-documentation.md` FIRST
|
|
44
|
+
- Define expected behavior, inputs, outputs, and edge cases
|
|
45
|
+
- Implement tests after documentation is complete
|
|
46
|
+
- Verify test failure (red phase), then implement code (green phase)
|
|
47
|
+
|
|
48
|
+
### Step 4: Implementation and Verification
|
|
49
|
+
|
|
50
|
+
- Write production code to make tests pass
|
|
51
|
+
- Run all tests (new and existing)
|
|
52
|
+
- Get user confirmation that implementation meets requirements
|
|
53
|
+
- Refactor while maintaining test coverage
|
|
54
|
+
|
|
55
|
+
### Step 5: Documentation and Status Updates
|
|
56
|
+
|
|
57
|
+
- Update all relevant documentation
|
|
58
|
+
- Mark completed tasks in `/_meta/project-task-list.md`
|
|
59
|
+
- Update test documentation status
|
|
60
|
+
- Update `CHANGELOG.md` with user-facing changes
|
|
61
|
+
|
|
62
|
+
### Step 6: Version Control
|
|
63
|
+
|
|
64
|
+
- Commit changes with conventional commit messages
|
|
65
|
+
- Include tests, documentation, and code together
|
|
66
|
+
- Write descriptive commit messages explaining what and why
|
|
67
|
+
- Keep commits atomic (one complete feature per commit)
|
|
68
|
+
|
|
69
|
+
### Step 7: Workflow Completion Check
|
|
70
|
+
|
|
71
|
+
- Verify all workflow requirements are satisfied
|
|
72
|
+
- Ensure tests pass, documentation is current, code is committed
|
|
73
|
+
- Complete current workflow before starting new tasks
|
|
74
|
+
|
|
75
|
+
## Workflow Enforcement Rules
|
|
76
|
+
|
|
77
|
+
### Documentation-First Principle
|
|
78
|
+
|
|
79
|
+
**MANDATORY: Document first, execute second for ALL development work.**
|
|
80
|
+
|
|
81
|
+
- Never begin coding until corresponding documentation is complete
|
|
82
|
+
- Task documentation required in `/_meta/project-task-list.md`
|
|
83
|
+
- Test documentation required in `/test/test-documentation.md`
|
|
84
|
+
- User must explicitly approve plan, scope, and consequences
|
|
85
|
+
|
|
86
|
+
### Single-Task Focus
|
|
87
|
+
|
|
88
|
+
**MANDATORY: One change at a time - never mix tasks.**
|
|
89
|
+
|
|
90
|
+
- Never work on multiple unrelated tasks simultaneously
|
|
91
|
+
- When new requests arise:
|
|
92
|
+
- **Blocking requests:** Add as subtask to current work
|
|
93
|
+
- **Non-blocking requests:** Add to task list, complete current workflow first
|
|
94
|
+
- Politely redirect users who try to switch tasks mid-workflow
|
|
95
|
+
|
|
96
|
+
### Quality Gates
|
|
97
|
+
|
|
98
|
+
- Complete every step in order - no shortcuts
|
|
99
|
+
- Focus on one task at a time until fully complete
|
|
100
|
+
- TDD approach is mandatory - no skipping tests
|
|
101
|
+
- All documentation must be current
|
|
102
|
+
- No uncommitted changes - commit before moving on
|
|
103
|
+
|
|
104
|
+
## Project Commands
|
|
105
|
+
|
|
106
|
+
# Common Commands
|
|
107
|
+
|
|
108
|
+
- `npm run build`: {{BUILD_COMMAND}}
|
|
109
|
+
- `npm test`: {{TEST_COMMAND}}
|
|
110
|
+
- `npm run lint`: {{LINT_COMMAND}}
|
|
111
|
+
- `npm run typecheck`: {{TYPECHECK_COMMAND}}
|
|
112
|
+
|
|
113
|
+
# Development Workflow
|
|
114
|
+
|
|
115
|
+
- Always run tests after making changes
|
|
116
|
+
- Use conventional commit messages (feat:, fix:, docs:, etc.)
|
|
117
|
+
- Prefer running single tests during development for performance
|
|
118
|
+
- Run full test suite before committing
|
|
119
|
+
|
|
120
|
+
## Code Style Guidelines
|
|
121
|
+
|
|
122
|
+
- {{CODE_STYLE_GUIDELINES}}
|
|
123
|
+
- Follow language-specific conventions defined in instruction files
|
|
124
|
+
- Use meaningful variable and function names
|
|
125
|
+
- Keep functions focused and reasonably sized
|
|
126
|
+
- Prefer early returns over deep nesting
|
|
127
|
+
- Add comments for complex business logic
|
|
128
|
+
|
|
129
|
+
## Testing Instructions
|
|
130
|
+
|
|
131
|
+
- Write tests before implementing features (TDD)
|
|
132
|
+
- Cover edge cases and error conditions
|
|
133
|
+
- Use realistic test data and fixtures
|
|
134
|
+
- Mock external dependencies appropriately
|
|
135
|
+
- Maintain high test coverage for critical functionality
|
|
136
|
+
|
|
137
|
+
## Repository Structure
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
{{REPOSITORY_STRUCTURE}}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Important Notes
|
|
144
|
+
|
|
145
|
+
- **Temporary files:** Always clean up debug files, temporary outputs, and experimental code
|
|
146
|
+
- **File organization:** Keep source code in appropriate directories, never in project root
|
|
147
|
+
- **Error handling:** Implement comprehensive error handling with proper logging
|
|
148
|
+
- **Performance:** Consider performance implications in all implementations
|
|
149
|
+
- **Security:** Follow secure coding practices, validate inputs, sanitize outputs
|
|
150
|
+
|
|
151
|
+
## Validation Reminder
|
|
152
|
+
|
|
153
|
+
After setup, test these instructions by asking:
|
|
154
|
+
**"What is the development workflow for this project?"**
|
|
155
|
+
|
|
156
|
+
The assistant should reference the 7-step workflow and demonstrate understanding of the documentation-first principle and single-task focus enforcement.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Style Guide for Gemini Code Assist
|
|
2
|
+
|
|
3
|
+
This configuration provides development guidelines for Gemini Code Assist to ensure consistent coding practices and workflow adherence.
|
|
4
|
+
|
|
5
|
+
## Project Configuration
|
|
6
|
+
|
|
7
|
+
**Project:** {{PROJECT_NAME}}
|
|
8
|
+
**Description:** {{PROJECT_DESCRIPTION}}
|
|
9
|
+
**Tech Stack:** {{TECH_STACK}}
|
|
10
|
+
**Environment:** {{ENVIRONMENT_TYPE}} development
|
|
11
|
+
**Domain:** {{PROJECT_DOMAIN}}
|
|
12
|
+
|
|
13
|
+
## Development Workflow Configuration
|
|
14
|
+
|
|
15
|
+
**IMPORTANT: Follow this mandatory 7-step development workflow for ALL coding tasks.**
|
|
16
|
+
|
|
17
|
+
### Workflow Step 1: Task Understanding and Planning
|
|
18
|
+
|
|
19
|
+
**Configuration Rule:** Always analyze before implementing.
|
|
20
|
+
|
|
21
|
+
- Read project system documentation and explore codebase structure completely
|
|
22
|
+
- Evaluate uncertainty level on scale from 1.0 (total uncertainty) to 0.1 (very low uncertainty)
|
|
23
|
+
- If uncertainty exceeds 0.1, continue research and exploration before requesting clarification
|
|
24
|
+
- Present brief implementation outline with essential details
|
|
25
|
+
- Obtain explicit user confirmation before advancing to next step
|
|
26
|
+
- **Critical Configuration:** No implementation work until all required documentation is complete
|
|
27
|
+
|
|
28
|
+
### Workflow Step 2: Task Management
|
|
29
|
+
|
|
30
|
+
**Configuration Rule:** Document tasks before execution.
|
|
31
|
+
|
|
32
|
+
- Record all tasks in `/_meta/project-task-list.md` BEFORE any implementation work begins
|
|
33
|
+
- Apply standardized naming pattern: `[AREA]-TASK-[NUMBER]`
|
|
34
|
+
- Use area prefixes: CORE, API, UI, DB, AUTH, UTIL, CONFIG, DOC, CLI, TMPL
|
|
35
|
+
- Set task status to "In Progress" with clear descriptions and effort estimates
|
|
36
|
+
- Decompose complex tasks into manageable subtasks with sequential numbering
|
|
37
|
+
|
|
38
|
+
### Workflow Step 3: Test-Driven Development (TDD)
|
|
39
|
+
|
|
40
|
+
**Configuration Rule:** Test documentation precedes test implementation.
|
|
41
|
+
|
|
42
|
+
- Document test cases in `/test/test-documentation.md` BEFORE implementing any test code
|
|
43
|
+
- Define expected behavior including inputs, outputs, and edge case scenarios
|
|
44
|
+
- Create test implementations only after test cases are fully documented
|
|
45
|
+
- Confirm tests fail appropriately (red phase in TDD cycle)
|
|
46
|
+
- Write minimal code to achieve passing tests (green phase in TDD cycle)
|
|
47
|
+
- Clean up test artifacts and organize test data in `/test/fixtures/`
|
|
48
|
+
|
|
49
|
+
### Workflow Step 4: Implementation and Verification
|
|
50
|
+
|
|
51
|
+
**Configuration Rule:** Implement with thorough verification.
|
|
52
|
+
|
|
53
|
+
- Develop production code to satisfy documented requirements
|
|
54
|
+
- Execute all test suites (newly created and existing) to verify functionality
|
|
55
|
+
- Confirm implementation meets user requirements and obtain user validation
|
|
56
|
+
- Refactor code while preserving test coverage (refactor phase in TDD cycle)
|
|
57
|
+
- Remove temporary files and clean up development session artifacts
|
|
58
|
+
|
|
59
|
+
### Workflow Step 5: Documentation and Status Updates
|
|
60
|
+
|
|
61
|
+
**Configuration Rule:** Update documentation consistently.
|
|
62
|
+
|
|
63
|
+
- Update all relevant project documentation files
|
|
64
|
+
- Mark completed tasks in `/_meta/project-task-list.md`
|
|
65
|
+
- Update test execution status in `/test/test-documentation.md`
|
|
66
|
+
- Document user-facing changes in `CHANGELOG.md`
|
|
67
|
+
- Review and update inline code documentation
|
|
68
|
+
|
|
69
|
+
### Workflow Step 6: Version Control
|
|
70
|
+
|
|
71
|
+
**Configuration Rule:** Commit changes systematically.
|
|
72
|
+
|
|
73
|
+
- Apply conventional commit message format (feat:, fix:, docs:, refactor:, test:)
|
|
74
|
+
- Include tests, documentation, and implementation code in atomic commits
|
|
75
|
+
- Compose descriptive commit messages explaining implementation details and rationale
|
|
76
|
+
- Ensure each commit represents complete, functional feature
|
|
77
|
+
|
|
78
|
+
### Workflow Step 7: Workflow Completion Check
|
|
79
|
+
|
|
80
|
+
**Configuration Rule:** Verify completion before proceeding.
|
|
81
|
+
|
|
82
|
+
- Validate all workflow requirements are satisfied
|
|
83
|
+
- Confirm all tests pass and documentation reflects current state
|
|
84
|
+
- Verify code changes are committed with appropriate messages
|
|
85
|
+
- Complete entire workflow cycle before initiating new task planning
|
|
86
|
+
|
|
87
|
+
## Style Guide Enforcement
|
|
88
|
+
|
|
89
|
+
### Documentation-First Style Rule
|
|
90
|
+
|
|
91
|
+
**MANDATORY CONFIGURATION: Documentation precedes execution for ALL development work.**
|
|
92
|
+
|
|
93
|
+
**Style Enforcement:**
|
|
94
|
+
|
|
95
|
+
- Prohibit coding, testing, or implementation until corresponding documentation exists
|
|
96
|
+
- Require task documentation in `/_meta/project-task-list.md` before work initiation
|
|
97
|
+
- Require test documentation in `/test/test-documentation.md` before test code creation
|
|
98
|
+
- Require explicit user approval of plan, scope, and consequences before proceeding
|
|
99
|
+
|
|
100
|
+
**Approved Style Examples:**
|
|
101
|
+
|
|
102
|
+
- "I'll document this task in the task list, create test case documentation, then obtain your confirmation before implementing"
|
|
103
|
+
- "Let me first document these test cases in test-documentation.md, then proceed with test implementation"
|
|
104
|
+
|
|
105
|
+
**Style Violations:**
|
|
106
|
+
|
|
107
|
+
- "I'll implement this feature and update documentation afterward"
|
|
108
|
+
- "I'll create the tests now and document them later"
|
|
109
|
+
|
|
110
|
+
### Single-Task Style Rule
|
|
111
|
+
|
|
112
|
+
**MANDATORY CONFIGURATION: One modification at a time - prohibit task mixing.**
|
|
113
|
+
|
|
114
|
+
**Style Enforcement:**
|
|
115
|
+
|
|
116
|
+
- Prohibit simultaneous work on multiple unrelated tasks or mixing unrelated modifications
|
|
117
|
+
- When additional requests emerge during active development:
|
|
118
|
+
- **Blocking requests:** Include as subtask if it prevents current progress
|
|
119
|
+
- **Non-blocking requests:** Record in task list as separate item, complete current workflow first
|
|
120
|
+
- Redirect users attempting task switching during active workflow
|
|
121
|
+
|
|
122
|
+
**Style Response Templates:**
|
|
123
|
+
|
|
124
|
+
- "I've recorded that request in the task list. Completing our current workflow first ensures quality."
|
|
125
|
+
- "That relates to current work, so I'll include it as a subtask to address immediately."
|
|
126
|
+
- "I recognize that as a separate concern. Let me record it in our task list and complete this workflow first."
|
|
127
|
+
|
|
128
|
+
### Quality Gate Style Rules
|
|
129
|
+
|
|
130
|
+
**Style Enforcement:**
|
|
131
|
+
|
|
132
|
+
- No workflow shortcuts: Complete every step sequentially
|
|
133
|
+
- No parallel task execution: Focus on single task until completely finished
|
|
134
|
+
- No test avoidance: Test-Driven Development approach is required
|
|
135
|
+
- No incomplete documentation: All documentation must reflect current state
|
|
136
|
+
- No uncommitted modifications: Commit all work before advancing to new tasks
|
|
137
|
+
|
|
138
|
+
## Project Style Configuration
|
|
139
|
+
|
|
140
|
+
### Build and Development Commands
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Build configuration
|
|
144
|
+
{{BUILD_COMMAND}}
|
|
145
|
+
|
|
146
|
+
# Test execution
|
|
147
|
+
{{TEST_COMMAND}}
|
|
148
|
+
|
|
149
|
+
# Code linting
|
|
150
|
+
{{LINT_COMMAND}}
|
|
151
|
+
|
|
152
|
+
# Type validation
|
|
153
|
+
{{TYPECHECK_COMMAND}}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Code Style Standards
|
|
157
|
+
|
|
158
|
+
- {{CODE_STYLE_GUIDELINES}}
|
|
159
|
+
- Apply conventional commit format consistently (feat:, fix:, docs:, refactor:, test:)
|
|
160
|
+
- Use descriptive variable and function naming conventions
|
|
161
|
+
- Prefer early returns over deeply nested conditional structures
|
|
162
|
+
- Maintain focused, appropriately-sized function implementations
|
|
163
|
+
- Include comments explaining complex business logic implementation
|
|
164
|
+
|
|
165
|
+
### Testing Style Standards
|
|
166
|
+
|
|
167
|
+
- Follow Test-Driven Development (TDD) methodology consistently
|
|
168
|
+
- Include edge cases and error condition coverage in test suites
|
|
169
|
+
- Use realistic test data and fixture configurations
|
|
170
|
+
- Apply appropriate mocking strategies for external dependencies in unit tests
|
|
171
|
+
- Maintain high test coverage for critical functionality paths
|
|
172
|
+
|
|
173
|
+
### Repository Organization Style
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
{{REPOSITORY_STRUCTURE}}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Development Style Guidelines
|
|
180
|
+
|
|
181
|
+
- **File Organization Style:** Prohibit source code placement in project root directory
|
|
182
|
+
- **Temporary File Style:** Clean up debug files, temporary outputs, experimental code artifacts
|
|
183
|
+
- **Error Handling Style:** Implement comprehensive error handling with structured logging
|
|
184
|
+
- **Resource Management Style:** Ensure proper cleanup of resources and event listeners
|
|
185
|
+
- **Performance Style:** Consider performance implications and identify optimization opportunities
|
|
186
|
+
- **Security Style:** Follow secure coding practices, validate inputs, sanitize outputs
|
|
187
|
+
|
|
188
|
+
## Configuration Validation
|
|
189
|
+
|
|
190
|
+
After style guide setup, validate configuration by requesting:
|
|
191
|
+
**"What is the development workflow for this project?"**
|
|
192
|
+
|
|
193
|
+
Expected response should demonstrate understanding of 7-step workflow, emphasize documentation-first style rule, and show comprehension of single-task focus enforcement style.
|