proagents 1.2.0 → 1.3.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/README.md CHANGED
@@ -304,6 +304,59 @@ Type these in any AI assistant (Claude, ChatGPT, Gemini, Cursor, etc.):
304
304
  | `pa:learn` | Teach AI a pattern |
305
305
  | `pa:suggestions` | Show AI suggestions |
306
306
 
307
+ ### API & Documentation
308
+ | Command | Description |
309
+ |---------|-------------|
310
+ | `pa:api-docs` | Generate OpenAPI/Swagger docs |
311
+ | `pa:storybook` | Generate Storybook stories |
312
+ | `pa:readme` | Auto-generate/update README |
313
+ | `pa:types` | Generate TypeScript types |
314
+
315
+ ### Git Advanced
316
+ | Command | Description |
317
+ |---------|-------------|
318
+ | `pa:branch` | Branch management |
319
+ | `pa:merge` | Smart merge with conflict preview |
320
+ | `pa:conflict` | Resolve merge conflicts with AI |
321
+ | `pa:changelog-gen` | Auto-generate changelog |
322
+
323
+ ### Search & Code Navigation
324
+ | Command | Description |
325
+ |---------|-------------|
326
+ | `pa:find` | Find code patterns/usage |
327
+ | `pa:todo` | Find all TODOs in code |
328
+ | `pa:fixme` | Find FIXMEs and critical issues |
329
+ | `pa:unused` | Find unused code/exports |
330
+
331
+ ### Code Analysis
332
+ | Command | Description |
333
+ |---------|-------------|
334
+ | `pa:complexity` | Cyclomatic complexity analysis |
335
+ | `pa:duplication` | Find duplicate code blocks |
336
+ | `pa:hotspots` | Find frequently changed files |
337
+
338
+ ### Testing Advanced
339
+ | Command | Description |
340
+ |---------|-------------|
341
+ | `pa:test-e2e` | Create/run E2E tests |
342
+ | `pa:test-unit` | Generate unit tests |
343
+ | `pa:mock` | Generate mocks/stubs |
344
+ | `pa:snapshot` | Snapshot testing management |
345
+
346
+ ### DevOps & Infrastructure
347
+ | Command | Description |
348
+ |---------|-------------|
349
+ | `pa:docker` | Docker commands |
350
+ | `pa:ci` | CI/CD pipeline management |
351
+ | `pa:deploy-preview` | Deploy preview environment |
352
+
353
+ ### Release Management
354
+ | Command | Description |
355
+ |---------|-------------|
356
+ | `pa:version` | Show/bump version |
357
+ | `pa:tag` | Create git tag |
358
+ | `pa:publish` | Publish package to registry |
359
+
307
360
  ### Custom Commands
308
361
  | Command | Description |
309
362
  |---------|-------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proagents",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "AI-agnostic development workflow framework that automates the full software development lifecycle",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -911,6 +911,630 @@ For `pa:suggestions`:
