Les enseignants ont besoin de moyennes à jour immédiatement après la publication ou modification des notes, sans attendre un batch nocturne. Le système recalcule via Domain Events synchrones : statistiques d'évaluation (min/max/moyenne/médiane), moyennes matières pondérées (normalisation /20), et moyenne générale par élève. Les résultats sont stockés dans des tables dénormalisées avec cache Redis (TTL 5 min). Trois endpoints API exposent les données avec contrôle d'accès par rôle. Une commande console permet le backfill des données historiques au déploiement.
5.0 KiB
5.0 KiB
Document Project Workflow Router
Communicate all responses in {communication_language}
This router determines workflow mode and delegates to specialized sub-workflows
Check for existing state file at: {project_knowledge}/project-scan-report.json Read state file and extract: timestamps, mode, scan_level, current_step, completed_steps, project_classification Extract cached project_type_id(s) from state file if present Calculate age of state file (current time - last_updated)I found an in-progress workflow state from {{last_updated}}.
**Current Progress:**
- Mode: {{mode}}
- Scan Level: {{scan_level}}
- Completed Steps: {{completed_steps_count}}/{{total_steps}}
- Last Step: {{current_step}}
- Project Type(s): {{cached_project_types}}
Would you like to:
1. **Resume from where we left off** - Continue from step {{current_step}}
2. **Start fresh** - Archive old state and begin new scan
3. **Cancel** - Exit without changes
Your choice [1/2/3]:
Set resume_mode = true
Set workflow_mode = {{mode}}
Load findings summaries from state file
Load cached project_type_id(s) from state file
<critical>CONDITIONAL CSV LOADING FOR RESUME:</critical>
<action>For each cached project_type_id, load ONLY the corresponding row from: ./documentation-requirements.csv</action>
<action>Skip loading project-types.csv and architecture_registry.csv (not needed on resume)</action>
<action>Store loaded doc requirements for use in remaining steps</action>
<action>Display: "Resuming {{workflow_mode}} from {{current_step}} with cached project type(s): {{cached_project_types}}"</action>
<check if="workflow_mode == deep_dive">
<action>Read fully and follow: ./workflows/deep-dive-workflow.md with resume context</action>
</check>
<check if="workflow_mode == initial_scan OR workflow_mode == full_rescan">
<action>Read fully and follow: ./workflows/full-scan-workflow.md with resume context</action>
</check>
Create archive directory: {project_knowledge}/.archive/
Move old state file to: {project_knowledge}/.archive/project-scan-report-{{timestamp}}.json
Set resume_mode = false
Continue to Step 0.5
Display: "Exiting workflow without changes."
Exit workflow
Display: "Found old state file (>24 hours). Starting fresh scan."
Archive old state file to: {project_knowledge}/.archive/project-scan-report-{{timestamp}}.json
Set resume_mode = false
Continue to Step 0.5
Check if {project_knowledge}/index.md exists
Read existing index.md to extract metadata (date, project structure, parts count)
Store as {{existing_doc_date}}, {{existing_structure}}
I found existing documentation generated on {{existing_doc_date}}.
What would you like to do?
- Re-scan entire project - Update all documentation with latest changes
- Deep-dive into specific area - Generate detailed documentation for a particular feature/module/folder
- Cancel - Keep existing documentation as-is
Your choice [1/2/3]:
Set workflow_mode = "full_rescan" Display: "Starting full project rescan..." Read fully and follow: ./workflows/full-scan-workflow.md After sub-workflow completes, continue to Step 4 Set workflow_mode = "deep_dive" Set scan_level = "exhaustive" Display: "Starting deep-dive documentation mode..." Read fully and follow: ./workflows/deep-dive-workflow.md After sub-workflow completes, continue to Step 4 Display message: "Keeping existing documentation. Exiting workflow." Exit workflow Set workflow_mode = "initial_scan" Display: "No existing documentation found. Starting initial project scan..." Read fully and follow: ./workflows/full-scan-workflow.md After sub-workflow completes, continue to Step 4