@context-forge/core 0.3.6 → 0.4.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 (42) hide show
  1. package/assets/prompt.ai-project.system.md +215 -392
  2. package/dist/introspection/ConsistencyChecker.d.ts +31 -1
  3. package/dist/introspection/ConsistencyChecker.d.ts.map +1 -1
  4. package/dist/introspection/ConsistencyChecker.js +300 -26
  5. package/dist/introspection/ConsistencyChecker.js.map +1 -1
  6. package/dist/introspection/WorkflowNavigator.d.ts.map +1 -1
  7. package/dist/introspection/WorkflowNavigator.js +11 -3
  8. package/dist/introspection/WorkflowNavigator.js.map +1 -1
  9. package/dist/introspection/parsers/slicePlanParser.d.ts.map +1 -1
  10. package/dist/introspection/parsers/slicePlanParser.js +5 -2
  11. package/dist/introspection/parsers/slicePlanParser.js.map +1 -1
  12. package/dist/introspection/types.d.ts +2 -0
  13. package/dist/introspection/types.d.ts.map +1 -1
  14. package/dist/introspection/writers/markdownWriter.d.ts.map +1 -1
  15. package/dist/introspection/writers/markdownWriter.js +11 -1
  16. package/dist/introspection/writers/markdownWriter.js.map +1 -1
  17. package/dist/schema/projectSchema.d.ts.map +1 -1
  18. package/dist/schema/projectSchema.js +4 -3
  19. package/dist/schema/projectSchema.js.map +1 -1
  20. package/dist/services/ContextIntegrator.d.ts +15 -1
  21. package/dist/services/ContextIntegrator.d.ts.map +1 -1
  22. package/dist/services/ContextIntegrator.js +51 -3
  23. package/dist/services/ContextIntegrator.js.map +1 -1
  24. package/dist/services/ContextProfileParser.d.ts +24 -0
  25. package/dist/services/ContextProfileParser.d.ts.map +1 -0
  26. package/dist/services/ContextProfileParser.js +123 -0
  27. package/dist/services/ContextProfileParser.js.map +1 -0
  28. package/dist/services/CoreServiceFactory.d.ts.map +1 -1
  29. package/dist/services/CoreServiceFactory.js +2 -1
  30. package/dist/services/CoreServiceFactory.js.map +1 -1
  31. package/dist/services/TemplateProcessor.d.ts.map +1 -1
  32. package/dist/services/TemplateProcessor.js +3 -0
  33. package/dist/services/TemplateProcessor.js.map +1 -1
  34. package/dist/services/index.d.ts +2 -0
  35. package/dist/services/index.d.ts.map +1 -1
  36. package/dist/services/index.js +1 -0
  37. package/dist/services/index.js.map +1 -1
  38. package/dist/types/context.d.ts +1 -0
  39. package/dist/types/context.d.ts.map +1 -1
  40. package/dist/types/project.d.ts +3 -1
  41. package/dist/types/project.d.ts.map +1 -1
  42. package/package.json +1 -1
@@ -9,192 +9,68 @@ ai description: Parameterized prompt library mapped to slice-based project phase
9
9
  dependsOn:
10
10
  - guide.ai-project.000-process.md
11
11
  npmScriptsAiSupport: "!include ../snippets/npm-scripts.ai-support.json"
12
+ dateCreated: 20250724
13
+ dateUpdated: 20260302
12
14
  ---
13
15
  ## Prompts
14
16
  This document contains prepared prompts useful in applying the `guide.ai-project.000-process` and performing additional supplemental tasks.
15
- ##### Project Object Model and Parameters
16
- ```python
17
- # input keys
18
- {
19
- project,
20
- slice,
21
- section,
22
- subsection,
23
- framework/language,
24
- tools,
25
- apis,
26
- monorepo,
27
- }
28
- ```
29
-
30
- ##### Project Phase (Phase n)
31
- *Use to directly execute a phase without additional instructions needed. Also usable with traditional (non-slice-based) projects.*
32
-
33
- ```
34
- Refer to the `guide.ai-project.000-process`, and function as a Senior AI. Implement the phase requested according to the respective procedures described in the guide. Remember to follow the rules in `directory-structure` for any files or directories created.
35
- ```
36
-
37
- ##### Concept Creation (Phase 1)
38
- ```markdown
39
- We're starting work on a new project {project}. We will use our curated AI Project Creation methods in `guide.ai-project.000-process` (can also be referred to as Project Guide or Process Guide) to assist us in designing and performing the work. Your role as described in the Project Guide is Technical Fellow.
40
-
41
- The initial concept description will be provided by the project manager, ideally as a starter document in `user/project-guides/001-concept.{project}.md`. Our goal is to refine this initial user-provided concept into the Refined Concept, which should be placed as instructed into the existing document. The placeholder document should provide any needed details needed for this procedure.
42
17
 
43
- We will use the refined concept as a basis for creating the spec, which will later be refined into designs, slices, features, and tasks. Use the Project Guide together with the user-provided concept to create the refined concept tailored to our project.
44
-
45
- When creating the refined concept, *ask questions* if any information is missing or unclear. The guideline of do not assume or guess applies, but is even more important here at this early concept state. Request any needed clarifications from the Project Manager. If you do not find or receive the user-provided concept description, obtain from Project Manager before proceeding.
46
- ```
47
-
48
- ##### Spec Creation (Phase 2)
18
+ ### Context Profiles
19
+ Maps prompt templates to their required context documents.
20
+ Variables not listed are excluded from context assembly.
21
+ Order: concept → hld → spec → arch → plan → slice → tasks. Note that not all inputs may be or are required to be present (we frequently do not have fileHLD or fileSpec, for example). This table is an interrim solution before we split the monolitic prompt file, which should happen soon.
22
+ ```yaml
23
+ context_profiles:
24
+ concept-phase-1: []
25
+ architecture-phase-2: [fileConcept, fileHLD, fileSpec, fileArch]
26
+ slice-planning-phase-3: [fileArch, fileSlicePlan]
27
+ slice-design-phase-4: [fileArch, fileSlicePlan, fileSlice]
28
+ task-breakdown-phase-5: [fileSlicePlan, fileSlice, fileTasks]
29
+ implementation-phase-6: [fileSlice, fileTasks]
30
+ slice-integration-phase-7: [fileArch, fileSlicePlan, fileSlice, fileTasks]
31
+ task-breakdown-supplement-phase-5: [fileSlicePlan, fileSlice, fileTasks]
32
+ task-expansion-variant-phase-5: [fileSlicePlan, fileSlice, fileTasks]
33
+ context-initialization: []
34
+ maintenance-task: [fileTasks]
35
+ maintenance-routine: [fileSlice, fileTasks]
36
+ analysis-processing: [fileSlice, fileTasks]
37
+ analysis-task-creation: [fileTasks]
38
+ analysis-to-lld: [fileSlice]
39
+ analysis-task-implementation: [fileSlice, fileTasks]
40
+ analyze-codebase: []
41
+ custom-instruction: []
42
+ _default: [fileArch, fileSlicePlan, fileSlice, fileTasks]
43
+ ```
44
+
45
+ ##### Concept (Phase 1)
49
46
  ```markdown
50
- We're working in our guide.ai-project.000-process, Phase 2: Spec Creation. Use `guide.ai-project.002-spec` with the approved concept document to create the project specification.
47
+ We're starting work on a new project {project}. We will use our curated AI Project Creation methods in `guide.ai-project.000-process` (can also be referred to as Project Guide or Process Guide) to assist us in designing and performing the work. Your role as described in the Project Guide is Architect.
51
48
 
52
- Your role is Technical Fellow as described in the Process Guide. Work with the Project Manager to create `user/project-guides/002-spec.{project}.md`.
49
+ Our goal is to collaboratively create the concept document. The Project Manager will describe the project usually conversationally, though they may also provide a starter document in `user/project-guides/001-concept.{project}.md`. Either approach works; follow the PM's lead.
53
50
 
54
- Required inputs:
55
- - Approved concept document (001-concept.{project}.md)
56
- - Technical stack and requirements from Project Manager
57
- - Any additional specific requirements
51
+ Through conversation, refine the PM's vision into a concept document following the Living Document Pattern and the structure described in `guide.ai-project.001-concept`. The PM's original concept is preserved in the User-Provided Concept section; structured technical analysis goes into the Refined Concept section.
58
52
 
59
- Focus on:
60
- - Tech stack with tool-guides availability check
61
- - Top-level features and major workflows
62
- - Architectural considerations and system boundaries
63
- - Sample data and UI sketches (if applicable)
64
-
65
- Caution:
66
- - Do not write code into the spec.
67
-
68
- Keep the spec concise and focused on coordination between components. If you need more information about requirements or cannot access referenced tools, stop and request from Project Manager.
53
+ We will use the completed concept as a basis for architecture and subsequent design work — breaking the project into architectural components, slice plans, and tasks.
69
54
 
70
- Note: This is a design and planning task, not a coding task.
55
+ When creating the concept, *ask questions* if any information is missing or unclear. The guideline of do not assume or guess applies, but is even more important here at this early concept stage where misunderstandings compound through later phases. Request any needed clarifications from the Project Manager.
71
56
  ```
