prizmkit 1.0.153 → 1.1.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.
Files changed (84) hide show
  1. package/bin/create-prizmkit.js +27 -2
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/claude/paths.js +1 -1
  4. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +482 -57
  5. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +2 -6
  6. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +6 -0
  7. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +6 -0
  8. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -1
  9. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +11 -0
  10. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +9 -0
  11. package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +12 -0
  12. package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +7 -0
  13. package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +8 -0
  14. package/bundled/dev-pipeline/templates/sections/directory-convention-full.md +9 -0
  15. package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +6 -0
  16. package/bundled/dev-pipeline/templates/sections/failure-capture.md +21 -0
  17. package/bundled/dev-pipeline/templates/sections/failure-log-check.md +8 -0
  18. package/bundled/dev-pipeline/templates/sections/feature-context.md +23 -0
  19. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +15 -0
  20. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +15 -0
  21. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +31 -0
  22. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +36 -0
  23. package/bundled/dev-pipeline/templates/sections/phase-commit.md +26 -0
  24. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +14 -0
  25. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +20 -0
  26. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +3 -0
  27. package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +24 -0
  28. package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +45 -0
  29. package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +24 -0
  30. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +36 -0
  31. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +24 -0
  32. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -0
  33. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +32 -0
  34. package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +17 -0
  35. package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +16 -0
  36. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +28 -0
  37. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +36 -0
  38. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +82 -0
  39. package/bundled/dev-pipeline/templates/sections/phase0-init.md +4 -0
  40. package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +12 -0
  41. package/bundled/dev-pipeline/templates/sections/resume-header.md +2 -0
  42. package/bundled/dev-pipeline/templates/sections/session-context.md +6 -0
  43. package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +6 -0
  44. package/bundled/skills/_metadata.json +21 -177
  45. package/bundled/skills/app-planner/SKILL.md +22 -3
  46. package/bundled/skills/app-planner/references/project-brief-guide.md +110 -0
  47. package/bundled/skills/bug-fix-workflow/SKILL.md +4 -0
  48. package/bundled/skills/bug-planner/SKILL.md +2 -2
  49. package/bundled/skills/dev-pipeline-launcher/SKILL.md +1 -1
  50. package/bundled/skills/prizm-kit/SKILL.md +18 -47
  51. package/bundled/skills/prizm-kit/assets/project-memory-template.md +1 -1
  52. package/bundled/skills/prizmkit-analyze/SKILL.md +4 -4
  53. package/bundled/skills/prizmkit-init/SKILL.md +4 -4
  54. package/bundled/skills/prizmkit-plan/SKILL.md +126 -108
  55. package/bundled/skills/prizmkit-plan/assets/plan-template.md +1 -2
  56. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +67 -0
  57. package/bundled/skills/refactor-workflow/SKILL.md +142 -124
  58. package/bundled/team/prizm-dev-team.json +2 -8
  59. package/package.json +1 -1
  60. package/src/clean.js +8 -0
  61. package/src/config.js +504 -0
  62. package/src/gitignore-template.js +12 -0
  63. package/src/index.js +3 -22
  64. package/src/prompts.js +210 -0
  65. package/src/scaffold.js +20 -11
  66. package/src/upgrade.js +6 -31
  67. package/bundled/skills/prizmkit-clarify/SKILL.md +0 -93
  68. package/bundled/skills/prizmkit-specify/SKILL.md +0 -118
  69. package/bundled/skills/prizmkit-tool-adr-manager/SKILL.md +0 -67
  70. package/bundled/skills/prizmkit-tool-adr-manager/assets/adr-template.md +0 -26
  71. package/bundled/skills/prizmkit-tool-api-doc-generator/SKILL.md +0 -55
  72. package/bundled/skills/prizmkit-tool-bug-reproducer/SKILL.md +0 -61
  73. package/bundled/skills/prizmkit-tool-ci-cd-generator/SKILL.md +0 -53
  74. package/bundled/skills/prizmkit-tool-db-migration/SKILL.md +0 -64
  75. package/bundled/skills/prizmkit-tool-dependency-health/SKILL.md +0 -122
  76. package/bundled/skills/prizmkit-tool-deployment-strategy/SKILL.md +0 -57
  77. package/bundled/skills/prizmkit-tool-error-triage/SKILL.md +0 -54
  78. package/bundled/skills/prizmkit-tool-log-analyzer/SKILL.md +0 -54
  79. package/bundled/skills/prizmkit-tool-monitoring-setup/SKILL.md +0 -74
  80. package/bundled/skills/prizmkit-tool-onboarding-generator/SKILL.md +0 -69
  81. package/bundled/skills/prizmkit-tool-perf-profiler/SKILL.md +0 -54
  82. package/bundled/skills/prizmkit-tool-security-audit/SKILL.md +0 -129
  83. package/bundled/skills/prizmkit-tool-tech-debt-tracker/SKILL.md +0 -138
  84. /package/bundled/skills/{prizmkit-specify → prizmkit-plan}/assets/spec-template.md +0 -0
