prizmkit 1.1.79 → 1.1.81

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 (110) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/scripts/init-pipeline.py +2 -0
  3. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +2 -0
  4. package/bundled/skills/_metadata.json +1 -1
  5. package/bundled/skills/app-planner/SKILL.md +12 -356
  6. package/bundled/skills/app-planner/references/infrastructure-convention-discovery.md +108 -0
  7. package/bundled/skills/app-planner/references/project-conventions-discovery.md +59 -0
  8. package/bundled/skills/app-planner/references/project-state-detection.md +88 -0
  9. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +10 -0
  10. package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +9 -0
  11. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +10 -0
  12. package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +17 -0
  13. package/bundled/skills/app-planner/references/rules/frontend/template.md +19 -0
  14. package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +10 -0
  15. package/bundled/skills/app-planner/references/rules-configuration.md +46 -0
  16. package/bundled/skills/bug-fix-workflow/SKILL.md +18 -54
  17. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +41 -0
  18. package/bundled/skills/bug-planner/SKILL.md +20 -12
  19. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +9 -108
  20. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +98 -0
  21. package/bundled/skills/feature-pipeline-launcher/SKILL.md +20 -103
  22. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +81 -0
  23. package/bundled/skills/feature-planner/SKILL.md +5 -9
  24. package/bundled/skills/feature-workflow/SKILL.md +27 -184
  25. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +137 -0
  26. package/bundled/skills/prizm-kit/SKILL.md +14 -2
  27. package/bundled/skills/prizmkit-code-review/SKILL.md +67 -136
  28. package/bundled/skills/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  29. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +31 -0
  30. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  31. package/bundled/skills/prizmkit-code-review/scripts/check_loop.py +186 -0
  32. package/bundled/skills/prizmkit-committer/SKILL.md +8 -0
  33. package/bundled/skills/prizmkit-deploy/SKILL.md +49 -73
  34. package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +120 -0
  35. package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  36. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  37. package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +20 -0
  38. package/bundled/skills/prizmkit-implement/SKILL.md +7 -1
  39. package/bundled/skills/prizmkit-plan/SKILL.md +1 -83
  40. package/bundled/skills/prizmkit-plan/references/examples.md +85 -0
  41. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +14 -0
  42. package/bundled/skills/prizmkit-retrospective/SKILL.md +1 -1
  43. package/bundled/skills/prizmkit-test/SKILL.md +3 -151
  44. package/bundled/skills/prizmkit-test/references/examples.md +70 -0
  45. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +49 -0
  46. package/bundled/skills/prizmkit-test/references/test-report-template.md +42 -0
  47. package/bundled/skills/recovery-workflow/SKILL.md +24 -103
  48. package/bundled/skills/recovery-workflow/references/detection.md +58 -0
  49. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +9 -96
  50. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +88 -0
  51. package/bundled/skills/refactor-planner/SKILL.md +15 -157
  52. package/bundled/skills/refactor-planner/references/fast-path.md +59 -0
  53. package/bundled/skills/refactor-planner/references/planning-phases.md +135 -0
  54. package/bundled/skills/refactor-workflow/SKILL.md +18 -178
  55. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +116 -0
  56. package/bundled/skills-windows/app-planner/SKILL.md +12 -358
  57. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +108 -0
  58. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +59 -0
  59. package/bundled/skills-windows/app-planner/references/project-state-detection.md +90 -0
  60. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +10 -0
  61. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +9 -0
  62. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +10 -0
  63. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +17 -0
  64. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +19 -0
  65. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +10 -0
  66. package/bundled/skills-windows/app-planner/references/rules-configuration.md +46 -0
  67. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +18 -54
  68. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +41 -0
  69. package/bundled/skills-windows/bug-planner/SKILL.md +20 -12
  70. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +6 -91
  71. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +94 -0
  72. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +19 -88
  73. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +77 -0
  74. package/bundled/skills-windows/feature-planner/SKILL.md +5 -9
  75. package/bundled/skills-windows/feature-workflow/SKILL.md +27 -184
  76. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +137 -0
  77. package/bundled/skills-windows/prizm-kit/SKILL.md +14 -2
  78. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +67 -136
  79. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  80. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +31 -0
  81. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  82. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +186 -0
  83. package/bundled/skills-windows/prizmkit-committer/SKILL.md +8 -0
  84. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +50 -74
  85. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +120 -0
  86. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +3 -3
  87. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  88. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  89. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +20 -0
  90. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +2 -2
  91. package/bundled/skills-windows/prizmkit-implement/SKILL.md +7 -1
  92. package/bundled/skills-windows/prizmkit-plan/SKILL.md +1 -83
  93. package/bundled/skills-windows/prizmkit-plan/references/examples.md +85 -0
  94. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +14 -0
  95. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +1 -1
  96. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +1 -1
  97. package/bundled/skills-windows/prizmkit-test/SKILL.md +3 -151
  98. package/bundled/skills-windows/prizmkit-test/references/examples.md +70 -0
  99. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +49 -0
  100. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +42 -0
  101. package/bundled/skills-windows/recovery-workflow/SKILL.md +24 -125
  102. package/bundled/skills-windows/recovery-workflow/references/detection.md +58 -0
  103. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +8 -77
  104. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +82 -0
  105. package/bundled/skills-windows/refactor-planner/SKILL.md +15 -157
  106. package/bundled/skills-windows/refactor-planner/references/fast-path.md +59 -0
  107. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +135 -0
  108. package/bundled/skills-windows/refactor-workflow/SKILL.md +18 -178
  109. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +116 -0
  110. package/package.json +1 -1
@@ -12,7 +12,7 @@ Plan an application from idea to actionable project context through interactive
12
12
  - Architecture decision capture