72
57
 
73
- ##### High-Level Design (HLD) Creation (Phase 2.5)
74
- *Use this to create a project-level high-level design that serves as the architectural blueprint for slice planning.*
58
+ ##### Architecture (Phase 2)
59
+ *Use this to design a high-level architectural component or initiative that will span multiple slices. This is the most common entry point for work on existing projects.*
75
60
 
76
61
  ```markdown
77
- We're creating a High-Level Design (HLD) for project {project}. Use the Phase 2.5 guidelines in `guide.ai-project.000-process` with the project concept and specification documents to create the HLD. The HLD serves as the architectural blueprint that will inform slice planning and guide all subsequent slice designs. It establishes the system's structural foundation without diving into slice-level details.
62
+ We're designing a new architectural component for project {project}: {component-name}. Architectural components represent major structural elements or new subsystems that will likely result in multiple slices and many tasks. This is distinct from individual slices—it's about the foundational architecture that slices will build upon.
78
63
 
79
- Create file at `user/architecture/nnn-arch.hld-{project}.md` using the next available index in the 050-099 range as defined in `file-naming-conventions.md`.
64
+ All projects will have at least one architectural component. A small project may have only one, and will directly reference the concept document to create its architectural component. In most projects, the project manager will describe the concept being designed in the architectural component.
80
65
 
81
- Your role is Technical Fellow as described in the Process Guide.
82
-
83
- **Required Inputs**
84
- - Approved concept document (`user/project-guides/001-concept.{project}.md`)
85
- - Project specification (`user/project-guides/002-spec.{project}.md`)
86
- - Technical stack and architectural constraints from Project Manager
87
-
88
- **Document Structure**
89
-
90
- **YAML Frontmatter:**
91
- ```
92
- ```yaml
93
- ---
94
- docType: architecture
95
- layer: project
96
- project: {project}
97
- archIndex: nnn
98
- component: hld-{project}
99
- dateCreated: YYYYMMDD
100
- dateUpdated: YYYYMMDD
101
- status: in_progress
102
- ---
103
- ```
104
- ```markdown
105
- **Content Sections:**
106
- 1. Overview
107
- - One-sentence summary of the system's purpose
108
- - High-level description of what the system does and why it matters
109
-
110
- 2. System Architecture
111
- - Major subsystems and their responsibilities
112
- - How subsystems interact and communicate
113
- - Architectural patterns used (e.g., layered, microservices, monolith)
114
-
115
- 3. Technology Stack Rationale
116
- - Key technology choices and why they were selected
117
- - How the stack supports the architectural goals
118
- - Dependencies between technologies
119
-
120
- 4. Data Flow
121
- - Major data flows between subsystems
122
- - Data storage strategy (databases, caching, etc.)
123
- - External integrations and APIs
124
-
125
- 5. Integration Points & System Boundaries
126
- - Clear boundaries between major components
127
- - How components communicate (APIs, events, etc.)
128
- - Third-party service integrations
129
-
130
- 6. Infrastructure & Deployment (if applicable)
131
- - Deployment architecture
132
- - Scalability and performance considerations
133
- - Environment strategy (dev, staging, prod)
134
-
135
- **Guidelines**
136
- - Focus on structure, not implementation: Describe what systems exist and how they relate, not how they work in detail
137
- - Avoid slice-level thinking: Do not break down into individual features or user workflows (that's Phase 3)
138
- - Avoid code examples: This is architecture, not design. No pseudo-code or implementation details
139
- - Be concrete about decisions: Explain why architectural choices were made, not just what they are
140
- - Consider cross-cutting concerns: Address security, scalability, and deployment without getting into task-level details
141
-
142
- **Expected Output**
143
- - Complete HLD document at user/architecture/nnn-arch.hld-{project}.md
144
- - Clear enough that slice designers can use it as a reference without ambiguity
145
- - Detailed enough to prevent conflicting slice designs
146
- - All required YAML frontmatter included
147
-
148
- **Avoid**
149
- - Vague statements about future optimization or performance
150
- - Speculative infrastructure requirements
151
- - Time estimates or complexity judgments
152
- - Detailed API specifications (defer to slice designs)
153
- - Individual feature descriptions (that's slice planning)
154
-
155
- If you need more information about architectural constraints or technical requirements, stop and request clarification from the Project Manager.
156
- *Note: This is a design and planning task, not a coding task.*
157
- ```
158
-
159
- ##### Slice Planning (Phase 3)
160
- ```markdown
161
- We're working in our guide.ai-project.000-process, Phase 3: Slice Planning. Use `guide.ai-project.003-slice-planning` to break the work described in the parent document into manageable vertical slices.
162
-
163
- **Parent document** (one of the following — only one will apply):
164
- 1. Project specification (`user/project-guides/002-spec.{project}.md`) — for project-level planning
165
- 2. Architecture document (`user/architecture/nnn-arch.{name}.md`) — for architecture-level planning
166
-
167
- If the parent is a project specification, also reference the concept document and any existing architecture documentation. If the parent is an architecture document, it functions as the HLD — do not create a separate one.
168
-
169
- Your role is Technical Fellow as described in the Process Guide. Work with the Project Manager to:
170
-
171
- 1. Identify the planning context (project-level or architecture-level) per the guide
172
- 2. Identify foundation work, feature slices, migration/refactoring slices, and integration work as applicable
173
- 3. Create the slice plan document in the correct location:
174
- - Project-level: `user/project-guides/003-slices.{project}.md`
175
- - Architecture-level: `user/architecture/nnn-slices.{name}.md` (sharing the parent architecture document's base index, per `file-naming-conventions.md`)
176
-
177
- Use enough slices to completely define the scope of the parent document. Consider functional requirements only. Ignore non-functional requirements. Avoid speculative risk projections. Do not include calendar or time-based estimates.
178
-
179
- When defining slices, focus on slice independence and clear value delivery (user value, developer value, or architectural enablement). Each slice must leave the system in a working state when complete. If you have all required inputs and sufficient information, proceed with slice planning. If not, request required information from the Project Manager.
180
-
181
- Note: This is a design and planning task, not a coding task.
182
- ```
183
-
184
- ```markdown
185
- ##### Architectural Component Design (Phase 3.5)
186
- *Use this to design a high-level architectural component or initiative that will span multiple slices*
187
-
188
- ```markdown
189
- We're designing a new architectural component for project {project}: {component-name}. Architectural components represent major structural changes or new subsystems that will likely result in multiple slices and many tasks. This is distinct from individual slices—it's about the foundational architecture that slices will build upon.
190
66
 