@@ -1,26 +0,0 @@
1
- # [NUMBER]. [TITLE]
2
-
3
- **Date**: YYYY-MM-DD
4
- **Status**: Proposed | Accepted | Deprecated | Superseded by [ADR-NNNN]
5
-
6
- ## Context
7
-
8
- [What is the issue that we're seeing that is motivating this decision or change?]
9
-
10
- ## Decision
11
-
12
- [What is the change that we're proposing and/or doing?]
13
-
14
- ## Consequences
15
-
16
- ### Positive
17
- - [Consequence 1]
18
-
19
- ### Negative
20
- - [Consequence 1]
21
-
22
- ## Alternatives Considered
23
-
24
- ### [Alternative 1]
25
- - **Description**: [What it is]
26
- - **Reason rejected**: [Why not chosen]
@@ -1,55 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-api-doc-generator"
3
- description: [Tier 2] Extract API documentation from source code into OpenAPI/Markdown. May miss undocumented or dynamically generated endpoints. (project)
4
- ---
5
-
6
- # PrizmKit API Doc Generator
7
-
8
- Generate API documentation from source code by scanning routes, controllers, and handlers. Produces OpenAPI 3.0 specs or Markdown reference docs.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-api`-docs [api-directory]
13
-
14
- Generate API documentation from source code.
15
-
16
- **STEPS:**
17
-
18
- 1. Read `.prizm-docs/` for project tech stack (framework, language, API style: REST / GraphQL / gRPC)
19
- 2. Scan API source files (routes, controllers, handlers):
20
- - Detect routing patterns based on framework:
21
- - Express/Fastify: `app.get()`, `router.post()`, etc.
22
- - Django/Flask: `@app.route()`, `urlpatterns`
23
- - Spring: `@GetMapping`, `@PostMapping`, etc.
24
- - Go: `http.HandleFunc`, gorilla/mux, chi routes
25
- - If `api-directory` is specified, limit scan to that directory
26
- 3. Extract for each endpoint:
27
- - **HTTP method and path**: GET /api/users/:id
28
- - **Request parameters**:
29
- - Path parameters (with types)
30
- - Query parameters (with types and defaults)
31
- - Request body schema (from types, validation decorators, or inline definitions)
32
- - **Response body schemas**: Success and error response structures
33
- - **Authentication requirements**: Which auth mechanism is required (JWT, API key, session, none)
34
- - **Error responses**: Common error codes and their meanings (400, 401, 403, 404, 500)
35
- - **Description**: From JSDoc comments, docstrings, or function/handler names
36
- 4. Generate documentation in requested format:
37
- - **OpenAPI 3.0 YAML** (default): Full spec with schemas, security definitions, and server info
38
- - **Markdown API reference**: Human-readable endpoint documentation
39
- - **Both**: Generate both formats
40
- 5. Include examples for each endpoint:
41
- - Sample request (curl command)
42
- - Sample success response (JSON)
43
- - Sample error response (JSON)
44
- 6. Write to `docs/api/` directory:
45
- - `docs/api/openapi.yaml` for OpenAPI spec
46
- - `docs/api/API_REFERENCE.md` for Markdown docs
47
-
48
- ## Path References
49
-
50
- All internal asset paths MUST use `.claude/commands/prizmkit-api-doc-generator` placeholder for cross-IDE compatibility.
51
-
52
- ## Output
53
-
54
- - `docs/api/openapi.yaml`: OpenAPI 3.0 specification
55
- - `docs/api/API_REFERENCE.md`: Markdown API reference
@@ -1,61 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-bug-reproducer"
3
- description: [Tier 1] Generate minimal reproduction scripts and test cases from bug descriptions. AI strength in test/script generation. (project)
4
- ---
5
-
6
- # PrizmKit Bug Reproducer
7
-
8
- Generate minimal reproduction scripts and test cases from bug descriptions to isolate, confirm, and verify fixes.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-bug`-reproduce \<bug-description\>
13
-
14
- Generate a minimal reproduction for a reported bug.
15
-
16
- **STEPS:**
17
-
18
- 1. Parse bug description: extract expected vs actual behavior, steps to reproduce (if given), environment details
19
- 2. Read `.prizm-docs/` for relevant module context, paying special attention to TRAPS sections that may document known pitfalls
20
- 3. Identify affected code path from description:
21
- - Map user-facing behavior to source code modules
22
- - Identify entry points and data flow
23
- 4. Generate minimal reproduction based on bug type:
24
- a. **For API bugs**: Generate curl/HTTP request sequence
25
- - Include headers, authentication, request body
26
- - Show expected vs actual response
27
- - Add assertions on status code and response body
28
- b. **For UI bugs**: Generate step-by-step user interaction guide
29
- - Numbered steps with specific UI elements to interact with
30
- - Screenshot annotation points (where to look)
31
- - Browser/device requirements if relevant
32
- c. **For logic bugs**: Generate unit test that demonstrates the failure
33
- - Minimal test case with clear arrange/act/assert
34
- - Test name describes the expected behavior
35
- - Comments explaining why this should pass
36
- d. **For data bugs**: Generate seed data + query sequence
37
- - Minimal dataset that triggers the issue
38
- - Query or operation sequence to reproduce
39
- - Expected vs actual result comparison
40
- 5. Write reproduction script/test to a temporary file:
41
- - Use project's existing test framework and conventions
42
- - Include setup and teardown
43
- - Make it self-contained and runnable
44
- 6. Include assertions that:
45
- - FAIL with current (buggy) behavior
46
- - PASS with expected (correct) behavior
47
- - Serve as regression test after fix is applied
48
- 7. Output:
49
- - Reproduction file path
50
- - Minimal steps document describing how to run
51
- - Suggested fix investigation starting points
52
-
53
- ## Path References
54
-
55
- All internal asset paths MUST use `.claude/commands/prizmkit-bug-reproducer` placeholder for cross-IDE compatibility.
56
-
57
- ## Output
58
-
59
- - Reproduction script or test file written to project's test directory
60
- - Minimal steps document printed to console
61
- - Investigation pointers for the fix
@@ -1,53 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-ci-cd-generator"
3
- description: [Tier 2] Generate CI/CD pipeline config templates for GitHub Actions/GitLab CI/Jenkins. Cannot validate or test pipelines. (project)
4
- ---
5
-
6
- # PrizmKit CI/CD Generator
7
-
8
- Generate production-ready CI/CD pipeline configurations derived from your project's tech stack context.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-ci`-cd
13
-
14
- Generate a CI/CD pipeline configuration for the project.
15
-
16
- **STEPS:**
17
-
18
- 1. Read `.prizm-docs/root.prizm` for tech stack context (LANG, FRAMEWORK, BUILD, TEST)
19
- 2. Ask user: target platform
20
- - GitHub Actions
21
- - GitLab CI
22
- - Jenkins
23
- - Other (specify)
24
- 3. Ask user: environments to configure (dev, staging, production)
25
- 4. Generate pipeline config with stages:
26
- - **Install dependencies**: Use project's package manager (npm, pip, cargo, etc.)
27
- - **Lint/format check**: Run linter and formatter configured in project
28
- - **Run tests**: Execute test suite with coverage reporting
29
- - **Build artifact**: Compile/bundle project output
30
- - **Deploy**: Per-environment deployment steps
31
- 5. Include in generated config:
32
- - Dependency caching (language-appropriate cache keys)
33
- - Artifact management (build outputs, test reports)
34
- - Environment variable placeholders with descriptive comments
35
- 6. Write config to standard location:
36
- - GitHub Actions: `.github/workflows/ci.yml` and `.github/workflows/deploy.yml`
37
- - GitLab CI: `.gitlab-ci.yml`
38
- - Jenkins: `Jenkinsfile`
39
- 7. Add environment-specific secrets as placeholders with `# TODO: Configure in CI/CD settings` comments
40
- 8. Generate a README section documenting the CI/CD setup:
41
- - Pipeline overview
42
- - Required secrets and environment variables
43
- - How to trigger deployments
44
- - How to add new stages
45
-
46
- ## Path References
47
-
48
- All internal asset paths MUST use `.claude/commands/prizmkit-ci-cd-generator` placeholder for cross-IDE compatibility.
49
-
50
- ## Output
51
-
52
- - Pipeline configuration file(s) in the appropriate standard location
53
- - README section or standalone CI/CD documentation
@@ -1,64 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-db-migration"
3
- description: [Tier 2] Database migration script generation with rollback plans. Cannot validate against actual database. (project)
4
- ---
5
-
6
- # PrizmKit Database Migration
7
-
8
- Plan safe database schema changes with forward and backward migration scripts, risk assessment, and verification queries.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-db`-migrate
13
-
14
- Generate a database migration plan with scripts and rollback procedures.
15
-
16
- **STEPS:**
17
-
18
- 1. Read current data model from `.prizmkit/specs/` or `.prizm-docs/` (entity definitions, relationships, constraints)
19
- 2. Ask user: describe the schema change needed
20
- - What tables/collections are affected
21
- - What is the desired end state
22
- - Any data transformation requirements
23
- 3. Analyze change type:
24
- - **Additive** (safe): New tables, new nullable columns, new indexes
25
- - **Destructive** (risky): Drop tables, drop columns, change types with data loss
26
- - **Transformative** (complex): Rename columns, split/merge tables, data backfill
27
- 4. Generate migration plan:
28
- - **Pre-migration**:
29
- - Backup command for affected tables
30
- - List of affected tables and estimated row counts
31
- - Estimated downtime (if any)
32
- - **Forward migration**: SQL or ORM migration script
33
- - Schema DDL statements
34
- - Data migration DML statements (if applicable)
35
- - Index creation (CONCURRENTLY where supported)
36
- - **Backward migration (rollback)**: Reverse SQL or ORM script
37
- - Reverse DDL statements
38
- - Data restoration approach
39
- - MUST be tested before deploying forward migration
40
- - **Data verification**: Queries to validate migration success
41
- - Row count comparisons
42
- - Data integrity checks
43
- - Constraint validation
44
- 5. Risk assessment:
45
- - **Data loss potential**: NONE / LOW / MEDIUM / HIGH
46
- - **Downtime estimate**: Zero / Seconds / Minutes / Hours
47
- - **Recommended deployment strategy**: Online migration vs offline migration
48
- - **Lock contention risk**: Which tables will be locked and for how long
49
- 6. Write migration files to project's migration directory convention (detect from existing migrations or ask user)
50
- 7. Generate `migration-plan.md` with complete procedure:
51
- - Step-by-step execution guide
52
- - Monitoring queries to run during migration
53
- - Success criteria
54
- - Abort conditions
55
-
56
- ## Path References
57
-
58
- All internal asset paths MUST use `.claude/commands/prizmkit-db-migration` placeholder for cross-IDE compatibility.
59
-
60
- ## Output
61
-
62
- - Migration script file(s) in the project's migration directory
63
- - Rollback script file(s) alongside migration scripts
64
- - `migration-plan.md`: Complete migration procedure with risk assessment
@@ -1,122 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-dependency-health"
3
- description: [Tier 2] Dependency review based on manifest files. Analyzes version patterns; cannot query package registries for real-time vulnerability data. (project)
4
- ---
5
-
6
- # PrizmKit Dependency Health
7
-
8
- Audit project dependencies across all supported ecosystems. Identifies outdated packages, known vulnerabilities, license conflicts, and abandoned projects. Generates a health report with prioritized upgrade recommendations.
9
-
10
- ### When to Use
11
- - User says "check dependencies", "dependency audit", "are my packages up to date"
12
- - Before a major release or deployment
13
- - Periodically as part of maintenance workflow
14
- - After security advisories are published
15
-
16
- ### `/prizmkit-dependency`-health
17
-
18
- ### Steps
19
-
20
- #### Step 1: Detect Dependency Files
21
- Scan project root and subdirectories for:
22
- - **Node.js**: package.json + package-lock.json / yarn.lock / pnpm-lock.yaml
23
- - **Python**: requirements.txt / Pipfile / pyproject.toml / setup.py
24
- - **Go**: go.mod / go.sum
25
- - **Rust**: Cargo.toml / Cargo.lock
26
- - **Java**: pom.xml / build.gradle / build.gradle.kts
27
- - **Ruby**: Gemfile / Gemfile.lock
28
- - **PHP**: composer.json / composer.lock
29
- - **.NET**: *.csproj / packages.config
30
-
31
- #### Step 2: Analyze Each Dependency
32
- For each dependency found:
33
- - Current version pinned in manifest
34
- - Latest available version (if determinable from lock files or version patterns)
35
- - Major/minor/patch version delta
36
- - Known security advisories (if detectable from version ranges)
37
- - License type and compatibility
38
-
39
- #### Step 3: Classify Health Status
40
- - **HEALTHY**: Up to date or within 1 minor version, no known issues
41
- - **STALE**: 1+ major version behind latest
42
- - **VULNERABLE**: Known security advisory for current version
43
- - **ABANDONED**: No updates in 2+ years (based on available metadata)
44
- - **INCOMPATIBLE**: License conflict with project license
45
-
46
- #### Step 4: Generate Recommendations
47
- Prioritized by risk:
48
-
49
- **Safe Updates** (low risk):
50
- - Patch version bumps (bug fixes only)
51
- - Minor version bumps within same major (backward compatible)
52
-
53
- **Breaking Updates** (medium risk):
54
- - Major version bumps — list known breaking changes where identifiable
55
- - Suggest migration steps if available
56
-
57
- **Replacements** (high effort):
58
- - For abandoned packages — suggest actively maintained alternatives
59
- - For packages with unresolved vulnerabilities — suggest secure alternatives
60
-
61
- #### Step 5: Generate Report
62
- Output health report to conversation (READ-ONLY):
63
-
64
- ```markdown
65
- # Dependency Health Report
66
- Date: YYYY-MM-DD
67
- Project: <project-name>
68
-
69
- ## Summary
70
- - Total dependencies: N
71
- - Healthy: N | Stale: N | Vulnerable: N | Abandoned: N
72
-
73
- ## Ecosystem: <Node.js / Python / etc.>
74
-
75
- ### Vulnerable (Action Required)
76
- | Package | Current | Latest | Advisory | Severity |
77
- |---------|---------|--------|----------|----------|
78
- | example | 1.2.3 | 1.2.5 | CVE-XXX | HIGH |
79
-
80
- ### Stale (Upgrade Recommended)
81
- | Package | Current | Latest | Versions Behind |
82
- |---------|---------|--------|-----------------|
83
- | example | 2.0.0 | 4.1.0 | 2 major |
84
-
85
- ### Abandoned (Consider Replacing)
86
- | Package | Last Update | Suggested Alternative |
87
- |---------|-------------|----------------------|
88
- | example | 2021-01-01 | better-example |
89
-
90
- ### Healthy
91
- N packages up to date.
92
-
93
- ## Recommended Actions
94
- 1. Run: <package-manager-specific update commands>
95
- 2. Review breaking changes for: <packages>
96
- 3. Evaluate replacements for: <packages>
97
- ```
98
-
99
- #### Step 6: Suggest Update Commands
100
- Provide copy-paste commands for the project's package manager:
101
-
102
- **Node.js**:
103
- ```bash
104
- npm update # safe updates
105
- npm install <pkg>@latest # major updates (one at a time)
106
- npx npm-check-updates -u # update all to latest
107
- ```
108
-
109
- **Python**:
110
- ```bash
111
- pip install --upgrade <pkg> # upgrade specific
112
- pip install -r requirements.txt --upgrade # upgrade all
113
- ```
114
-
115
- **Go**:
116
- ```bash
117
- go get -u ./... # update all
118
- go get <pkg>@latest # update specific
119
- go mod tidy # clean up
120
- ```
121
-
122
- Adapt commands to the detected package manager.
@@ -1,57 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-deployment-strategy"
3
- description: [Tier 2] Deployment planning with rollback procedures for blue-green/canary/rolling strategies. Planning only, cannot execute. (project)
4
- ---
5
-
6
- # PrizmKit Deployment Strategy
7
-
8
- Plan comprehensive deployment strategies with rollback procedures tailored to your project's infrastructure.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-deploy`-plan
13
-
14
- Generate a deployment plan with rollback procedures.
15
-
16
- **STEPS:**
17
-
18
- 1. Read project context from `.prizm-docs/` (architecture, tech stack, infrastructure references)
19
- 2. Ask user: deployment target
20
- - Cloud provider (AWS, GCP, Azure)
21
- - Container orchestration (Kubernetes, Docker Swarm, ECS)
22
- - Bare metal / VM-based
23
- - Serverless (Lambda, Cloud Functions, Vercel)
24
- 3. Ask user: strategy preference
25
- - **Blue-green**: Zero-downtime with full environment swap
26
- - **Canary**: Gradual traffic shift to new version
27
- - **Rolling**: Incremental instance replacement
28
- - **Recreate**: Stop old, start new (accepts brief downtime)
29
- 4. Generate `deployment-plan.md` containing:
30
- - **Pre-deployment checklist**:
31
- - All tests passing on target branch
32
- - Database migrations prepared and tested
33
- - Backups completed (database, config, artifacts)
34
- - Monitoring and alerting confirmed operational
35
- - Communication sent to stakeholders
36
- - **Deployment steps**: Specific commands for the chosen strategy and target
37
- - **Health check configuration**: Endpoints, thresholds, intervals
38
- - **Rollback procedure**: Step-by-step commands to revert to previous version
39
- - **Monitoring points**: What to watch during and after deployment
40
- - **Post-deployment verification**:
41
- - Smoke test endpoints
42
- - Key metric baselines to compare
43
- - User-facing feature verification
44
- 5. Generate rollback script (`rollback.sh`) if applicable:
45
- - Automated rollback with safety checks
46
- - Confirmation prompts before destructive operations
47
- - Logging of rollback actions
48
- 6. Write to `.prizmkit/deployment-plan.md`
49
-
50
- ## Path References
51
-
52
- All internal asset paths MUST use `.claude/commands/prizmkit-deployment-strategy` placeholder for cross-IDE compatibility.
53
-
54
- ## Output
55
-
56
- - `.prizmkit/deployment-plan.md`: Complete deployment procedure
57
- - `rollback.sh` (if applicable): Executable rollback script
@@ -1,54 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-error-triage"
3
- description: [Tier 2] Error categorization and root cause analysis via pattern matching. Checks Prizm TRAPS for known issues; no runtime debugger. (project)
4
- ---
5
-
6
- # PrizmKit Error Triage
7
-
8
- Systematically categorize errors, perform root cause analysis, and check Prizm docs TRAPS for known patterns.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-error`-triage \<error-description-or-log\>
13
-
14
- Triage an error by classifying it, identifying root cause, and suggesting fixes.
15
-
16
- **STEPS:**
17
-
18
- 1. Parse error input (stack trace, error message, log snippet, or user description)
19
- 2. Classify error category:
20
- - **Runtime**: null reference, type error, out of bounds, division by zero
21
- - **Network**: timeout, DNS resolution, connection refused, SSL/TLS handshake
22
- - **Auth**: 401/403 responses, token expired, permission denied, CORS
23
- - **Data**: validation failure, serialization error, encoding mismatch, corruption
24
- - **Resource**: OOM, disk full, connection pool exhausted, file handle leak
25
- - **Logic**: incorrect output, race condition, deadlock, infinite loop
26
- - **Config**: missing env var, wrong endpoint, version mismatch, malformed config
27
- - **External**: third-party API failure, dependency bug, upstream service degradation
28
- 3. Check `.prizm-docs/` for known issues:
29
- - Read TRAPS sections of affected modules for documented pitfalls
30
- - Check DECISIONS sections for prior choices that may relate to the error
31
- 4. If known trap matches:
32
- - Suggest documented solution from TRAPS
33
- - Reference the specific `.prizm-docs/` file and entry
34
- 5. If no match: analyze root cause from first principles:
35
- a. Identify the error origin (file, line, function) from stack trace or context
36
- b. Trace the call chain to find the triggering condition
37
- c. Identify the most likely root cause
38
- d. Suggest fix approach with specific code pointers
39
- 6. Generate structured triage report:
40
- - **Category and subcategory**: e.g., Runtime > NullReference
41
- - **Root cause**: confirmed or suspected, with reasoning
42
- - **Affected files/modules**: list of files involved in the error path
43
- - **Suggested fix**: concrete steps or code changes to resolve
44
- - **Prevention**: what check, test, or guard would have caught this earlier
45
- 7. Suggest updating `.prizm-docs/` TRAPS section with newly discovered pitfalls to prevent recurrence
46
-
47
- ## Path References
48
-
49
- All internal asset paths MUST use `.claude/commands/prizmkit-error-triage` placeholder for cross-IDE compatibility.
50
-
51
- ## Output
52
-
53
- - Structured triage report printed to console
54
- - Suggestion to update `.prizm-docs/` TRAPS with new findings
@@ -1,54 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-log-analyzer"
3
- description: [Tier 2] Log pattern recognition via text analysis. Identifies error frequencies and correlations from provided log content. (project)
4
- ---
5
-
6
- # PrizmKit Log Analyzer
7
-
8
- Analyze log files to identify anomaly patterns, frequency trends, and error correlations for production issue investigation.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-analyze`-logs \<log-file-or-directory\>
13
-
14
- Analyze log files and produce a structured report of findings.
15
-
16
- **STEPS:**
17
-
18
- 1. Read and parse log files (auto-detect format):
19
- - JSON structured logs
20
- - Structured text (key=value pairs)
21
- - Syslog format
22
- - Custom formats (infer delimiter and field positions)
23
- 2. Extract entries with normalized fields:
24
- - **Timestamp**: parse to comparable datetime
25
- - **Level**: DEBUG, INFO, WARN, ERROR, FATAL
26
- - **Source**: service name, module, class, or file
27
- - **Message**: the log message body
28
- - **Metadata**: request ID, user ID, trace ID (if present)
29
- 3. Analyze patterns:
30
- - **Error frequency**: count by type and time window (per minute, per hour)
31
- - **Correlation**: errors that consistently appear together or in sequence
32
- - **Anomaly detection**: sudden spikes in error rate, new error types not seen before
33
- - **Timeline**: when did behavior change relative to deployments or config changes
34
- - **Request tracing**: follow request IDs across log entries to reconstruct flows
35
- 4. Identify top issues:
36
- - Most frequent errors (by count)
37
- - Most recent new errors (not seen in earlier log entries)
38
- - Errors with increasing trend (getting worse over time)
39
- - Errors correlated with specific endpoints, users, or time windows
40
- 5. Generate analysis report:
41
- - **Timeline of events**: chronological summary of significant changes
42
- - **Top 10 error patterns**: with frequency, first/last occurrence, and sample messages
43
- - **Correlation findings**: errors that co-occur or cascade
44
- - **Anomaly alerts**: unusual patterns that warrant investigation
45
- - **Recommended investigation priorities**: ranked list of what to look at first
46
-
47
- ## Path References
48
-
49
- All internal asset paths MUST use `.claude/commands/prizmkit-log-analyzer` placeholder for cross-IDE compatibility.
50
-
51
- ## Output
52
-
53
- - Structured analysis report printed to console
54
- - Summary suitable for sharing with team or pasting into incident reports
@@ -1,74 +0,0 @@
1
- ---
2
- name: "prizmkit-tool-monitoring-setup"
3
- description: [Tier 2] Generate monitoring config templates for Prometheus/Grafana/CloudWatch/etc. Cannot test or validate actual metrics collection. (project)
4
- ---
5
-
6
- # PrizmKit Monitoring Setup
7
-
8
- Generate comprehensive monitoring, alerting, and log collection configurations for your project's observability stack.
9
-
10
- ## Commands
11
-
12
- ### `/prizmkit-monitoring`
13
-
14
- Generate monitoring and observability configurations.
15
-
16
- **STEPS:**
17
-
18
- 1. Read `.prizm-docs/root.prizm` for tech stack and architecture (services, databases, external dependencies)
19
- 2. Ask user: monitoring stack
20
- - Prometheus + Grafana
21
- - ELK (Elasticsearch, Logstash, Kibana)
22
- - CloudWatch (AWS)
23
- - Datadog
24
- - Other (specify)
25
- 3. Identify key metrics to monitor:
26
- - **Application (RED metrics)**:
27
- - Request **R**ate: requests per second by endpoint
28
- - **E**rror rate: 4xx/5xx responses, exception counts
29
- - **D**uration: latency percentiles (p50, p95, p99)
30
- - **System**:
31
- - CPU utilization and saturation
32
- - Memory usage and swap
33
- - Disk I/O and space
34
- - Network throughput and errors
35
- - **Business**:
36
- - Feature-specific metrics derived from spec (signups, transactions, etc.)
37
- - SLA/SLO compliance indicators
38
- - **Database**:
39
- - Connection pool utilization
40
- - Query latency by type (read/write)
41
- - Replication lag
42
- - Slow query count
43
- 4. Generate monitoring configs:
44
- - **Metrics collection**: Scrape configs, exporters, or agent configurations
45
- - **Alert rules** with severity levels:
46
- - Critical: immediate page (service down, data loss risk)
47
- - Warning: investigate soon (degraded performance, approaching limits)
48
- - Info: awareness (deployment events, scaling events)
49
- - **Dashboard definition**: JSON/YAML for Grafana or equivalent
50
- - Overview dashboard: service health at a glance
51
- - Detail dashboard: per-service deep dive
52
- - **Log format and collection config**:
53
- - Structured log format recommendation
54
- - Log shipping configuration
55
- - Log retention policy
56
- 5. Generate health check endpoint code if not existing:
57
- - Liveness probe: process is running
58
- - Readiness probe: dependencies are available
59
- - Startup probe: initialization complete
60
- 6. Write configs to standard locations:
61
- - Prometheus: `monitoring/prometheus.yml`, `monitoring/alerts.yml`
62
- - Grafana: `monitoring/dashboards/`
63
- - Application: health check endpoint in source code
64
-
65
- ## Path References
66
-
67
- All internal asset paths MUST use `.claude/commands/prizmkit-monitoring-setup` placeholder for cross-IDE compatibility.
68
-
69
- ## Output
70
-
71
- - Monitoring configuration files in `monitoring/` directory
72
- - Alert rule definitions
73
- - Dashboard JSON/YAML files
74
- - Health check endpoint code (if generated)