13
13
  - Project brief accumulation (`.prizmkit/plans/project-brief.md`)
14
14
 
15
- This skill captures **project-level context only**: vision, tech stack, conventions, architecture decisions, and project brief. It does NOT do feature decomposition or generate `feature-list.json` that is `feature-planner`'s job.
15
+ This skill captures **project-level context only**: vision, tech stack, conventions, architecture decisions, and project brief. It does not do feature decomposition. (See **Scope Boundary** for the authoritative output rules.)
16
16
 
17
17
  For adding features to an **existing** project that already has a project brief, use `feature-planner` directly.
18
18
 
@@ -56,14 +56,7 @@ If you believe the task is better suited for a different workflow, you MUST:
56
56
 
57
57
  ## When to Use
58
58
 
59
- Trigger this skill for requests like:
60
- - "Plan an app", "Design a project", "Design a new application"
61
- - "Start from scratch", "Build something new", "Create a new product"
62
- - "Help me figure out what to build", "Brainstorm an app idea"
63
- - "What tech stack should I use?", "Help me choose frameworks"
64
- - "Create a project brief for my existing project"
65
- - "Help me document what this project is about"
66
- - "I have a codebase but no project plan yet"
59
+ The skill `description` lists the trigger phrases. Beyond those, use this section to disambiguate from `feature-planner` and other workflows.
67
60
 
68
61
  Do NOT use this skill when:
69
62
  - The user already has a project brief and wants to add features → use `feature-planner`
@@ -88,155 +81,16 @@ Do NOT use this skill when:
88
81
 
89
82
  **Do NOT follow any fixed checklist.** Every project is different. You must analyze the project first, then reason about what system-level conventions this specific project needs.
90
83
 
91
- **Step 1: Analyze the project**
92
- - Read tech stack, dependencies, existing code, config files, README, any existing style guides or linter configs
93
- - For brownfield: also read actual source code patterns (naming, file structure, error handling, etc.)
94
- - For greenfield: use the user's stated goals and intended tech stack
95
-
96
- **Step 2: Reason about what conventions matter for THIS project**
97
- Think about what decisions, if left unstandardized, would cause inconsistency as the project grows. Consider all dimensions relevant to the project — these might include (but are NOT limited to):
98
- - Language and localization choices
99
- - Code style and naming patterns
100
- - Architecture and communication patterns
101
- - Data format and storage decisions
102
- - Security and auth approaches
103
- - UI/UX patterns
104
- - Testing strategies
105
- - Deployment and environment patterns
106
- - ...anything else you observe that needs a project-level decision
107
-
108
- The point is: YOU decide what's relevant based on what you see. A Next.js SaaS app needs completely different conventions than a Python data pipeline or a Go microservice.
109
-
110
- **Step 3: Present findings via `AskUserQuestion`**
111
-
112
- First, show "Already decided" conventions as text:
113
- > **Already decided** (detected from your codebase):
114
- > - [convention]: [value] (source: [where you found it])
115
- > - [convention]: [value] (source: [where you found it])
116
-
117
- Then use `AskUserQuestion` for conventions that need user input (up to 4 questions per call, use multiple calls as needed — no limit on total rounds). Each question:
118
- - Question text includes the convention name AND why it matters for this project
119
- - Options are the reasonable choices (2-4 per question)
120
- - Mark the recommended option first with "(Recommended)" in its label
121
- - Use `description` field to explain trade-offs
122
-
123
- After each batch of `AskUserQuestion` calls, reassess: are there more project-level conventions to cover? If yes, continue with more `AskUserQuestion` calls. Keep going until ALL project-level conventions are fully addressed.
124
-
125
- Then ask in text: "Anything I missing that you'd like to standardize?" — if the user adds more, continue the discovery loop.
126
-
127
- **Rules:**
128
- - **No interaction limit** — keep asking until every project-level convention is covered. Do NOT stop early or batch-skip to save rounds.
129
- - Every proposed convention must be justified by something you observed in the project — explain WHY it matters
130
- - Auto-confirm anything already evident from the codebase (show as "detected", let user override)
131
- - Propose as many conventions as the project genuinely needs, but don't pad with irrelevant ones
132
- - The "Anything I missing?" question is NOT the end — if the user adds items, ask follow-up `AskUserQuestion` calls to clarify those too
84
+ Read `${SKILL_DIR}/references/project-conventions-discovery.md` for the full AI-driven discovery procedure (Analyze → Reason → Present via AskUserQuestion).
133
85
 
134
86
  → Save answers to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
135
87
  → Output format will naturally vary per project — that is the intended behavior
136
88
 
137
89
  **Infrastructure Convention Discovery (Database + Deployment)**
138
90
 