191
67
  Create a design document for the architectural component.
192
68
 
193
69
  Create file at `user/architecture/nnn-arch.{component-name}.md`, where nnn is the next available base index at an increment of 10 in the 100-799 initiative working range as defined in `file-naming-conventions.md`. This base index will be shared by the slice plan and slice designs derived from this architecture document (e.g., if this document is `120-arch.{name}.md`, its slice plan will be `120-slices.{name}.md` and its first slice design will be `120-slice.{first-slice}.md`).
194
70
 
195
- Note: Do not use the 050-099 range — that is reserved for project-level architecture (HLD). Initiative-level architecture documents use the working range.
71
+ Note: Do not use the 050-099 range — that is reserved for project-level architecture (HLD). Initiative-level architecture documents use the working range.
196
72
 
197
- Your role is Technical Fellow as described in the Process Guide. Keep this document at the architectural level—do not include task-level breakdown or detailed slice specifications.
73
+ Your role is Architect as described in the Process Guide. Keep this document at the architectural level—do not include task-level breakdown or detailed slice specifications.
198
74
 
199
75
  **Document Structure**
200
76
  The component design should include:
@@ -253,15 +129,15 @@ Format as bulleted list with provisional slice concept and brief description
253
129
  Include only if you have meaningful ideas about slice boundaries
254
130
 
255
131
  **Related Work**
256
- Reference to related slices, features, initiatives, or domain knowledge (if any exist)
257
- Link to existing slice files, feature files, or framework guides
132
+ Reference to related slices, initiatives, or domain knowledge (if any exist)
133
+ Link to existing architectural component, files, slice files, or framework guides
258
134
  No direct references to individual tasks
259
135
 
260
136
  3. Guidelines
261
137
  - Keep it high-level: This document informs slice planning, not implementation. Do not include code, pseudo-code, or detailed API specifications.
262
- - Focus on architecture: Describe structural decisions and principles, not individual features or user-facing behaviors.
138
+ - Focus on architecture: Describe structural decisions and principles, not individual user-facing behaviors.
263
139
  - Avoid implementation detail: Do not prescribe how tasks will be organized or which technologies to use. That emerges during slice design.
264
- - Link to context: Reference existing slices, features, or framework guides where relevant. Do not reference individual tasks.
140
+ - Link to context: Reference existing slices or framework guides where relevant. Do not reference individual tasks.
265
141
  - Be concrete about principles: Architectural principles should be clear enough to guide slice designers. Avoid vague statements.
266
142
 
267
143
  **Expected Output**
@@ -284,6 +160,42 @@ If you need more information about the component requirements or architectural c
284
160
  Note: This is a design and planning task, not a coding task. Any code samples should be minimal and limited to what is truly needed to convey architectural information.
