mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 22:36:32 +00:00
22dd5db0d5
- SKILL.md: hub with frontmatter, principles, mode detection, file index (71 lines) - workflows/full.md: Full/Focus/Resume modes — Steps 0-7 (376 lines) - workflows/task.md: Task mode — incremental doc updates (90 lines) - references/artifacts.md: directory structure, state.json, resumability (70 lines) Made-with: Cursor
4.1 KiB
4.1 KiB
Document Skill — Task Mode Workflow
Lightweight, incremental documentation update triggered by task spec files. Updates only the docs affected by implemented tasks — does NOT redo full discovery, verification, or problem extraction.
Trigger
- User provides one or more task spec files (e.g.,
@_docs/02_tasks/done/AZ-173_*.md) - AND
_docs/02_document/already contains module/component docs
Accepts
One or more task spec files from _docs/02_tasks/todo/ or _docs/02_tasks/done/.
Steps
Task Step 0: Scope Analysis
- Read each task spec — extract the "Files Modified" or "Scope / Included" section to identify which source files were changed
- Map changed source files to existing module docs in
DOCUMENT_DIR/modules/ - Map affected modules to their parent components in
DOCUMENT_DIR/components/ - Identify which higher-level docs might be affected (system-flows, data_model, data_parameters)
Output: a list of docs to update, organized by level:
- Module docs (direct matches)
- Component docs (parents of affected modules)
- System-level docs (only if the task changed API endpoints, data models, or external integrations)
- Problem-level docs (only if the task changed input parameters, acceptance criteria, or restrictions)
Task Step 1: Module Doc Updates
For each affected module:
- Read the current source file
- Read the existing module doc
- Diff the module doc against current code — identify:
- New functions/methods/classes not in the doc
- Removed functions/methods/classes still in the doc
- Changed signatures or behavior
- New/removed dependencies
- New/removed external integrations
- Update the module doc in-place, preserving the existing structure and style
- If a module is entirely new (no existing doc), create a new module doc following the standard template from
workflows/full.mdStep 1
Task Step 2: Component Doc Updates
For each affected component:
- Read all module docs belonging to this component (including freshly updated ones)
- Read the existing component doc
- Update internal interfaces, dependency graphs, implementation details, and caveats sections
- Do NOT change the component's purpose, pattern, or high-level overview unless the task fundamentally changed it
Task Step 3: System-Level Doc Updates (conditional)
Only if the task changed API endpoints, system flows, data models, or external integrations:
- Update
system-flows.md— modify affected flow diagrams and data flow tables - Update
data_model.md— if entities changed - Update
architecture.md— only if new external integrations or architectural patterns were added
Task Step 4: Problem-Level Doc Updates (conditional)
Only if the task changed API input parameters, configuration, or acceptance criteria:
- Update
_docs/00_problem/input_data/data_parameters.md - Update
_docs/00_problem/acceptance_criteria.md— if new testable criteria emerged
Task Step 5: Summary
Present a summary of all docs updated:
══════════════════════════════════════
DOCUMENTATION UPDATE COMPLETE
══════════════════════════════════════
Task(s): [task IDs]
Module docs updated: [count]
Component docs updated: [count]
System-level docs updated: [list or "none"]
Problem-level docs updated: [list or "none"]
══════════════════════════════════════
Principles
- Minimal changes: only update what the task actually changed. Do not rewrite unaffected sections.
- Preserve style: match the existing doc's structure, tone, and level of detail.
- Verify against code: for every entity added or changed in a doc, confirm it exists in the current source.
- New modules: if the task introduced an entirely new source file, create a new module doc from the standard template.
- Dead references: if the task removed code, remove the corresponding doc entries. Do not keep stale references.