Refactor inference engine and task management: Remove obsolete inference engine and ONNX engine files, update inference processing to utilize batch handling, and enhance task management structure in documentation. Adjust paths for task specifications to align with new directory organization.

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-28 01:04:28 +02:00
parent 1e4ef299f9
commit 5be53739cd
60 changed files with 111875 additions and 208 deletions
+9 -5
View File
@@ -16,7 +16,7 @@ If you want to run a specific skill directly (without the orchestrator), use the
/problem — interactive problem gathering → _docs/00_problem/
/research — solution drafts → _docs/01_solution/
/plan — architecture, components, tests → _docs/02_document/
/decompose — atomic task specs → _docs/02_tasks/
/decompose — atomic task specs → _docs/02_tasks/todo/
/implement — batched parallel implementation → _docs/03_implementation/
/deploy — containerization, CI/CD, observability → _docs/04_deploy/
```
@@ -122,7 +122,7 @@ Bottom-up codebase documentation. Analyzes existing code from modules through co
2. /plan — architecture, data model, deployment, components, risks, tests, Jira epics → _docs/02_document/
3. /decompose — atomic task specs + dependency table → _docs/02_tasks/
3. /decompose — atomic task specs + dependency table → _docs/02_tasks/todo/
4. /implement — batched parallel agents, code review, commit per batch → _docs/03_implementation/
```
@@ -150,7 +150,7 @@ Or just use `/autopilot` to run steps 0-5 automatically.
| **problem** | "problem", "define problem", "new project" | `_docs/00_problem/` |
| **research** | "research", "investigate" | `_docs/01_solution/` |
| **plan** | "plan", "decompose solution" | `_docs/02_document/` |
| **decompose** | "decompose", "task decomposition" | `_docs/02_tasks/` |
| **decompose** | "decompose", "task decomposition" | `_docs/02_tasks/todo/` |
| **implement** | "implement", "start implementation" | `_docs/03_implementation/` |
| **code-review** | "code review", "review code" | Verdict: PASS / FAIL / PASS_WITH_WARNINGS |
| **refactor** | "refactor", "improve code" | `_docs/04_refactoring/` |
@@ -185,7 +185,11 @@ _docs/
│ ├── deployment/ — containerization, CI/CD, environments, observability, procedures
│ ├── diagrams/
│ └── FINAL_report.md
├── 02_tasks/ — [JIRA-ID]_[name].md + _dependencies_table.md
├── 02_tasks/ — task workflow folders + _dependencies_table.md
│ ├── _dependencies_table.md — cross-task dependency graph (root level)
│ ├── backlog/ — parked tasks (not scheduled for implementation)
│ ├── todo/ — tasks ready for implementation
│ └── done/ — completed tasks (moved here by /implement)
├── 03_implementation/ — batch reports, FINAL report
├── 04_deploy/ — containerization, CI/CD, environments, observability, procedures, scripts
├── 04_refactoring/ — baseline, discovery, analysis, execution, hardening
@@ -208,4 +212,4 @@ _docs/
/decompose @_docs/02_document/components/03_parser/description.md
```
Appends tasks for that component to `_docs/02_tasks/` without running bootstrap or cross-verification.
Appends tasks for that component to `_docs/02_tasks/todo/` without running bootstrap or cross-verification.
+2 -2
View File
@@ -1,7 +1,7 @@
---
name: implementer
description: |
Implements a single task from its spec file. Use when implementing tasks from _docs/02_tasks/.
Implements a single task from its spec file. Use when implementing tasks from _docs/02_tasks/todo/.
Reads the task spec, analyzes the codebase, implements the feature with tests, and verifies acceptance criteria.
Launched by the /implement skill as a subagent.
category: build
@@ -13,7 +13,7 @@ You are a professional software developer implementing a single task.
## Input
You receive from the `/implement` orchestrator:
- Path to a task spec file (e.g., `_docs/02_tasks/[JIRA-ID]_[short_name].md`)
- Path to a task spec file (e.g., `_docs/02_tasks/todo/[JIRA-ID]_[short_name].md`)
- Files OWNED (exclusive write access — only you may modify these)
- Files READ-ONLY (shared interfaces, types — read but do not modify)
- Files FORBIDDEN (other agents' owned files — do not touch)
+7
View File
@@ -0,0 +1,7 @@
# Project Management
- This project uses **Jira ONLY** for work item tracking (NOT Azure DevOps)
- Jira project key: `AZ` (AZAION)
- Jira cloud ID: `1598226f-845f-4705-bcd1-5ed0c82d6119`
- Use the `user-Jira-MCP-Server` MCP server for all Jira operations
- Never use Azure DevOps MCP for this project's work items
@@ -44,23 +44,23 @@ This step applies when the codebase was documented via the `/document` skill. Te
---
**Step 3 — Decompose Tests**
Condition: `_docs/02_document/tests/traceability-matrix.md` exists AND workspace contains source code files AND the autopilot state shows Document was run AND (`_docs/02_tasks/` does not exist or has no task files)
Condition: `_docs/02_document/tests/traceability-matrix.md` exists AND workspace contains source code files AND the autopilot state shows Document was run AND (`_docs/02_tasks/todo/` does not exist or has no task files)
Action: Read and execute `.cursor/skills/decompose/SKILL.md` in **tests-only mode** (pass `_docs/02_document/tests/` as input). The decompose skill will:
1. Run Step 1t (test infrastructure bootstrap)
2. Run Step 3 (blackbox test task decomposition)
3. Run Step 4 (cross-verification against test coverage)
If `_docs/02_tasks/` has some task files already, the decompose skill's resumability handles it.
If `_docs/02_tasks/todo/` has some task files already, the decompose skill's resumability handles it.
---
**Step 4 — Implement Tests**
Condition: `_docs/02_tasks/` contains task files AND `_dependencies_table.md` exists AND the autopilot state shows Step 3 (Decompose Tests) is completed AND `_docs/03_implementation/FINAL_implementation_report.md` does not exist
Condition: `_docs/02_tasks/todo/` contains task files AND `_docs/02_tasks/_dependencies_table.md` exists AND the autopilot state shows Step 3 (Decompose Tests) is completed AND `_docs/03_implementation/FINAL_implementation_report.md` does not exist
Action: Read and execute `.cursor/skills/implement/SKILL.md`
The implement skill reads test tasks from `_docs/02_tasks/` and implements them.
The implement skill reads test tasks from `_docs/02_tasks/todo/` and implements them.
If `_docs/03_implementation/` has batch reports, the implement skill detects completed tasks and continues.
@@ -91,16 +91,16 @@ Condition: the autopilot state shows Step 6 (Refactor) is completed AND the auto
Action: Read and execute `.cursor/skills/new-task/SKILL.md`
The new-task skill interactively guides the user through defining new functionality. It loops until the user is done adding tasks. New task files are written to `_docs/02_tasks/`.
The new-task skill interactively guides the user through defining new functionality. It loops until the user is done adding tasks. New task files are written to `_docs/02_tasks/todo/`.
---
**Step 8 — Implement**
Condition: the autopilot state shows Step 7 (New Task) is completed AND `_docs/03_implementation/` does not contain a FINAL report covering the new tasks (check state for distinction between test implementation and feature implementation)
Condition: the autopilot state shows Step 7 (New Task) is completed AND `_docs/02_tasks/todo/` contains task files AND `_docs/03_implementation/` does not contain a FINAL report covering the new tasks (check state for distinction between test implementation and feature implementation)
Action: Read and execute `.cursor/skills/implement/SKILL.md`
The implement skill reads the new tasks from `_docs/02_tasks/` and implements them. Tasks already implemented in Step 4 are skipped (the implement skill tracks completed tasks in batch reports).
The implement skill reads the new tasks from `_docs/02_tasks/todo/` and implements them. Tasks already implemented in Step 4 are in `_docs/02_tasks/done/`.
If `_docs/03_implementation/` has batch reports from this phase, the implement skill detects completed tasks and continues.
+3 -3
View File
@@ -110,16 +110,16 @@ If the project IS a UI project → present using Choose format:
---
**Step 5 — Decompose**
Condition: `_docs/02_document/` contains `architecture.md` AND `_docs/02_document/components/` has at least one component AND `_docs/02_tasks/` does not exist or has no task files (excluding `_dependencies_table.md`)
Condition: `_docs/02_document/` contains `architecture.md` AND `_docs/02_document/components/` has at least one component AND `_docs/02_tasks/todo/` does not exist or has no task files
Action: Read and execute `.cursor/skills/decompose/SKILL.md`
If `_docs/02_tasks/` has some task files already, the decompose skill's resumability handles it.
If `_docs/02_tasks/todo/` has some task files already, the decompose skill's resumability handles it.
---
**Step 6 — Implement**
Condition: `_docs/02_tasks/` contains task files AND `_dependencies_table.md` exists AND `_docs/03_implementation/FINAL_implementation_report.md` does not exist
Condition: `_docs/02_tasks/todo/` contains task files AND `_docs/02_tasks/_dependencies_table.md` exists AND `_docs/03_implementation/FINAL_implementation_report.md` does not exist
Action: Read and execute `.cursor/skills/implement/SKILL.md`
+1 -1
View File
@@ -159,7 +159,7 @@ The `/implement` skill invokes this skill after each batch completes:
| Input | Type | Source | Required |
|-------|------|--------|----------|
| `task_specs` | list of file paths | Task `.md` files from `_docs/02_tasks/` for the current batch | Yes |
| `task_specs` | list of file paths | Task `.md` files from `_docs/02_tasks/todo/` for the current batch | Yes |
| `changed_files` | list of file paths | Files modified by implementer agents (from `git diff` or agent reports) | Yes |
| `batch_number` | integer | Current batch number (for report naming) | Yes |
| `project_restrictions` | file path | `_docs/00_problem/restrictions.md` | If exists |
+27 -17
View File
@@ -22,7 +22,7 @@ Decompose planned components into atomic, implementable task specs with a bootst
- **Atomic tasks**: each task does one thing; if it exceeds 5 complexity points, split it
- **Behavioral specs, not implementation plans**: describe what the system should do, not how to build it
- **Flat structure**: all tasks are Jira-ID-prefixed files in TASKS_DIR — no component subdirectories
- **Flat structure**: all tasks are Jira-ID-prefixed files in TASKS_DIR (`todo/`) — no component subdirectories within workflow folders
- **Save immediately**: write artifacts to disk after each task; never accumulate unsaved work
- **Jira inline**: create Jira ticket immediately after writing each task file
- **Ask, don't assume**: when requirements are ambiguous, ask the user before proceeding
@@ -34,20 +34,26 @@ Determine the operating mode based on invocation before any other logic runs.
**Default** (no explicit input file provided):
- DOCUMENT_DIR: `_docs/02_document/`
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/todo/`
- TASKS_ROOT: `_docs/02_tasks/`
- DEPS_TABLE: `_docs/02_tasks/_dependencies_table.md`
- Reads from: `_docs/00_problem/`, `_docs/01_solution/`, DOCUMENT_DIR
- Runs Step 1 (bootstrap) + Step 2 (all components) + Step 3 (blackbox tests) + Step 4 (cross-verification)
**Single component mode** (provided file is within `_docs/02_document/` and inside a `components/` subdirectory):
- DOCUMENT_DIR: `_docs/02_document/`
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/todo/`
- TASKS_ROOT: `_docs/02_tasks/`
- DEPS_TABLE: `_docs/02_tasks/_dependencies_table.md`
- Derive component number and component name from the file path
- Ask user for the parent Epic ID
- Runs Step 2 (that component only, appending to existing task numbering)
**Tests-only mode** (provided file/directory is within `tests/`, or `DOCUMENT_DIR/tests/` exists and input explicitly requests test decomposition):
- DOCUMENT_DIR: `_docs/02_document/`
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/todo/`
- TASKS_ROOT: `_docs/02_tasks/`
- DEPS_TABLE: `_docs/02_tasks/_dependencies_table.md`
- TESTS_DIR: `DOCUMENT_DIR/tests/`
- Reads from: `_docs/00_problem/`, `_docs/01_solution/`, TESTS_DIR
- Runs Step 1t (test infrastructure bootstrap) + Step 3 (blackbox test decomposition) + Step 4 (cross-verification against test coverage)
@@ -99,8 +105,8 @@ Announce the detected mode and resolved paths to the user before proceeding.
**Default:**
1. DOCUMENT_DIR contains `architecture.md` and `components/`**STOP if missing**
2. Create TASKS_DIR if it does not exist
3. If TASKS_DIR already contains task files, ask user: **resume from last checkpoint or start fresh?**
2. Create TASKS_ROOT subfolders (`todo/`, `backlog/`, `done/`) if they do not exist
3. If TASKS_DIR (`todo/`) already contains task files, ask user: **resume from last checkpoint or start fresh?**
**Single component mode:**
1. The provided component file exists and is non-empty — **STOP if missing**
@@ -108,22 +114,26 @@ Announce the detected mode and resolved paths to the user before proceeding.
**Tests-only mode:**
1. `TESTS_DIR/blackbox-tests.md` exists and is non-empty — **STOP if missing**
2. `TESTS_DIR/environment.md` exists — **STOP if missing**
3. Create TASKS_DIR if it does not exist
4. If TASKS_DIR already contains task files, ask user: **resume from last checkpoint or start fresh?**
3. Create TASKS_ROOT subfolders (`todo/`, `backlog/`, `done/`) if they do not exist
4. If TASKS_DIR (`todo/`) already contains task files, ask user: **resume from last checkpoint or start fresh?**
## Artifact Management
### Directory Structure
```
TASKS_DIR/
├── [JIRA-ID]_initial_structure.md
├── [JIRA-ID]_[short_name].md
├── [JIRA-ID]_[short_name].md
├── ...
└── _dependencies_table.md
_docs/02_tasks/
├── _dependencies_table.md
├── backlog/
├── todo/
│ ├── [JIRA-ID]_initial_structure.md
│ ├── [JIRA-ID]_[short_name].md
│ └── ...
└── done/
```
New task files are written to `todo/`. The `/implement` skill moves them to `done/` after successful implementation. Users can move tasks to `backlog/` to defer them.
**Naming convention**: Each task file is initially saved with a temporary numeric prefix (`[##]_[short_name].md`). After creating the Jira ticket, rename the file to use the Jira ticket ID as prefix (`[JIRA-ID]_[short_name].md`). For example: `01_initial_structure.md``AZ-42_initial_structure.md`.
### Save Timing
@@ -138,9 +148,9 @@ TASKS_DIR/
### Resumability
If TASKS_DIR already contains task files:
If task files already exist (in `todo/`, `backlog/`, or `done/`):
1. List existing `*_*.md` files (excluding `_dependencies_table.md`) and count them
1. List existing `*_*.md` files across all three subfolders (excluding `_dependencies_table.md`) and count them
2. Resume numbering from the next number (for temporary numeric prefix before Jira rename)
3. Inform the user which tasks already exist and are being skipped
@@ -342,7 +352,7 @@ Tests-only mode:
- **Cross-component tasks**: each task belongs to exactly one component
- **Skipping BLOCKING gates**: never proceed past a BLOCKING marker without user confirmation
- **Creating git branches**: branch creation is an implementation concern, not a decomposition one
- **Creating component subdirectories**: all tasks go flat in TASKS_DIR
- **Creating component subdirectories**: all tasks go flat in TASKS_DIR (`todo/`)
- **Forgetting Jira**: every task must have a Jira ticket created inline — do not defer to a separate step
- **Forgetting to rename**: after Jira ticket creation, always rename the file from numeric prefix to Jira ID prefix
+16 -7
View File
@@ -32,15 +32,18 @@ The `implementer` agent is the specialist that writes all the code — it receiv
## Context Resolution
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/todo/`
- DONE_DIR: `_docs/02_tasks/done/`
- BACKLOG_DIR: `_docs/02_tasks/backlog/`
- TASKS_ROOT: `_docs/02_tasks/`
- Task files: all `*.md` files in TASKS_DIR (excluding files starting with `_`)
- Dependency table: `TASKS_DIR/_dependencies_table.md`
- Dependency table: `TASKS_ROOT/_dependencies_table.md`
## Prerequisite Checks (BLOCKING)
1. TASKS_DIR exists and contains at least one task file — **STOP if missing**
2. `_dependencies_table.md` exists — **STOP if missing**
3. At least one task is not yet completed — **STOP if all done**
1. TASKS_DIR (`todo/`) exists and contains at least one task file — **STOP if missing**
2. `TASKS_ROOT/_dependencies_table.md` exists — **STOP if missing**
3. At least one task in TASKS_DIR is not yet completed — **STOP if all done** (already-completed tasks live in DONE_DIR)
## Algorithm
@@ -52,7 +55,8 @@ The `implementer` agent is the specialist that writes all the code — it receiv
### 2. Detect Progress
- Scan the codebase to determine which tasks are already completed
- Scan DONE_DIR to identify tasks that were already completed in previous runs
- Scan the codebase to determine which TASKS_DIR tasks are already completed
- Match implemented code against task acceptance criteria
- Mark completed tasks as done in the DAG
- Report progress to user: "X of Y tasks completed"
@@ -130,13 +134,18 @@ Track `auto_fix_attempts` count in the batch report for retrospective analysis.
- `git commit` with a message that includes ALL task IDs (Jira IDs, ADO IDs, or numeric prefixes) of tasks implemented in the batch, followed by a summary of what was implemented. Format: `[TASK-ID-1] [TASK-ID-2] ... Summary of changes`
- `git push` to the remote branch
### 11b. Move Completed Tasks to Done
- For each task in the batch that completed successfully, move its task spec file from TASKS_DIR (`todo/`) to DONE_DIR (`done/`)
- `git add` the moved files and amend the batch commit, or create a follow-up commit
### 12. Update Tracker Status → In Testing
After the batch is committed and pushed, transition the ticket status of each task in the batch to **In Testing** via the configured work item tracker. If `tracker: local`, skip this step.
### 13. Loop
- Go back to step 2 until all tasks are done
- Go back to step 2 until TASKS_DIR (`todo/`) is empty (all tasks moved to DONE_DIR)
- When all tasks are complete, report final summary
## Batch Report Persistence
+6 -3
View File
@@ -30,14 +30,17 @@ Guide the user through defining new functionality for an existing codebase. Prod
Fixed paths:
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/todo/`
- TASKS_ROOT: `_docs/02_tasks/`
- DONE_DIR: `_docs/02_tasks/done/`
- BACKLOG_DIR: `_docs/02_tasks/backlog/`
- PLANS_DIR: `_docs/02_task_plans/`
- DOCUMENT_DIR: `_docs/02_document/`
- DEPENDENCIES_TABLE: `_docs/02_tasks/_dependencies_table.md`
Create TASKS_DIR and PLANS_DIR if they don't exist.
Create TASKS_ROOT subfolders (`todo/`, `backlog/`, `done/`) and PLANS_DIR if they don't exist.
If TASKS_DIR already contains task files, scan them to determine the next numeric prefix for temporary file naming.
Scan all three subfolders (`todo/`, `backlog/`, `done/`) for existing task files to determine the next numeric prefix for temporary file naming.
## Workflow
+4 -1
View File
@@ -32,7 +32,10 @@ Fixed paths:
- IMPL_DIR: `_docs/03_implementation/`
- METRICS_DIR: `_docs/06_metrics/`
- TASKS_DIR: `_docs/02_tasks/`
- TASKS_DIR: `_docs/02_tasks/done/`
- TASKS_ROOT: `_docs/02_tasks/`
TASKS_DIR points to `done/` because retrospective analyzes completed work. To compute broader metrics (e.g., backlog size), also scan `TASKS_ROOT/backlog/` and `TASKS_ROOT/todo/`.
Announce the resolved paths to the user before proceeding.