139
- After project conventions are captured, check `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` for `### Infrastructure` section:
140
-
141
- - If `### Infrastructure` section does not exist this project was not initialized with prizmkit-init's Phase 4.6. Treat as if both database and deployment are undecided run full inquiry below.
142
- - If `<!-- infrastructure: deferred -->` → user explicitly skipped at init time. Ask: "During project init you deferred infrastructure decisions. Would you like to configure them now?" (options: "Yes — configure now (Recommended)", "Skip — decide later")
143
- - If `<!-- database: deferred -->` → only database was deferred, run database inquiry only
144
- - If `<!-- deployment: deferred -->` or deployment section is missing → run deployment inquiry only
145
- - If both sections exist with real values → read existing config, present as "Already decided", ask: "Anything to change?" If no → skip to next phase.
146
-
147
- **Database Convention Deep Inquiry** (AI-driven, context-aware — select from pool based on project):
148
-
149
- AI analyzes the detected database type, ORM, and tech stack, then selects relevant questions from this pool. Do NOT ask all questions — only those that matter for THIS project:
150
-
151
- 1. **Table naming convention**: snake_case / camelCase / PascalCase; prefix convention (e.g., `t_`, `tbl_`, none). For brownfield: detect from existing migration files or schema and present as "Already decided" with override option.
152
- 2. **Field naming convention**: snake_case / camelCase; common fields convention — are `created_at`, `updated_at`, `deleted_at` (soft delete) required on all tables? What about `id` vs `uuid` column naming?
153
- 3. **Migration conventions**:
154
- - File storage directory (e.g., `db/migrations/`, `prisma/migrations/`, `alembic/versions/`)
155
- - Naming rule (timestamp prefix `20240101_create_users`, sequence prefix `001_create_users`, ORM auto-generated)
156
- - Migration tool (ORM built-in / Flyway / Liquibase / golang-migrate / manual SQL)
157
- - For brownfield: detect existing migration directory and naming pattern, present as "Already decided"
158
- 4. **Primary key strategy**: Auto-increment integer / UUID v4 / ULID / Snowflake ID / Other
159
- 5. **Index naming convention**: e.g., `idx_{table}_{column}`, `ix_{table}_{column}`, or ORM default
160
- 6. **Environment separation**: dev/test/prod database separation strategy; connection config management (env vars / config files / secret manager)
161
-
162
- Use `AskUserQuestion` for each batch (up to 4 questions per call). For brownfield projects, show detected patterns as recommended options. Each question MUST include a "Skip — decide later" option.
163
-
164
- **Deployment Configuration Deep Inquiry** (AI-driven, context-aware):
165
-
166
- Read the existing `### Infrastructure` → `#### Deployment` section for the deployment target, then ask relevant follow-up questions:
167
-
168
- 1. **Deployment target refinement**:
169
- - Own server: SSH access method (key-based / password), OS (Ubuntu / CentOS / other), Docker installed?
170
- - SaaS platform: specific platform confirmation, existing account and project? Already deployed before?
171
- - Container: orchestration method (Docker Compose / K8s / ECS / Cloud Run)
172
- 2. **Existing infrastructure**:
173
- - Remote machine availability — IP/domain? Existing server configuration?
174
- - Existing CI/CD pipeline — GitHub Actions / GitLab CI / Jenkins / other? Already configured?
175
- - Domain name and SSL — already owned? DNS provider? SSL management (Let's Encrypt / platform-managed / other)?
176
- 3. **AI-assisted deployment**:
177
- - Whether AI should help execute deploy commands (via SaaS CLI like `vercel deploy`, `fly deploy`, `railway up`, `docker push`, or SSH remote commands)
178
- - If yes: collect necessary info — API token storage method (env var name, e.g., `VERCEL_TOKEN`), project name/ID on the platform, target environment (production / staging)
179
- - Explicitly inform: "AI will show each command and wait for your confirmation before executing"
180
- 4. **Environment variable management**: production env var strategy (SaaS platform dashboard / `.env.production` committed to repo / secret manager like AWS Secrets Manager, Vault / CI/CD secrets)
181
-
182
- Use `AskUserQuestion` for each batch. Each question MUST include a "Skip — decide later" option.
183
-
184
- **Cloud Services Deep Inquiry** (Two-round AskUserQuestion):
185
-
186
- Many projects depend on third-party cloud services (object storage, CDN, managed DB, auth, domain, email, SMS, payment, AI APIs). Capture them now so feature-planner and prizmkit-deploy can reference them later.
187
-
188
- *Round 1 — Cloud Vendors* (multi-select via `AskUserQuestion`):
189
- - "Which cloud vendors will this project integrate with?"
190
- - Options: `AWS`, `Aliyun`, `Tencent Cloud`, `Cloudflare`, `Vercel`, `Other` (free text), `None — skip`
191
- - If `None — skip`, write `<!-- cloud-services: none -->` to the `#### Cloud Services` subsection and exit this inquiry.
192
-
193
- *Round 2 — Service Types* (multi-select, only if Round 1 returned any vendor):
194
- - "Which types of cloud services will you use?"
195
- - Options: `Object Storage (COS/S3/OSS)`, `CDN`, `Managed Database`, `Functions/Serverless`, `Auth (OAuth/JWT/IDaaS)`, `Domain & DNS`, `Email`, `SMS`, `Payment`, `AI API (OpenAI/Anthropic/...)`, `Other`
196
- - The list is multi-select. Skip the question entirely if user picks "None" in Round 1.
197
-
198
- *After both rounds, write to `#### Cloud Services`*:
199
- - For each chosen (vendor × service) pair, append a row to the subsection (see template below)
200
- - **Do NOT** prompt for env var names, credentials, region, or SDK details — those belong to `prizmkit-deploy`'s scope, not planning
201
- - If the user is unsure of the mapping, store the vendors and service types separately; deploy skill can refine later
202
-
203
- Use `AskUserQuestion` for both rounds. Each question MUST include a "Skip — decide later" option.
204
-
205
- **After infrastructure inquiry**:
206
- - Update `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section with all collected information. Replace `<!-- deferred -->` markers with real values. Preserve any existing values that were confirmed unchanged. Full format:
207
- ```markdown
208
- ### Infrastructure
209
-
210
- #### Database
211
- - **Type**: [database type]
212
- - **ORM**: [ORM name]
213
- - **Table naming**: [convention, e.g., snake_case, no prefix]
214
- - **Field naming**: [convention]; common fields: [list]
215
- - **Primary key**: [strategy]
216
- - **Migration directory**: [path]
217
- - **Migration naming**: [rule]
218
- - **Index naming**: [convention]
219
- - **Environment separation**: [strategy]
220
-
221
- #### Deployment
222
- - **Target**: [platform/method]
223
- - **AI-assisted deploy**: [yes/no]
224
- - **Domain**: [domain or "not configured"]
225
- - **SSL**: [management method]
226
- - **CI/CD**: [tool or "not configured"]
227
- - **Env var management**: [strategy]
228
-
229
- #### Deployment Credentials Reference
230
- - [platform]: [token/auth method description]
231
-
232
- #### Cloud Services
233
- - **Vendors**: [comma-separated list, e.g., "AWS, Cloudflare" or "none"]
234
- - **Services**:
235
- - [vendor]: [service type] — [optional one-line note, e.g., "user-upload images"]
236
- - [vendor]: [service type]
237
- <!-- If user picked "None" in Round 1, replace this block with: cloud-services: none -->
238
- ```
239
- - Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` in the selected project instruction file for `prizmkit-deploy` to pick up later.
91
+ After project conventions are captured, check the project instruction file for `### Infrastructure` section status. Read `${SKILL_DIR}/references/infrastructure-convention-discovery.md` for the full database (6 topics — table naming, field naming, migrations, primary keys, indexes, environment separation), deployment (4 topics — target refinement, existing infrastructure, AI-assisted deploy, env var management), and cloud services (2-round AskUserQuestion) inquiry procedures. Follow the inquiry flow there — use `AskUserQuestion` for each batch. Each question MUST include a "Skip — decide later" option.
92
+
93
+ After inquiry, update the `### Infrastructure` section in the project instruction file with all collected information (see reference file for full output format). Items still marked "Skip decide later" remain as `<!-- [topic]: deferred -->` for `prizmkit-deploy` to pick up later.
240
94
 
241
95
  4. **Project brief accumulation** — throughout all interactive phases:
242
96
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
@@ -248,142 +102,7 @@ After Infrastructure configuration is complete (CP-AP-1.5), check whether the pr
248
102
 
249
103
  Rules are optional. If the user skips, AI uses general best practices freely — no reminders, no blocking.
250
104
 
251
- ### Step 1: Detect which layers need rules
252
-
253
- 1. Read `.prizmkit/config.json` to get `detected_layers` (written by `prizmkit-init` Phase 4.5).
254
- - If `detected_layers` is present and non-empty → use it directly, jump to step 3.
255
- - If `detected_layers` is absent or empty → run self-detection (step 2). Do NOT skip rules configuration just because this field is missing — the project may still have layers that need rules.
256
-
257
- 2. **Self-detection** (only when `detected_layers` is absent/empty from config.json):
258
-
259
- Scan the project to determine which development layers exist. Combine signal matching with your own judgment — the signals below are a guide, not exhaustive.
260
-
261
- | Layer | Where to Look | Signals |
262
- |-------|---------------|---------|
263
- | **frontend** | `package.json` deps | `react`, `vue`, `angular`, `next`, `nuxt`, `svelte`, `solid-js`, `preact`, `remix`, `astro`, `qwik` |
264
- | **frontend** | `package.json` devDeps | `vite`, `webpack`, `parcel`, `turbo` |
265
- | **frontend** | Directory | `src/components/`, `pages/`, `app/` with `.tsx`/`.jsx`/`.vue` files |
266
- | **backend** | `package.json` deps | `express`, `fastify`, `koa`, `hono`, `nest` |
267
- | **backend** | `pyproject.toml`/`requirements.txt` | `fastapi`, `django`, `flask`, `sanic`, `litestar` |
268
- | **backend** | `go.mod` | `gin-gonic`, `echo`, `fiber`, `chi` |
269
- | **backend** | `pom.xml`/`build.gradle` | `spring-boot`, `quarkus`, `micronaut`, `ktor` |
270
- | **backend** | Directory | `routes/`, `controllers/`, `handlers/`, `api/` with server code |
271
- | **database** | `package.json` deps | `prisma`, `typeorm`, `sequelize`, `mongoose`, `knex`, `drizzle-orm`, `kysely` |
272
- | **database** | `pyproject.toml`/`requirements.txt` | `sqlalchemy`, `pony`, `peewee`, `tortoise-orm` |
273
- | **database** | `go.mod` | `gorm`, `sqlx`, `sqlc`, `ent`, `bun` |
274
- | **database** | Directory/Env | `migrations/`, `prisma/`, `alembic/`; `.env*` with `DATABASE_URL`, `DB_HOST`, `MONGO_URI` |
275
- | **mobile** | File | `pubspec.yaml` (Flutter) |
276
- | **mobile** | `package.json` deps | `react-native`, `expo` |
277
- | **mobile** | Directory | Both `ios/*.xcodeproj` + `android/build.gradle` simultaneously |
278
-
279
- **Apply your own judgment**: if you see clear evidence of a layer not covered above, include it. If a signal matches but context suggests it's misleading (e.g., a dependency present but not used as the primary tech), downgrade or ignore it.
280
-
281
- After scanning, present findings via `AskUserQuestion`:
282
-
283
- **Question**: "I detected these development layers: [list with brief evidence]. Is this correct?"
284
- - **Yes, looks correct (Recommended)** — use detected layers
285
- - **Mostly correct, adjust** — I'll note changes
286
- - **No layers apply** — skip rules configuration (library/CLI project)
287
-
288
- If user picks "No layers apply" → skip this entire section, proceed to Prerequisites.
289
- If user picks "Mostly correct, adjust" → ask what to add, remove, or change, then reassemble `detected_layers`. Continue to step 3.
290
- If user confirms → assemble `detected_layers` array and continue to step 3.
291
-
292
- 3. For each layer in `detected_layers`, check if `.prizmkit/rules/<layer>-rules.md` exists:
293
- - `frontend` → `.prizmkit/rules/frontend-rules.md`
294
- - `backend` → `.prizmkit/rules/backend-rules.md`
295
- - `database` → `.prizmkit/rules/database-rules.md`
296
- - `mobile` → `.prizmkit/rules/mobile-rules.md`
297
-
298
- 4. Display status:
299
-
300
- ```
301
- Rules Status Check:
302
- [missing] frontend-rules.md — frontend code detected, no rules configured
303
- [exists] backend-rules.md — already configured
304
- [missing] database-rules.md — database interaction detected, no rules configured
305
- ```
306
-
307
- 5. If all detected layers already have rules → skip to Prerequisites.
308
- 6. If missing rules found, proceed to Step 2.
309
-
310
- ### Step 2: Ask configuration mode
311
-
312
- Use `AskUserQuestion`:
313
-
314
- **Question**: "{N} layer(s) without custom dev rules. How would you like to configure?"
315
- - **Quick setup (only core decisions, rest use recommended defaults)** — covers essential architecture, core technology decisions, and testing questions specific to each layer. Detailed configuration topics (design-system, i18n, performance tuning, deployment details, AI constraints) adopt recommended defaults. See Step 4 for exact per-layer coverage.
316
- - **Full setup (customize every detail)** — 15-25 questions per layer
317
- - **Skip — no custom rules needed**
318
-
319
- If user picks "Skip" → proceed to Prerequisites.
320
-
321
- ### Step 3: Select layers to configure
322
-
323
- Use `AskUserQuestion` (multiSelect):
324
-
325
- **Question**: "Which layers do you want to configure?"
326
- - Options: the missing layers from Step 1, each with a brief description
327
- - All pre-selected by default
328
-
329
- ### Step 4: Configure each selected layer
330
-
331
- For each selected layer, run the rules Q&A workflow. This follows the 4-phase rule generation pattern:
332
-
333
- **Phase A — Load layer resources:**
334
- - Read `${SKILL_DIR}/references/rules/<layer>/fixed-rules.md` — industry-consensus rules injected without asking
335
- - Read `${SKILL_DIR}/references/rules/<layer>/question-bank.md` — interactive questions organized in groups (G1→G10): authoritative source for question text, options, "Recommended" markers, and Notes
336
- - Read `${SKILL_DIR}/references/rules/<layer>/question-manifest.json` — machine-readable structure for this layer. **This is your asking checklist.** It lists, per question: `group`, `required`, `maps_to` (which template placeholders the answer fills), and conditional fields (`required_if`, `auto_derived_when`, `options_vary_by`). Its `groups[]` carries each group's `quick_mode` flag, and `template_placeholders` is the expected-set for the Phase D self-check. Use the manifest to track coverage; use question-bank.md for the actual wording you present to the user. If a question id in one file is absent from the other, trust question-bank.md for content and note the drift.
337
-
338
- **Phase B — Interactive Q&A:**
339
- - Ask questions one group at a time (max 3 questions per message), as defined in question-bank.md
340
- - Each question shows a "Recommended" option to reduce decision cost
341
- - **Quick mode**: ask only the groups whose `quick_mode` is `true` in `question-manifest.json`. All other groups adopt recommended defaults silently. (The manifest is the single source of truth for quick-mode membership — do not hardcode group lists here.)
342
- - **Full mode**: ask all groups in manifest order (`groups[]`).
343
- - **Conditional questions** (driven by the manifest's per-question fields):
344
- - `required_if: "<expr>"` — ask this question only when the expression over prior answers holds (e.g. Q14 `required_if: Q13 != D`). If the condition is false, the question is legitimately skipped — not a coverage gap.
345
- - `auto_derived_when: "<expr>"` — when this holds, fill the mapped placeholder(s) from the prior answer without asking (e.g. backend Q6 `auto_derived_when: Q5 in [GraphQL, gRPC]`). Count as satisfied, not skipped.
346
- - `options_vary_by: "<Qid>"` — the question is still asked; only its option list depends on that prior answer (e.g. framework/ORM options vary by language). Never affects whether the question is required.
347
- - Shortcut commands work at any point:
348
- - `recommended` / `default` → adopt all recommended for current group
349
- - `all recommended` → adopt all recommended for all remaining groups
350
- - `skip` → mark current group as "Not required at this stage"
351
- - Record answers in memory after each group. Track which manifest questions are answered, auto-derived, or conditionally skipped so Phase D can verify coverage.
352
-
353
- **Phase C — Auto-derivation:**
354
- - Read `${SKILL_DIR}/references/rules/<layer>/derivation-rules.md`
355
- - Match user answers against the trigger map using keyword matching
356
- - Derive platform-specific rules without asking the user (e.g., choosing Flutter → auto-inject Flutter widget/persistence/navigation rules)
357
-
358
- **Phase D — Render and write:**
359
- - Read `${SKILL_DIR}/references/rules/<layer>/template.md`
360
- - Fill all template placeholders with accumulated content from Phases A+B+C
361
- - **Post-render self-check** (driven by `question-manifest.json` → `template_placeholders`):
362
- 1. **Coverage pass** — for every placeholder in `from_questions`, confirm it traces to an answered question OR an `auto_derived_when` path OR a conditionally-skipped question (`required_if` false). If a `from_questions` placeholder has no source, you skipped a required question — go back and ask it before writing.
363
- 2. **Residual pass** — scan the rendered document for any residual `{{ ` or ` }}`; count must be 0. Placeholders in `from_fixed_rules` / `auto_generated` / `metadata` are filled from fixed-rules.md, Phase D generation, and project metadata respectively — they are NOT expected to come from Q&A, but they MUST still be rendered (no residual braces).
364
- - Generate Appendix A (Deny List) and Appendix B (Recommended Tools) per template instructions — these fill the `auto_generated` placeholders
365
- - Create `.prizmkit/rules/` directory if it doesn't exist
366
- - Write `.prizmkit/rules/<layer>-rules.md`
367
-
368
- ### Step 5: Update root.prizm
369
-
370
- After all selected layers are configured:
371
- 1. Check if `.prizmkit/prizm-docs/root.prizm` exists.
372
- 2. **If root.prizm exists**:
373
- - Read the file.
374
- - Check if `RULES:` line exists:
375
- - If present: append new rules file paths to the existing line (check for duplicates first — skip paths already on the line).
376
- - If absent: add `RULES: .prizmkit/rules/<layer>-rules.md, ...` at the end (after PROJECT_BRIEF line).
377
- 3. **If root.prizm does not exist** (e.g., project without prizm-docs init):
378
- - Create a minimal `root.prizm` with:
379
- ```
380
- PRIZM_VERSION: 2
381
- PROJECT: <name> — from package.json name, directory name, or git repo name
382
- MODULE_INDEX:
383
- RULES: .prizmkit/rules/<layer>-rules.md, ...
384
- ```
385
- - The file will be expanded when the project later runs `prizmkit-prizm-docs init`.
386
- 4. The RULES pointer tells every AI session where to find custom dev rules — AI reads rules via this pointer on session start
105
+ Read `${SKILL_DIR}/references/rules-configuration.md` for the full procedure: layer detection, configuration mode selection, interactive Q&A per layer, template rendering, and root.prizm RULES pointer update.
387
106
 
388
107
  ### After rules configuration
389
108
 
@@ -483,77 +202,12 @@ Proceed with the standard Core Workflow — ask all questions from scratch.
483
202
 
484
203
  ### Brownfield Behavior
485
204
 
486
- When an existing project is detected:
487
-
488
- **Step 1: Prerequisite Check (Mandatory)**
489
-
490
- Before ANY planning work, check if AI-essential project context files exist:
491
-
492
- | File | Purpose | Status |
493
- |------|---------|--------|
494
- | `.prizmkit/prizm-docs/root.prizm` | Project architecture context for AI | exists / missing |
495
- | `.prizmkit/config.json` | Tech stack + runtime config | exists / missing |
496
- | `.prizmkit/plans/project-brief.md` | Product vision checklist | exists / missing |
497
-
498
- **If ANY are missing**, show the status table, then use `AskUserQuestion`:
499
-
500
- **Question**: "Some AI context files are missing. These help AI understand your project — making planning much more effective. How would you like to proceed?"
501
- - **Run project init first (Recommended)** — invoke `prizmkit-init` to scan your codebase and generate these files, then return to planning
502
- - **Continue without init** — I'll scan the project manually during this session (less thorough)
503
- - **Skip, I'll set these up later** — proceed with planning using only what's available
504
-
505
- - **Run project init first** → Invoke `prizmkit-init`, then resume app-planner from where it left off
506
- - **Continue without init** → Continue with Step 2 below (manual scan)
507
- - **Skip** → Continue with Step 3, skip scanning
508
-
509
- **Step 2: Proactive Project Scanning**
510
-
511
- Do NOT ask the user to describe their project — read it yourself first:
512
-
513
- 1. **Scan project structure** to understand the codebase layout:
514
- ```powershell
515
- Get-ChildItem -Path . -Directory -Recurse -Depth 2 -ErrorAction SilentlyContinue |
516
- Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|__pycache__|vendor)(\\|$)' } |
517
- Select-Object -ExpandProperty FullName
518
- ```
519
-
520
- 2. **Read existing project metadata** to infer tech stack and purpose:
521
- - `package.json` → name, description, dependencies, scripts
522
- - `pyproject.toml` / `requirements.txt` → Python dependencies
523
- - `go.mod` → Go module info
524
- - `README.md` → project description and goals
525
- - `.prizmkit/config.json` → previously detected tech stack
526
- - `.prizmkit/prizm-docs/root.prizm` → existing architecture context
527
-
528
- 3. **Read key source files** (entry points, main routes, core models) to understand what the project actually does — don't rely solely on metadata.
529
-
530
- **Step 3: Present inferred summary with confirmation**
531
-
532
- Show the summary as text, then use `AskUserQuestion`:
533
-
534
- > Based on my analysis of your codebase:
535
- >
536
- > **Project**: [name] — [inferred description]
537
- > **Tech Stack**: [framework] + [language] + [key dependencies]
538
- > **Key Features Found**: [list 3-5 detected capabilities]
539
- > **Architecture**: [e.g., monolithic, microservices, serverless]
540
-
541
- **Question**: "Does this look correct?"
542
- - **Yes, looks correct (Recommended)** — proceed with planning
543
- - **Mostly correct, with changes** — I'll note corrections
544
- - **This is off** — let me describe the project
545
-
546
- **Step 4: Pre-fill and focus**
547
-
548
- - Phase 2 tech stack selection → largely pre-filled from dependencies
549
- - Vision/problem statement → inferred from README or package description (user confirms)
550
- - Existing features → note them as `[x]` items in project brief
205
+ When an existing project is detected, read `${SKILL_DIR}/references/project-state-detection.md` for the full 4-step brownfield procedure:
551
206
 
552
- **Focus remaining questions** (as options where possible) on what CANNOT be inferred:
553
- - Target users and core value proposition
554
- - Future direction and planned capabilities
555
- - Non-functional requirements (performance, scale, security)
556
- - Design direction (for frontend projects)
207
+ - **Step 1**: Prerequisite check verify `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json`, `.prizmkit/plans/project-brief.md` exist. If missing, offer to run `prizmkit-init` first.
208
+ - **Step 2**: Proactive scanning — read codebase structure, metadata files, and key source files yourself
209
+ - **Step 3**: Present inferred summary and confirm with `AskUserQuestion`
210
+ - **Step 4**: Pre-fill known information, focus questions on what cannot be inferred
557
211
 
558
212
  ## Core Workflow
559
213
 
@@ -0,0 +1,108 @@
1
+ # Infrastructure Convention Discovery
2
+
3
+ Detailed Q&A flows for database, deployment, and cloud services conventions during app planning.
4
+
5
+ ## Infrastructure Section Check
6
+
7
+ Check `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` for `### Infrastructure` section:
8
+
9
+ - If `### Infrastructure` section does not exist → this project was not initialized with prizmkit-init's Phase 4.6. Treat as if both database and deployment are undecided — run full inquiry below.
10
+ - If `<!-- infrastructure: deferred -->` → user explicitly skipped at init time. Ask: "During project init you deferred infrastructure decisions. Would you like to configure them now?" (options: "Yes — configure now (Recommended)", "Skip — decide later")
11
+ - If `<!-- database: deferred -->` → only database was deferred, run database inquiry only
12
+ - If `<!-- deployment: deferred -->` or deployment section is missing → run deployment inquiry only
13
+ - If both sections exist with real values → read existing config, present as "Already decided", ask: "Anything to change?" If no → skip to next phase.
14
+
15
+ ## Database Convention Deep Inquiry
16
+
17
+ AI-driven, context-aware — select from pool based on project. AI analyzes the detected database type, ORM, and tech stack, then selects relevant questions from this pool. Do NOT ask all questions — only those that matter for THIS project:
18
+
19
+ 1. **Table naming convention**: snake_case / camelCase / PascalCase; prefix convention (e.g., `t_`, `tbl_`, none). For brownfield: detect from existing migration files or schema and present as "Already decided" with override option.
20
+ 2. **Field naming convention**: snake_case / camelCase; common fields convention — are `created_at`, `updated_at`, `deleted_at` (soft delete) required on all tables? What about `id` vs `uuid` column naming?
21
+ 3. **Migration conventions**:
22
+ - File storage directory (e.g., `db/migrations/`, `prisma/migrations/`, `alembic/versions/`)
23
+ - Naming rule (timestamp prefix `20240101_create_users`, sequence prefix `001_create_users`, ORM auto-generated)
24
+ - Migration tool (ORM built-in / Flyway / Liquibase / golang-migrate / manual SQL)
25
+ - For brownfield: detect existing migration directory and naming pattern, present as "Already decided"
26
+ 4. **Primary key strategy**: Auto-increment integer / UUID v4 / ULID / Snowflake ID / Other
27
+ 5. **Index naming convention**: e.g., `idx_{table}_{column}`, `ix_{table}_{column}`, or ORM default
28
+ 6. **Environment separation**: dev/test/prod database separation strategy; connection config management (env vars / config files / secret manager)
29
+
30
+ Use `AskUserQuestion` for each batch (up to 4 questions per call). For brownfield projects, show detected patterns as recommended options. Each question MUST include a "Skip — decide later" option.
31
+
32
+ ## Deployment Configuration Deep Inquiry
33
+
34
+ AI-driven, context-aware. Read the existing `### Infrastructure` → `#### Deployment` section for the deployment target, then ask relevant follow-up questions:
35
+
36
+ 1. **Deployment target refinement**:
37
+ - Own server: SSH access method (key-based / password), OS (Ubuntu / CentOS / other), Docker installed?
38
+ - SaaS platform: specific platform confirmation, existing account and project? Already deployed before?
39
+ - Container: orchestration method (Docker Compose / K8s / ECS / Cloud Run)
40
+ 2. **Existing infrastructure**:
41
+ - Remote machine availability — IP/domain? Existing server configuration?
42
+ - Existing CI/CD pipeline — GitHub Actions / GitLab CI / Jenkins / other? Already configured?
43
+ - Domain name and SSL — already owned? DNS provider? SSL management (Let's Encrypt / platform-managed / other)?
44
+ 3. **AI-assisted deployment**:
45
+ - Whether AI should help execute deploy commands (via SaaS CLI like `vercel deploy`, `fly deploy`, `railway up`, `docker push`, or SSH remote commands)
46
+ - If yes: collect necessary info — API token storage method (env var name, e.g., `VERCEL_TOKEN`), project name/ID on the platform, target environment (production / staging)
47
+ - Explicitly inform: "AI will show each command and wait for your confirmation before executing"
48
+ 4. **Environment variable management**: production env var strategy (SaaS platform dashboard / `.env.production` committed to repo / secret manager like AWS Secrets Manager, Vault / CI/CD secrets)
49
+
50
+ Use `AskUserQuestion` for each batch. Each question MUST include a "Skip — decide later" option.
51
+
52
+ ## Cloud Services Deep Inquiry
53
+
54
+ Two-round AskUserQuestion.
55
+
56
+ *Round 1 — Cloud Vendors* (multi-select via `AskUserQuestion`):
57
+ - "Which cloud vendors will this project integrate with?"
58
+ - Options: `AWS`, `Aliyun`, `Tencent Cloud`, `Cloudflare`, `Vercel`, `Other` (free text), `None — skip`
59
+ - If `None — skip`, write `<!-- cloud-services: none -->` to the `#### Cloud Services` subsection and exit this inquiry.
60
+
61
+ *Round 2 — Service Types* (multi-select, only if Round 1 returned any vendor):
62
+ - "Which types of cloud services will you use?"
63
+ - Options: `Object Storage (COS/S3/OSS)`, `CDN`, `Managed Database`, `Functions/Serverless`, `Auth (OAuth/JWT/IDaaS)`, `Domain & DNS`, `Email`, `SMS`, `Payment`, `AI API (OpenAI/Anthropic/...)`, `Other`
64
+ - The list is multi-select. Skip the question entirely if user picks "None" in Round 1.
65
+
66
+ *After both rounds, write to `#### Cloud Services`*:
67
+ - For each chosen (vendor x service) pair, append a row to the subsection
68
+ - **Do NOT** prompt for env var names, credentials, region, or SDK details — those belong to `prizmkit-deploy`'s scope, not planning
69
+ - If the user is unsure of the mapping, store the vendors and service types separately; deploy skill can refine later
70
+
71
+ ## Output Format
72
+
73
+ After infrastructure inquiry, update the `### Infrastructure` section in the project instruction file:
74
+
75
+ ```markdown
76
+ ### Infrastructure
77
+
78
+ #### Database
79
+ - **Type**: [database type]
80
+ - **ORM**: [ORM name]
81
+ - **Table naming**: [convention, e.g., snake_case, no prefix]
82
+ - **Field naming**: [convention]; common fields: [list]
83
+ - **Primary key**: [strategy]
84
+ - **Migration directory**: [path]
85
+ - **Migration naming**: [rule]
86
+ - **Index naming**: [convention]
87
+ - **Environment separation**: [strategy]
88
+
89
+ #### Deployment
90
+ - **Target**: [platform/method]
91
+ - **AI-assisted deploy**: [yes/no]
92
+ - **Domain**: [domain or "not configured"]
93
+ - **SSL**: [management method]
94
+ - **CI/CD**: [tool or "not configured"]
95
+ - **Env var management**: [strategy]
96
+
97
+ #### Deployment Credentials Reference
98
+ - [platform]: [token/auth method description]
99
+
100
+ #### Cloud Services
101
+ - **Vendors**: [comma-separated list, e.g., "AWS, Cloudflare" or "none"]
102
+ - **Services**:
103
+ - [vendor]: [service type] — [optional one-line note, e.g., "user-upload images"]
104
+ - [vendor]: [service type]
105
+ <!-- If user picked "None" in Round 1, replace this block with: cloud-services: none -->
106
+ ```
107
+
108
+ Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` in the selected project instruction file for `prizmkit-deploy` to pick up later.
@@ -0,0 +1,59 @@
1
+ # Project Conventions Discovery
2
+
3
+ AI-driven procedure for discovering and capturing project-level conventions. SKILL.md retains the trigger condition and entry point; this file contains the full Analyze → Reason → Present workflow.
4
+
5
+ ## Principle
6
+
7
+ **Do NOT follow any fixed checklist.** Every project is different. You must analyze the project first, then reason about what system-level conventions this specific project needs.
8
+
9
+ ## Step 1: Analyze the project
10
+
11
+ - Read tech stack, dependencies, existing code, config files, README, any existing style guides or linter configs
12
+ - For brownfield: also read actual source code patterns (naming, file structure, error handling, etc.)
13
+ - For greenfield: use the user's stated goals and intended tech stack
14
+
15
+ ## Step 2: Reason about what conventions matter for THIS project
16
+
17
+ Think about what decisions, if left unstandardized, would cause inconsistency as the project grows. Consider all dimensions relevant to the project — these might include (but are NOT limited to):
18
+
19
+ - Language and localization choices
20
+ - Code style and naming patterns
21
+ - Architecture and communication patterns
22
+ - Data format and storage decisions
23
+ - Security and auth approaches
24
+ - UI/UX patterns
25
+ - Testing strategies
26
+ - Deployment and environment patterns
27
+ - ...anything else you observe that needs a project-level decision
28
+
29
+ The point is: YOU decide what's relevant based on what you see. A Next.js SaaS app needs completely different conventions than a Python data pipeline or a Go microservice.
30
+
31
+ ## Step 3: Present findings via `AskUserQuestion`
32
+
33
+ First, show "Already decided" conventions as text:
34
+ > **Already decided** (detected from your codebase):
35
+ > - [convention]: [value] (source: [where you found it])
36
+ > - [convention]: [value] (source: [where you found it])
37
+
38
+ Then use `AskUserQuestion` for conventions that need user input (up to 4 questions per call, use multiple calls as needed — no limit on total rounds). Each question:
39
+ - Question text includes the convention name AND why it matters for this project
40
+ - Options are the reasonable choices (2-4 per question)
41
+ - Mark the recommended option first with "(Recommended)" in its label
42
+ - Use `description` field to explain trade-offs
43
+
44
+ After each batch of `AskUserQuestion` calls, reassess: are there more project-level conventions to cover? If yes, continue with more `AskUserQuestion` calls. Keep going until ALL project-level conventions are fully addressed.
45
+
46
+ Then ask in text: "Anything I missed that you'd like to standardize?" — if the user adds more, continue the discovery loop.
47
+
48
+ ## Rules
49
+
50
+ - **No interaction limit** — keep asking until every project-level convention is covered. Do NOT stop early or batch-skip to save rounds.
51
+ - Every proposed convention must be justified by something you observed in the project — explain WHY it matters
52
+ - Auto-confirm anything already evident from the codebase (show as "detected", let user override)
53
+ - Propose as many conventions as the project genuinely needs, but don't pad with irrelevant ones
54
+ - The "Anything I missed?" question is NOT the end — if the user adds items, ask follow-up `AskUserQuestion` calls to clarify those too
55
+
56
+ ## After Discovery
57
+
58
+ → Save answers to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
59
+ → Output format will naturally vary per project — that is the intended behavior