911
911
  ```
912
912
  4. Offer to apply each suggestion
913
913
 
914
+ ### API & Documentation Generation
915
+ | Command | Action |
916
+ |---------|--------|
917
+ | `pa:api-docs` | Generate OpenAPI/Swagger documentation |
918
+ | `pa:api-docs "path"` | Generate docs for specific API path |
919
+ | `pa:storybook` | Generate Storybook stories for components |
920
+ | `pa:storybook "component"` | Generate story for specific component |
921
+ | `pa:readme` | Auto-generate/update README.md |
922
+ | `pa:readme-section "name"` | Update specific README section |
923
+ | `pa:types` | Generate TypeScript types/interfaces |
924
+ | `pa:types "file"` | Generate types for specific file |
925
+
926
+ **How to execute API & Documentation commands:**
927
+
928
+ For `pa:api-docs`:
929
+ 1. Detect API framework (Express, Next.js, NestJS, FastAPI, etc.)
930
+ 2. Scan route files for endpoints
931
+ 3. Extract:
932
+ - HTTP methods and paths
933
+ - Request/response types
934
+ - Query/path parameters
935
+ - Authentication requirements
936
+ 4. Generate OpenAPI 3.0 spec:
937
+ ```yaml
938
+ openapi: 3.0.0
939
+ info:
940
+ title: API Documentation
941
+ version: 1.0.0
942
+ paths:
943
+ /api/users:
944
+ get:
945
+ summary: List all users
946
+ responses:
947
+ '200':
948
+ description: Success
949
+ ```
950
+ 5. Save to `./docs/openapi.yaml` or `./swagger.json`
951
+ 6. Optionally generate HTML documentation
952
+
953
+ For `pa:storybook`:
954
+ 1. Find React/Vue/Angular components
955
+ 2. Analyze component props/interfaces
956
+ 3. Generate story file with:
957
+ - Default story
958
+ - Variant stories for different props
959
+ - Interactive controls
960
+ 4. Save to `*.stories.tsx` alongside component:
961
+ ```tsx
962
+ import type { Meta, StoryObj } from '@storybook/react';
963
+ import { Button } from './Button';
964
+
965
+ const meta: Meta<typeof Button> = {
966
+ component: Button,
967
+ title: 'Components/Button',
968
+ };
969
+ export default meta;
970
+
971
+ export const Primary: StoryObj<typeof Button> = {
972
+ args: { variant: 'primary', children: 'Click me' },
973
+ };
974
+ ```
975
+
976
+ For `pa:readme`:
977
+ 1. Analyze project structure
978
+ 2. Detect:
979
+ - Project type and framework
980
+ - Available scripts (npm scripts)
981
+ - Dependencies
982
+ - Existing documentation
983
+ 3. Generate/update README with:
984
+ - Project title and description
985
+ - Installation instructions
986
+ - Usage examples
987
+ - Available commands
988
+ - Contributing guidelines
989
+ 4. Preserve existing custom sections
990
+
991
+ For `pa:types`:
992
+ 1. Analyze source file or API responses
993
+ 2. Infer TypeScript types:
994
+ - From JavaScript usage patterns
995
+ - From JSON data structures
996
+ - From API responses
997
+ 3. Generate interface/type definitions:
998
+ ```typescript
999
+ interface User {
1000
+ id: string;
1001
+ name: string;
1002
+ email: string;
1003
+ createdAt: Date;
1004
+ }
1005
+ ```
1006
+ 4. Save to `types/` folder or alongside source
1007
+
1008
+ ### Git Advanced
1009
+ | Command | Action |
1010
+ |---------|--------|
1011
+ | `pa:branch` | Branch management (list, info) |
1012
+ | `pa:branch-create "name"` | Create new branch |
1013
+ | `pa:branch-clean` | Clean up merged/stale branches |
1014
+ | `pa:merge` | Smart merge with conflict preview |
1015
+ | `pa:merge "branch"` | Merge specific branch |
1016
+ | `pa:conflict` | Resolve merge conflicts with AI |
1017
+ | `pa:conflict "file"` | Resolve conflicts in specific file |
1018
+ | `pa:changelog-gen` | Auto-generate changelog from commits |
1019
+ | `pa:changelog-gen "version"` | Generate for specific version |
1020
+
1021
+ **How to execute Git Advanced commands:**
1022
+
1023
+ For `pa:branch`:
1024
+ 1. Run `git branch -a` to list all branches
1025
+ 2. Show current branch with `git branch --show-current`
1026
+ 3. Display branch info:
1027
+ ```
1028
+ Branches
1029
+ ════════
1030
+ Current: feature/user-auth
1031
+
1032
+ Local:
1033
+ • main (2 days ago)
1034
+ • develop (1 hour ago)
1035
+ • feature/user-auth * (current)
1036
+ • feature/dashboard (5 days ago, stale)
1037
+
1038
+ Remote:
1039
+ • origin/main
1040
+ • origin/develop
1041
+ ```
1042
+
1043
+ For `pa:branch-clean`:
1044
+ 1. Find merged branches: `git branch --merged`
1045
+ 2. Find stale branches (no commits in 30+ days)
1046
+ 3. Show list and ask for confirmation
1047
+ 4. Delete selected branches
1048
+ 5. Optionally prune remote tracking branches
1049
+
1050
+ For `pa:merge`:
1051
+ 1. Show current branch and target
1052
+ 2. Preview changes: `git diff branch...HEAD`
1053
+ 3. Check for conflicts: `git merge --no-commit --no-ff branch`
1054
+ 4. If conflicts exist, list conflicting files
1055
+ 5. If clean, proceed with merge
1056
+ 6. Create merge commit with descriptive message
1057
+
1058
+ For `pa:conflict`:
1059
+ 1. List conflicting files: `git diff --name-only --diff-filter=U`
1060
+ 2. For each file:
1061
+ - Show conflict markers
1062
+ - Analyze both versions
1063
+ - Suggest resolution based on:
1064
+ - Code context
1065
+ - Which change is more recent
1066
+ - What each change accomplishes
1067
+ 3. Apply resolution and mark as resolved
1068
+ 4. Stage resolved files
1069
+
1070
+ For `pa:changelog-gen`:
1071
+ 1. Get commits since last tag: `git log $(git describe --tags --abbrev=0)..HEAD`
1072
+ 2. Parse conventional commits
1073
+ 3. Group by type (feat, fix, docs, etc.)
1074
+ 4. Generate changelog:
1075
+ ```markdown
1076
+ ## [1.2.0] - 2024-03-06
1077
+
1078
+ ### Added
1079
+ - User authentication with JWT (#123)
1080
+ - Dashboard component (#125)
1081
+
1082
+ ### Fixed
1083
+ - Login button styling (#124)
1084
+
1085
+ ### Changed
1086
+ - Updated dependencies (#126)
1087
+ ```
1088
+ 5. Prepend to CHANGELOG.md
1089
+
1090
+ ### Search & Code Navigation
1091
+ | Command | Action |
1092
+ |---------|--------|
1093
+ | `pa:find "pattern"` | Find code patterns/usage |
1094
+ | `pa:find-usage "symbol"` | Find all usages of symbol |
1095
+ | `pa:find-definition "symbol"` | Find definition of symbol |
1096
+ | `pa:todo` | Find and list all TODOs |
1097
+ | `pa:todo-add "message"` | Add TODO at current location |
1098
+ | `pa:fixme` | Find FIXMEs and critical issues |
1099
+ | `pa:unused` | Find unused code/exports |
1100
+ | `pa:unused-deps` | Find unused dependencies |
1101
+
1102
+ **How to execute Search commands:**
1103
+
1104
+ For `pa:find`:
1105
+ 1. Search codebase for pattern using grep/ripgrep
1106
+ 2. Support regex patterns
1107
+ 3. Show results with context:
1108
+ ```
1109
+ Search Results: "useAuth"
1110
+ ═══════════════════════════
1111
+
1112
+ src/hooks/useAuth.ts:5
1113
+ │ export function useAuth() {
1114
+
1115
+ src/pages/Login.tsx:12
1116
+ │ const { login, logout } = useAuth();
1117
+
1118
+ src/components/Navbar.tsx:8
1119
+ │ const { user } = useAuth();
1120
+
1121
+ Found 3 matches in 3 files
1122
+ ```
1123
+
1124
+ For `pa:todo`:
1125
+ 1. Search for TODO, FIXME, HACK, XXX comments
1126
+ 2. Parse priority markers (TODO(high):, TODO:, etc.)
1127
+ 3. Group by priority and file:
1128
+ ```
1129
+ TODOs Found: 15
1130
+ ═══════════════
1131
+
1132
+ High Priority:
1133
+ • src/auth/jwt.ts:45 - TODO(high): Add token refresh
1134
+ • src/api/users.ts:78 - FIXME: SQL injection risk
1135
+
1136
+ Medium Priority:
1137
+ • src/utils/date.ts:12 - TODO: Handle timezone
1138
+
1139
+ Low Priority:
1140
+ • src/components/Button.tsx:5 - TODO: Add loading state
1141
+ ```
1142
+
1143
+ For `pa:fixme`:
1144
+ 1. Search for FIXME, BUG, HACK, XXX, SECURITY
1145
+ 2. Prioritize by keyword severity
1146
+ 3. Show with context and age (when added via git blame)
1147
+ 4. Suggest fixes where possible
1148
+
1149
+ For `pa:unused`:
1150
+ 1. Analyze exports and imports
1151
+ 2. Find:
1152
+ - Exported but never imported
1153
+ - Defined but never used
1154
+ - Dead code (unreachable)
1155
+ 3. Report with confidence level:
1156
+ ```
1157
+ Unused Code Analysis
1158
+ ═══════════════════
1159
+
1160
+ Definitely Unused:
1161
+ • src/utils/old-helper.ts - entire file (no imports)
1162
+ • src/types/legacy.ts:LegacyUser - type never used
1163
+
1164
+ Possibly Unused:
1165
+ • src/api/deprecated.ts:oldEndpoint - only test imports
1166
+ ```
1167
+
1168
+ For `pa:unused-deps`:
1169
+ 1. Read package.json dependencies
1170
+ 2. Search codebase for imports
1171
+ 3. Find packages never imported:
1172
+ ```
1173
+ Unused Dependencies
1174
+ ═══════════════════
1175
+
1176
+ dependencies:
1177
+ • lodash - never imported
1178
+ • moment - never imported (consider date-fns)
1179
+
1180
+ devDependencies:
1181
+ • @types/node - used
1182
+ ```
1183
+
1184
+ ### Code Analysis
1185
+ | Command | Action |
1186
+ |---------|--------|
1187
+ | `pa:complexity` | Cyclomatic complexity analysis |
1188
+ | `pa:complexity "file"` | Analyze specific file |
1189
+ | `pa:duplication` | Find duplicate code blocks |
1190
+ | `pa:duplication "threshold"` | Set minimum lines threshold |
1191
+ | `pa:hotspots` | Find frequently changed files |
1192
+ | `pa:hotspots "days"` | Analyze over specific period |
1193
+
1194
+ **How to execute Code Analysis commands:**
1195
+
1196
+ For `pa:complexity`:
1197
+ 1. Analyze functions/methods for:
1198
+ - Cyclomatic complexity (if/else, switch, loops)
1199
+ - Cognitive complexity
1200
+ - Nesting depth
1201
+ - Parameter count
1202
+ 2. Report high complexity areas:
1203
+ ```
1204
+ Complexity Report
1205
+ ═════════════════
1206
+
1207
+ High Complexity (>10):
1208
+ • src/utils/parser.ts:parseData() - complexity: 15
1209
+ ↳ 8 if statements, 3 loops, max depth: 4
1210
+ ↳ Suggestion: Split into smaller functions
1211
+
1212
+ • src/api/handler.ts:processRequest() - complexity: 12
1213
+ ↳ Large switch statement (10 cases)
1214
+ ↳ Suggestion: Use strategy pattern
1215
+
1216
+ Medium Complexity (5-10):
1217
+ • src/auth/validate.ts:validateUser() - complexity: 7
1218
+ ```
1219
+
1220
+ For `pa:duplication`:
1221
+ 1. Find duplicate code blocks (default: 6+ lines)
1222
+ 2. Calculate similarity percentage
1223
+ 3. Report duplicates:
1224
+ ```
1225
+ Code Duplication Report
1226
+ ═══════════════════════
1227
+
1228
+ Duplicate #1 (98% similar, 15 lines):
1229
+ • src/api/users.ts:45-60
1230
+ • src/api/posts.ts:32-47
1231
+ ↳ Suggestion: Extract to shared utility
1232
+
1233
+ Duplicate #2 (100% identical, 8 lines):
1234
+ • src/components/Card.tsx:12-20
1235
+ • src/components/Panel.tsx:8-16
1236
+ ↳ Suggestion: Create shared component
1237
+
1238
+ Total: 5 duplicate blocks, ~120 duplicated lines
1239
+ ```
1240
+
1241
+ For `pa:hotspots`:
1242
+ 1. Analyze git history for frequently changed files
1243
+ 2. Correlate with bug fixes
1244
+ 3. Identify risky areas:
1245
+ ```
1246
+ Code Hotspots (Last 30 Days)
1247
+ ════════════════════════════
1248
+
1249
+ Most Changed:
1250
+ 1. src/api/auth.ts - 45 changes, 12 bug fixes
1251
+ ↳ High churn + bugs = refactoring candidate
1252
+
1253
+ 2. src/utils/helpers.ts - 32 changes, 3 bug fixes
1254
+ ↳ Frequently modified utility
1255
+
1256
+ 3. src/components/Form.tsx - 28 changes, 8 bug fixes
1257
+ ↳ Complex component, consider splitting
1258
+ ```
1259
+
1260
+ ### Testing Advanced
1261
+ | Command | Action |
1262
+ |---------|--------|
1263
+ | `pa:test-e2e` | Create/run E2E tests |
1264
+ | `pa:test-e2e "flow"` | E2E test for specific flow |
1265
+ | `pa:test-unit` | Generate unit tests |
1266
+ | `pa:test-unit "file"` | Generate tests for file |
1267
+ | `pa:mock` | Generate mocks/stubs |
1268
+ | `pa:mock "module"` | Mock specific module |
1269
+ | `pa:snapshot` | Snapshot testing management |
1270
+ | `pa:snapshot-update` | Update snapshots |
1271
+
1272
+ **How to execute Testing Advanced commands:**
1273
+
1274
+ For `pa:test-e2e`:
1275
+ 1. Detect E2E framework (Playwright, Cypress, etc.)
1276
+ 2. Analyze user flows in the app
1277
+ 3. Generate E2E test:
1278
+ ```typescript
1279
+ import { test, expect } from '@playwright/test';
1280
+
1281
+ test.describe('User Authentication', () => {
1282
+ test('should login successfully', async ({ page }) => {
1283
+ await page.goto('/login');
1284
+ await page.fill('[name="email"]', 'test@example.com');
1285
+ await page.fill('[name="password"]', 'password123');
1286
+ await page.click('button[type="submit"]');
1287
+ await expect(page).toHaveURL('/dashboard');
1288
+ });
1289
+
1290
+ test('should show error for invalid credentials', async ({ page }) => {
1291
+ await page.goto('/login');
1292
+ await page.fill('[name="email"]', 'wrong@example.com');
1293
+ await page.fill('[name="password"]', 'wrong');
1294
+ await page.click('button[type="submit"]');
1295
+ await expect(page.locator('.error')).toBeVisible();
1296
+ });
1297
+ });
1298
+ ```
1299
+
1300
+ For `pa:test-unit`:
1301
+ 1. Read source file
1302
+ 2. Identify functions/methods to test
1303
+ 3. Generate comprehensive test file:
1304
+ ```typescript
1305
+ import { describe, it, expect, vi } from 'vitest';
1306
+ import { calculateTotal, formatPrice } from './pricing';
1307
+
1308
+ describe('calculateTotal', () => {
1309
+ it('should calculate total with tax', () => {
1310
+ expect(calculateTotal(100, 0.1)).toBe(110);
1311
+ });
1312
+
1313
+ it('should handle zero amount', () => {
1314
+ expect(calculateTotal(0, 0.1)).toBe(0);
1315
+ });
1316
+
1317
+ it('should throw for negative amounts', () => {
1318
+ expect(() => calculateTotal(-100, 0.1)).toThrow();
1319
+ });
1320
+ });
1321
+ ```
1322
+
1323
+ For `pa:mock`:
1324
+ 1. Analyze module dependencies
1325
+ 2. Generate mock implementations:
1326
+ ```typescript
1327
+ // mocks/api.ts
1328
+ import { vi } from 'vitest';
1329
+
1330
+ export const mockApi = {
1331
+ getUsers: vi.fn().mockResolvedValue([
1332
+ { id: '1', name: 'Test User' }
1333
+ ]),
1334
+ createUser: vi.fn().mockResolvedValue({ id: '2' }),
1335
+ deleteUser: vi.fn().mockResolvedValue(true),
1336
+ };
1337
+
1338
+ vi.mock('../api', () => mockApi);
1339
+ ```
1340
+ 3. Include type-safe mocks with TypeScript
1341
+
1342
+ For `pa:snapshot`:
1343
+ 1. Find existing snapshots
1344
+ 2. Show status:
1345
+ ```
1346
+ Snapshot Status
1347
+ ═══════════════
1348
+
1349
+ Total: 45 snapshots in 12 files
1350
+
1351
+ Outdated (need update):
1352
+ • Button.test.tsx - 3 snapshots
1353
+ • Card.test.tsx - 1 snapshot
1354
+
1355
+ Obsolete (no matching test):
1356
+ • OldComponent.test.tsx.snap - entire file
1357
+
1358
+ Commands:
1359
+ • pa:snapshot-update - Update outdated
1360
+ • pa:snapshot-clean - Remove obsolete
1361
+ ```
1362
+
1363
+ ### DevOps & Infrastructure
1364
+ | Command | Action |
1365
+ |---------|--------|
1366
+ | `pa:docker` | Docker commands overview |
1367
+ | `pa:docker-build` | Build Docker image |
1368
+ | `pa:docker-compose` | Docker Compose operations |
1369
+ | `pa:ci` | CI/CD pipeline status/management |
1370
+ | `pa:ci-run` | Trigger CI pipeline |
1371
+ | `pa:deploy-preview` | Deploy to preview environment |
1372
+ | `pa:deploy-preview-url` | Get preview deployment URL |
1373
+
1374
+ **How to execute DevOps commands:**
1375
+
1376
+ For `pa:docker`:
1377
+ 1. Check for Dockerfile and docker-compose.yml
1378
+ 2. Show available commands:
1379
+ ```
1380
+ Docker Status
1381
+ ═════════════
1382
+
1383
+ Dockerfile: ✓ Found
1384
+ docker-compose.yml: ✓ Found
1385
+
1386
+ Services:
1387
+ • app - Node.js application
1388
+ • db - PostgreSQL
1389
+ • redis - Redis cache
1390
+
1391
+ Commands:
1392
+ • pa:docker-build - Build images
1393
+ • pa:docker-compose up - Start services
1394
+ • pa:docker-compose down - Stop services
1395
+ ```
1396
+
1397
+ For `pa:docker-build`:
1398
+ 1. Read Dockerfile
1399
+ 2. Suggest optimizations if needed
1400
+ 3. Build image with appropriate tags
1401
+ 4. Report build status and size
1402
+
1403
+ For `pa:ci`:
1404
+ 1. Detect CI system (GitHub Actions, GitLab CI, etc.)
1405
+ 2. Show pipeline status:
1406
+ ```
1407
+ CI/CD Status
1408
+ ════════════
1409
+
1410
+ Platform: GitHub Actions
1411
+
1412
+ Recent Workflows:
1413
+ ✓ Build & Test (main) - 2m ago - passed
1414
+ ✓ Deploy Preview (PR #123) - 15m ago - passed
1415
+ ✗ Security Scan (main) - 1h ago - failed
1416
+ ↳ 2 vulnerabilities found
1417
+
1418
+ Current:
1419
+ ● Build & Test (feature/auth) - running (1m 30s)
1420
+ ```
1421
+
1422
+ For `pa:deploy-preview`:
1423
+ 1. Detect preview deployment platform (Vercel, Netlify, etc.)
1424
+ 2. Trigger preview deployment
1425
+ 3. Wait for deployment URL
1426
+ 4. Return preview URL:
1427
+ ```
1428
+ Preview Deployment
1429
+ ══════════════════
1430
+
1431
+ Branch: feature/user-auth
1432
+ Status: Deploying...
1433
+
1434
+ ✓ Building... done (45s)
1435
+ ✓ Deploying... done (30s)
1436
+
1437
+ Preview URL: https://my-app-user-auth-123.vercel.app
1438
+ ```
1439
+
1440
+ ### Release Management
1441
+ | Command | Action |
1442
+ |---------|--------|
1443
+ | `pa:version` | Show current version |
1444
+ | `pa:version-bump "type"` | Bump version (major/minor/patch) |
1445
+ | `pa:tag` | Create git tag for release |
1446
+ | `pa:tag "version"` | Create specific version tag |
1447
+ | `pa:publish` | Publish package to registry |
1448
+ | `pa:publish-dry` | Dry run of publish |
1449
+
1450
+ **How to execute Release commands:**
1451
+
1452
+ For `pa:version`:
1453
+ 1. Read version from package.json or equivalent
1454
+ 2. Show version info:
1455
+ ```
1456
+ Version Info
1457
+ ════════════
1458
+
1459
+ Current: 1.2.3
1460
+ Last Release: 1.2.2 (2024-03-01)
1461
+
1462
+ Unreleased Changes:
1463
+ • 5 features
1464
+ • 3 bug fixes
1465
+ • 2 breaking changes
1466
+
1467
+ Suggested Next:
1468
+ • Major (2.0.0) - has breaking changes
1469
+ • Minor (1.3.0) - new features
1470
+ • Patch (1.2.4) - bug fixes only
1471
+ ```
1472
+
1473
+ For `pa:version-bump`:
1474
+ 1. Determine bump type (major/minor/patch)
1475
+ 2. Update version in:
1476
+ - package.json
1477
+ - package-lock.json
1478
+ - Other version files
1479
+ 3. Update CHANGELOG.md with new version
1480
+ 4. Show changes:
1481
+ ```
1482
+ Version Bump: 1.2.3 → 1.3.0
1483
+ ═══════════════════════════
1484
+
1485
+ Updated files:
1486
+ • package.json
1487
+ • package-lock.json
1488
+ • CHANGELOG.md
1489
+
1490
+ Next steps:
1491
+ • pa:tag 1.3.0 - Create release tag
1492
+ • pa:publish - Publish to npm
1493
+ ```
1494
+
1495
+ For `pa:tag`:
1496
+ 1. Create annotated git tag
1497
+ 2. Include release notes in tag message
1498
+ 3. Optionally push to remote:
1499
+ ```
1500
+ Created Tag: v1.3.0
1501
+ ═══════════════════
1502
+
1503
+ Tag: v1.3.0
1504
+ Message: Release 1.3.0 - User Authentication
1505
+
1506
+ Included:
1507
+ • feat: Add user authentication
1508
+ • feat: Add password reset
1509
+ • fix: Login validation
1510
+
1511
+ Push to remote? (git push origin v1.3.0)
1512
+ ```
1513
+
1514
+ For `pa:publish`:
1515
+ 1. Run pre-publish checks:
1516
+ - Tests pass
1517
+ - Build succeeds
1518
+ - No uncommitted changes
1519
+ - Version is tagged
1520
+ 2. Show publish preview
1521
+ 3. Publish to registry:
1522
+ ```
1523
+ Publishing: mypackage@1.3.0
1524
+ ═══════════════════════════
1525
+
1526
+ Pre-checks:
1527
+ ✓ Tests passing
1528
+ ✓ Build successful
1529
+ ✓ Clean working directory
1530
+ ✓ Version tagged (v1.3.0)
1531
+
1532
+ Publishing to npm...
1533
+ ✓ Published successfully!
1534
+
1535
+ https://www.npmjs.com/package/mypackage
1536
+ ```
1537
+
914
1538
  ### AI Platform Management
915
1539
  | Command | Action |
916
1540
  |---------|--------|
@@ -155,6 +155,67 @@ Execute these commands when user types them (prefix: `pa:`):
155
155
  | `pa:forget "pattern"` | Remove learned pattern |
156
156
  | `pa:suggestions` | Show AI suggestions |
157
157
 
158
+ ## API & Documentation
159
+
160
+ | Command | What to Do |
161
+ |---------|------------|
162
+ | `pa:api-docs` | Generate OpenAPI/Swagger documentation |
163
+ | `pa:storybook` | Generate Storybook stories |
164
+ | `pa:readme` | Auto-generate/update README.md |
165
+ | `pa:types` | Generate TypeScript types/interfaces |
166
+
167
+ ## Git Advanced
168
+
169
+ | Command | What to Do |
170
+ |---------|------------|
171
+ | `pa:branch` | Branch management (list, create, clean) |
172
+ | `pa:merge` | Smart merge with conflict preview |
173
+ | `pa:conflict` | Resolve merge conflicts with AI |
174
+ | `pa:changelog-gen` | Auto-generate changelog from commits |
175
+
176
+ ## Search & Navigation
177
+
178
+ | Command | What to Do |
179
+ |---------|------------|
180
+ | `pa:find "pattern"` | Find code patterns/usage |
181
+ | `pa:todo` | Find and list all TODOs in code |
182
+ | `pa:fixme` | Find FIXMEs and critical issues |
183
+ | `pa:unused` | Find unused code/exports |
184
+ | `pa:unused-deps` | Find unused dependencies |
185
+
186
+ ## Code Analysis
187
+
188
+ | Command | What to Do |
189
+ |---------|------------|
190
+ | `pa:complexity` | Cyclomatic complexity analysis |
191
+ | `pa:duplication` | Find duplicate code blocks |
192
+ | `pa:hotspots` | Find frequently changed files |
193
+
194
+ ## Testing Advanced
195
+
196
+ | Command | What to Do |
197
+ |---------|------------|
198
+ | `pa:test-e2e` | Create/run E2E tests |
199
+ | `pa:test-unit` | Generate unit tests |
200
+ | `pa:mock` | Generate mocks/stubs |
201
+ | `pa:snapshot` | Snapshot testing management |
202
+
203
+ ## DevOps & Infrastructure
204
+
205
+ | Command | What to Do |
206
+ |---------|------------|
207
+ | `pa:docker` | Docker commands (build, compose) |
208
+ | `pa:ci` | CI/CD pipeline status/management |
209
+ | `pa:deploy-preview` | Deploy to preview environment |
210
+
211
+ ## Release Management
212
+
213
+ | Command | What to Do |
214
+ |---------|------------|
215
+ | `pa:version` | Show/bump version |
216
+ | `pa:tag` | Create git tag for release |
217
+ | `pa:publish` | Publish package to registry |
218
+
158
219
  ## Key Files to Read
159
220
 
160
221
  | File | Purpose |