speccrew 0.7.9 → 0.7.11

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.
@@ -11,10 +11,10 @@
11
11
 
12
12
  | # | File | Source |
13
13
  |---|------|--------|
14
- | 1 | {router} | [View](../../{routerSourcePath}) |
15
- | 2 | {service} | [View](../../{serviceSourcePath}) |
16
- | 3 | {model} | [View](../../{modelSourcePath}) |
17
- | 4 | {schema} | [View](../../{schemaSourcePath}) |
14
+ | 1 | {router} | [View](../../../../../../{routerSourcePath}) |
15
+ | 2 | {service} | [View](../../../../../../{serviceSourcePath}) |
16
+ | 3 | {model} | [View](../../../../../../{modelSourcePath}) |
17
+ | 4 | {schema} | [View](../../../../../../{schemaSourcePath}) |
18
18
 
19
19
  ---
20
20
 
@@ -152,11 +152,11 @@ graph TB
152
152
 
153
153
  | # | Layer | File | Function/Class | Responsibility | Source |
154
154
  |---|-------|------|----------------|----------------|--------|
155
- | 1 | Router | {users.py} | {create_user} | Receive request, validate params, call service | [Source](../../{routerSourcePath}) |
156
- | 2 | Service | {user_service.py} | {create_user} | Business validation, data processing, call CRUD | [Source](../../{serviceSourcePath}) |
157
- | 3 | Service | {user_service.py} | {validate_user_email} | Check email uniqueness | [Source](../../{serviceSourcePath}) |
158
- | 4 | CRUD | {user_crud.py} | {create} | Execute INSERT via SQLAlchemy | [Source](../../{crudSourcePath}) |
159
- | 5 | Model | {user.py} | {User model} | SQLAlchemy ORM model definition | [Source](../../{modelSourcePath}) |
155
+ | 1 | Router | {users.py} | {create_user} | Receive request, validate params, call service | [Source](../../../../../../{routerSourcePath}) |
156
+ | 2 | Service | {user_service.py} | {create_user} | Business validation, data processing, call CRUD | [Source](../../../../../../{serviceSourcePath}) |
157
+ | 3 | Service | {user_service.py} | {validate_user_email} | Check email uniqueness | [Source](../../../../../../{serviceSourcePath}) |
158
+ | 4 | CRUD | {user_crud.py} | {create} | Execute INSERT via SQLAlchemy | [Source](../../../../../../{crudSourcePath}) |
159
+ | 5 | Model | {user.py} | {User model} | SQLAlchemy ORM model definition | [Source](../../../../../../{modelSourcePath}) |
160
160
 
161
161
  **Database Operations:**
162
162
 
@@ -213,7 +213,7 @@ graph TB
213
213
  | {related_table} | {One-to-Many} | {ForeignKey("related.id")} | {Relationship description} |
214
214
  | {another_table} | {Many-to-One} | {ForeignKey("another.id")} | {Relationship description} |
215
215
 
216
- **Source:** [Model](../../{modelSourcePath})
216
+ **Source:** [Model](../../../../../../{modelSourcePath})
217
217
 
218
218
  ### 3.2 Model-Database Mapping
219
219
 
@@ -260,23 +260,23 @@ class {UserResponse}(BaseModel):
260
260
 
261
261
  | Service Name | Purpose | Source Path |
262
262
  |--------------|---------|-------------|
263
- | {user_service} | {e.g., User business logic} | [Source](../../{serviceSourcePath}) |
264
- | {auth_service} | {e.g., Authentication validation} | [Source](../../{serviceSourcePath}) |
263
+ | {user_service} | {e.g., User business logic} | [Source](../../../../../../{serviceSourcePath}) |
264
+ | {auth_service} | {e.g., Authentication validation} | [Source](../../../../../../{serviceSourcePath}) |
265
265
 
266
266
  ### 4.2 Data Access Layer
267
267
 
268
268
  | CRUD/Repository | Model | Purpose | Source Path |
269
269
  |-----------------|-------|---------|-------------|
270
- | {user_crud} | {User} | {e.g., User CRUD operations} | [Source](../../{crudSourcePath}) |
271
- | {role_crud} | {Role} | {e.g., Role query} | [Source](../../{crudSourcePath}) |
270
+ | {user_crud} | {User} | {e.g., User CRUD operations} | [Source](../../../../../../{crudSourcePath}) |
271
+ | {role_crud} | {Role} | {e.g., Role query} | [Source](../../../../../../{crudSourcePath}) |
272
272
 
