@sk8metal/michi-cli 0.10.1 → 0.11.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.
Files changed (104) hide show
  1. package/README.md +77 -847
  2. package/dist/scripts/phase-runner.js +1 -1
  3. package/dist/scripts/phase-runner.js.map +1 -1
  4. package/dist/scripts/utils/multi-repo-validator.d.ts +18 -0
  5. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  6. package/dist/scripts/utils/multi-repo-validator.js +42 -0
  7. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  8. package/dist/scripts/utils/tasks-format-validator.js +3 -3
  9. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  10. package/docs/README.md +20 -83
  11. package/docs/getting-started/configuration.md +379 -0
  12. package/docs/getting-started/installation.md +59 -0
  13. package/docs/getting-started/quick-start.md +76 -0
  14. package/docs/guides/ai-tools.md +311 -0
  15. package/docs/guides/atlassian-integration.md +116 -0
  16. package/docs/guides/claude-code.md +155 -0
  17. package/docs/guides/multi-repo.md +117 -0
  18. package/docs/guides/workflow.md +382 -0
  19. package/docs/reference/ai-commands.md +92 -0
  20. package/docs/reference/cli.md +756 -0
  21. package/docs/reference/environment-variables.md +192 -0
  22. package/docs/troubleshooting.md +543 -0
  23. package/package.json +1 -1
  24. package/scripts/phase-runner.ts +1 -1
  25. package/scripts/utils/__tests__/multi-repo-validator.test.ts +159 -1
  26. package/scripts/utils/multi-repo-validator.ts +50 -0
  27. package/scripts/utils/tasks-format-validator.ts +3 -3
  28. package/templates/claude/agents/e2e-first-planner/AGENT.md +1 -1
  29. package/templates/claude/agents/pr-resolver/AGENT.md +15 -3
  30. package/templates/claude/commands/michi/e2e-plan.md +1 -1
  31. package/templates/claude/commands/michi/spec-design.md +2 -2
  32. package/templates/claude/commands/michi/spec-tasks.md +156 -0
  33. package/templates/claude/commands/michi/test-planning.md +1 -1
  34. package/templates/claude/commands/michi/validate-design.md +3 -3
  35. package/templates/claude/commands/michi-multi-repo/impl-all.md +30 -1
  36. package/templates/claude/commands/michi-multi-repo/propagate-specs.md +14 -1
  37. package/templates/claude/commands/michi-multi-repo/spec-review.md +16 -2
  38. package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
  39. package/templates/claude-agent/commands/michi/spec-tasks.md +117 -0
  40. package/templates/claude-agent/rules/code-size-monitor.md +26 -0
  41. package/templates/claude-agent/rules/code-size-rules.md +32 -0
  42. package/templates/codex/AGENTS.override.md +1 -1
  43. package/templates/codex/rules/README.md +2 -2
  44. package/templates/cursor/commands/michi/spec-tasks.md +117 -0
  45. package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +1 -1
  46. package/docs/context.md +0 -59
  47. package/docs/michi-development/contributing/development.md +0 -341
  48. package/docs/michi-development/contributing/release.md +0 -365
  49. package/docs/michi-development/design/config-unification.md +0 -733
  50. package/docs/michi-development/design/design-config-current-state.md +0 -330
  51. package/docs/michi-development/design/design-config-implementation.md +0 -628
  52. package/docs/michi-development/design/design-config-migration.md +0 -952
  53. package/docs/michi-development/design/design-config-security.md +0 -771
  54. package/docs/michi-development/design/design-config-solution.md +0 -583
  55. package/docs/michi-development/design/design-config-testing.md +0 -892
  56. package/docs/michi-development/testing/manual-verification-flow.md +0 -871
  57. package/docs/michi-development/testing/manual-verification-other-tools.md +0 -1279
  58. package/docs/michi-development/testing/manual-verification-troubleshooting.md +0 -122
  59. package/docs/michi-development/testing/pre-publish-checklist.md +0 -560
  60. package/docs/michi-development/testing-strategy.md +0 -87
  61. package/docs/plan.md +0 -275
  62. package/docs/user-guide/getting-started/github-token-setup.md +0 -510
  63. package/docs/user-guide/getting-started/new-repository-setup.md +0 -704
  64. package/docs/user-guide/getting-started/quick-start.md +0 -212
  65. package/docs/user-guide/getting-started/setup.md +0 -819
  66. package/docs/user-guide/guides/agent-skills-integration.md +0 -222
  67. package/docs/user-guide/guides/customization.md +0 -537
  68. package/docs/user-guide/guides/internationalization.md +0 -540
  69. package/docs/user-guide/guides/migration-guide.md +0 -138
  70. package/docs/user-guide/guides/multi-project.md +0 -368
  71. package/docs/user-guide/guides/multi-repo-guide.md +0 -1590
  72. package/docs/user-guide/guides/phase-automation.md +0 -419
  73. package/docs/user-guide/guides/workflow.md +0 -574
  74. package/docs/user-guide/hands-on/README.md +0 -142
  75. package/docs/user-guide/hands-on/claude-agent-setup.md +0 -597
  76. package/docs/user-guide/hands-on/claude-setup.md +0 -452
  77. package/docs/user-guide/hands-on/cursor-setup.md +0 -353
  78. package/docs/user-guide/hands-on/troubleshooting.md +0 -964
  79. package/docs/user-guide/hands-on/verification-checklist.md +0 -439
  80. package/docs/user-guide/hands-on/workflow-walkthrough.md +0 -1078
  81. package/docs/user-guide/reference/config.md +0 -589
  82. package/docs/user-guide/reference/multi-repo-api.md +0 -771
  83. package/docs/user-guide/reference/quick-reference.md +0 -297
  84. package/docs/user-guide/reference/security-test-payloads.md +0 -50
  85. package/docs/user-guide/reference/tasks-template.md +0 -550
  86. package/docs/user-guide/release/ci-setup-java.md +0 -114
  87. package/docs/user-guide/release/ci-setup-nodejs.md +0 -94
  88. package/docs/user-guide/release/ci-setup-php.md +0 -102
  89. package/docs/user-guide/release/ci-setup-troubleshooting.md +0 -94
  90. package/docs/user-guide/release/ci-setup.md +0 -188
  91. package/docs/user-guide/release/release-flow.md +0 -476
  92. package/docs/user-guide/templates/test-specs/README.md +0 -173
  93. package/docs/user-guide/templates/test-specs/e2e-test-spec-template.md +0 -553
  94. package/docs/user-guide/templates/test-specs/integration-test-spec-template.md +0 -435
  95. package/docs/user-guide/templates/test-specs/performance-test-spec-template.md +0 -454
  96. package/docs/user-guide/templates/test-specs/security-test-spec-template.md +0 -625
  97. package/docs/user-guide/templates/test-specs/unit-test-spec-template.md +0 -328
  98. package/docs/user-guide/testing/integration-tests.md +0 -312
  99. package/docs/user-guide/testing/tdd-cycle.md +0 -349
  100. package/docs/user-guide/testing/test-execution-flow.md +0 -396
  101. package/docs/user-guide/testing/test-failure-handling.md +0 -521
  102. package/docs/user-guide/testing/test-planning-flow.md +0 -185
  103. package/docs/user-guide/testing-strategy.md +0 -185
  104. package/docs/verification-guide.md +0 -518