285
161
  ```
286
162
 
163
+ ##### Slice Planning (Phase 3)
164
+ ```markdown
165
+ We're working in our guide.ai-project.000-process, Phase 3: Slice Planning. Use `guide.ai-project.003-slice-planning` to break the work described in the parent document into manageable vertical slices.
166
+
167
+ **Parent document**
168
+ 1. Architecture document (`user/architecture/nnn-arch.{name}.md`) — for architecture-level planning
169
+
170
+ Your role is Architect as described in the Process Guide. Work with the Project Manager to:
171
+
172
+ 1. Identify the planning context (architecture-level) per the guide
173
+ 2. Identify foundation work, functional slices, migration/refactoring slices, and integration work as applicable
174
+ 3. Create the slice plan document in the correct location:
175
+ `user/architecture/nnn-slices.{name}.md` (sharing the parent architecture document's base index, per `file-naming-conventions.md`)
176
+ 4. When numbering slices, you may use an index starting with 1, but continue the same index throughout the document. Do not restart the numbering within the plan.
177
+ 5. Include YAML frontmatter with `status: active` (or `complete` if all slices are done). Each slice entry should also include a status field: `not_started`, `in_progress`, `complete`, or `blocked`.
178
+
179
+ **Example YAML FrontMatter**:
180
+ ```yaml
181
+ ---
182
+ docType: slice-plan
183
+ parent: user/architecture/140-arch.context-forge-restructure.md
184
+ project: context-forge
185
+ status: active
186
+ dateCreated: 20260214
187
+ dateUpdated: 20260217
188
+ ---
189
+ ```
190
+
191
+ ```markdown
192
+ Use enough slices to completely define the scope of the parent document. Consider functional requirements only. Ignore non-functional requirements. Avoid speculative risk projections. Do not include calendar or time-based estimates.
193
+
194
+ When defining slices, focus on slice independence and clear value delivery (user value, developer value, or architectural enablement). Each slice must leave the system in a working state when complete. If you have all required inputs and sufficient information, proceed with slice planning. If not, request required information from the Project Manager.
195
+
196
+ Note: This is a design and planning task, not a coding task.
197
+ ```
198
+
287
199
  ##### Slice Design (Phase 4)
288
200
  ```markdown
289
201
  We're working in our guide.ai-project.000-process, Phase 4: Slice Design (Low-Level Design). Create a detailed design for slice: {slice} in project {project} by following `guide.ai-project.004-slice-design`.
@@ -291,25 +203,33 @@ We're working in our guide.ai-project.000-process, Phase 4: Slice Design (Low-Le
291
203
  **Inputs** (two levels — use what applies):
292
204
 
293
205
  *Strategic context* (provides the big-picture view of where this slice fits):
294
- - Architecture document, HLD, or project spec — as identified by the Project Manager or referenced in the slice plan's parent document.
206
+ - Architecture document or HLD — as identified by the Project Manager or referenced in the slice plan's parent document.
295
207
 
296
- *Working input* (defines what this specific slice should accomplish — one of the following):
297
- 1. Slice plan entry from `user/project-guides/003-slices.{project}.md` (project-level)
298
- 2. Slice plan entry from `user/architecture/nnn-slices.{name}.md` (architecture-level)
299
- 3. Slice description provided directly with this request
208
+ *Working input* (defines what this specific slice should accomplish:
209
+ 1. Slice plan entry from `user/architecture/nnn-slices.{name}.md`
210
+ 2. Slice description provided directly with this request
300
211
 
301
212
  If using a slice plan, it must contain an entry for this slice. If the strategic context document is not obvious, ask the Project Manager.
302
213
 
303
- Create the slice design document at `user/slices/nnn-slice.{slice-name}.md`, where `nnn` shares the initiative's base index (for the first slice) or increments sequentially from it (for subsequent slices), per `file-naming-conventions.md`. Your role is Technical Fellow.
214
+ Create the slice design document at `user/slices/nnn-slice.{slice-name}.md`, where `nnn` shares the initiative's base index (for the first slice) or increments sequentially from it (for subsequent slices), per `file-naming-conventions.md`.
215
+
216
+ When creating a slice design for a slice plan entry, update its entry to include the materialized `nnn` index.
217
+ Example:
218
+ Creating slice 175 for slice plan entry 11:
219
+ pre: 11 [ ] **Our Slice Title** {slice plan entry text}
220
+ post: 11 [ ] **(175) Our Slice Title** {slice plan entry text}
221
+
222
+ Your role is Architect.
304
223
 
305
224
  Include:
306
- - YAML frontmatter as described below
225
+ - YAML frontmatter as described below. Ensure that status field is present.
307
226
  - Detailed technical decisions for this slice
308
227
  - Data flows and component interactions
309
228
  - For migration/refactoring slices: migration plan (source/destination, consumer updates, behavior verification)
310
229
  - UI mockups or API/tool specifications (if applicable)
311
230
  - Cross-slice dependencies and interfaces
312
231
  - Success criteria specific enough for task creation
232
+ - Verification walkthrough: concrete commands, workflows, and step-by-step confirmation that the user can follow to prove the slice delivers what it claims. This is not a restatement of success criteria — it's the "demo script" showing what the user can actually do.
313
233
  - Only template sections that are relevant to this slice — omit sections that don't apply
314
234
 
315
235
  Avoid:
@@ -320,6 +240,8 @@ Avoid:
320
240
  - Filling in template sections with boilerplate just because they exist.
321
241
 
322
242
  YAML Frontmatter:
243
+ ```
244
+ ```yaml
323
245
  ---
324
246
  docType: slice-design
325
247
  slice: {slice-name}
@@ -327,36 +249,35 @@ project: {project}
327
249
  parent: {path to the slice plan this slice comes from}
328
250
  dependencies: [list-if-any]
329
251
  interfaces: [list-of-slices-that-depend-on-this]
330
- status: not started
331
252
  dateCreated: YYYYMMDD
332
253
  dateUpdated: YYYYMMDD
254
+ status: not_started
333
255
  ---
334
-
256
+ ```
257
+ ```markdown
335
258
  If framework or platform are specified, guide(s) for the framework(s) should be provided in `ai-project-guide/framework-guides/{framework}/introduction.md`. If tools are specified, guide for each tool should be available at `ai-project-guide/tool-guides/{tool}/introduction.md`.
336
259
 
337
260
  Stop and request clarification if you need more information to complete the slice design. This is a design and process task — not a coding task! Any code present should be minimal, and should provide essential information.
338
261
  ```
339
262
 
340
263
  ##### Task Breakdown (Phase 5)
341
- *This should be usable for Slice or Feature task breakdown.*
342
-
343
264
  ```markdown
344
- We're working in our guide.ai-project.000-process, Phase 5: Slice Task Breakdown. Convert the design for {slice | feature} in project {project} into granular, actionable tasks. Note that this request can be used for *slice* or *feature*, but only one will be applicable to a particular request.
265
+ We're working in our guide.ai-project.000-process, Phase 5: Slice Task Breakdown. Convert the design for {slice} in project {project} into granular, actionable tasks.
345
266
 
346
- Your role is Senior AI. Use exactly one of the following as input:
347
- 1. The slice design document `user/slices/{slice}.md`.
348
- 2. The feature design document `user/features/{feature}.md`.
267
+ Your role is Senior AI. Use the following as input:
268
+ - The slice design document `user/slices/{slice}.md`.
349
269
 
350
270
  Create task file at `user/tasks/{sliceindex}-tasks.{slicename}.md` (where `{sliceindex}` matches the parent slice's index, preserving lineage per `file-naming-conventions.md`).
351
271
  Use `guide.ai-project.005-task-breakdown` for detailed guidance on this phase.
352
272
 
353
273
  Include:
354
- 1. YAML front matter including slice name, project, LLD reference, dependencies, and current project state
274
+ 1. YAML front matter including slice name, project, LLD reference, dependencies, current project state, and status: not_started
355
275
  2. Context summary section
356
276
  3. Granular tasks following Phase 5 guidelines
357
277
  4. Create separate sub-tasks for each similar component.
358
278
  5. Organize so that tasks can be completed sequentially.
359
- 6. Use checklist format for all task files.
279
+ 6. Test-with pattern: place test tasks immediately after their corresponding implementation tasks, not batched at the end. Each feature or component task should be followed by its test task before moving to the next feature.
280
+ 7. Use checklist format for all task files.
360
281
 
361
282
  Avoid:
362
283
  - Time estimates in hours/days/etc. You may use a 1-5 relative effort scale.
@@ -375,95 +296,27 @@ Notes:
375
296
  * Always use mathematical comparison when evaluating file length vs target size. Always compare vs actual number of lines in the file, not number of list items or checkboxes.
376
297
  ```
377
298
 
378
- ##### Task Breakdown - Explicit (Phase 5 - Extra)
379
- *Use this when you have a detailed slice design especially one containing code that may have been iterated on in order to solve complex or subtle design problems. This should be added to the regular task breakdown prompt. Until that is properly supported by context-builder, we have duplicated the base task expansion prompt here.
380
-
299
+ ##### Implementation (Phase 6)
381
300
  ```markdown
382
- We're working in our guide.ai-project.000-process, Phase 5: Slice Task Breakdown. Convert the design for {slice | feature} in project {project} into granular, actionable tasks. Note that this request can be used for *slice* or *feature*, but only one will be applicable to a particular request.
383
-
384
- Your role is Senior AI. Use exactly one of the following as input:
385
- 1. The slice design document `user/slices/{slice}.md`.
386
- 2. The feature design document `user/features/{feature}.md`.
387
-
388
- Create task file at `user/tasks/{sliceindex}-tasks.{slicename}.md` (where `{sliceindex}` matches the parent slice's index, preserving lineage per `file-naming-conventions.md`).
389
-
390
- Include:
391
- 1. YAML front matter including slice name, project, LLD reference, dependencies, and current project state
392
- 2. Context summary section
393
- 3. Granular tasks following Phase 5 guidelines
394
- 4. Create separate sub-tasks for each similar component.
395
- 5. Organize so that tasks can be completed sequentially.
396
- 6. Use checklist format for all task files.
397
-
398
- Avoid:
399
- - Time estimates in hours/days/etc. You may use a 1-5 relative effort scale.
400
- - Extensive benchmarking tasks unless actually relevant to this effort.
401
- - Extensive or speculative risk items. Include only if truly relevant.
402
-
403
- For each {tool} in use, consult knowledge in `ai-project-guide/tool-guides/{tool}/`. Follow all task creation guidelines from the Process Guide.
404
-
405
- Each task must be completable by a junior AI with clear success criteria. If insufficient information is available, stop and request clarifying information. Keep files to about 350 lines or less. If considerably more space is needed modify files as detailed here. Do not split a file if it's less than about 100 line overrun.
406
- 1. rename current file nnn-tasks.[task section name]-1.md
407
- 2. add new file nnn-tasks.[task-section-name]-2.md
408
- 3. ...etc...
409
-
410
- Notes:
411
- * This is a project planning task, not a coding task. Code segments should be MINIMAL and kept to only what is necessary to convey information.
412
- * Always use mathematical comparison when evaluating file length vs target size. Always compare vs actual number of lines in the file, not number of list items or checkboxes.
413
-
414
- ##### Important Additional Information
415
- Note that our slice design is intricate, detailed, and has been refined extensively in order to address complex and/or subtle issues. The slice design contains code, and we *need* to use this code in our task planning.
416
-
417
- As you are planning tasks, proceed *carefully* through the slice design, creating tasks to accomplish the design *exactly* as presented. Once you complete the task breakdown, review it in light of the slice design to ensure that:
418
- 1. You completely addressed the design. If there are similar items, for example numerous wrapper components, ensure that your tasks explicitly address creation of each one.
419
- 2. You did not miss any details. This is critical. Do not "gloss over", simplify, or add workarounds to any coding sections of the design even though they may be difficult.
420
-
421
- Note also that tasks may reference the relevant design document. You do not need to replicate large pieces of the design document all over the task list. Ensure that references are accurate. Do not assume or guess anywhere in this task.
422
-
423
- After creation of task list, you must review the entire list against the slice design to ensure that these requirements are met.
424
- ```
425
-
426
- ##### Slice Task Expansion (Phase 6)
427
- ```markdown
428
- We're working in our guide.ai-project.000-process, Phase 6: Task Enhancement and Expansion. Enhance the tasks for slice {slice} in project {project} to improve the chances that our "junior" AI workers can complete assigned tasks on their own. Only enhance tasks that can truly benefit from it. Many tasks may already be described with sufficient detail.
429
-
430
- Use `guide.ai-project.006-task-expansion` as your detailed guide for this phase. Work on the task file `user/tasks/{sliceindex}-tasks.{slicename}.md`.
431
-
432
- Your role is Senior AI. For each task:
433
- - If it would benefit from expansion or subdivision, enhance it.
434
- - If it's already appropriate, output it verbatim.
435
- - Ensure all tasks are accounted for.
436
-
437
- Additionally:
438
- - Make sure that you do NOT use this expansion as a way to write code in a design and planning phase. Expanded tasks should not look like writing code for the the tasks. You may spec out interfaces or use minimal code examples where truly useful. Evaluate carefully before doing so.
439
-
440
- After any expansion, review it against the original unexpanded task and ensure that your expansion is a detailed representation of the original task, not a reinterpretation or change of the original task.
441
-
442
- Output results by updating the existing task file. Success: All tasks have been processed and either output as is, or enhanced and divided into further subtasks.
443
-
444
- Note: This is a project planning task, not a coding task.
445
- ```
446
-
447
- ##### Task Implementation (Phase 7)
448
- ```markdown
449
- We are working on {slice | feature} in project {project}, phase 7 of `ai-project-guide/project-guides/guide.ai-project.000-process`.
301
+ We are working on {slice} in project {project}, phase 6 of `ai-project-guide/project-guides/guide.ai-project.000-process`.
450
302
 
451
303
  Your job is to complete the tasks in the `user/tasks/{sliceindex}-tasks.{slicename}.md` file. Please work through the tasks, following the guidelines in our project guides, and using the relevant provided rules (`rules/`, `CLAUDE.md`, etc). Your role is "Senior AI".
452
304
 
453
- Use exactly one of the following (only one match should exist):
305
+ Use the following as overview input when needed. Primary input is the task file referenced above.
454
306
  - The slice design at `user/slices/{slice}.md`.
455
- - The feature design at `user/features/{feature}.md`.
456
307
 
457
- Always git commit at least once per task but ideally after every section of items containing a 'Success:' criteria. For example, if a file contains Task 1.2, Task 1.2.1, commit after each task. If 1.2.1 contains multiple checklists each with its own 'Success:' criteria, commit after any section containing Success. STOP and confer with Project Manager after each task, unless directed otherwise
308
+ Commit at each checkpoint marked in the task file (look for lines starting with `**Commit**:`). Use the commit message provided. If a task has no explicit commit marker, commit at the end of the task before moving to the next.
458
309
 
459
310
  Work carefully and sequentially through the tasks, ensuring that each task is verified complete before proceeding to the next. You should write unit tests for code as you work through the task. Ensure that tests pass and task is complete before moving to the next.
460
311
 
312
+ If you encounter a failing test, an ambiguous requirement, or a design decision not covered by the slice design, stop and confer with the Project Manager. Do not make more than three attempts at a failing approach before stopping.
313
+
461
314
  If an attempted solution does not work or you find reason to try another approach, do not make more than three attempts without stopping and obtaining confirmation from Project Manager.
462
315
 
463
- Be sure to check off tasks as they are completed. If a parent file (ex: `003-slices.{project}.md`) contains checklist items, check off parent items after all child items are complete. If a `task-checker` tool|agent is available to you, use it.
316
+ Be sure to check off tasks as they are completed. If a parent slice plan file contains checklist items, check off parent items after all child items are complete. If a `task-checker` tool|agent is available to you, use it.
464
317
 
465
318
  Maintain the YAML frontmatter including:
466
- - Status: not-started, in-progress, complete, not-applicable
319
+ - Status: not_started, in_progress, complete, not_applicable
467
320
  - Date updated
468
321
 
469
322
  Notes:
@@ -475,143 +328,68 @@ Notes:
475
328
  - Do not guess, assume, or proceed without required files.
476
329
  ```
477
330
 
478
- ##### Context Initialization
479
- *Use this prompt when you need to switch models or refresh understanding in slice-based projects.*
480
- ```markdown
481
- The following provides context on our current work in project {project}.
331
+ ##### Slice Integration (Phase 7)
332
+ We are completing slice integration (Phase 7) for {slice} in project {project}, as described in `ai-project-guide/project-guides/guide.ai-project.000-process`.
482
333
 
483
- We are using the slice-based methodology from `ai-project-guide/project-guides/guide.ai-project.000-process`. Current work context:
484
- - Project: {project}
485
- - Slice: {slice}
486
- - Tasks: {task-file}
487
- - Phase: {development-phase}
488
- - if [slice] is provided it can be decomposed into [sliceindex]-slice.[slicename].md
334
+ Your role is Senior AI.
489
335
 
490
- Refer to the Resource Structure in `ai-project-guide/project-guides/guide.ai-project.000-process` for locations of resources. Key project documents:
491
- - Project Documents: `project-documents/user/`.
492
- - Slice design: user/slices/{slice}.md
493
- - Tasks file: user/tasks/{sliceindex}-tasks.{slicename}.md
336
+ **Integration Steps:**
494
337
 
495
- Concentrate on the most granular level available (e.g. tasks if present), and use the higher-level files as reference only if needed.
496
- - Project HLD: user/architecture/050-arch.hld-{project}.md
497
- *Note: legacy HLD location is: user/project-guide/050-hld.{project}.md*
338
+ 1. **Merge and verify**
339
+ - Ensure the slice branch is merged into the main development branch (if using branches)
340
+ - Resolve any merge conflicts, preserving slice intent
341
+ - Run full test suite — not just slice tests, but project-wide regressions
342
+ - Verify build succeeds cleanly
498
343
 
499
- If you were previously assigned a role, continue in that role. If not, assume role of Senior AI as defined in the Process Guide.
344
+ 2. **Interface verification**
345
+ - Confirm that slice dependencies and interfaces work as expected with the integrated codebase
346
+ - If this slice exposed new interfaces consumed by future slices, verify they are accessible and correctly typed
347
+ - If this slice consumed interfaces from prior slices, confirm integration is clean
500
348
 
501
- If tasks file is already present, it should be your primary focus. Slice design may be used to gain overview or as a source for generating tasks. Once we have the tasks, we primarily work from those.
349
+ 3. **Documentation update**
350
+ - Update any project documentation affected by this slice (README, API docs, architecture docs)
351
+ - If the slice introduced new patterns, conventions, or infrastructure, ensure they are documented
352
+ - Skip if no documentation is affected — do not create documentation for its own sake
502
353
 
503
- If given an instruction similar to "process and stand by", make sure you understand all instructions, what files or architecture components are involved, and alert Project Manager to any missing, incomplete, or vague information preventing you from accurately carrying out your instructions. Wait for confirmation from Project Manager before proceeding further.
504
- ```
354
+ 4. **Close out**
355
+ - Check off the completed slice in the parent slice plan
356
+ - Update the slice design document status to `complete`
357
+ - Update the task file status to `complete`
505
358
 
506
- ##### Context Initialization - Monorepo
507
- *This is the monorepo version of the context initialization prompt. This creates some duplication but it is sufficient and direct. *
508
- ```markdown
509
- The following provides context on our current work in project {project}.
359
+ **Notes:**
360
+ - If integration reveals issues that require non-trivial fixes, log them to maintenance (`tasks/950-tasks.maintenance.md`) rather than blocking integration
361
+ - This phase does not determine what to work on next — workflow navigation is handled by orchestration
362
+ - If you cannot verify integration (e.g., missing test infrastructure), note what was verified and what was not
510
363
 
511
- We are using the slice-based methodology from `ai-project-guide/project-guides/guide.ai-project.000-process`. Current work context:
512
- - Project: {project}
513
- - Slice: {slice}
514
- - Tasks: {task-file}
515
- - Phase: {development-phase}
516
- - if [slice] is provided it can be decomposed into [sliceindex]-slice.[slicename].md
517
364
 
518
- Refer to the Resource Structure in `ai-project-guide/project-guides/guide.ai-project.000-process` for locations of resources. Key project documents and locations:
519
- - Project Documents: `project-artifacts/{project-type}/{project}` where project type == 'template' (only value in use 20251003), for example: `project-artifacts/template/react/`. This is interpreted as the value of user/ wherever that is encountered. For example if a prompt references: user/tasks/100-tasks.some-tasks, this would be interpreted as: project-artifacts/template/react/. Alternately, it can be flattened on level to: project-artifacts/template-react/.
365
+ ##### Context Initialization
366
+ *Use this prompt when you need to switch models or refresh understanding in a project.*
367
+ ```markdown
368
+ The following provides context on our current work in project {project}.
520
369
 
521
- - Slice design: user/slices/{slice}.md maps to: project-artifacts/{project-type}-{project}/slices/{slice}.md
522
- - Tasks file: user/tasks/{sliceindex}-tasks.{slicename}.md --> synonym: {taskfile}, maps to: project-artifacts/{project-type}-{project}/tasks/{taskfile}.md
370
+ Refer to `ai-project-guide/project-guides/guide.ai-project.000-process` for resource structure and locations.
523
371
 
524
- Refer to the Resource Structure in `ai-project-guide/project-guides/guide.ai-project.000-process` for locations of resources. Concentrate on the most granular level available (e.g. tasks if present), and use the higher-level files as reference only if needed. Key project documents:
525
- - High-level design: user/architecture/050-arch.hld-{project}.md
526
- - Current slice design: user/slices/{slice}.md
527
- - Tasks file: user/tasks/{sliceindex}-tasks.{slicename}.md
528
- *Note: legacy HLD location is: user/project-guide/050-hld.{project}.md*
372
+ {{#if fileArch}}Architecture: {fileArch}{{/if}}
373
+ {{#if fileSlicePlan}}Slice Plan: {fileSlicePlan}{{/if}}
529
374
 
530
- If you were previously assigned a role, continue in that role. If not, assume role of Senior AI as defined in the Process Guide.
375
+ Concentrate on the most granular level available (e.g. tasks if present), and use the higher-level files as reference only if needed.
376
+
377
+ If you were previously assigned a role, continue in that role. If not, assume role of Senior AI as defined in the Process Guide.
531
378
 
532
379
  If tasks file is already present, it should be your primary focus. Slice design may be used to gain overview or as a source for generating tasks. Once we have the tasks, we primarily work from those.
533
380
 
534
- If given an instruction similar to "process and stand by", make sure you understand all instructions, what files or architecture components are involved, and alert Project Manager to any missing, incomplete, or vague information preventing you from accurately carrying out your instructions. Wait for confirmation from Project Manager before proceeding further.
381
+ If given an instruction similar to "process and stand by", make sure you understand all instructions, what files or architecture components are involved, and alert Project Manager to any missing, incomplete, or vague information preventing you from accurately carrying out your instructions. Wait for confirmation from Project Manager before proceeding further.
535
382
  ```
383
+
536
384
  ##### Tool Usage
537
385
  ```markdown
538
386
  You will need to consult specific knowledge for 3rd party tools, libraries, or packages, which should be available to you in the `ai-project-guide/tool-guides/[tool]/` directory for our curated knowledge. Follow these steps when working with these tools, libraries, or packages. Use proactively.
539
387
 
540
- 1. Consult Overview: Start with the specific `AI Tool Overview [toolname].md` in the `ai-project-guide/tool-guides/[tool]` directory.
541
- 2. Locate Docs: Scan the Overview for references to more detailed documentation (like local API files under `/documentation`, reference notes, or official web links).
542
- 3. Search Docs: Search within those specific documentation sources first using `grep_search` or `codebase_search`.
388
+ 1. Consult Overview: Start with the specific `AI Tool Overview [toolname].md` in the `ai-project-guide/tool-guides/[tool]` directory.
389
+ 2. Locate Docs: Scan the Overview for references to more detailed documentation (like local API files under `/documentation`, reference notes, or official web links).
390
+ 3. Search Docs: Search within those specific documentation sources first using `grep_search` or `codebase_search`.
543
391
  4. Additional documentation. If you have a documentation tool available (ex: context7 MCP) use it for additional information. Always use it if available and no specific tool guide is provided.
544
- 5. Web Search Fallback: If the targeted search doesn't yield results, then search the web.
545
- ```
546
-
547
- ##### Feature Design
548
- *Use this to design a feature. Features are horizontal sections that extend or modify slices. They are for work that is too large or complex to be described with only a task or few, but that does not represent a vertical slice of functionality.*
549
-
550
- ```markdown
551
- We're adding a new feature to project {project}, modifying slice {slice}. Features are horizontal sections that extend or modify slices. They are for work that is too large or complex to be described with only a task or few, but that does not represent a vertical slice of functionality. Create a design for the feature.
552
-
553
- Create or modify file at features/{sliceindex}-feature.{featurename}.md, where we refer to {sliceindex}-feature.{featurename} as the compound term {feature}. Note that an existing associated slice is required in order to create a feature. The {featurename} value should be provided by Project Manager or clearly contained in existing context.
554
-
555
- Any needed high-level design (HLD) can be provided in an ## HLD section in the document. Place detailed design in an ## LLD section in the document. Keep it concise and minimal. Use relevant methodology from `guide.ai-project.000-process` to create the design for the feature. Your role is Technical Fellow.
556
-
557
- The feature description should be provided by the Project Manager. Ideally it will be provided under a ## User-Provided Concept or similar heading in a feature file for you. DO NOT overwrite any User-Provided (or PM-Provided) concept. Preserve this information when you edit or re-create the file.
558
-
559
- Expected Output:
560
- * Concise feature design document in features/{sliceindex}-feature.{featurename}.md. Create if it doesn't already exist. If file exists, edit existing file as described above.
561
-
562
- Add YAML FrontMatter to the relevant file if it is not present:
563
- ```yaml
564
- ---
565
- item: {featurename}
566
- project: {project}
567
- type: feature
568
- github: {url of github issue, if one is related}
569
- dependencies: [list-if-any]
570
- projectState: brief current state
571
- status: not started
572
- dateCreated: YYYYMMDD
573
- dateUpdated: YYYYMMDD
574
- ---
575
- ```
576
- ``` markdown
577
- Follow dependency management - identify what foundation work project elements may depend on or be affected by this change.
578
-
579
- Guidelines:
580
- 1. Stick to relevant information only.
581
- 2. Follow Phase 4 guidelines substituting 'feature' for 'slice' as needed.
582
-
583
- Avoid:
584
- 1. Vague fluff about future performance testing or involved benchmarking, unless this is specifically relevant.
585
- 2. Avoid vague or speculative Risk Items.
586
- 3. Do not add a time estimate in minutes/hours/days etc. You may use 1-5 relative effort scale.
587
-
588
- If you need more information about the feature requirements, stop and request from Project Manager. Note that this is a project and process task, NOT a coding task. Any code samples should be minimal and limited to what is truly needed to provide the information.
589
- ```
590
-
591
-
592
- ##### Ad-Hoc Tasks
593
- ```markdown
594
- Create tasks for {feature|bugfix|maintenance-work} in project {project}. This is for smaller work items that need task breakdown but don't require full slice design.
595
-
596
- Your role is Senior AI. Analyze the work item and create a task file at `user/tasks/nnn-tasks.{item-name}.md` with:
597
-
598
- 1. YAML front matter:
599
- ---
600
- item: {item-name}
601
- project: {project}
602
- type: feature|maintenance|bugfix
603
- dependencies: [list-if-any]
604
- projectState: brief current state
605
- dateCreated: YYYYMMDD
606
- dateUpdated: YYYYMMDD
607
- ---
608
-
609
- 2. Context summary explaining the work
610
- 3. Granular tasks following Phase 5 guidelines
611
-
612
- Skip LLD creation - go directly from description to implementable tasks. Each task should be completable by a junior AI with clear success criteria.
613
-
614
- If the item is too complex for this approach, recommend creating a design file instead. If you need more information about the requirements, stop and request from Project Manager. Keep tasks focused and atomic.
392
+ 5. Web Search Fallback: If the targeted search doesn't yield results, then search the web.
615
393
  ```
616
394
 
617
395
  ##### Summarize Context
@@ -639,7 +417,6 @@ Include:
639
417
  - What's pending: manual verification, known issues, deferred items
640
418
  - Issues logged to maintenance (file reference + brief description)
641
419
  - Key implementation decisions or surprises worth noting for future context
642
- - Next: the next slice or work item to pick up
643
420
 
644
421
  **If work is in progress (mid-slice or mid-task):**
645
422
  ###### Slice nnn: {Slice Name} — In Progress
@@ -658,7 +435,6 @@ Include:
658
435
  - Key design decisions and rationale
659
436
  - Scope summary (what the design covers)
660
437
  - Notable findings (broken imports, gaps discovered, deferred items)
661
- - Next: what implementation or planning step follows
662
438
 
663
439
  **Guidelines:**
664
440
  - Keep it concise — this will be used as input for context assembly on the next session
@@ -666,6 +442,7 @@ Include:
666
442
  - Focus on: state, decisions, and continuation context
667
443
  - If tests are relevant, include pass/fail counts and note any failures with brief descriptions
668
444
  - Reference file paths for any issues logged to maintenance or other task files
445
+ - Do not include "next steps" or "next slice" — workflow navigation is handled by orchestration, not DEVLOG
669
446
  - This is a documentation task, not a coding task
670
447
 
671
448
  **DEVLOG.md format:**
@@ -684,7 +461,11 @@ Format: `## YYYYMMDD` followed by brief notes (1-3 lines per session).
684
461
 
685
462
  ##### Maintenance Task
686
463
  ```markdown
687
- Operate as a Senior AI. Use the issue description provided, and add tasks to the maintenance file to address implementation of the issue or feature. Add a new task to your maintenance file, which should be `tasks/950-tasks.maintenance.md` unless there is reason to deviate (there normally isn't). This should be used for an item small enough to represent as a single main task.
464
+ Operate as a Senior AI. Use the issue description provided, and add tasks to the maintenance file to address implementation of the issue. Use a maintenance task and slice file in the 950-999 range. Add a concise description in the slist file and add a new task to the task file. Use an existing slice and task file in the maintenance range if present and the item is small enough to represent as a single main task. Create new files if needed.
465
+
466
+ Example files:
467
+ `slices/950-slices.maintenance.md`
468
+ `tasks/950-tasks.maintenance.md`
688
469
 
689
470
  Include:
690
471
  1. A new Task {n}
@@ -706,7 +487,7 @@ Each task must be completable by a junior AI with clear success criteria. If ins
706
487
  This is a project planning task, not a coding task.
707
488
  ```
708
489
 
709
- ##### Perform Routine Maintenance
490
+ ##### Maintenance Routine
710
491
  ```markdown
711
492
  We are performing routine maintenance by implementing solutions for incomplete tasks in the maintenance task file. Unless otherwise specified, use file `tasks/950-tasks.maintenance.md` and scan for incomplete tasks. If given a particular section heading in the file, consider only that section.
712
493
 
@@ -785,24 +566,25 @@ This is a project planning task, not a coding task.
785
566
  ```
786
567
 
787
568
  ##### Analysis to LLD
569
+ *Note: this is rarely used and should normally be addressed using the standard architectural component → slice plan → slices methodology.*
788
570
  ```markdown
789
- We need to create a Low-Level Design (LLD) for {feature/component} identified during codebase analysis or task planning in project {project}. It may be an expansion of an initial task section identified during analysis.
571
+ We need to create a Low-Level Design (LLD) for {component} identified during codebase analysis or task planning in project {project}. It may be an expansion of an initial task section identified during analysis.
790
572
 
791
- Your role is Technical Fellow as described in the Process Guide. This LLD will bridge the gap between high-level understanding and implementable tasks.
573
+ Your role is Architect as described in the Process Guide. This LLD will bridge the gap between high-level understanding and implementable tasks.
792
574
 
793
575
  Context:
794
576
  - Analysis document: `user/analysis/nnn-analysis.{project-name}{.subproject or analysis topic?}` (or specify location)
795
577
  - Related task file: `user/tasks/nnn-analysis{.subproject?}-{date}.md` (if exists)
796
578
  - Current issue: {brief description of what analysis revealed}
797
579
 
798
- Create LLD document at: `user/features/nnn-lld.{feature-name}.md`
580
+ Create LLD document at: `user/slices/nnn-slice.{slice-name}.md`
799
581
 
800
582
  Required YAML front matter:
801
583
  ```yaml
802
584
  ---
803
585
  layer: project
804
- docType: lld
805
- feature: {featurename}
586
+ docType: slice-design
587
+ slice: {slice-name}
806
588
  project: {project}
807
589
  triggeredBy: analysis|task-breakdown|architecture-review
808
590
  sourceDocument: {path-to-analysis-or-task-file}
@@ -811,6 +593,7 @@ affects: [list-components-or-slices-impacted]
811
593
  complexity: low|medium|high
812
594
  dateCreated: YYYYMMDD
813
595
  dateUpdated: YYYYMMDD
596
+ status: not_started
814
597
  ---
815
598
 
816
599
  Guidelines for creating LLD:
@@ -819,7 +602,7 @@ Cross-Reference Requirements:
819
602
 
820
603
  - Update source analysis/task document to reference this LLD
821
604
  - Add back-reference in this LLD to triggering document
822
- - Note any slice designs or existing features this affects
605
+ - Note any slice designs or existing slices this affects
823
606
 
824
607
  Focus Areas:
825
608
 
@@ -834,9 +617,9 @@ Note: This creates implementation-ready technical designs, not high-level planni
834
617
  ```
835
618
 
836
619
  ##### Analysis Task Implementation
837
- *Phase 7 Task Implementation customized for analysis files. *
620
+ *Phase 6 Task Implementation customized for analysis files.*
838
621
  ```markdown
839
- We are working on the analysis file {analysis} in project {project}, phase 7 of `ai-project-guide/project-guides/guide.ai-project.000-process`.
622
+ We are working on the analysis file {analysis} in project {project}, phase 6 of `ai-project-guide/project-guides/guide.ai-project.000-process`.
840
623
 
841
624
  Your role is "Senior AI". Your job is to complete the tasks in the `user/tasks/nnn-analysis-{topic}.md` file. Please work through the tasks, following the guidelines in our project guides, and using the rules in the rules/ directory.
842
625
 
@@ -846,7 +629,7 @@ STOP and confer with Project Manager after each task, unless directed otherwise
846
629
 
847
630
  Work carefully and ensure that each task is verified complete before proceeding to the next. If an attempted solution does not work or you find reason to try another approach, do not make more than three attempts without stopping and obtaining confirmation from Project Manager.
848
631
 
849
- Check off completed tasks in the task file when verified complete. When all tasks for the slice are complete, proceed to Phase 8 (integration) with Project Manager approval.
632
+ Check off completed tasks in the task file when verified complete. When all tasks are complete, proceed to Phase 7 (integration) with Project Manager approval.
850
633
 
851
634
  Notes:
852
635
  * Use the task-checker to manage lists if it is available to you
@@ -861,7 +644,7 @@ Notes:
861
644
  Purpose: Perform discovery analysis of existing codebase to:
862
645
  - Document system architecture and technology stack
863
646
  - Identify technical debt and improvement opportunities
864
- - Provide foundation for creating slices, features, or maintenance tasks
647
+ - Provide foundation for creating architectural components, slices, or maintenance tasks
865
648
  - Create reference documentation for team members
866
649
 
867
650
  This is reconnaissance work - not goal-oriented development.
@@ -908,6 +691,46 @@ Analyze the following existing codebase and document your findings. We want this
908
691
  Custom instructions apply. See Additional Context for instruction prompt.
909
692
  ```
910
693
 
694
+ ##### Task Breakdown (Supplement: Phase 5)
695
+ *Add this when you have a detailed slice design especially one containing code that may have been iterated on in order to solve complex or subtle design problems. This should be added to the regular task breakdown prompt.*
696
+
697
+ ```markdown
698
+ ###### Important Additional Information
699
+ Note that our slice design is intricate, detailed, and has been refined extensively in order to address complex and/or subtle issues. The slice design contains code, and we *need* to use this code in our task planning.
700
+
701
+ As you are planning tasks, proceed *carefully* through the slice design, creating tasks to accomplish the design *exactly* as presented. Once you complete the task breakdown, review it in light of the slice design to ensure that:
702
+ 1. You completely addressed the design. If there are similar items, for example numerous wrapper components, ensure that your tasks explicitly address creation of each one.
703
+ 2. You did not miss any details. This is critical. Do not "gloss over", simplify, or add workarounds to any coding sections of the design even though they may be difficult.
704
+
705
+ Note also that tasks may reference the relevant design document. You do not need to replicate large pieces of the design document all over the task list. Ensure that references are accurate. Do not assume or guess anywhere in this task.
706
+
707
+ After creation of task list, you must review the entire list against the slice design to ensure that these requirements are met.
708
+ ```
709
+
710
+ ##### Task Expansion (Variant: Phase 5))
711
+ *This is no longer a separate phase. Use only when task breakdown results need additional enhancement, which is uncommon. See `guide.ai-project.005-variant-task-expansion` for detailed guidance.*
712
+
713
+ ```markdown
714
+ We're working in our guide.ai-project.000-process, Phase 5 (optional task expansion). Enhance the tasks for slice {slice} in project {project} to improve the chances that our "junior" AI workers can complete assigned tasks on their own. Only enhance tasks that can truly benefit from it. Many tasks may already be described with sufficient detail.
715
+
716
+ Use `guide.ai-project.005-variant-task-expansion` as your detailed guide. Work on the task file `user/tasks/{sliceindex}-tasks.{slicename}.md`.
717
+
718
+ Your role is Senior AI. For each task:
719
+ - If it would benefit from expansion or subdivision, enhance it.
720
+ - If it's already appropriate, output it verbatim.
721
+ - Ensure all tasks are accounted for.
722
+
723
+ Additionally:
724
+ - Make sure that you do NOT use this expansion as a way to write code in a design and planning phase. Expanded tasks should not look like writing code for the the tasks. You may spec out interfaces or use minimal code examples where truly useful. Evaluate carefully before doing so.
725
+
726
+ After any expansion, review it against the original unexpanded task and ensure that your expansion is a detailed representation of the original task, not a reinterpretation or change of the original task.
727
+
728
+ Output results by updating the existing task file. Success: All tasks have been processed and either output as is, or enhanced and divided into further subtasks.
729
+
730
+ Note: This is a project planning task, not a coding task.
731
+ ```
732
+
733
+
911
734
  ***
912
735
  ### Experimental
913
736
  *Less than no guarantees here. Generally promoted to active, or deprecated.*