273
273
  ### 4.3 Schemas and Models
274
274
 
275
275
  | Class Name | Type | Purpose | Source Path |
276
276
  |------------|------|---------|-------------|
277
- | {UserCreate} | Request Schema | {e.g., Create user request} | [Source](../../{schemaSourcePath}) |
278
- | {UserResponse} | Response Schema | {e.g., User detail response} | [Source](../../{schemaSourcePath}) |
279
- | {User} | SQLAlchemy Model | {e.g., User database model} | [Source](../../{modelSourcePath}) |
277
+ | {UserCreate} | Request Schema | {e.g., Create user request} | [Source](../../../../../../{schemaSourcePath}) |
278
+ | {UserResponse} | Response Schema | {e.g., User detail response} | [Source](../../../../../../{schemaSourcePath}) |
279
+ | {User} | SQLAlchemy Model | {e.g., User database model} | [Source](../../../../../../{modelSourcePath}) |
280
280
 
281
281
  ### 4.4 API Consumers
282
282
 
@@ -284,8 +284,8 @@ class {UserResponse}(BaseModel):
284
284
 
285
285
  | Page Name | Function Description | Source Path | Document Path |
286
286
  |-----------|---------------------|-------------|---------------|
287
- | {PageName} | {e.g., User management list page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
288
- | {PageName} | {e.g., User form page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
287
+ | {PageName} | {e.g., User management list page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
288
+ | {PageName} | {e.g., User form page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
289
289
 
290
290
  ---
291
291
 
@@ -339,7 +339,7 @@ graph LR
339
339
  ```
340
340
 
341
341
  **Diagram Source**
342
- - [{Service}.py](../../{serviceSourcePath})
342
+ - [{Service}.py](../../../../../../{serviceSourcePath})
343
343
 
344
344
  ### 6.3 External Dependencies
345
345
 
@@ -458,6 +458,6 @@ router = APIRouter(
458
458
  **Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
459
459
 
460
460
  **Section Source**
461
- - [{Router}.py](../../{routerSourcePath})
462
- - [{Service}.py](../../{serviceSourcePath})
463
- - [{Model}.py](../../{modelSourcePath})
461
+ - [{Router}.py](../../../../../../{routerSourcePath})
462
+ - [{Service}.py](../../../../../../{serviceSourcePath})
463
+ - [{Model}.py](../../../../../../{modelSourcePath})
@@ -11,10 +11,10 @@
11
11
 
12
12
  | # | File | Source |
13
13
  |---|------|--------|
14
- | 1 | {Controller} | [View](../../{controllerSourcePath}) |
15
- | 2 | {Service} | [View](../../{serviceSourcePath}) |
16
- | 3 | {Entity} | [View](../../{entitySourcePath}) |
17
- | 4 | {DTO} | [View](../../{dtoSourcePath}) |
14
+ | 1 | {Controller} | [View](../../../../../../{controllerSourcePath}) |
15
+ | 2 | {Service} | [View](../../../../../../{serviceSourcePath}) |
16
+ | 3 | {Entity} | [View](../../../../../../{entitySourcePath}) |
17
+ | 4 | {DTO} | [View](../../../../../../{dtoSourcePath}) |
18
18
 
19
19
  ---
20
20
 
@@ -156,11 +156,11 @@ graph TB
156
156
 
157
157
  | # | Layer | Class | Method | Responsibility | Source |
158
158
  |---|-------|-------|--------|----------------|--------|
159
- | 1 | Controller | {UserController} | {createUser} | Receive request, validate params, call service | [Source](../../{controllerSourcePath}) |
160
- | 2 | Service | {UserService} | {createUser} | Business validation, data processing, call mapper | [Source](../../{serviceSourcePath}) |
161
- | 3 | Service | {UserService} | {validateUserName} | Check user name uniqueness | [Source](../../{serviceSourcePath}) |
162
- | 4 | Mapper | {UserMapper} | {insert} | Execute INSERT SQL | [Source](../../{mapperSourcePath}) |
163
- | 5 | Mapper XML | {UserMapper.xml} | {insert} | SQL: INSERT INTO user (...) VALUES (...) | [Source](../../{mapperXmlSourcePath}) |
159
+ | 1 | Controller | {UserController} | {createUser} | Receive request, validate params, call service | [Source](../../../../../../{controllerSourcePath}) |
160
+ | 2 | Service | {UserService} | {createUser} | Business validation, data processing, call mapper | [Source](../../../../../../{serviceSourcePath}) |
161
+ | 3 | Service | {UserService} | {validateUserName} | Check user name uniqueness | [Source](../../../../../../{serviceSourcePath}) |
162
+ | 4 | Mapper | {UserMapper} | {insert} | Execute INSERT SQL | [Source](../../../../../../{mapperSourcePath}) |
163
+ | 5 | Mapper XML | {UserMapper.xml} | {insert} | SQL: INSERT INTO user (...) VALUES (...) | [Source](../../../../../../{mapperXmlSourcePath}) |
164
164
 
165
165
  **Database Operations:**
166
166
 
@@ -217,7 +217,7 @@ graph TB
217
217
  | {related_table} | {One-to-Many} | {this_table.related_id} | {Relationship description} |
218
218
  | {another_table} | {Many-to-One} | {this_table.parent_id} | {Relationship description} |
219
219
 
220
- **Source:** [Entity](../../{entitySourcePath}) | [Mapper XML](../../{mapperXmlSourcePath})
220
+ **Source:** [Entity](../../../../../../{entitySourcePath}) | [Mapper XML](../../../../../../{mapperXmlSourcePath})
221
221
 
222
222
  ### 3.2 Entity-Database Mapping
223
223
 
@@ -266,23 +266,23 @@ graph TB
266
266
 
267
267
  | Service Name | Purpose | Source Path |
268
268
  |--------------|---------|-------------|
269
- | {ServiceName} | {e.g., User business logic} | [Source](../../{serviceSourcePath}) |
270
- | {ServiceName} | {e.g., Permission validation} | [Source](../../{serviceSourcePath}) |
269
+ | {ServiceName} | {e.g., User business logic} | [Source](../../../../../../{serviceSourcePath}) |
270
+ | {ServiceName} | {e.g., Permission validation} | [Source](../../../../../../{serviceSourcePath}) |
271
271
 
272
272
  ### 4.2 Data Access Layer
273
273
 
274
274
  | Mapper/Repository | Entity | Purpose | Source Path |
275
275
  |-------------------|--------|---------|-------------|
276
- | {MapperName} | {EntityName} | {e.g., User CRUD operations} | [Source](../../{mapperSourcePath}) |
277
- | {MapperName} | {EntityName} | {e.g., Role query} | [Source](../../{mapperSourcePath}) |
276
+ | {MapperName} | {EntityName} | {e.g., User CRUD operations} | [Source](../../../../../../{mapperSourcePath}) |
277
+ | {MapperName} | {EntityName} | {e.g., Role query} | [Source](../../../../../../{mapperSourcePath}) |
278
278
 
279
279
  ### 4.3 DTOs and Entities
280
280
 
281
281
  | Class Name | Type | Purpose | Source Path |
282
282
  |------------|------|---------|-------------|
283
- | {DTOClass} | Request DTO | {e.g., Create user request} | [Source](../../{dtoSourcePath}) |
284
- | {VOClass} | Response VO | {e.g., User detail response} | [Source](../../{voSourcePath}) |
285
- | {EntityClass} | Entity | {e.g., User database entity} | [Source](../../{entitySourcePath}) |
283
+ | {DTOClass} | Request DTO | {e.g., Create user request} | [Source](../../../../../../{dtoSourcePath}) |
284
+ | {VOClass} | Response VO | {e.g., User detail response} | [Source](../../../../../../{voSourcePath}) |
285
+ | {EntityClass} | Entity | {e.g., User database entity} | [Source](../../../../../../{entitySourcePath}) |
286
286
 
287
287
  ### 4.4 API Consumers
288
288
 
@@ -290,8 +290,8 @@ graph TB
290
290
 
291
291
  | Page Name | Function Description | Source Path | Document Path |
292
292
  |-----------|---------------------|-------------|---------------|
293
- | {PageName} | {e.g., User management list page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
294
- | {PageName} | {e.g., User form page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
293
+ | {PageName} | {e.g., User management list page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
294
+ | {PageName} | {e.g., User form page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
295
295
 
296
296
  ---
297
297
 
@@ -346,7 +346,7 @@ graph LR
346
346
  ```
347
347
 
348
348
  **Diagram Source**
349
- - [{Service}.java](../../{serviceSourcePath})
349
+ - [{Service}.java](../../../../../../{serviceSourcePath})
350
350
 
351
351
  ### 6.3 External Dependencies
352
352
 
@@ -476,6 +476,6 @@ feature:
476
476
  **Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
477
477
 
478
478
  **Section Source**
479
- - [{Controller}.java](../../{controllerSourcePath})
480
- - [{Service}.java](../../{serviceSourcePath})
481
- - [{Entity}.java](../../{entitySourcePath})
479
+ - [{Controller}.java](../../../../../../{controllerSourcePath})
480
+ - [{Service}.java](../../../../../../{serviceSourcePath})
481
+ - [{Entity}.java](../../../../../../{entitySourcePath})
@@ -11,10 +11,10 @@
11
11
 
12
12
  | # | File | Source |
13
13
  |---|------|--------|
14
- | 1 | {Controller} | [View](../../{controllerSourcePath}) |
15
- | 2 | {Service} | [View](../../{serviceSourcePath}) |
16
- | 3 | {Repository} | [View](../../{repositorySourcePath}) |
17
- | 4 | {Entity} | [View](../../{entitySourcePath}) |
14
+ | 1 | {Controller} | [View](../../../../../../{controllerSourcePath}) |
15
+ | 2 | {Service} | [View](../../../../../../{serviceSourcePath}) |
16
+ | 3 | {Repository} | [View](../../../../../../{repositorySourcePath}) |
17
+ | 4 | {Entity} | [View](../../../../../../{entitySourcePath}) |
18
18
 
19
19
  ---
20
20
 
@@ -152,11 +152,11 @@ graph TB
152
152
 
153
153
  | # | Layer | File | Method/Class | Responsibility | Source |
154
154
  |---|-------|------|--------------|----------------|--------|
155
- | 1 | Controller | {UsersController.cs} | {CreateUser} | Receive request, validate params, call service | [Source](../../{controllerSourcePath}) |
156
- | 2 | Service | {UserService.cs} | {CreateUserAsync} | Business validation, data processing, call repository | [Source](../../{serviceSourcePath}) |
157
- | 3 | Service | {UserService.cs} | {ValidateUserEmailAsync} | Check email uniqueness | [Source](../../{serviceSourcePath}) |
158
- | 4 | Repository | {UserRepository.cs} | {AddAsync} | Execute Add via EF Core | [Source](../../{repositorySourcePath}) |
159
- | 5 | Entity | {User.cs} | {User entity} | EF Core entity definition | [Source](../../{entitySourcePath}) |
155
+ | 1 | Controller | {UsersController.cs} | {CreateUser} | Receive request, validate params, call service | [Source](../../../../../../{controllerSourcePath}) |
156
+ | 2 | Service | {UserService.cs} | {CreateUserAsync} | Business validation, data processing, call repository | [Source](../../../../../../{serviceSourcePath}) |
157
+ | 3 | Service | {UserService.cs} | {ValidateUserEmailAsync} | Check email uniqueness | [Source](../../../../../../{serviceSourcePath}) |
158
+ | 4 | Repository | {UserRepository.cs} | {AddAsync} | Execute Add via EF Core | [Source](../../../../../../{repositorySourcePath}) |
159
+ | 5 | Entity | {User.cs} | {User entity} | EF Core entity definition | [Source](../../../../../../{entitySourcePath}) |
160
160
 
161
161
  **Database Operations:**
162
162
 
@@ -213,7 +213,7 @@ graph TB
213
213
  | {RelatedTable} | {One-to-Many} | {RelatedId} | {Relationship description} |
214
214
  | {AnotherTable} | {Many-to-One} | {AnotherId} | {Relationship description} |
215
215
 
216
- **Source:** [Entity](../../{entitySourcePath}) | [DbContext](../../{dbContextSourcePath})
216
+ **Source:** [Entity](../../../../../../{entitySourcePath}) | [DbContext](../../../../../../{dbContextSourcePath})
217
217
 
218
218
  ### 3.2 Entity-Database Mapping
219
219
 
@@ -262,23 +262,23 @@ public class {UserResponse}
262
262
 
263
263
  | Service Name | Purpose | Source Path |
264
264
  |--------------|---------|-------------|
265
- | {IUserService} | {e.g., User business logic interface} | [Source](../../{serviceInterfaceSourcePath}) |
266
- | {UserService} | {e.g., User business logic implementation} | [Source](../../{serviceSourcePath}) |
265
+ | {IUserService} | {e.g., User business logic interface} | [Source](../../../../../../{serviceInterfaceSourcePath}) |
266
+ | {UserService} | {e.g., User business logic implementation} | [Source](../../../../../../{serviceSourcePath}) |
267
267
 
268
268
  ### 4.2 Data Access Layer
269
269
 
270
270
  | Repository | Entity | Purpose | Source Path |
271
271
  |------------|--------|---------|-------------|
272
- | {IUserRepository} | {User} | {e.g., User repository interface} | [Source](../../{repositoryInterfaceSourcePath}) |
273
- | {UserRepository} | {User} | {e.g., User repository implementation} | [Source](../../{repositorySourcePath}) |
272
+ | {IUserRepository} | {User} | {e.g., User repository interface} | [Source](../../../../../../{repositoryInterfaceSourcePath}) |
273
+ | {UserRepository} | {User} | {e.g., User repository implementation} | [Source](../../../../../../{repositorySourcePath}) |
274
274
 
275
275
  ### 4.3 DTOs and Entities
276
276
 
277
277
  | Class Name | Type | Purpose | Source Path |
278
278
  |------------|------|---------|-------------|
279
- | {CreateUserRequest} | Request DTO | {e.g., Create user request} | [Source](../../{dtoSourcePath}) |
280
- | {UserResponse} | Response DTO | {e.g., User detail response} | [Source](../../{dtoSourcePath}) |
281
- | {User} | EF Core Entity | {e.g., User database entity} | [Source](../../{entitySourcePath}) |
279
+ | {CreateUserRequest} | Request DTO | {e.g., Create user request} | [Source](../../../../../../{dtoSourcePath}) |
280
+ | {UserResponse} | Response DTO | {e.g., User detail response} | [Source](../../../../../../{dtoSourcePath}) |
281
+ | {User} | EF Core Entity | {e.g., User database entity} | [Source](../../../../../../{entitySourcePath}) |
282
282
 
283
283
  ### 4.4 API Consumers
284
284
 
@@ -286,8 +286,8 @@ public class {UserResponse}
286
286
 
287
287
  | Page Name | Function Description | Source Path | Document Path |
288
288
  |-----------|---------------------|-------------|---------------|
289
- | {PageName} | {e.g., User management list page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
290
- | {PageName} | {e.g., User form page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
289
+ | {PageName} | {e.g., User management list page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
290
+ | {PageName} | {e.g., User form page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
291
291
 
292
292
  ---
293
293
 
@@ -341,7 +341,7 @@ graph LR
341
341
  ```
342
342
 
343
343
  **Diagram Source**
344
- - [{Service}.cs](../../{serviceSourcePath})
344
+ - [{Service}.cs](../../../../../../{serviceSourcePath})
345
345
 
346
346
  ### 6.3 External Dependencies
347
347
 
@@ -460,6 +460,6 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
460
460
  **Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
461
461
 
462
462
  **Section Source**
463
- - [{Controller}.cs](../../{controllerSourcePath})
464
- - [{Service}.cs](../../{serviceSourcePath})
465
- - [{Entity}.cs](../../{entitySourcePath})
463
+ - [{Controller}.cs](../../../../../../{controllerSourcePath})
464
+ - [{Service}.cs](../../../../../../{serviceSourcePath})
465
+ - [{Entity}.cs](../../../../../../{entitySourcePath})
@@ -11,10 +11,10 @@
11
11
 
12
12
  | # | File | Source |
13
13
  |---|------|--------|
14
- | 1 | {Controller} | [View](../../{controllerSourcePath}) |
15
- | 2 | {Service} | [View](../../{serviceSourcePath}) |
16
- | 3 | {Entity} | [View](../../{entitySourcePath}) |
17
- | 4 | {DTO} | [View](../../{dtoSourcePath}) |
14
+ | 1 | {Controller} | [View](../../../../../../{controllerSourcePath}) |
15
+ | 2 | {Service} | [View](../../../../../../{serviceSourcePath}) |
16
+ | 3 | {Entity} | [View](../../../../../../{entitySourcePath}) |
17
+ | 4 | {DTO} | [View](../../../../../../{dtoSourcePath}) |
18
18
 
19
19
  ---
20
20
 
@@ -156,11 +156,11 @@ graph TB
156
156
 
157
157
  | # | Layer | Class | Method | Responsibility | Source |
158
158
  |---|-------|-------|--------|----------------|--------|
159
- | 1 | Controller | {UserController} | {createUser} | Receive request, validate params, call service | [Source](../../{controllerSourcePath}) |
160
- | 2 | Service | {UserService} | {createUser} | Business validation, data processing, call mapper | [Source](../../{serviceSourcePath}) |
161
- | 3 | Service | {UserService} | {validateUserName} | Check user name uniqueness | [Source](../../{serviceSourcePath}) |
162
- | 4 | Mapper | {UserMapper} | {insert} | Execute INSERT SQL | [Source](../../{mapperSourcePath}) |
163
- | 5 | Mapper XML | {UserMapper.xml} | {insert} | SQL: INSERT INTO user (...) VALUES (...) | [Source](../../{mapperXmlSourcePath}) |
159
+ | 1 | Controller | {UserController} | {createUser} | Receive request, validate params, call service | [Source](../../../../../../{controllerSourcePath}) |
160
+ | 2 | Service | {UserService} | {createUser} | Business validation, data processing, call mapper | [Source](../../../../../../{serviceSourcePath}) |
161
+ | 3 | Service | {UserService} | {validateUserName} | Check user name uniqueness | [Source](../../../../../../{serviceSourcePath}) |
162
+ | 4 | Mapper | {UserMapper} | {insert} | Execute INSERT SQL | [Source](../../../../../../{mapperSourcePath}) |
163
+ | 5 | Mapper XML | {UserMapper.xml} | {insert} | SQL: INSERT INTO user (...) VALUES (...) | [Source](../../../../../../{mapperXmlSourcePath}) |
164
164
 
165
165
  **Database Operations:**
166
166
 
@@ -217,7 +217,7 @@ graph TB
217
217
  | {related_table} | {One-to-Many} | {this_table.related_id} | {Relationship description} |
218
218
  | {another_table} | {Many-to-One} | {this_table.parent_id} | {Relationship description} |
219
219
 
220
- **Source:** [Entity](../../{entitySourcePath}) | [Mapper XML](../../{mapperXmlSourcePath})
220
+ **Source:** [Entity](../../../../../../{entitySourcePath}) | [Mapper XML](../../../../../../{mapperXmlSourcePath})
221
221
 
222
222
  ### 3.2 Entity-Database Mapping
223
223
 
@@ -266,23 +266,23 @@ graph TB
266
266
 
267
267
  | Service Name | Purpose | Source Path |
268
268
  |--------------|---------|-------------|
269
- | {ServiceName} | {e.g., User business logic} | [Source](../../{serviceSourcePath}) |
270
- | {ServiceName} | {e.g., Permission validation} | [Source](../../{serviceSourcePath}) |
269
+ | {ServiceName} | {e.g., User business logic} | [Source](../../../../../../{serviceSourcePath}) |
270
+ | {ServiceName} | {e.g., Permission validation} | [Source](../../../../../../{serviceSourcePath}) |
271
271
 
272
272
  ### 4.2 Data Access Layer
273
273
 
274
274
  | Mapper/Repository | Entity | Purpose | Source Path |
275
275
  |-------------------|--------|---------|-------------|
276
- | {MapperName} | {EntityName} | {e.g., User CRUD operations} | [Source](../../{mapperSourcePath}) |
277
- | {MapperName} | {EntityName} | {e.g., Role query} | [Source](../../{mapperSourcePath}) |
276
+ | {MapperName} | {EntityName} | {e.g., User CRUD operations} | [Source](../../../../../../{mapperSourcePath}) |
277
+ | {MapperName} | {EntityName} | {e.g., Role query} | [Source](../../../../../../{mapperSourcePath}) |
278
278
 
279
279
  ### 4.3 DTOs and Entities
280
280
 
281
281
  | Class Name | Type | Purpose | Source Path |
282
282
  |------------|------|---------|-------------|
283
- | {DTOClass} | Request DTO | {e.g., Create user request} | [Source](../../{dtoSourcePath}) |
284
- | {VOClass} | Response VO | {e.g., User detail response} | [Source](../../{voSourcePath}) |
285
- | {EntityClass} | Entity | {e.g., User database entity} | [Source](../../{entitySourcePath}) |
283
+ | {DTOClass} | Request DTO | {e.g., Create user request} | [Source](../../../../../../{dtoSourcePath}) |
284
+ | {VOClass} | Response VO | {e.g., User detail response} | [Source](../../../../../../{voSourcePath}) |
285
+ | {EntityClass} | Entity | {e.g., User database entity} | [Source](../../../../../../{entitySourcePath}) |
286
286
 
287
287
  ### 4.4 API Consumers
288
288
 
@@ -290,8 +290,8 @@ graph TB
290
290
 
291
291
  | Page Name | Function Description | Source Path | Document Path |
292
292
  |-----------|---------------------|-------------|---------------|
293
- | {PageName} | {e.g., User management list page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
294
- | {PageName} | {e.g., User form page} | [Source](../../{pageSourcePath}) | [Doc](../../{pageDocumentPath}) |
293
+ | {PageName} | {e.g., User management list page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
294
+ | {PageName} | {e.g., User form page} | [Source](../../../../../../{pageSourcePath}) | [Doc](../../../../../../{pageDocumentPath}) |
295
295
 
296
296
  ---
297
297
 
@@ -346,7 +346,7 @@ graph LR
346
346
  ```
347
347
 
348
348
  **Diagram Source**
349
- - [{Service}.java](../../{serviceSourcePath})
349
+ - [{Service}.java](../../../../../../{serviceSourcePath})
350
350
 
351
351
  ### 6.3 External Dependencies
352
352
 
@@ -476,6 +476,6 @@ feature:
476
476
  **Related Module Document:** [Module Overview Document](../{{module-name}}-overview.md)
477
477
 
478
478
  **Section Source**
479
- - [{Controller}.java](../../{controllerSourcePath})
480
- - [{Service}.java](../../{serviceSourcePath})
481
- - [{Entity}.java](../../{entitySourcePath})
479
+ - [{Controller}.java](../../../../../../{controllerSourcePath})
480
+ - [{Service}.java](../../../../../../{serviceSourcePath})
481
+ - [{Entity}.java](../../../../../../{entitySourcePath})
@@ -320,11 +320,6 @@
320
320
  </block>
321
321
 
322
322
  <!-- ==================== STEP 5B: FILL EACH SECTION USING SEARCH_REPLACE ==================== -->
323
- <!-- Calculate Dynamic Path Prefix -->
324
- <block type="task" id="B17" action="calculate-path-prefix" desc="Calculate path prefix">
325
- <field name="documentPath" value="${documentPath}"/>
326
- <field name="output" var="pathPrefix" from="calculation.prefix"/>
327
- </block>
328
323
 
329
324
  <!-- Section 1: Content Overview -->
330
325
  <block type="task" id="B18" action="search_replace" desc="Fill overview section">
@@ -479,6 +474,14 @@
479
474
  <field name="verify" value="file.exists(${completed_dir}/${markerName}.done.json)"/>
480
475
  </block>
481
476
 
477
+ <!-- ==================== MANDATORY GRAPH WRITE RULE ==================== -->
478
+ <block type="rule" id="R-GRAPH" level="mandatory" desc="Graph data write is MANDATORY">
479
+ <field name="text">MANDATORY: You MUST execute ALL graph write blocks (B32a through B32g) before proceeding to O1.</field>
480
+ <field name="text">Graph data (nodes + edges) MUST be appended to knowledges/bizs/graph/nodes.json and edges.json.</field>
481
+ <field name="text">DO NOT skip graph write. DO NOT jump directly to O1 output block.</field>
482
+ <field name="text">If graph directory does not exist, create it first.</field>
483
+ </block>
484
+
482
485
  <!-- Step 7b: Construct and Append Graph Data -->
483
486
  <!-- Construct Graph Nodes from API Analysis -->
484
487
  <block type="task" id="B32a" action="analyze" desc="Construct API endpoint nodes">
@@ -612,6 +615,7 @@ console.log('Edges appended:', newEdges.length);
612
615
  <field name="featureName" from="step6-report.feature_name"/>
613
616
  <field name="generatedFile" from="step6-report.generated_file"/>
614
617
  <field name="message" from="step6-report.message"/>
618
+ <field name="graph_status" value="nodes and edges written to knowledges/bizs/graph/"/>
615
619
  </block>
616
620
 
617
621
  <!-- ==================== ERROR HANDLING ==================== -->
@@ -155,6 +155,78 @@ function getBatch(args) {
155
155
  }
156
156
  }
157
157
 
158
+ // Parse featureId to extract platformId, module, and fileName
159
+ // featureId format: {platformId}-{module}-{fileNameWithoutExt}
160
+ function parseFeatureId(featureId) {
161
+ const parts = featureId.split('-');
162
+ if (parts.length >= 3) {
163
+ const platformId = parts[0];
164
+ const module = parts[1];
165
+ const fileNameWithoutExt = parts.slice(2).join('-'); // Handle fileName with hyphens
166
+ return { platformId, module, fileNameWithoutExt };
167
+ }
168
+ return null;
169
+ }
170
+
171
+ // Update features JSON file with analysis results
172
+ function updateFeaturesJson(syncStatePath, featureId, doneData) {
173
+ const parsed = parseFeatureId(featureId);
174
+ if (!parsed) {
175
+ console.error(JSON.stringify({ warning: `Cannot parse featureId: ${featureId}` }));
176
+ return false;
177
+ }
178
+
179
+ const { platformId, module, fileNameWithoutExt } = parsed;
180
+ const featuresFilePath = path.join(syncStatePath, `features-${platformId}.json`);
181
+
182
+ if (!fs.existsSync(featuresFilePath)) {
183
+ console.error(JSON.stringify({ warning: `Features file not found: ${featuresFilePath}` }));
184
+ return false;
185
+ }
186
+
187
+ const featuresData = readJsonSafe(featuresFilePath);
188
+ if (!featuresData || !Array.isArray(featuresData.features)) {
189
+ console.error(JSON.stringify({ warning: `Invalid features data in: ${featuresFilePath}` }));
190
+ return false;
191
+ }
192
+
193
+ // Find matching feature
194
+ let found = false;
195
+ for (const feature of featuresData.features) {
196
+ const featureFileName = feature.fileName || feature.sourceFile || 'unknown';
197
+ const featureFileNameWithoutExt = featureFileName.replace(/\.[^.]+$/, '');
198
+
199
+ // Match by module and fileName (platformId already matched by filename)
200
+ if (feature.module === module && featureFileNameWithoutExt === fileNameWithoutExt) {
201
+ // Skip if already analyzed (idempotency)
202
+ if (feature.analyzed === true) {
203
+ found = true;
204
+ continue;
205
+ }
206
+
207
+ // Update feature fields
208
+ feature.analyzed = true;
209
+ feature.startedAt = doneData.startedAt || doneData.timestamp || null;
210
+ feature.completedAt = doneData.completedAt || doneData.timestamp || null;
211
+ feature.analysisNotes = doneData.notes || 'completed';
212
+ found = true;
213
+ }
214
+ }
215
+
216
+ if (!found) {
217
+ console.error(JSON.stringify({ warning: `Feature not found in ${featuresFilePath}: ${featureId}` }));
218
+ return false;
219
+ }
220
+
221
+ // Update top-level counts
222
+ featuresData.analyzedCount = featuresData.features.filter(f => f.analyzed).length;
223
+ featuresData.pendingCount = featuresData.features.filter(f => !f.analyzed).length;
224
+
225
+ // Write back to file (atomic write)
226
+ fs.writeFileSync(featuresFilePath, JSON.stringify(featuresData, null, 2));
227
+ return true;
228
+ }
229
+
158
230
  // process-results subcommand
159
231
  function processResults(args) {
160
232
  const { syncStatePath, graphRoot, completedDir } = args;
@@ -165,9 +237,10 @@ function processResults(args) {
165
237
  let success = 0;
166
238
  let failed = 0;
167
239
  let graphUpdated = false;
240
+ let featuresUpdated = 0;
168
241
 
169
242
  if (!fs.existsSync(completedDir)) {
170
- console.log(JSON.stringify({ success, failed, graphUpdated }));
243
+ console.log(JSON.stringify({ success, failed, graphUpdated, featuresUpdated }));
171
244
  return;
172
245
  }
173
246
 
@@ -178,14 +251,26 @@ function processResults(args) {
178
251
  for (const file of doneFiles) {
179
252
  const filePath = path.join(completedDir, file);
180
253
  const data = readJsonSafe(filePath);
254
+
255
+ // Extract featureId from filename: {featureId}.done.json
256
+ const featureId = file.replace('.done.json', '');
257
+
181
258
  if (data) {
182
259
  if (data.status === 'success' || data.status === 'completed') {
183
260
  success++;
261
+ // Update features JSON for successful analysis
262
+ if (updateFeaturesJson(syncStatePath, featureId, data)) {
263
+ featuresUpdated++;
264
+ }
184
265
  } else if (data.status === 'failed' || data.status === 'error') {
185
266
  failed++;
186
267
  } else {
187
268
  // Default to success if no status field
188
269
  success++;
270
+ // Update features JSON for successful analysis
271
+ if (updateFeaturesJson(syncStatePath, featureId, data)) {
272
+ featuresUpdated++;
273
+ }
189
274
  }
190
275
  } else {
191
276
  // Invalid JSON, assume success
@@ -260,7 +345,8 @@ function processResults(args) {
260
345
  console.log(JSON.stringify({
261
346
  success,
262
347
  failed,
263
- graphUpdated
348
+ graphUpdated,
349
+ featuresUpdated
264
350
  }));
265
351
  }
266
352