@@ -1,435 +0,0 @@
1
- # Integration Test Specification: {{TEST_NAME}}
2
-
3
- **Author**: {{AUTHOR}}
4
- **Date**: {{DATE}}
5
- **Version**: 1.0
6
-
7
- ## 1. Overview
8
-
9
- ### 1.1 Purpose
10
- {{PURPOSE}}
11
-
12
- Example: To verify that multiple components in the {{SYSTEM_NAME}} system work correctly together and data flows properly between integrated modules.
13
-
14
- ### 1.2 Scope
15
- {{SCOPE}}
16
-
17
- Example: This test specification covers the integration between the API layer, service layer, and database layer for the user management feature.
18
-
19
- ### 1.3 Testing Tool
20
- - **Tool**: {{TOOL_NAME}}
21
- - **Version**: {{VERSION}}
22
-
23
- Example:
24
- - **Tool**: Vitest (Node.js) / JUnit 5 with Spring Test (Java) / PHPUnit with Laravel Testing (PHP)
25
- - **Version**: 1.0.0 / 5.10.0 / 10.5.0
26
-
27
- ## 2. Test Environment
28
-
29
- ### 2.1 Software Requirements
30
- - Programming Language: {{LANGUAGE}} {{LANGUAGE_VERSION}}
31
- - Testing Framework: {{FRAMEWORK}} {{FRAMEWORK_VERSION}}
32
- - Database: {{DATABASE}} {{DB_VERSION}} (test instance)
33
- - External Services: {{EXTERNAL_SERVICES}}
34
- - Dependencies: {{DEPENDENCIES}}
35
-
36
- ### 2.2 Hardware Requirements
37
- - Test Database Server: {{DB_SERVER_SPEC}}
38
- - External API Test Environment: {{API_TEST_ENV}}
39
- - Network: {{NETWORK_REQUIREMENTS}}
40
-
41
- Example:
42
- - Test Database Server: PostgreSQL 15 on Docker container
43
- - External API Test Environment: Staging API endpoint
44
- - Network: Stable internet connection for external API calls
45
-
46
- ### 2.3 Test Data
47
- - Test database setup script: `{{DB_SETUP_SCRIPT}}`
48
- - Test data fixtures: `{{FIXTURES_PATH}}`
49
- - Data cleanup script: `{{CLEANUP_SCRIPT}}`
50
- - External API mock data: `{{MOCK_DATA_PATH}}` (if applicable)
51
-
52
- ## 3. Integration Points
53
-
54
- ### 3.1 Integration Architecture
55
- Describe the components being integrated and their relationships:
56
-
57
- ```
58
- {{COMPONENT_A}} → {{COMPONENT_B}} → {{COMPONENT_C}}
59
- ↓ ↓ ↓
60
- {{DEPENDENCY_1}} {{DEPENDENCY_2}} {{DEPENDENCY_3}}
61
- ```
62
-
63
- Example:
64
- ```
65
- API Controller → Service Layer → Repository Layer
66
- ↓ ↓ ↓
67
- Authentication Business Logic Database
68
- ```
69
-
70
- ### 3.2 Integration Points Table
71
-
72
- | Integration Point | Component A | Component B | Data Flow | Protocol/Method |
73
- |-------------------|-------------|-------------|-----------|-----------------|
74
- | {{POINT_1}} | {{COMP_A}} | {{COMP_B}} | {{DIRECTION}} | {{PROTOCOL}} |
75
- | {{POINT_2}} | {{COMP_C}} | {{COMP_D}} | {{DIRECTION}} | {{PROTOCOL}} |
76
-
77
- Example:
78
- | Integration Point | Component A | Component B | Data Flow | Protocol/Method |
79
- |-------------------|-------------|-------------|-----------|-----------------|
80
- | User Registration | API Controller | UserService | Request → | HTTP POST |
81
- | Data Persistence | UserService | UserRepository | Save → | ORM Method |
82
- | Database Access | UserRepository | PostgreSQL | Query → | SQL/JDBC |
83
-
84
- ### 3.3 External Dependencies
85
-
86
- | Dependency | Type | Connection | Mock/Real | Notes |
87
- |------------|------|------------|-----------|-------|
88
- | {{DEP_1}} | {{TYPE}} | {{CONNECTION}} | {{STATUS}} | {{NOTES}} |
89
- | {{DEP_2}} | {{TYPE}} | {{CONNECTION}} | {{STATUS}} | {{NOTES}} |
90
-
91
- Example:
92
- | Dependency | Type | Connection | Mock/Real | Notes |
93
- |------------|------|------------|-----------|-------|
94
- | Test Database | PostgreSQL | localhost:5432 | Real | Isolated test instance |
95
- | Email Service | SMTP | smtp.example.com | Mock | Use MailHog for testing |
96
- | Payment API | REST API | staging.payment.com | Real | Staging environment |
97
-
98
- ## 4. Test Cases
99
-
100
- ### Test Case IT-001: {{TEST_CASE_NAME}}
101
-
102
- **Description**: {{TEST_CASE_DESCRIPTION}}
103
-
104
- Example: Verify that user registration API successfully saves user data to the database and returns correct response.
105
-
106
- **Preconditions**:
107
- - {{PRECONDITION_1}}
108
- - {{PRECONDITION_2}}
109
-
110
- Example:
111
- - Test database is running and empty
112
- - API server is started
113
- - Test user data is prepared
114
-
115
- **Test Steps**:
116
- 1. {{STEP_1}}
117
- 2. {{STEP_2}}
118
- 3. {{STEP_3}}
119
- 4. {{STEP_4}}
120
-
121
- Example:
122
- 1. Send POST request to `/api/users` with user data: `{name: "John", email: "john@example.com"}`
123
- 2. Verify API returns 201 status code
124
- 3. Query database to check if user record exists
125
- 4. Verify database record matches the input data
126
-
127
- **Expected Results**:
128
- {{EXPECTED_RESULTS}}
129
-
130
- Example:
131
- - API returns status 201 with user ID
132
- - Database contains exactly one record with matching data
133
- - All fields (name, email, created_at) are correctly stored
134
-
135
- **Actual Results**:
136
- [To be filled during test execution]
137
-
138
- **Status**: [ ] Pass / [ ] Fail / [ ] Blocked
139
-
140
- **Notes**:
141
- {{NOTES}}
142
-
143
- ---
144
-
145
- ### Test Case IT-002: {{TEST_CASE_NAME}}
146
-
147
- **Description**: {{TEST_CASE_DESCRIPTION}}
148
-
149
- Example: Verify that authentication service correctly validates user credentials against the database.
150
-
151
- **Preconditions**:
152
- - {{PRECONDITION_1}}
153
- - {{PRECONDITION_2}}
154
-
155
- **Test Steps**:
156
- 1. {{STEP_1}}
157
- 2. {{STEP_2}}
158
- 3. {{STEP_3}}
159
-
160
- **Expected Results**:
161
- {{EXPECTED_RESULTS}}
162
-
163
- **Actual Results**:
164
- [To be filled during test execution]
165
-
166
- **Status**: [ ] Pass / [ ] Fail / [ ] Blocked
167
-
168
- **Notes**:
169
- {{NOTES}}
170
-
171
- ---
172
-
173
- ### Test Case IT-003: Transaction Rollback - {{SCENARIO_NAME}}
174
-
175
- **Description**: {{TEST_CASE_DESCRIPTION}}
176
-
177
- Example: Verify that database transaction is rolled back correctly when an error occurs during user registration.
178
-
179
- **Preconditions**:
180
- - {{PRECONDITION}}
181
-
182
- Example:
183
- - Test database is running
184
- - Trigger condition for rollback is prepared (e.g., duplicate email constraint)
185
-
186
- **Test Steps**:
187
- 1. {{STEP_1}}
188
- 2. {{STEP_2}}
189
- 3. {{STEP_3}}
190
-
191
- Example:
192
- 1. Create a user with email "test@example.com"
193
- 2. Attempt to create another user with the same email
194
- 3. Verify that the second operation fails
195
- 4. Verify that database contains only the first user (no partial data)
196
-
197
- **Expected Results**:
198
- {{EXPECTED_RESULTS}}
199
-
200
- Example:
201
- - API returns 409 Conflict status
202
- - Database contains only one user record
203
- - No orphaned or partial records exist
204
-
205
- **Actual Results**:
206
- [To be filled during test execution]
207
-
208
- **Status**: [ ] Pass / [ ] Fail / [ ] Blocked
209
-
210
- **Notes**:
211
- {{NOTES}}
212
-
213
- ---
214
-
215
- ### Test Case IT-004: External Service Integration - {{SERVICE_NAME}}
216
-
217
- **Description**: {{TEST_CASE_DESCRIPTION}}
218
-
219
- Example: Verify that the system correctly integrates with external payment API for order processing.
220
-
221
- **Preconditions**:
222
- - {{PRECONDITION}}
223
-
224
- **Test Steps**:
225
- 1. {{STEP_1}}
226
- 2. {{STEP_2}}
227
- 3. {{STEP_3}}
228
-
229
- **Expected Results**:
230
- {{EXPECTED_RESULTS}}
231
-
232
- **Actual Results**:
233
- [To be filled during test execution]
234
-
235
- **Status**: [ ] Pass / [ ] Fail / [ ] Blocked
236
-
237
- **Notes**:
238
- {{NOTES}}
239
-
240
- ---
241
-
242
- ## 5. Test Execution Summary
243
-
244
- | ID | Test Name | Status | Executed By | Date | Notes |
245
- |----|-----------|--------|-------------|------|-------|
246
- | IT-001 | {{NAME}} | | | | |
247
- | IT-002 | {{NAME}} | | | | |
248
- | IT-003 | {{NAME}} | | | | |
249
- | IT-004 | {{NAME}} | | | | |
250
-
251
- ## 6. Defects Found
252
-
253
- | Defect ID | Severity | Description | Affected Components | Status |
254
- |-----------|----------|-------------|---------------------|--------|
255
- | | High/Medium/Low | | | Open/In Progress/Fixed/Closed |
256
-
257
- ## 7. Sign-off
258
-
259
- **Tested By**: _______________
260
- **Date**: _______________
261
- **Approved By**: _______________
262
- **Date**: _______________
263
-
264
- ---
265
-
266
- ## Appendix A: Test Environment Setup
267
-
268
- ### Database Setup Script
269
-
270
- ```bash
271
- # Start test database (Docker)
272
- docker run -d \
273
- --name test-postgres \
274
- -e POSTGRES_USER=testuser \
275
- -e POSTGRES_PASSWORD=testpass \
276
- -e POSTGRES_DB=testdb \
277
- -p 5432:5432 \
278
- postgres:15
279
-
280
- # Run migrations
281
- npm run migrate:test
282
- # or
283
- ./gradlew flywayMigrate -Pflyway.configFiles=test-flyway.conf
284
- # or
285
- php artisan migrate --env=testing
286
- ```
287
-
288
- ### Test Data Setup
289
-
290
- ```bash
291
- # Seed test data
292
- npm run seed:test
293
- # or
294
- ./gradlew run --args="TestDataSeeder"
295
- # or
296
- php artisan db:seed --class=TestDataSeeder --env=testing
297
- ```
298
-
299
- ### Cleanup Script
300
-
301
- ```bash
302
- # Clean up test database
303
- docker stop test-postgres
304
- docker rm test-postgres
305
-
306
- # Or truncate tables
307
- npm run db:truncate:test
308
- ```
309
-
310
- ## Appendix B: Code Examples
311
-
312
- ### Example Integration Test Code (Node.js/Vitest)
313
-
314
- ```typescript
315
- import { describe, it, expect, beforeAll, afterAll } from 'vitest';
316
- import request from 'supertest';
317
- import { app } from '../src/app';
318
- import { db } from '../src/database';
319
-
320
- describe('User Registration Integration', () => {
321
- beforeAll(async () => {
322
- await db.connect();
323
- await db.migrate();
324
- });
325
-
326
- afterAll(async () => {
327
- await db.truncate('users');
328
- await db.disconnect();
329
- });
330
-
331
- it('should register user and save to database', async () => {
332
- const userData = { name: 'John', email: 'john@example.com' };
333
-
334
- // API call
335
- const response = await request(app)
336
- .post('/api/users')
337
- .send(userData);
338
-
339
- expect(response.status).toBe(201);
340
- expect(response.body).toHaveProperty('id');
341
-
342
- // Database verification
343
- const user = await db.query('SELECT * FROM users WHERE email = ?', [userData.email]);
344
- expect(user).toBeDefined();
345
- expect(user.name).toBe(userData.name);
346
- });
347
- });
348
- ```
349
-
350
- ### Example Integration Test Code (Java/JUnit 5 + Spring Test)
351
-
352
- ```java
353
- import org.junit.jupiter.api.Test;
354
- import org.springframework.beans.factory.annotation.Autowired;
355
- import org.springframework.boot.test.context.SpringBootTest;
356
- import org.springframework.boot.test.web.client.TestRestTemplate;
357
- import org.springframework.http.HttpStatus;
358
- import org.springframework.http.ResponseEntity;
359
- import org.springframework.test.context.jdbc.Sql;
360
-
361
- @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
362
- @Sql(scripts = "/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD)
363
- class UserRegistrationIntegrationTest {
364
-
365
- @Autowired
366
- private TestRestTemplate restTemplate;
367
-
368
- @Autowired
369
- private UserRepository userRepository;
370
-
371
- @Test
372
- void shouldRegisterUserAndSaveToDatabase() {
373
- UserRequest request = new UserRequest("John", "john@example.com");
374
-
375
- ResponseEntity<UserResponse> response = restTemplate
376
- .postForEntity("/api/users", request, UserResponse.class);
377
-
378
- assertEquals(HttpStatus.CREATED, response.getStatusCode());
379
- assertNotNull(response.getBody().getId());
380
-
381
- // Database verification
382
- User user = userRepository.findByEmail("john@example.com").orElseThrow();
383
- assertEquals("John", user.getName());
384
- }
385
- }
386
- ```
387
-
388
- ### Example Integration Test Code (PHP/PHPUnit + Laravel)
389
-
390
- ```php
391
- <?php
392
- namespace Tests\Feature;
393
-
394
- use Tests\TestCase;
395
- use Illuminate\Foundation\Testing\RefreshDatabase;
396
-
397
- class UserRegistrationIntegrationTest extends TestCase
398
- {
399
- use RefreshDatabase;
400
-
401
- public function test_should_register_user_and_save_to_database()
402
- {
403
- $userData = [
404
- 'name' => 'John',
405
- 'email' => 'john@example.com',
406
- 'password' => 'password123'
407
- ];
408
-
409
- // API call
410
- $response = $this->postJson('/api/users', $userData);
411
-
412
- $response->assertStatus(201)
413
- ->assertJsonStructure(['id', 'name', 'email']);
414
-
415
- // Database verification
416
- $this->assertDatabaseHas('users', [
417
- 'name' => 'John',
418
- 'email' => 'john@example.com'
419
- ]);
420
- }
421
- }
422
- ```
423
-
424
- ## Appendix C: Execution Timing
425
-
426
- ## Phase B (Before Release) - Manual Execution
427
-
428
- Integration tests are executed manually before creating a release tag:
429
-
430
- 1. After PR is merged to main branch
431
- 2. Before creating a release tag
432
- 3. Run all integration tests in Phase B
433
- 4. Verify all tests pass before proceeding to release
434
-
435
- Integration tests are **NOT** executed automatically in CI/CD during PR phase (only unit tests run automatically).