aios-core 2.1.5 → 2.2.0
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.
- package/.aios-core/core/README.md +229 -229
- package/.aios-core/core/data/agent-config-requirements.yaml +368 -368
- package/.aios-core/core/data/aios-kb.md +923 -923
- package/.aios-core/core/data/workflow-patterns.yaml +267 -267
- package/.aios-core/core/docs/SHARD-TRANSLATION-GUIDE.md +335 -335
- package/.aios-core/core/docs/component-creation-guide.md +457 -457
- package/.aios-core/core/docs/session-update-pattern.md +307 -307
- package/.aios-core/core/docs/template-syntax.md +266 -266
- package/.aios-core/core/docs/troubleshooting-guide.md +624 -624
- package/.aios-core/core/elicitation/elicitation-engine.js +1 -1
- package/.aios-core/core/index.esm.js +42 -42
- package/.aios-core/core/index.js +1 -1
- package/.aios-core/core/migration/migration-config.yaml +83 -83
- package/.aios-core/core/migration/module-mapping.yaml +89 -89
- package/.aios-core/core/quality-gates/layer2-pr-automation.js +1 -1
- package/.aios-core/core/quality-gates/quality-gate-config.yaml +86 -86
- package/.aios-core/core/registry/README.md +179 -179
- package/.aios-core/core/utils/security-utils.js +1 -1
- package/.aios-core/core-config.yaml +391 -382
- package/.aios-core/data/agent-config-requirements.yaml +368 -368
- package/.aios-core/data/aios-kb.md +923 -923
- package/.aios-core/data/technical-preferences.md +3 -3
- package/.aios-core/data/workflow-patterns.yaml +267 -267
- package/.aios-core/development/README.md +142 -142
- package/.aios-core/development/agent-teams/team-all.yaml +15 -15
- package/.aios-core/development/agent-teams/team-fullstack.yaml +18 -18
- package/.aios-core/development/agent-teams/team-ide-minimal.yaml +10 -10
- package/.aios-core/development/agent-teams/team-no-ui.yaml +13 -13
- package/.aios-core/development/agent-teams/team-qa-focused.yaml +155 -155
- package/.aios-core/development/agents/aios-master.md +339 -339
- package/.aios-core/development/agents/analyst.md +195 -195
- package/.aios-core/development/agents/architect.md +359 -359
- package/.aios-core/development/agents/data-engineer.md +468 -468
- package/.aios-core/development/agents/dev.md +390 -390
- package/.aios-core/development/agents/devops.md +398 -398
- package/.aios-core/development/agents/pm.md +198 -198
- package/.aios-core/development/agents/po.md +256 -256
- package/.aios-core/development/agents/qa.md +312 -312
- package/.aios-core/development/agents/sm.md +220 -220
- package/.aios-core/development/agents/ux-design-expert.md +451 -451
- package/.aios-core/development/scripts/greeting-config-cli.js +85 -85
- package/.aios-core/development/tasks/add-mcp.md +319 -319
- package/.aios-core/development/tasks/advanced-elicitation.md +318 -318
- package/.aios-core/development/tasks/analyst-facilitate-brainstorming.md +341 -341
- package/.aios-core/development/tasks/analyze-brownfield.md +456 -0
- package/.aios-core/development/tasks/analyze-framework.md +696 -696
- package/.aios-core/development/tasks/analyze-performance.md +637 -637
- package/.aios-core/development/tasks/apply-qa-fixes.md +340 -340
- package/.aios-core/development/tasks/architect-analyze-impact.md +826 -826
- package/.aios-core/development/tasks/audit-codebase.md +429 -429
- package/.aios-core/development/tasks/audit-tailwind-config.md +270 -270
- package/.aios-core/development/tasks/audit-utilities.md +358 -358
- package/.aios-core/development/tasks/bootstrap-shadcn-library.md +286 -286
- package/.aios-core/development/tasks/brownfield-create-epic.md +485 -485
- package/.aios-core/development/tasks/brownfield-create-story.md +356 -356
- package/.aios-core/development/tasks/build-component.md +478 -478
- package/.aios-core/development/tasks/calculate-roi.md +455 -455
- package/.aios-core/development/tasks/ci-cd-configuration.md +764 -764
- package/.aios-core/development/tasks/cleanup-utilities.md +670 -670
- package/.aios-core/development/tasks/collaborative-edit.md +1108 -1108
- package/.aios-core/development/tasks/compose-molecule.md +284 -284
- package/.aios-core/development/tasks/consolidate-patterns.md +414 -414
- package/.aios-core/development/tasks/correct-course.md +279 -279
- package/.aios-core/development/tasks/create-agent.md +321 -321
- package/.aios-core/development/tasks/create-brownfield-story.md +726 -726
- package/.aios-core/development/tasks/create-deep-research-prompt.md +498 -498
- package/.aios-core/development/tasks/create-doc.md +316 -316
- package/.aios-core/development/tasks/create-next-story.md +774 -774
- package/.aios-core/development/tasks/create-suite.md +283 -283
- package/.aios-core/development/tasks/create-task.md +371 -371
- package/.aios-core/development/tasks/create-workflow.md +370 -370
- package/.aios-core/development/tasks/db-analyze-hotpaths.md +572 -572
- package/.aios-core/development/tasks/db-apply-migration.md +381 -381
- package/.aios-core/development/tasks/db-bootstrap.md +642 -642
- package/.aios-core/development/tasks/db-domain-modeling.md +693 -693
- package/.aios-core/development/tasks/db-dry-run.md +293 -293
- package/.aios-core/development/tasks/db-env-check.md +260 -260
- package/.aios-core/development/tasks/db-expansion-pack-integration.md +663 -663
- package/.aios-core/development/tasks/db-explain.md +631 -631
- package/.aios-core/development/tasks/db-impersonate.md +495 -495
- package/.aios-core/development/tasks/db-load-csv.md +593 -593
- package/.aios-core/development/tasks/db-policy-apply.md +653 -653
- package/.aios-core/development/tasks/db-rls-audit.md +411 -411
- package/.aios-core/development/tasks/db-rollback.md +739 -739
- package/.aios-core/development/tasks/db-run-sql.md +613 -613
- package/.aios-core/development/tasks/db-schema-audit.md +1011 -1011
- package/.aios-core/development/tasks/db-seed.md +390 -390
- package/.aios-core/development/tasks/db-smoke-test.md +351 -351
- package/.aios-core/development/tasks/db-snapshot.md +569 -569
- package/.aios-core/development/tasks/db-supabase-setup.md +712 -712
- package/.aios-core/development/tasks/db-verify-order.md +515 -515
- package/.aios-core/development/tasks/deprecate-component.md +956 -956
- package/.aios-core/development/tasks/dev-apply-qa-fixes.md +318 -318
- package/.aios-core/development/tasks/dev-backlog-debt.md +469 -469
- package/.aios-core/development/tasks/dev-develop-story.md +846 -846
- package/.aios-core/development/tasks/dev-improve-code-quality.md +872 -872
- package/.aios-core/development/tasks/dev-optimize-performance.md +1033 -1033
- package/.aios-core/development/tasks/dev-suggest-refactoring.md +870 -870
- package/.aios-core/development/tasks/dev-validate-next-story.md +348 -348
- package/.aios-core/development/tasks/document-project.md +552 -552
- package/.aios-core/development/tasks/environment-bootstrap.md +1311 -1311
- package/.aios-core/development/tasks/execute-checklist.md +301 -301
- package/.aios-core/development/tasks/export-design-tokens-dtcg.md +274 -274
- package/.aios-core/development/tasks/extend-pattern.md +269 -269
- package/.aios-core/development/tasks/extract-tokens.md +467 -467
- package/.aios-core/development/tasks/facilitate-brainstorming-session.md +518 -518
- package/.aios-core/development/tasks/generate-ai-frontend-prompt.md +260 -260
- package/.aios-core/development/tasks/generate-documentation.md +284 -284
- package/.aios-core/development/tasks/generate-migration-strategy.md +522 -522
- package/.aios-core/development/tasks/generate-shock-report.md +501 -501
- package/.aios-core/development/tasks/github-devops-github-pr-automation.md +427 -427
- package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +733 -733
- package/.aios-core/development/tasks/github-devops-repository-cleanup.md +374 -374
- package/.aios-core/development/tasks/github-devops-version-management.md +483 -483
- package/.aios-core/development/tasks/improve-self.md +822 -822
- package/.aios-core/development/tasks/index-docs.md +387 -387
- package/.aios-core/development/tasks/init-project-status.md +506 -506
- package/.aios-core/development/tasks/integrate-expansion-pack.md +314 -314
- package/.aios-core/development/tasks/kb-mode-interaction.md +283 -283
- package/.aios-core/development/tasks/learn-patterns.md +900 -900
- package/.aios-core/development/tasks/mcp-workflow.md +437 -437
- package/.aios-core/development/tasks/modify-agent.md +381 -381
- package/.aios-core/development/tasks/modify-task.md +424 -424
- package/.aios-core/development/tasks/modify-workflow.md +465 -465
- package/.aios-core/development/tasks/po-backlog-add.md +370 -370
- package/.aios-core/development/tasks/po-manage-story-backlog.md +523 -523
- package/.aios-core/development/tasks/po-pull-story-from-clickup.md +540 -540
- package/.aios-core/development/tasks/po-pull-story.md +316 -316
- package/.aios-core/development/tasks/po-stories-index.md +351 -351
- package/.aios-core/development/tasks/po-sync-story-to-clickup.md +457 -457
- package/.aios-core/development/tasks/po-sync-story.md +303 -303
- package/.aios-core/development/tasks/pr-automation.md +701 -701
- package/.aios-core/development/tasks/propose-modification.md +842 -842
- package/.aios-core/development/tasks/qa-backlog-add-followup.md +425 -425
- package/.aios-core/development/tasks/qa-gate.md +373 -373
- package/.aios-core/development/tasks/qa-generate-tests.md +1174 -1174
- package/.aios-core/development/tasks/qa-nfr-assess.md +557 -557
- package/.aios-core/development/tasks/qa-review-proposal.md +1157 -1157
- package/.aios-core/development/tasks/qa-review-story.md +682 -682
- package/.aios-core/development/tasks/qa-risk-profile.md +566 -566
- package/.aios-core/development/tasks/qa-run-tests.md +277 -277
- package/.aios-core/development/tasks/qa-test-design.md +387 -387
- package/.aios-core/development/tasks/qa-trace-requirements.md +476 -476
- package/.aios-core/development/tasks/release-management.md +723 -723
- package/.aios-core/development/tasks/security-audit.md +554 -554
- package/.aios-core/development/tasks/security-scan.md +790 -790
- package/.aios-core/development/tasks/setup-database.md +741 -741
- package/.aios-core/development/tasks/setup-design-system.md +462 -462
- package/.aios-core/development/tasks/setup-github.md +874 -874
- package/.aios-core/development/tasks/setup-llm-routing.md +1 -1
- package/.aios-core/development/tasks/setup-mcp-docker.md +584 -584
- package/.aios-core/development/tasks/setup-project-docs.md +440 -0
- package/.aios-core/development/tasks/shard-doc.md +537 -537
- package/.aios-core/development/tasks/sm-create-next-story.md +480 -480
- package/.aios-core/development/tasks/sync-documentation.md +864 -864
- package/.aios-core/development/tasks/tailwind-upgrade.md +294 -294
- package/.aios-core/development/tasks/test-as-user.md +621 -621
- package/.aios-core/development/tasks/test-validation-task.md +171 -171
- package/.aios-core/development/tasks/undo-last.md +346 -346
- package/.aios-core/development/tasks/update-manifest.md +409 -409
- package/.aios-core/development/tasks/ux-create-wireframe.md +617 -617
- package/.aios-core/development/tasks/ux-ds-scan-artifact.md +672 -672
- package/.aios-core/development/tasks/ux-user-research.md +559 -559
- package/.aios-core/development/tasks/validate-next-story.md +422 -422
- package/.aios-core/development/workflows/README.md +83 -83
- package/.aios-core/development/workflows/brownfield-fullstack.yaml +297 -297
- package/.aios-core/development/workflows/brownfield-service.yaml +187 -187
- package/.aios-core/development/workflows/brownfield-ui.yaml +197 -197
- package/.aios-core/development/workflows/greenfield-fullstack.yaml +333 -333
- package/.aios-core/development/workflows/greenfield-service.yaml +206 -206
- package/.aios-core/development/workflows/greenfield-ui.yaml +235 -235
- package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +335 -335
- package/.aios-core/docs/component-creation-guide.md +457 -457
- package/.aios-core/docs/session-update-pattern.md +307 -307
- package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +572 -572
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +185 -185
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +354 -354
- package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +1963 -1963
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +821 -821
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +1190 -1190
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +439 -439
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +1339 -1339
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +5398 -5398
- package/.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md +697 -697
- package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +511 -511
- package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +556 -556
- package/.aios-core/docs/standards/STANDARDS-INDEX.md +210 -210
- package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +550 -550
- package/.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md +1414 -1414
- package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +523 -523
- package/.aios-core/docs/template-syntax.md +266 -266
- package/.aios-core/docs/troubleshooting-guide.md +624 -624
- package/.aios-core/index.esm.js +15 -15
- package/.aios-core/index.js +1 -1
- package/.aios-core/infrastructure/README.md +126 -126
- package/.aios-core/infrastructure/integrations/pm-adapters/README.md +59 -59
- package/.aios-core/infrastructure/scripts/approval-workflow.js +1 -1
- package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
- package/.aios-core/infrastructure/scripts/component-generator.js +3 -3
- package/.aios-core/infrastructure/scripts/component-metadata.js +1 -1
- package/.aios-core/infrastructure/scripts/component-search.js +1 -1
- package/.aios-core/infrastructure/scripts/coverage-analyzer.js +1 -1
- package/.aios-core/infrastructure/scripts/dependency-analyzer.js +1 -1
- package/.aios-core/infrastructure/scripts/dependency-impact-analyzer.js +1 -1
- package/.aios-core/infrastructure/scripts/documentation-integrity/brownfield-analyzer.js +501 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/config-generator.js +368 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js +308 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js +331 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js +312 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/index.js +74 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js +389 -0
- package/.aios-core/infrastructure/scripts/framework-analyzer.js +1 -1
- package/.aios-core/infrastructure/scripts/improvement-engine.js +1 -1
- package/.aios-core/infrastructure/scripts/llm-routing/install-llm-routing.js +26 -13
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.cmd +127 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.sh +108 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.cmd +71 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.sh +65 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.cmd +51 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.sh +16 -0
- package/.aios-core/infrastructure/scripts/llm-routing/usage-tracker/index.js +549 -0
- package/.aios-core/infrastructure/scripts/modification-risk-assessment.js +1 -1
- package/.aios-core/infrastructure/scripts/performance-analyzer.js +1 -1
- package/.aios-core/infrastructure/scripts/pm-adapter.js +134 -134
- package/.aios-core/infrastructure/scripts/repository-detector.js +3 -3
- package/.aios-core/infrastructure/scripts/template-engine.js +1 -1
- package/.aios-core/infrastructure/scripts/template-validator.js +1 -1
- package/.aios-core/infrastructure/scripts/test-generator.js +1 -1
- package/.aios-core/infrastructure/scripts/test-quality-assessment.js +1 -1
- package/.aios-core/infrastructure/scripts/transaction-manager.js +1 -1
- package/.aios-core/infrastructure/scripts/usage-analytics.js +1 -1
- package/.aios-core/infrastructure/scripts/visual-impact-generator.js +2 -2
- package/.aios-core/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +176 -0
- package/.aios-core/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +127 -0
- package/.aios-core/infrastructure/templates/github-workflows/README.md +109 -109
- package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -0
- package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -0
- package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -0
- package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -0
- package/.aios-core/infrastructure/templates/project-docs/coding-standards-tmpl.md +346 -0
- package/.aios-core/infrastructure/templates/project-docs/source-tree-tmpl.md +177 -0
- package/.aios-core/infrastructure/templates/project-docs/tech-stack-tmpl.md +267 -0
- package/.aios-core/infrastructure/tests/regression-suite-v2.md +621 -621
- package/.aios-core/infrastructure/tools/README.md +222 -222
- package/.aios-core/infrastructure/tools/cli/github-cli.yaml +200 -200
- package/.aios-core/infrastructure/tools/cli/railway-cli.yaml +260 -260
- package/.aios-core/infrastructure/tools/cli/supabase-cli.yaml +224 -224
- package/.aios-core/infrastructure/tools/local/ffmpeg.yaml +261 -261
- package/.aios-core/infrastructure/tools/mcp/21st-dev-magic.yaml +127 -127
- package/.aios-core/infrastructure/tools/mcp/browser.yaml +103 -103
- package/.aios-core/infrastructure/tools/mcp/clickup.yaml +534 -534
- package/.aios-core/infrastructure/tools/mcp/context7.yaml +78 -78
- package/.aios-core/infrastructure/tools/mcp/desktop-commander.yaml +180 -180
- package/.aios-core/infrastructure/tools/mcp/exa.yaml +103 -103
- package/.aios-core/infrastructure/tools/mcp/google-workspace.yaml +930 -930
- package/.aios-core/infrastructure/tools/mcp/n8n.yaml +551 -551
- package/.aios-core/infrastructure/tools/mcp/supabase.yaml +808 -808
- package/.aios-core/install-manifest.yaml +347 -347
- package/.aios-core/product/README.md +56 -56
- package/.aios-core/product/checklists/accessibility-wcag-checklist.md +80 -0
- package/.aios-core/product/checklists/architect-checklist.md +443 -443
- package/.aios-core/product/checklists/change-checklist.md +182 -182
- package/.aios-core/product/checklists/component-quality-checklist.md +74 -0
- package/.aios-core/product/checklists/database-design-checklist.md +119 -119
- package/.aios-core/product/checklists/dba-predeploy-checklist.md +97 -97
- package/.aios-core/product/checklists/dba-rollback-checklist.md +99 -99
- package/.aios-core/product/checklists/migration-readiness-checklist.md +75 -0
- package/.aios-core/product/checklists/pattern-audit-checklist.md +88 -0
- package/.aios-core/product/checklists/pm-checklist.md +375 -375
- package/.aios-core/product/checklists/po-master-checklist.md +441 -441
- package/.aios-core/product/checklists/pre-push-checklist.md +108 -108
- package/.aios-core/product/checklists/release-checklist.md +122 -122
- package/.aios-core/product/checklists/story-dod-checklist.md +101 -101
- package/.aios-core/product/checklists/story-draft-checklist.md +215 -215
- package/.aios-core/product/data/atomic-design-principles.md +108 -0
- package/.aios-core/product/data/brainstorming-techniques.md +36 -36
- package/.aios-core/product/data/consolidation-algorithms.md +142 -0
- package/.aios-core/product/data/database-best-practices.md +182 -0
- package/.aios-core/product/data/design-token-best-practices.md +107 -0
- package/.aios-core/product/data/elicitation-methods.md +134 -134
- package/.aios-core/product/data/integration-patterns.md +207 -0
- package/.aios-core/product/data/migration-safety-guide.md +329 -0
- package/.aios-core/product/data/mode-selection-best-practices.md +471 -471
- package/.aios-core/product/data/postgres-tuning-guide.md +300 -0
- package/.aios-core/product/data/rls-security-patterns.md +333 -0
- package/.aios-core/product/data/roi-calculation-guide.md +142 -0
- package/.aios-core/product/data/supabase-patterns.md +330 -0
- package/.aios-core/product/data/test-levels-framework.md +148 -148
- package/.aios-core/product/data/test-priorities-matrix.md +174 -174
- package/.aios-core/product/data/wcag-compliance-guide.md +267 -0
- package/.aios-core/product/templates/1mcp-config.yaml +225 -225
- package/.aios-core/product/templates/activation-instructions-inline-greeting.yaml +63 -63
- package/.aios-core/product/templates/activation-instructions-template.md +258 -258
- package/.aios-core/product/templates/agent-template.yaml +120 -120
- package/.aios-core/product/templates/architecture-tmpl.yaml +650 -650
- package/.aios-core/product/templates/brainstorming-output-tmpl.yaml +155 -155
- package/.aios-core/product/templates/brownfield-architecture-tmpl.yaml +475 -475
- package/.aios-core/product/templates/brownfield-prd-tmpl.yaml +279 -279
- package/.aios-core/product/templates/changelog-template.md +134 -134
- package/.aios-core/product/templates/command-rationalization-matrix.md +152 -152
- package/.aios-core/product/templates/competitor-analysis-tmpl.yaml +292 -292
- package/.aios-core/product/templates/design-story-tmpl.yaml +587 -587
- package/.aios-core/product/templates/ds-artifact-analysis.md +70 -70
- package/.aios-core/product/templates/front-end-architecture-tmpl.yaml +205 -205
- package/.aios-core/product/templates/front-end-spec-tmpl.yaml +348 -348
- package/.aios-core/product/templates/fullstack-architecture-tmpl.yaml +804 -804
- package/.aios-core/product/templates/github-pr-template.md +67 -67
- package/.aios-core/product/templates/gordon-mcp.yaml +140 -140
- package/.aios-core/product/templates/ide-rules/antigravity-rules.md +115 -115
- package/.aios-core/product/templates/ide-rules/claude-rules.md +221 -221
- package/.aios-core/product/templates/ide-rules/cline-rules.md +84 -84
- package/.aios-core/product/templates/ide-rules/copilot-rules.md +92 -92
- package/.aios-core/product/templates/ide-rules/cursor-rules.md +115 -115
- package/.aios-core/product/templates/ide-rules/gemini-rules.md +85 -85
- package/.aios-core/product/templates/ide-rules/roo-rules.md +86 -86
- package/.aios-core/product/templates/ide-rules/trae-rules.md +104 -104
- package/.aios-core/product/templates/ide-rules/windsurf-rules.md +80 -80
- package/.aios-core/product/templates/index-strategy-tmpl.yaml +53 -53
- package/.aios-core/product/templates/market-research-tmpl.yaml +251 -251
- package/.aios-core/product/templates/mcp-workflow.js +271 -271
- package/.aios-core/product/templates/migration-plan-tmpl.yaml +1022 -1022
- package/.aios-core/product/templates/migration-strategy-tmpl.md +524 -524
- package/.aios-core/product/templates/personalized-agent-template.md +258 -258
- package/.aios-core/product/templates/personalized-checklist-template.md +340 -340
- package/.aios-core/product/templates/personalized-task-template-v2.md +905 -905
- package/.aios-core/product/templates/personalized-task-template.md +344 -344
- package/.aios-core/product/templates/personalized-template-file.yaml +322 -322
- package/.aios-core/product/templates/personalized-workflow-template.yaml +460 -460
- package/.aios-core/product/templates/prd-tmpl.yaml +201 -201
- package/.aios-core/product/templates/project-brief-tmpl.yaml +220 -220
- package/.aios-core/product/templates/qa-gate-tmpl.yaml +240 -240
- package/.aios-core/product/templates/rls-policies-tmpl.yaml +1203 -1203
- package/.aios-core/product/templates/schema-design-tmpl.yaml +428 -428
- package/.aios-core/product/templates/state-persistence-tmpl.yaml +219 -219
- package/.aios-core/product/templates/story-tmpl.yaml +331 -331
- package/.aios-core/product/templates/task-execution-report.md +495 -495
- package/.aios-core/product/templates/task-template.md +122 -122
- package/.aios-core/product/templates/token-exports-tailwind-tmpl.js +395 -395
- package/.aios-core/product/templates/tokens-schema-tmpl.yaml +305 -305
- package/.aios-core/product/templates/workflow-template.yaml +133 -133
- package/.aios-core/scripts/README.md +354 -354
- package/.aios-core/scripts/aios-doc-template.md +325 -325
- package/.aios-core/scripts/elicitation-engine.js +1 -1
- package/.aios-core/scripts/test-template-system.js +1 -1
- package/.aios-core/scripts/workflow-management.md +69 -69
- package/.aios-core/user-guide.md +1413 -1413
- package/.aios-core/working-in-the-brownfield.md +361 -361
- package/LICENSE +1 -1
- package/README.md +702 -703
- package/bin/aios-init-old.js +3 -3
- package/bin/aios-init-v4.js +1 -1
- package/bin/aios-init.backup-v1.1.4.js +1 -1
- package/bin/aios-init.js +3 -3
- package/bin/aios.js +279 -279
- package/bin/utils/install-errors.js +339 -339
- package/bin/utils/install-transaction.js +445 -445
- package/index.d.ts +18 -18
- package/index.esm.js +20 -20
- package/index.js +6 -6
- package/package.json +8 -10
- package/packages/installer/src/config/templates/env-template.js +27 -4
- package/packages/installer/src/detection/detect-project-type.js +81 -81
- package/packages/installer/src/wizard/wizard.js +185 -34
- package/packages/installer/tests/integration/environment-configuration.test.js +2 -1
- package/packages/installer/tests/integration/wizard-detection.test.js +8 -6
- package/packages/installer/tests/unit/env-template.test.js +11 -10
- package/src/config/ide-configs.js +1 -1
- package/src/wizard/feedback.js +2 -2
- package/src/wizard/index.js +1 -1
- package/src/wizard/validation/report-generator.js +1 -1
- package/src/wizard/validation/troubleshooting-system.js +13 -13
- package/.aios-core/development/tasks/validate-structure.md +0 -243
- package/.aios-core/infrastructure/scripts/_archived/final-todo-count.js +0 -122
- package/.aios-core/infrastructure/scripts/_archived/fix-yaml-formatting.js +0 -89
- package/.aios-core/infrastructure/scripts/_archived/migration-generator.js +0 -780
- package/.aios-core/infrastructure/scripts/_archived/migration-path-generator.js +0 -950
- package/.aios-core/infrastructure/scripts/_archived/phase2-entrada-saida-errors.js +0 -425
- package/.aios-core/infrastructure/scripts/_archived/phase2-spot-check.js +0 -132
- package/.aios-core/infrastructure/scripts/_archived/phase3-tools-scripts-validation.js +0 -381
- package/.aios-core/infrastructure/scripts/_archived/phase4-metadata-performance.js +0 -203
- package/.aios-core/infrastructure/scripts/_archived/test-yaml-parsing.js +0 -24
- package/.aios-core/infrastructure/scripts/_archived/verify-yaml-fix.js +0 -51
- package/.aios-core/infrastructure/scripts/source-tree-guardian/index.js +0 -375
- package/.aios-core/infrastructure/scripts/source-tree-guardian/manifest-generator.js +0 -410
- package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/naming-rules.yaml +0 -285
- package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/placement-rules.yaml +0 -262
- package/.aios-core/infrastructure/scripts/source-tree-guardian/validator.js +0 -468
- package/.aios-core/tasks/find-component.md.legacy +0 -391
- package/.aios-core/tasks/generate-commit-message.md.legacy +0 -426
- package/.aios-core/tasks/generate-migration.md.legacy +0 -382
- package/.aios-core/tasks/rollback-modification.md.legacy +0 -307
- package/.aios-core/tasks/update-tests.md.legacy +0 -283
|
@@ -1,905 +1,905 @@
|
|
|
1
|
-
# {Task Name}
|
|
2
|
-
|
|
3
|
-
**Task ID:** `{task-identifier}`
|
|
4
|
-
**Version:** {X.Y.Z}
|
|
5
|
-
**Status:** {Draft|Active|Deprecated}
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
{Brief description of what this task does and when to use it}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Execution Modes
|
|
16
|
-
|
|
17
|
-
**Choose your execution mode** (if applicable for this task):
|
|
18
|
-
|
|
19
|
-
### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
|
|
20
|
-
- Autonomous decision making with logging
|
|
21
|
-
- Minimal user interaction
|
|
22
|
-
- **Best for:** Experienced developers, simple tasks, time-sensitive work
|
|
23
|
-
|
|
24
|
-
### 2. Interactive Mode - Balanced, Educational (5-10 prompts) **[DEFAULT]**
|
|
25
|
-
- Explicit decision checkpoints
|
|
26
|
-
- Educational explanations
|
|
27
|
-
- **Best for:** Learning, complex decisions, collaborative work
|
|
28
|
-
|
|
29
|
-
### 3. Pre-Flight Planning - Comprehensive Upfront Planning
|
|
30
|
-
- Task analysis phase (identify all ambiguities)
|
|
31
|
-
- Questionnaire before execution
|
|
32
|
-
- Zero ambiguity execution
|
|
33
|
-
- **Best for:** Ambiguous requirements, critical work, team consensus needed
|
|
34
|
-
|
|
35
|
-
**Parameter:** `mode` (optional, default: `interactive`)
|
|
36
|
-
|
|
37
|
-
**Valid values:** `yolo`, `interactive`, `preflight`
|
|
38
|
-
|
|
39
|
-
**Note:** For simple, deterministic tasks (e.g., load config, validate schema), execution mode may not apply. Mode selection is most valuable for tasks involving creativity, decisions, or ambiguity.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Task Definition (AIOS Task Format V1.0)
|
|
44
|
-
|
|
45
|
-
```yaml
|
|
46
|
-
task: {taskIdentifier()}
|
|
47
|
-
responsável: {AgentName} # Agent executing this task (e.g., Dex, Quinn, Pax)
|
|
48
|
-
responsavel_type: Agente # Open-source: always "Agente" (Worker/Humano/Clone for services only)
|
|
49
|
-
atomic_layer: {Layer} # Atom|Molecule|Organism|Template|Page|Config|Strategy|Content|Media|Layout|Analysis (optional for open-source)
|
|
50
|
-
|
|
51
|
-
**Entrada:**
|
|
52
|
-
- campo: {fieldName}
|
|
53
|
-
tipo: {type} # string | number | boolean | array<type> | object { key: type }
|
|
54
|
-
origem: {source} # Step X ({stepName}) | User Input | config | {agent-id} output
|
|
55
|
-
obrigatório: {true|false}
|
|
56
|
-
padrão: {defaultValue} # Optional: default if not provided
|
|
57
|
-
validação: {validationRule} # Optional: validation logic
|
|
58
|
-
|
|
59
|
-
- campo: {fieldName2}
|
|
60
|
-
tipo: {type}
|
|
61
|
-
origem: {source}
|
|
62
|
-
obrigatório: {true|false}
|
|
63
|
-
|
|
64
|
-
**Saída:**
|
|
65
|
-
- campo: {fieldName}
|
|
66
|
-
tipo: {type}
|
|
67
|
-
destino: {destination} # Step Y ({stepName}) | state | output | multiple steps
|
|
68
|
-
persistido: {true|false} # Saved to file/DB or memory-only
|
|
69
|
-
cache_key: {key} # Optional: if cacheable
|
|
70
|
-
|
|
71
|
-
- campo: {fieldName2}
|
|
72
|
-
tipo: {type}
|
|
73
|
-
destino: {destination}
|
|
74
|
-
persistido: {true|false}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Pre-Conditions
|
|
80
|
-
|
|
81
|
-
**Purpose:** Validate prerequisites BEFORE task execution (blocking)
|
|
82
|
-
|
|
83
|
-
**Checklist:**
|
|
84
|
-
|
|
85
|
-
```yaml
|
|
86
|
-
pre-conditions:
|
|
87
|
-
- [ ] {condition_description}
|
|
88
|
-
tipo: pre-condition
|
|
89
|
-
blocker: true
|
|
90
|
-
validação: |
|
|
91
|
-
{executable_validation_logic}
|
|
92
|
-
error_message: "{message_if_fails}"
|
|
93
|
-
|
|
94
|
-
- [ ] {condition_description_2}
|
|
95
|
-
tipo: pre-condition
|
|
96
|
-
blocker: true
|
|
97
|
-
validação: "{simple_check}"
|
|
98
|
-
error_message: "{message}"
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Examples:**
|
|
102
|
-
|
|
103
|
-
```yaml
|
|
104
|
-
pre-conditions:
|
|
105
|
-
- [ ] Input file exists and is readable
|
|
106
|
-
tipo: pre-condition
|
|
107
|
-
blocker: true
|
|
108
|
-
validação: |
|
|
109
|
-
const fs = require('fs');
|
|
110
|
-
if (!fs.existsSync(inputPath)) {
|
|
111
|
-
throw new Error(`File not found: ${inputPath}`);
|
|
112
|
-
}
|
|
113
|
-
error_message: "Required input file not found"
|
|
114
|
-
|
|
115
|
-
- [ ] Agent has required tools available
|
|
116
|
-
tipo: pre-condition
|
|
117
|
-
blocker: true
|
|
118
|
-
validação: "expect(agent.tools).toContain('tool-name')"
|
|
119
|
-
error_message: "Agent missing required tool: tool-name"
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Workflow
|
|
125
|
-
|
|
126
|
-
### Mode: YOLO (Autonomous)
|
|
127
|
-
|
|
128
|
-
**Execution:**
|
|
129
|
-
1. Read task definition
|
|
130
|
-
2. Validate pre-conditions automatically
|
|
131
|
-
3. Execute workflow with autonomous decisions
|
|
132
|
-
4. Log all decisions to `.ai/decision-log-{task-id}.md`
|
|
133
|
-
5. Validate post-conditions automatically
|
|
134
|
-
6. Return standardized output
|
|
135
|
-
|
|
136
|
-
**Decision Logging:**
|
|
137
|
-
```markdown
|
|
138
|
-
## Decision: {Title}
|
|
139
|
-
**Context:** {What problem}
|
|
140
|
-
**Options:** [{Option A}, {Option B}]
|
|
141
|
-
**Selected:** {Option}
|
|
142
|
-
**Rationale:** {Why}
|
|
143
|
-
**Timestamp:** {ISO 8601}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
**User Prompts:** 0-1 (only if blocking issue)
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### Mode: Interactive (Balanced) **[DEFAULT]**
|
|
151
|
-
|
|
152
|
-
**Execution:**
|
|
153
|
-
1. Read task definition
|
|
154
|
-
2. Present summary to user
|
|
155
|
-
3. Validate pre-conditions with user
|
|
156
|
-
4. Execute workflow with decision checkpoints
|
|
157
|
-
5. Prompt user at each decision point
|
|
158
|
-
6. Explain options and trade-offs
|
|
159
|
-
7. Validate post-conditions with user
|
|
160
|
-
8. Return standardized output
|
|
161
|
-
|
|
162
|
-
**Decision Checkpoints:**
|
|
163
|
-
- {Decision point 1 description}
|
|
164
|
-
- {Decision point 2 description}
|
|
165
|
-
- {Decision point 3 description}
|
|
166
|
-
|
|
167
|
-
**Educational Explanations:**
|
|
168
|
-
- Before decision: Explain options and trade-offs
|
|
169
|
-
- After decision: Explain why it's a good fit
|
|
170
|
-
- During execution: Explain what's happening and why
|
|
171
|
-
|
|
172
|
-
**User Prompts:** 5-10
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
### Mode: Pre-Flight Planning (Comprehensive)
|
|
177
|
-
|
|
178
|
-
**Execution:**
|
|
179
|
-
1. **Analysis Phase:**
|
|
180
|
-
- Read task definition completely
|
|
181
|
-
- Identify ALL ambiguities and decision points
|
|
182
|
-
- Generate comprehensive questionnaire
|
|
183
|
-
|
|
184
|
-
2. **Questionnaire Phase:**
|
|
185
|
-
- Present all questions to user at once
|
|
186
|
-
- Collect all responses in batch
|
|
187
|
-
- Create detailed execution plan
|
|
188
|
-
|
|
189
|
-
3. **Approval Phase:**
|
|
190
|
-
- Present execution plan to user
|
|
191
|
-
- Wait for user confirmation
|
|
192
|
-
- Proceed only after approval
|
|
193
|
-
|
|
194
|
-
4. **Zero-Ambiguity Execution:**
|
|
195
|
-
- Execute with full context from questionnaire
|
|
196
|
-
- No additional decision points
|
|
197
|
-
- Validate all conditions
|
|
198
|
-
- Return standardized output
|
|
199
|
-
|
|
200
|
-
**User Prompts:** All upfront (questionnaire), then 0 during execution
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## Step-by-Step Execution
|
|
205
|
-
|
|
206
|
-
### Step 1: {Step Name}
|
|
207
|
-
|
|
208
|
-
**Purpose:** {What this step accomplishes}
|
|
209
|
-
|
|
210
|
-
**Actions:**
|
|
211
|
-
1. {Action 1}
|
|
212
|
-
2. {Action 2}
|
|
213
|
-
3. {Action 3}
|
|
214
|
-
|
|
215
|
-
**Validation:**
|
|
216
|
-
- {Validation check 1}
|
|
217
|
-
- {Validation check 2}
|
|
218
|
-
|
|
219
|
-
**Personality Injection (if applicable):**
|
|
220
|
-
|
|
221
|
-
```javascript
|
|
222
|
-
// Use agent's vocabulary and tone
|
|
223
|
-
const verb = selectFromVocabulary(agent.persona_profile.communication.vocabulary);
|
|
224
|
-
const statusMessage = generatePersonalizedStatus(agent.persona_profile.communication.tone, verb, result);
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Example status messages by archetype:**
|
|
228
|
-
- **Builder (Dex):** "✅ Implementei com sucesso. {detail}."
|
|
229
|
-
- **Guardian (Quinn):** "✅ Validado rigorosamente. {detail}."
|
|
230
|
-
- **Balancer (Pax):** "✅ Equilibrei todas as dependências. {detail}."
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Step 2: {Step Name}
|
|
235
|
-
|
|
236
|
-
{Continue with additional steps...}
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
## Post-Conditions
|
|
241
|
-
|
|
242
|
-
**Purpose:** Validate outputs AFTER task execution (blocking)
|
|
243
|
-
|
|
244
|
-
**Checklist:**
|
|
245
|
-
|
|
246
|
-
```yaml
|
|
247
|
-
post-conditions:
|
|
248
|
-
- [ ] {condition_description}
|
|
249
|
-
tipo: post-condition
|
|
250
|
-
blocker: true
|
|
251
|
-
validação: |
|
|
252
|
-
{executable_validation_logic}
|
|
253
|
-
rollback: {true|false} # Rollback changes if fails?
|
|
254
|
-
|
|
255
|
-
- [ ] {condition_description_2}
|
|
256
|
-
tipo: post-condition
|
|
257
|
-
blocker: true
|
|
258
|
-
validação: "{simple_check}"
|
|
259
|
-
rollback: false
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Examples:**
|
|
263
|
-
|
|
264
|
-
```yaml
|
|
265
|
-
post-conditions:
|
|
266
|
-
- [ ] Output matches expected schema
|
|
267
|
-
tipo: post-condition
|
|
268
|
-
blocker: true
|
|
269
|
-
validação: |
|
|
270
|
-
const schema = loadSchema('output-schema.json');
|
|
271
|
-
const valid = validateAgainstSchema(output, schema);
|
|
272
|
-
if (!valid) throw new Error("Schema validation failed");
|
|
273
|
-
rollback: false
|
|
274
|
-
|
|
275
|
-
- [ ] All required fields present in output
|
|
276
|
-
tipo: post-condition
|
|
277
|
-
blocker: true
|
|
278
|
-
validação: |
|
|
279
|
-
expect(output.field1).toBeDefined();
|
|
280
|
-
expect(output.field2).toBeDefined();
|
|
281
|
-
rollback: false
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## Acceptance Criteria
|
|
287
|
-
|
|
288
|
-
**Purpose:** Validate story requirements AFTER workflow (non-blocking, can be manual)
|
|
289
|
-
|
|
290
|
-
**Checklist:**
|
|
291
|
-
|
|
292
|
-
```yaml
|
|
293
|
-
acceptance-criteria:
|
|
294
|
-
- [ ] {criterion_description}
|
|
295
|
-
tipo: acceptance
|
|
296
|
-
blocker: false # Non-blocking
|
|
297
|
-
story: {STORY-XXX}
|
|
298
|
-
manual_check: {true|false}
|
|
299
|
-
test: {test_file_path} # If automated
|
|
300
|
-
|
|
301
|
-
- [ ] {criterion_description_2}
|
|
302
|
-
tipo: acceptance
|
|
303
|
-
blocker: false
|
|
304
|
-
story: {STORY-XXX}
|
|
305
|
-
manual_check: true
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
**Examples:**
|
|
309
|
-
|
|
310
|
-
```yaml
|
|
311
|
-
acceptance-criteria:
|
|
312
|
-
- [ ] Output is user-friendly and easy to understand
|
|
313
|
-
tipo: acceptance
|
|
314
|
-
blocker: false
|
|
315
|
-
story: STORY-6.1.2
|
|
316
|
-
manual_check: false
|
|
317
|
-
test: "tests/user-experience/output-clarity.test.js"
|
|
318
|
-
|
|
319
|
-
- [ ] Agent personality is recognizable in output
|
|
320
|
-
tipo: acceptance
|
|
321
|
-
blocker: false
|
|
322
|
-
story: STORY-6.1.2
|
|
323
|
-
manual_check: true
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
## Template (Optional)
|
|
329
|
-
|
|
330
|
-
**Purpose:** Reference template files for input/output schemas, prompts, or UI forms
|
|
331
|
-
|
|
332
|
-
```yaml
|
|
333
|
-
**Template:**
|
|
334
|
-
- path: {relativePath}
|
|
335
|
-
type: {input|output|prompt|ui|script}
|
|
336
|
-
version: {X.Y.Z}
|
|
337
|
-
variables: [{var1}, {var2}, {var3}]
|
|
338
|
-
schema: {schemaPath} # Optional: JSON Schema reference
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
**Examples:**
|
|
342
|
-
|
|
343
|
-
```yaml
|
|
344
|
-
**Template:**
|
|
345
|
-
- path: .aios-core/product/templates/task-execution-report.md
|
|
346
|
-
type: output
|
|
347
|
-
version: 1.0
|
|
348
|
-
variables: [agent_name, task_name, duration, tokens, status_message]
|
|
349
|
-
schema: schemas/task-execution-report.schema.json
|
|
350
|
-
|
|
351
|
-
- path: .aios-core/product/templates/story-tmpl.yaml
|
|
352
|
-
type: input
|
|
353
|
-
version: 2.1
|
|
354
|
-
variables: [story_id, title, description, acceptance_criteria]
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
359
|
-
## Tools (External/Shared)
|
|
360
|
-
|
|
361
|
-
**Purpose:** Catalog reusable tools used by multiple agents
|
|
362
|
-
|
|
363
|
-
**Definition:** Tools are external systems (MCPs, APIs, CLIs) or reusable scripts shared across agents.
|
|
364
|
-
|
|
365
|
-
```yaml
|
|
366
|
-
**Tools:**
|
|
367
|
-
- {tool_name}:
|
|
368
|
-
version: {X.Y.Z}
|
|
369
|
-
used_for: {description}
|
|
370
|
-
shared_with: [{agent1}, {agent2}, {agent3}]
|
|
371
|
-
cost: ${Y} per call # Optional: for cost tracking
|
|
372
|
-
cacheable: {true|false} # Optional
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
**Examples:**
|
|
376
|
-
|
|
377
|
-
```yaml
|
|
378
|
-
**Tools:**
|
|
379
|
-
- mcp-clickup:
|
|
380
|
-
version: 2.0
|
|
381
|
-
used_for: Task management integration
|
|
382
|
-
shared_with: [pm, po, sm]
|
|
383
|
-
cost: $0
|
|
384
|
-
|
|
385
|
-
- context7:
|
|
386
|
-
version: 1.0
|
|
387
|
-
used_for: Documentation lookup during development
|
|
388
|
-
shared_with: [dev, architect]
|
|
389
|
-
cost: $0.001 per query
|
|
390
|
-
cacheable: true
|
|
391
|
-
|
|
392
|
-
- exa:
|
|
393
|
-
version: 1.0
|
|
394
|
-
used_for: Web search for research and validation
|
|
395
|
-
shared_with: [analyst, architect, qa]
|
|
396
|
-
cost: $0.008 per search
|
|
397
|
-
cacheable: false
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
---
|
|
401
|
-
|
|
402
|
-
## Scripts (Agent-Specific)
|
|
403
|
-
|
|
404
|
-
**Purpose:** Reference custom scripts specific to this agent/task
|
|
405
|
-
|
|
406
|
-
**Definition:** Scripts are code files that are NOT reusable across agents (agent-specific logic).
|
|
407
|
-
|
|
408
|
-
```yaml
|
|
409
|
-
**Scripts:**
|
|
410
|
-
- {script_path}:
|
|
411
|
-
description: {what_it_does}
|
|
412
|
-
language: {javascript|python|bash|etc}
|
|
413
|
-
version: {X.Y.Z} # Optional
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
**Examples:**
|
|
417
|
-
|
|
418
|
-
```yaml
|
|
419
|
-
**Scripts:**
|
|
420
|
-
- .aios-core/scripts/dev-specific/test-runner.js:
|
|
421
|
-
description: Runs tests with coverage reporting specific to dev agent
|
|
422
|
-
language: javascript
|
|
423
|
-
version: 1.2.0
|
|
424
|
-
|
|
425
|
-
- .aios-core/scripts/qa-specific/regression-validator.js:
|
|
426
|
-
description: QA-specific regression validation logic
|
|
427
|
-
language: javascript
|
|
428
|
-
version: 2.0.0
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
---
|
|
432
|
-
|
|
433
|
-
## Performance Metrics
|
|
434
|
-
|
|
435
|
-
**Purpose:** Document expected performance for optimization
|
|
436
|
-
|
|
437
|
-
```yaml
|
|
438
|
-
**Performance:**
|
|
439
|
-
- duration_expected: {X}ms
|
|
440
|
-
- cost_estimated: ${Y} # For AI executors (token costs)
|
|
441
|
-
- cacheable: {true|false}
|
|
442
|
-
- cache_key: {identifier} # If cacheable
|
|
443
|
-
- parallelizable: {true|false}
|
|
444
|
-
- parallel_with: [{task1}, {task2}] # If parallelizable
|
|
445
|
-
- skippable_when: [{condition1}, {condition2}] # Optional: skip conditions
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
**Examples:**
|
|
449
|
-
|
|
450
|
-
```yaml
|
|
451
|
-
# AI-heavy task (expensive, slow)
|
|
452
|
-
**Performance:**
|
|
453
|
-
- duration_expected: 4000ms
|
|
454
|
-
- cost_estimated: $0.0025
|
|
455
|
-
- cacheable: false
|
|
456
|
-
- parallelizable: false
|
|
457
|
-
|
|
458
|
-
# Config load (fast, cacheable)
|
|
459
|
-
**Performance:**
|
|
460
|
-
- duration_expected: 100ms
|
|
461
|
-
- cost_estimated: $0
|
|
462
|
-
- cacheable: true
|
|
463
|
-
- cache_key: config_${format_id}_${brand_id}
|
|
464
|
-
- parallelizable: true
|
|
465
|
-
- parallel_with: [loadBrand]
|
|
466
|
-
|
|
467
|
-
# Conditional execution
|
|
468
|
-
**Performance:**
|
|
469
|
-
- duration_expected: 2000ms
|
|
470
|
-
- cost_estimated: $0.001
|
|
471
|
-
- cacheable: false
|
|
472
|
-
- parallelizable: false
|
|
473
|
-
- skippable_when: [ready_copy=true, template_id=provided]
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
---
|
|
477
|
-
|
|
478
|
-
## Error Handling
|
|
479
|
-
|
|
480
|
-
**Purpose:** Define error handling strategy for resilience
|
|
481
|
-
|
|
482
|
-
```yaml
|
|
483
|
-
**Error Handling:**
|
|
484
|
-
- strategy: {retry|fallback|abort}
|
|
485
|
-
- fallback: {description_or_value} # If strategy=fallback
|
|
486
|
-
- retry:
|
|
487
|
-
max_attempts: {N}
|
|
488
|
-
backoff: {linear|exponential}
|
|
489
|
-
backoff_ms: {initial_delay}
|
|
490
|
-
- abort_workflow: {true|false}
|
|
491
|
-
- notification: {log|email|slack|etc}
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
**Error Strategies:**
|
|
495
|
-
|
|
496
|
-
| Strategy | When to Use | Example |
|
|
497
|
-
|----------|-------------|---------|
|
|
498
|
-
| **retry** | Transient errors (API timeout, rate limit) | AI call failed with 429 |
|
|
499
|
-
| **fallback** | Recoverable errors (AI failed, use default) | Template not found → use default |
|
|
500
|
-
| **abort** | Critical errors (invalid input, missing dependency) | Required file not found → abort |
|
|
501
|
-
|
|
502
|
-
**Fallback Plans:**
|
|
503
|
-
|
|
504
|
-
### Missing Input
|
|
505
|
-
```yaml
|
|
506
|
-
**Error Handling:**
|
|
507
|
-
- strategy: fallback
|
|
508
|
-
- fallback: |
|
|
509
|
-
If user input missing:
|
|
510
|
-
1. Check for default values in config
|
|
511
|
-
2. Prompt user for missing input
|
|
512
|
-
3. If still missing, use task default values
|
|
513
|
-
- retry:
|
|
514
|
-
max_attempts: 1
|
|
515
|
-
backoff: linear
|
|
516
|
-
backoff_ms: 0
|
|
517
|
-
- abort_workflow: false
|
|
518
|
-
- notification: log
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### Missing Template
|
|
522
|
-
```yaml
|
|
523
|
-
**Error Handling:**
|
|
524
|
-
- strategy: fallback
|
|
525
|
-
- fallback: |
|
|
526
|
-
If template not found:
|
|
527
|
-
1. Check alternative template paths
|
|
528
|
-
2. Use generic template from .aios-core/product/templates/
|
|
529
|
-
3. If no generic template, create minimal output structure
|
|
530
|
-
- retry:
|
|
531
|
-
max_attempts: 2
|
|
532
|
-
backoff: linear
|
|
533
|
-
backoff_ms: 100
|
|
534
|
-
- abort_workflow: false
|
|
535
|
-
- notification: log + warn_user
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
### Missing Tool
|
|
539
|
-
```yaml
|
|
540
|
-
**Error Handling:**
|
|
541
|
-
- strategy: abort
|
|
542
|
-
- fallback: N/A (tool required for task)
|
|
543
|
-
- retry:
|
|
544
|
-
max_attempts: 1
|
|
545
|
-
backoff: linear
|
|
546
|
-
backoff_ms: 0
|
|
547
|
-
- abort_workflow: true
|
|
548
|
-
- notification: log + error_user
|
|
549
|
-
- error_message: |
|
|
550
|
-
{PERSONALITY_SLOT: agent_name} needs tool '{tool_name}' to complete this task.
|
|
551
|
-
|
|
552
|
-
**Examples:**
|
|
553
|
-
- Dex: "⚠️ Não consigo implementar sem a tool 'mcp-supabase'. Preciso dela pra continuar."
|
|
554
|
-
- Quinn: "⚠️ Ferramenta 'coderabbit' ausente. Não posso validar sem ela. Bloqueando task."
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
### Missing Data
|
|
558
|
-
```yaml
|
|
559
|
-
**Error Handling:**
|
|
560
|
-
- strategy: fallback
|
|
561
|
-
- fallback: |
|
|
562
|
-
If data file not found:
|
|
563
|
-
1. Check alternative data sources (.aios-core/data/)
|
|
564
|
-
2. Prompt user for manual data entry
|
|
565
|
-
3. Use minimal default data structure
|
|
566
|
-
- retry:
|
|
567
|
-
max_attempts: 1
|
|
568
|
-
backoff: linear
|
|
569
|
-
backoff_ms: 0
|
|
570
|
-
- abort_workflow: false
|
|
571
|
-
- notification: log + warn_user
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
### Checklist Failure
|
|
575
|
-
```yaml
|
|
576
|
-
**Error Handling:**
|
|
577
|
-
- strategy: retry
|
|
578
|
-
- fallback: Rollback to previous state if retry fails
|
|
579
|
-
- retry:
|
|
580
|
-
max_attempts: 3
|
|
581
|
-
backoff: exponential
|
|
582
|
-
backoff_ms: 500
|
|
583
|
-
- abort_workflow: {depends_on_blocker_flag} # true if blocker=true
|
|
584
|
-
- notification: log + error_user
|
|
585
|
-
- error_message: |
|
|
586
|
-
{PERSONALITY_SLOT: agent_name} detected validation failure:
|
|
587
|
-
- Failed check: {failed_check_description}
|
|
588
|
-
- Error: {validation_error_message}
|
|
589
|
-
|
|
590
|
-
**Examples:**
|
|
591
|
-
- Dex: "⚠️ Build falhou. Tentando novamente com cleanup antes..."
|
|
592
|
-
- Quinn: "⚠️ Post-condition falhou: output schema inválido. Bloqueando execução."
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
**Personalized Error Messages:**
|
|
596
|
-
|
|
597
|
-
```javascript
|
|
598
|
-
function generateErrorMessage(agent, errorType, errorDetails) {
|
|
599
|
-
const { archetype, tone, vocabulary } = agent.persona_profile.communication;
|
|
600
|
-
|
|
601
|
-
const templates = {
|
|
602
|
-
Builder: "⚠️ {verb} falhou. Vou debugar e reconstruir.",
|
|
603
|
-
Guardian: "⚠️ Validação falhou. Bloqueando até resolução.",
|
|
604
|
-
Balancer: "⚠️ Conflito detectado. Vou mediar e encontrar solução.",
|
|
605
|
-
Visionary: "⚠️ Planejamento interrompido. Preciso revisar estratégia.",
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
return templates[archetype] || "⚠️ Erro detectado. Aplicando fallback.";
|
|
609
|
-
}
|
|
610
|
-
```
|
|
611
|
-
|
|
612
|
-
---
|
|
613
|
-
|
|
614
|
-
## Metadata
|
|
615
|
-
|
|
616
|
-
**Purpose:** Link task to stories, versions, dependencies for traceability
|
|
617
|
-
|
|
618
|
-
```yaml
|
|
619
|
-
**Metadata:**
|
|
620
|
-
- story: {STORY-XXX}
|
|
621
|
-
- version: {X.Y.Z}
|
|
622
|
-
- dependencies: [{task1}, {task2}] # Other tasks this depends on
|
|
623
|
-
- breaking_changes: [{change1}, {change2}] # If version is breaking
|
|
624
|
-
- author: {name}
|
|
625
|
-
- created_at: {YYYY-MM-DD}
|
|
626
|
-
- updated_at: {YYYY-MM-DD}
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
**Example:**
|
|
630
|
-
|
|
631
|
-
```yaml
|
|
632
|
-
**Metadata:**
|
|
633
|
-
- story: STORY-6.1.2
|
|
634
|
-
- version: 2.0.0
|
|
635
|
-
- dependencies: [loadAgentPersona, validateVocabulary]
|
|
636
|
-
- breaking_changes:
|
|
637
|
-
- Output format changed: added persona_profile section
|
|
638
|
-
- Removed generic status messages
|
|
639
|
-
- author: Roundtable (Pedro, Brad, Seth, Dan)
|
|
640
|
-
- created_at: 2025-01-14
|
|
641
|
-
- updated_at: 2025-01-14
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
## Output Format (Standardized)
|
|
647
|
-
|
|
648
|
-
**CRITICAL:** All task outputs MUST follow this structure (see `AGENT-PERSONALIZATION-STANDARD-V1.md`):
|
|
649
|
-
|
|
650
|
-
```markdown
|
|
651
|
-
## 📊 Task Execution Report
|
|
652
|
-
|
|
653
|
-
**Agent:** {agent.name} ({agent.persona_profile.archetype})
|
|
654
|
-
**Task:** {task.name}
|
|
655
|
-
**Mode:** {execution_mode} # yolo | interactive | preflight
|
|
656
|
-
**Started:** {timestamp.start}
|
|
657
|
-
**Completed:** {timestamp.end}
|
|
658
|
-
**Duration:** {duration} ← ALWAYS LINE 7 (familiaridade)
|
|
659
|
-
**Tokens Used:** {tokens.total} total ← ALWAYS LINE 8 (familiaridade)
|
|
660
|
-
|
|
661
|
-
---
|
|
662
|
-
|
|
663
|
-
### Status
|
|
664
|
-
{status_icon} {PERSONALIZED_STATUS_MESSAGE} ← PERSONALITY SLOT
|
|
665
|
-
|
|
666
|
-
**Examples:**
|
|
667
|
-
- Dex: "✅ Implementei com sucesso. 3 componentes criados."
|
|
668
|
-
- Quinn: "✅ Validado rigorosamente. 47 edge cases testados."
|
|
669
|
-
- Pax: "✅ Equilibrei as dependências. Tudo alinhado."
|
|
670
|
-
|
|
671
|
-
### Output
|
|
672
|
-
{task_specific_content}
|
|
673
|
-
|
|
674
|
-
### Metrics ← ALWAYS LAST SECTION (familiaridade)
|
|
675
|
-
- Tests: {tests.passed}/{tests.total}
|
|
676
|
-
- Coverage: {coverage}%
|
|
677
|
-
- Linting: {lint.status}
|
|
678
|
-
- Pre-conditions: {pre.passed}/{pre.total}
|
|
679
|
-
- Post-conditions: {post.passed}/{post.total}
|
|
680
|
-
- {task_specific_metric}: {value}
|
|
681
|
-
|
|
682
|
-
---
|
|
683
|
-
{agent.persona_profile.signature_closing} ← PERSONALITY SLOT
|
|
684
|
-
```
|
|
685
|
-
|
|
686
|
-
**Personality Injection Points:**
|
|
687
|
-
1. Status message (use agent vocabulary)
|
|
688
|
-
2. Signature closing (agent signature)
|
|
689
|
-
3. Emoji selection (from archetype palette)
|
|
690
|
-
|
|
691
|
-
**Fixed Positions (NEVER change):**
|
|
692
|
-
1. Section order: Header → Status → Output → Metrics
|
|
693
|
-
2. Duration (line 7)
|
|
694
|
-
3. Tokens (line 8)
|
|
695
|
-
4. Metrics (always last section)
|
|
696
|
-
|
|
697
|
-
---
|
|
698
|
-
|
|
699
|
-
## Testing
|
|
700
|
-
|
|
701
|
-
### Unit Test Template
|
|
702
|
-
|
|
703
|
-
```javascript
|
|
704
|
-
// tests/tasks/{task-name}.test.js
|
|
705
|
-
|
|
706
|
-
describe('{Task Name}', () => {
|
|
707
|
-
describe('Pre-conditions', () => {
|
|
708
|
-
it('should validate all pre-conditions', () => {
|
|
709
|
-
const result = validatePreConditions(task, inputs);
|
|
710
|
-
expect(result.allPassed).toBe(true);
|
|
711
|
-
});
|
|
712
|
-
|
|
713
|
-
it('should block execution if pre-condition fails', () => {
|
|
714
|
-
const invalidInputs = { ...inputs, requiredField: null };
|
|
715
|
-
expect(() => executeTask(task, invalidInputs)).toThrow();
|
|
716
|
-
});
|
|
717
|
-
});
|
|
718
|
-
|
|
719
|
-
describe('Execution', () => {
|
|
720
|
-
it('should execute in YOLO mode autonomously', () => {
|
|
721
|
-
const result = executeTask(task, inputs, { mode: 'yolo' });
|
|
722
|
-
expect(result.status).toBe('success');
|
|
723
|
-
expect(result.decisionLog).toBeDefined();
|
|
724
|
-
});
|
|
725
|
-
|
|
726
|
-
it('should execute in Interactive mode with prompts', () => {
|
|
727
|
-
const result = executeTask(task, inputs, { mode: 'interactive' });
|
|
728
|
-
expect(result.userPrompts.length).toBeGreaterThan(0);
|
|
729
|
-
});
|
|
730
|
-
|
|
731
|
-
it('should execute in Pre-Flight mode with questionnaire', () => {
|
|
732
|
-
const result = executeTask(task, inputs, { mode: 'preflight' });
|
|
733
|
-
expect(result.questionnaire).toBeDefined();
|
|
734
|
-
expect(result.executionPlan).toBeDefined();
|
|
735
|
-
});
|
|
736
|
-
});
|
|
737
|
-
|
|
738
|
-
describe('Post-conditions', () => {
|
|
739
|
-
it('should validate all post-conditions', () => {
|
|
740
|
-
const result = executeTask(task, inputs);
|
|
741
|
-
const validation = validatePostConditions(task, result.output);
|
|
742
|
-
expect(validation.allPassed).toBe(true);
|
|
743
|
-
});
|
|
744
|
-
|
|
745
|
-
it('should rollback if post-condition fails and rollback=true', () => {
|
|
746
|
-
// Mock failure
|
|
747
|
-
const result = executeTaskWithMockedFailure(task);
|
|
748
|
-
expect(result.rolledBack).toBe(true);
|
|
749
|
-
});
|
|
750
|
-
});
|
|
751
|
-
|
|
752
|
-
describe('Output', () => {
|
|
753
|
-
it('should generate standardized output', () => {
|
|
754
|
-
const result = executeTask(task, inputs);
|
|
755
|
-
|
|
756
|
-
// Validate fixed structure
|
|
757
|
-
expect(result.output).toContain('## 📊 Task Execution Report');
|
|
758
|
-
expect(result.output).toContain('**Duration:**');
|
|
759
|
-
expect(result.output).toContain('**Tokens Used:**');
|
|
760
|
-
expect(result.output).toContain('### Status');
|
|
761
|
-
expect(result.output).toContain('### Metrics');
|
|
762
|
-
});
|
|
763
|
-
|
|
764
|
-
it('should inject agent personality', () => {
|
|
765
|
-
const agent = loadAgent('dev');
|
|
766
|
-
const result = executeTask(task, inputs, { agent });
|
|
767
|
-
|
|
768
|
-
expect(result.output).toContain(agent.persona_profile.signature_closing);
|
|
769
|
-
|
|
770
|
-
const hasVocabularyWord = agent.persona_profile.communication.vocabulary
|
|
771
|
-
.some(word => result.statusMessage.includes(word));
|
|
772
|
-
expect(hasVocabularyWord).toBe(true);
|
|
773
|
-
});
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
describe('Error Handling', () => {
|
|
777
|
-
it('should retry on transient errors', () => {
|
|
778
|
-
const mockedError = new Error('Transient error');
|
|
779
|
-
const result = executeTaskWithMockedError(task, mockedError, { strategy: 'retry' });
|
|
780
|
-
expect(result.retryCount).toBeGreaterThan(0);
|
|
781
|
-
expect(result.status).toBe('success');
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
it('should fallback on recoverable errors', () => {
|
|
785
|
-
const result = executeTaskWithMissingTemplate(task);
|
|
786
|
-
expect(result.usedFallback).toBe(true);
|
|
787
|
-
expect(result.status).toBe('success');
|
|
788
|
-
});
|
|
789
|
-
|
|
790
|
-
it('should abort on critical errors', () => {
|
|
791
|
-
const result = executeTaskWithMissingRequiredInput(task);
|
|
792
|
-
expect(result.status).toBe('aborted');
|
|
793
|
-
expect(result.workflowAborted).toBe(true);
|
|
794
|
-
});
|
|
795
|
-
});
|
|
796
|
-
|
|
797
|
-
describe('Performance', () => {
|
|
798
|
-
it('should complete within expected duration', async () => {
|
|
799
|
-
const start = Date.now();
|
|
800
|
-
await executeTask(task, inputs);
|
|
801
|
-
const duration = Date.now() - start;
|
|
802
|
-
|
|
803
|
-
expect(duration).toBeLessThan(task.performance.duration_expected * 1.5);
|
|
804
|
-
});
|
|
805
|
-
|
|
806
|
-
it('should use cache when available', () => {
|
|
807
|
-
const result1 = executeTask(task, inputs);
|
|
808
|
-
const result2 = executeTask(task, inputs); // Should use cache
|
|
809
|
-
|
|
810
|
-
if (task.performance.cacheable) {
|
|
811
|
-
expect(result2.usedCache).toBe(true);
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
});
|
|
815
|
-
});
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
---
|
|
819
|
-
|
|
820
|
-
## Examples
|
|
821
|
-
|
|
822
|
-
### Example 1: Simple Deterministic Task (No Mode Selection)
|
|
823
|
-
|
|
824
|
-
**Task:** Load configuration file
|
|
825
|
-
|
|
826
|
-
```yaml
|
|
827
|
-
task: loadConfig()
|
|
828
|
-
responsável: System Loader
|
|
829
|
-
responsavel_type: Agente
|
|
830
|
-
atomic_layer: Config
|
|
831
|
-
|
|
832
|
-
**Entrada:**
|
|
833
|
-
- campo: config_path
|
|
834
|
-
tipo: string
|
|
835
|
-
origem: User Input
|
|
836
|
-
obrigatório: true
|
|
837
|
-
|
|
838
|
-
**Saída:**
|
|
839
|
-
- campo: config
|
|
840
|
-
tipo: object
|
|
841
|
-
destino: state
|
|
842
|
-
persistido: false
|
|
843
|
-
|
|
844
|
-
**Performance:**
|
|
845
|
-
- duration_expected: 50ms
|
|
846
|
-
- cost_estimated: $0
|
|
847
|
-
- cacheable: true
|
|
848
|
-
|
|
849
|
-
**Note:** Execution mode not applicable (deterministic, no decisions)
|
|
850
|
-
```
|
|
851
|
-
|
|
852
|
-
---
|
|
853
|
-
|
|
854
|
-
### Example 2: Complex Creative Task (Mode Selection Applicable)
|
|
855
|
-
|
|
856
|
-
**Task:** Design UI Component
|
|
857
|
-
|
|
858
|
-
```yaml
|
|
859
|
-
task: designComponent()
|
|
860
|
-
responsável: Uma (Empathizer)
|
|
861
|
-
responsavel_type: Agente
|
|
862
|
-
atomic_layer: Molecule
|
|
863
|
-
|
|
864
|
-
**Entrada:**
|
|
865
|
-
- campo: componentSpec
|
|
866
|
-
tipo: object
|
|
867
|
-
origem: User Input
|
|
868
|
-
obrigatório: true
|
|
869
|
-
|
|
870
|
-
**Saída:**
|
|
871
|
-
- campo: componentDesign
|
|
872
|
-
tipo: object
|
|
873
|
-
destino: state
|
|
874
|
-
persistido: true
|
|
875
|
-
|
|
876
|
-
**Performance:**
|
|
877
|
-
- duration_expected: 4000ms
|
|
878
|
-
- cost_estimated: $0.0025
|
|
879
|
-
- cacheable: false
|
|
880
|
-
|
|
881
|
-
**Execution Modes:**
|
|
882
|
-
- YOLO: Auto-generate based on best practices
|
|
883
|
-
- Interactive: Ask user for design preferences at 5 decision points
|
|
884
|
-
- Pre-Flight: Complete questionnaire about brand, audience, goals before designing
|
|
885
|
-
|
|
886
|
-
**Note:** Mode selection highly valuable (creative, subjective decisions)
|
|
887
|
-
```
|
|
888
|
-
|
|
889
|
-
---
|
|
890
|
-
|
|
891
|
-
## Notes
|
|
892
|
-
|
|
893
|
-
- **CRITICAL:** Follow AIOS Task Format Specification V1.0 exactly
|
|
894
|
-
- **CRITICAL:** All outputs use standardized template (familiaridade = produtividade)
|
|
895
|
-
- **CRITICAL:** Track duration and tokens for all executions
|
|
896
|
-
- **CRITICAL:** Use agent's vocabulary and tone consistently
|
|
897
|
-
- See `.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md` for complete spec
|
|
898
|
-
- See `.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md` for personality guidelines
|
|
899
|
-
|
|
900
|
-
---
|
|
901
|
-
|
|
902
|
-
**Template Version:** 2.0
|
|
903
|
-
**Last Updated:** 2025-01-14
|
|
904
|
-
**Applies to:** All tasks with AIOS Task Format V1.0 + Personalized Agents (Story 6.1.2+)
|
|
905
|
-
**Breaking Changes:** Yes (from v1.0 - added execution modes, restructured checklist)
|
|
1
|
+
# {Task Name}
|
|
2
|
+
|
|
3
|
+
**Task ID:** `{task-identifier}`
|
|
4
|
+
**Version:** {X.Y.Z}
|
|
5
|
+
**Status:** {Draft|Active|Deprecated}
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
{Brief description of what this task does and when to use it}
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Execution Modes
|
|
16
|
+
|
|
17
|
+
**Choose your execution mode** (if applicable for this task):
|
|
18
|
+
|
|
19
|
+
### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
|
|
20
|
+
- Autonomous decision making with logging
|
|
21
|
+
- Minimal user interaction
|
|
22
|
+
- **Best for:** Experienced developers, simple tasks, time-sensitive work
|
|
23
|
+
|
|
24
|
+
### 2. Interactive Mode - Balanced, Educational (5-10 prompts) **[DEFAULT]**
|
|
25
|
+
- Explicit decision checkpoints
|
|
26
|
+
- Educational explanations
|
|
27
|
+
- **Best for:** Learning, complex decisions, collaborative work
|
|
28
|
+
|
|
29
|
+
### 3. Pre-Flight Planning - Comprehensive Upfront Planning
|
|
30
|
+
- Task analysis phase (identify all ambiguities)
|
|
31
|
+
- Questionnaire before execution
|
|
32
|
+
- Zero ambiguity execution
|
|
33
|
+
- **Best for:** Ambiguous requirements, critical work, team consensus needed
|
|
34
|
+
|
|
35
|
+
**Parameter:** `mode` (optional, default: `interactive`)
|
|
36
|
+
|
|
37
|
+
**Valid values:** `yolo`, `interactive`, `preflight`
|
|
38
|
+
|
|
39
|
+
**Note:** For simple, deterministic tasks (e.g., load config, validate schema), execution mode may not apply. Mode selection is most valuable for tasks involving creativity, decisions, or ambiguity.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Task Definition (AIOS Task Format V1.0)
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
task: {taskIdentifier()}
|
|
47
|
+
responsável: {AgentName} # Agent executing this task (e.g., Dex, Quinn, Pax)
|
|
48
|
+
responsavel_type: Agente # Open-source: always "Agente" (Worker/Humano/Clone for services only)
|
|
49
|
+
atomic_layer: {Layer} # Atom|Molecule|Organism|Template|Page|Config|Strategy|Content|Media|Layout|Analysis (optional for open-source)
|
|
50
|
+
|
|
51
|
+
**Entrada:**
|
|
52
|
+
- campo: {fieldName}
|
|
53
|
+
tipo: {type} # string | number | boolean | array<type> | object { key: type }
|
|
54
|
+
origem: {source} # Step X ({stepName}) | User Input | config | {agent-id} output
|
|
55
|
+
obrigatório: {true|false}
|
|
56
|
+
padrão: {defaultValue} # Optional: default if not provided
|
|
57
|
+
validação: {validationRule} # Optional: validation logic
|
|
58
|
+
|
|
59
|
+
- campo: {fieldName2}
|
|
60
|
+
tipo: {type}
|
|
61
|
+
origem: {source}
|
|
62
|
+
obrigatório: {true|false}
|
|
63
|
+
|
|
64
|
+
**Saída:**
|
|
65
|
+
- campo: {fieldName}
|
|
66
|
+
tipo: {type}
|
|
67
|
+
destino: {destination} # Step Y ({stepName}) | state | output | multiple steps
|
|
68
|
+
persistido: {true|false} # Saved to file/DB or memory-only
|
|
69
|
+
cache_key: {key} # Optional: if cacheable
|
|
70
|
+
|
|
71
|
+
- campo: {fieldName2}
|
|
72
|
+
tipo: {type}
|
|
73
|
+
destino: {destination}
|
|
74
|
+
persistido: {true|false}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Pre-Conditions
|
|
80
|
+
|
|
81
|
+
**Purpose:** Validate prerequisites BEFORE task execution (blocking)
|
|
82
|
+
|
|
83
|
+
**Checklist:**
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
pre-conditions:
|
|
87
|
+
- [ ] {condition_description}
|
|
88
|
+
tipo: pre-condition
|
|
89
|
+
blocker: true
|
|
90
|
+
validação: |
|
|
91
|
+
{executable_validation_logic}
|
|
92
|
+
error_message: "{message_if_fails}"
|
|
93
|
+
|
|
94
|
+
- [ ] {condition_description_2}
|
|
95
|
+
tipo: pre-condition
|
|
96
|
+
blocker: true
|
|
97
|
+
validação: "{simple_check}"
|
|
98
|
+
error_message: "{message}"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Examples:**
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
pre-conditions:
|
|
105
|
+
- [ ] Input file exists and is readable
|
|
106
|
+
tipo: pre-condition
|
|
107
|
+
blocker: true
|
|
108
|
+
validação: |
|
|
109
|
+
const fs = require('fs');
|
|
110
|
+
if (!fs.existsSync(inputPath)) {
|
|
111
|
+
throw new Error(`File not found: ${inputPath}`);
|
|
112
|
+
}
|
|
113
|
+
error_message: "Required input file not found"
|
|
114
|
+
|
|
115
|
+
- [ ] Agent has required tools available
|
|
116
|
+
tipo: pre-condition
|
|
117
|
+
blocker: true
|
|
118
|
+
validação: "expect(agent.tools).toContain('tool-name')"
|
|
119
|
+
error_message: "Agent missing required tool: tool-name"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Workflow
|
|
125
|
+
|
|
126
|
+
### Mode: YOLO (Autonomous)
|
|
127
|
+
|
|
128
|
+
**Execution:**
|
|
129
|
+
1. Read task definition
|
|
130
|
+
2. Validate pre-conditions automatically
|
|
131
|
+
3. Execute workflow with autonomous decisions
|
|
132
|
+
4. Log all decisions to `.ai/decision-log-{task-id}.md`
|
|
133
|
+
5. Validate post-conditions automatically
|
|
134
|
+
6. Return standardized output
|
|
135
|
+
|
|
136
|
+
**Decision Logging:**
|
|
137
|
+
```markdown
|
|
138
|
+
## Decision: {Title}
|
|
139
|
+
**Context:** {What problem}
|
|
140
|
+
**Options:** [{Option A}, {Option B}]
|
|
141
|
+
**Selected:** {Option}
|
|
142
|
+
**Rationale:** {Why}
|
|
143
|
+
**Timestamp:** {ISO 8601}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**User Prompts:** 0-1 (only if blocking issue)
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### Mode: Interactive (Balanced) **[DEFAULT]**
|
|
151
|
+
|
|
152
|
+
**Execution:**
|
|
153
|
+
1. Read task definition
|
|
154
|
+
2. Present summary to user
|
|
155
|
+
3. Validate pre-conditions with user
|
|
156
|
+
4. Execute workflow with decision checkpoints
|
|
157
|
+
5. Prompt user at each decision point
|
|
158
|
+
6. Explain options and trade-offs
|
|
159
|
+
7. Validate post-conditions with user
|
|
160
|
+
8. Return standardized output
|
|
161
|
+
|
|
162
|
+
**Decision Checkpoints:**
|
|
163
|
+
- {Decision point 1 description}
|
|
164
|
+
- {Decision point 2 description}
|
|
165
|
+
- {Decision point 3 description}
|
|
166
|
+
|
|
167
|
+
**Educational Explanations:**
|
|
168
|
+
- Before decision: Explain options and trade-offs
|
|
169
|
+
- After decision: Explain why it's a good fit
|
|
170
|
+
- During execution: Explain what's happening and why
|
|
171
|
+
|
|
172
|
+
**User Prompts:** 5-10
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Mode: Pre-Flight Planning (Comprehensive)
|
|
177
|
+
|
|
178
|
+
**Execution:**
|
|
179
|
+
1. **Analysis Phase:**
|
|
180
|
+
- Read task definition completely
|
|
181
|
+
- Identify ALL ambiguities and decision points
|
|
182
|
+
- Generate comprehensive questionnaire
|
|
183
|
+
|
|
184
|
+
2. **Questionnaire Phase:**
|
|
185
|
+
- Present all questions to user at once
|
|
186
|
+
- Collect all responses in batch
|
|
187
|
+
- Create detailed execution plan
|
|
188
|
+
|
|
189
|
+
3. **Approval Phase:**
|
|
190
|
+
- Present execution plan to user
|
|
191
|
+
- Wait for user confirmation
|
|
192
|
+
- Proceed only after approval
|
|
193
|
+
|
|
194
|
+
4. **Zero-Ambiguity Execution:**
|
|
195
|
+
- Execute with full context from questionnaire
|
|
196
|
+
- No additional decision points
|
|
197
|
+
- Validate all conditions
|
|
198
|
+
- Return standardized output
|
|
199
|
+
|
|
200
|
+
**User Prompts:** All upfront (questionnaire), then 0 during execution
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Step-by-Step Execution
|
|
205
|
+
|
|
206
|
+
### Step 1: {Step Name}
|
|
207
|
+
|
|
208
|
+
**Purpose:** {What this step accomplishes}
|
|
209
|
+
|
|
210
|
+
**Actions:**
|
|
211
|
+
1. {Action 1}
|
|
212
|
+
2. {Action 2}
|
|
213
|
+
3. {Action 3}
|
|
214
|
+
|
|
215
|
+
**Validation:**
|
|
216
|
+
- {Validation check 1}
|
|
217
|
+
- {Validation check 2}
|
|
218
|
+
|
|
219
|
+
**Personality Injection (if applicable):**
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
// Use agent's vocabulary and tone
|
|
223
|
+
const verb = selectFromVocabulary(agent.persona_profile.communication.vocabulary);
|
|
224
|
+
const statusMessage = generatePersonalizedStatus(agent.persona_profile.communication.tone, verb, result);
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Example status messages by archetype:**
|
|
228
|
+
- **Builder (Dex):** "✅ Implementei com sucesso. {detail}."
|
|
229
|
+
- **Guardian (Quinn):** "✅ Validado rigorosamente. {detail}."
|
|
230
|
+
- **Balancer (Pax):** "✅ Equilibrei todas as dependências. {detail}."
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Step 2: {Step Name}
|
|
235
|
+
|
|
236
|
+
{Continue with additional steps...}
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Post-Conditions
|
|
241
|
+
|
|
242
|
+
**Purpose:** Validate outputs AFTER task execution (blocking)
|
|
243
|
+
|
|
244
|
+
**Checklist:**
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
post-conditions:
|
|
248
|
+
- [ ] {condition_description}
|
|
249
|
+
tipo: post-condition
|
|
250
|
+
blocker: true
|
|
251
|
+
validação: |
|
|
252
|
+
{executable_validation_logic}
|
|
253
|
+
rollback: {true|false} # Rollback changes if fails?
|
|
254
|
+
|
|
255
|
+
- [ ] {condition_description_2}
|
|
256
|
+
tipo: post-condition
|
|
257
|
+
blocker: true
|
|
258
|
+
validação: "{simple_check}"
|
|
259
|
+
rollback: false
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Examples:**
|
|
263
|
+
|
|
264
|
+
```yaml
|
|
265
|
+
post-conditions:
|
|
266
|
+
- [ ] Output matches expected schema
|
|
267
|
+
tipo: post-condition
|
|
268
|
+
blocker: true
|
|
269
|
+
validação: |
|
|
270
|
+
const schema = loadSchema('output-schema.json');
|
|
271
|
+
const valid = validateAgainstSchema(output, schema);
|
|
272
|
+
if (!valid) throw new Error("Schema validation failed");
|
|
273
|
+
rollback: false
|
|
274
|
+
|
|
275
|
+
- [ ] All required fields present in output
|
|
276
|
+
tipo: post-condition
|
|
277
|
+
blocker: true
|
|
278
|
+
validação: |
|
|
279
|
+
expect(output.field1).toBeDefined();
|
|
280
|
+
expect(output.field2).toBeDefined();
|
|
281
|
+
rollback: false
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Acceptance Criteria
|
|
287
|
+
|
|
288
|
+
**Purpose:** Validate story requirements AFTER workflow (non-blocking, can be manual)
|
|
289
|
+
|
|
290
|
+
**Checklist:**
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
acceptance-criteria:
|
|
294
|
+
- [ ] {criterion_description}
|
|
295
|
+
tipo: acceptance
|
|
296
|
+
blocker: false # Non-blocking
|
|
297
|
+
story: {STORY-XXX}
|
|
298
|
+
manual_check: {true|false}
|
|
299
|
+
test: {test_file_path} # If automated
|
|
300
|
+
|
|
301
|
+
- [ ] {criterion_description_2}
|
|
302
|
+
tipo: acceptance
|
|
303
|
+
blocker: false
|
|
304
|
+
story: {STORY-XXX}
|
|
305
|
+
manual_check: true
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**Examples:**
|
|
309
|
+
|
|
310
|
+
```yaml
|
|
311
|
+
acceptance-criteria:
|
|
312
|
+
- [ ] Output is user-friendly and easy to understand
|
|
313
|
+
tipo: acceptance
|
|
314
|
+
blocker: false
|
|
315
|
+
story: STORY-6.1.2
|
|
316
|
+
manual_check: false
|
|
317
|
+
test: "tests/user-experience/output-clarity.test.js"
|
|
318
|
+
|
|
319
|
+
- [ ] Agent personality is recognizable in output
|
|
320
|
+
tipo: acceptance
|
|
321
|
+
blocker: false
|
|
322
|
+
story: STORY-6.1.2
|
|
323
|
+
manual_check: true
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Template (Optional)
|
|
329
|
+
|
|
330
|
+
**Purpose:** Reference template files for input/output schemas, prompts, or UI forms
|
|
331
|
+
|
|
332
|
+
```yaml
|
|
333
|
+
**Template:**
|
|
334
|
+
- path: {relativePath}
|
|
335
|
+
type: {input|output|prompt|ui|script}
|
|
336
|
+
version: {X.Y.Z}
|
|
337
|
+
variables: [{var1}, {var2}, {var3}]
|
|
338
|
+
schema: {schemaPath} # Optional: JSON Schema reference
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**Examples:**
|
|
342
|
+
|
|
343
|
+
```yaml
|
|
344
|
+
**Template:**
|
|
345
|
+
- path: .aios-core/product/templates/task-execution-report.md
|
|
346
|
+
type: output
|
|
347
|
+
version: 1.0
|
|
348
|
+
variables: [agent_name, task_name, duration, tokens, status_message]
|
|
349
|
+
schema: schemas/task-execution-report.schema.json
|
|
350
|
+
|
|
351
|
+
- path: .aios-core/product/templates/story-tmpl.yaml
|
|
352
|
+
type: input
|
|
353
|
+
version: 2.1
|
|
354
|
+
variables: [story_id, title, description, acceptance_criteria]
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Tools (External/Shared)
|
|
360
|
+
|
|
361
|
+
**Purpose:** Catalog reusable tools used by multiple agents
|
|
362
|
+
|
|
363
|
+
**Definition:** Tools are external systems (MCPs, APIs, CLIs) or reusable scripts shared across agents.
|
|
364
|
+
|
|
365
|
+
```yaml
|
|
366
|
+
**Tools:**
|
|
367
|
+
- {tool_name}:
|
|
368
|
+
version: {X.Y.Z}
|
|
369
|
+
used_for: {description}
|
|
370
|
+
shared_with: [{agent1}, {agent2}, {agent3}]
|
|
371
|
+
cost: ${Y} per call # Optional: for cost tracking
|
|
372
|
+
cacheable: {true|false} # Optional
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Examples:**
|
|
376
|
+
|
|
377
|
+
```yaml
|
|
378
|
+
**Tools:**
|
|
379
|
+
- mcp-clickup:
|
|
380
|
+
version: 2.0
|
|
381
|
+
used_for: Task management integration
|
|
382
|
+
shared_with: [pm, po, sm]
|
|
383
|
+
cost: $0
|
|
384
|
+
|
|
385
|
+
- context7:
|
|
386
|
+
version: 1.0
|
|
387
|
+
used_for: Documentation lookup during development
|
|
388
|
+
shared_with: [dev, architect]
|
|
389
|
+
cost: $0.001 per query
|
|
390
|
+
cacheable: true
|
|
391
|
+
|
|
392
|
+
- exa:
|
|
393
|
+
version: 1.0
|
|
394
|
+
used_for: Web search for research and validation
|
|
395
|
+
shared_with: [analyst, architect, qa]
|
|
396
|
+
cost: $0.008 per search
|
|
397
|
+
cacheable: false
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Scripts (Agent-Specific)
|
|
403
|
+
|
|
404
|
+
**Purpose:** Reference custom scripts specific to this agent/task
|
|
405
|
+
|
|
406
|
+
**Definition:** Scripts are code files that are NOT reusable across agents (agent-specific logic).
|
|
407
|
+
|
|
408
|
+
```yaml
|
|
409
|
+
**Scripts:**
|
|
410
|
+
- {script_path}:
|
|
411
|
+
description: {what_it_does}
|
|
412
|
+
language: {javascript|python|bash|etc}
|
|
413
|
+
version: {X.Y.Z} # Optional
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**Examples:**
|
|
417
|
+
|
|
418
|
+
```yaml
|
|
419
|
+
**Scripts:**
|
|
420
|
+
- .aios-core/scripts/dev-specific/test-runner.js:
|
|
421
|
+
description: Runs tests with coverage reporting specific to dev agent
|
|
422
|
+
language: javascript
|
|
423
|
+
version: 1.2.0
|
|
424
|
+
|
|
425
|
+
- .aios-core/scripts/qa-specific/regression-validator.js:
|
|
426
|
+
description: QA-specific regression validation logic
|
|
427
|
+
language: javascript
|
|
428
|
+
version: 2.0.0
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Performance Metrics
|
|
434
|
+
|
|
435
|
+
**Purpose:** Document expected performance for optimization
|
|
436
|
+
|
|
437
|
+
```yaml
|
|
438
|
+
**Performance:**
|
|
439
|
+
- duration_expected: {X}ms
|
|
440
|
+
- cost_estimated: ${Y} # For AI executors (token costs)
|
|
441
|
+
- cacheable: {true|false}
|
|
442
|
+
- cache_key: {identifier} # If cacheable
|
|
443
|
+
- parallelizable: {true|false}
|
|
444
|
+
- parallel_with: [{task1}, {task2}] # If parallelizable
|
|
445
|
+
- skippable_when: [{condition1}, {condition2}] # Optional: skip conditions
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Examples:**
|
|
449
|
+
|
|
450
|
+
```yaml
|
|
451
|
+
# AI-heavy task (expensive, slow)
|
|
452
|
+
**Performance:**
|
|
453
|
+
- duration_expected: 4000ms
|
|
454
|
+
- cost_estimated: $0.0025
|
|
455
|
+
- cacheable: false
|
|
456
|
+
- parallelizable: false
|
|
457
|
+
|
|
458
|
+
# Config load (fast, cacheable)
|
|
459
|
+
**Performance:**
|
|
460
|
+
- duration_expected: 100ms
|
|
461
|
+
- cost_estimated: $0
|
|
462
|
+
- cacheable: true
|
|
463
|
+
- cache_key: config_${format_id}_${brand_id}
|
|
464
|
+
- parallelizable: true
|
|
465
|
+
- parallel_with: [loadBrand]
|
|
466
|
+
|
|
467
|
+
# Conditional execution
|
|
468
|
+
**Performance:**
|
|
469
|
+
- duration_expected: 2000ms
|
|
470
|
+
- cost_estimated: $0.001
|
|
471
|
+
- cacheable: false
|
|
472
|
+
- parallelizable: false
|
|
473
|
+
- skippable_when: [ready_copy=true, template_id=provided]
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Error Handling
|
|
479
|
+
|
|
480
|
+
**Purpose:** Define error handling strategy for resilience
|
|
481
|
+
|
|
482
|
+
```yaml
|
|
483
|
+
**Error Handling:**
|
|
484
|
+
- strategy: {retry|fallback|abort}
|
|
485
|
+
- fallback: {description_or_value} # If strategy=fallback
|
|
486
|
+
- retry:
|
|
487
|
+
max_attempts: {N}
|
|
488
|
+
backoff: {linear|exponential}
|
|
489
|
+
backoff_ms: {initial_delay}
|
|
490
|
+
- abort_workflow: {true|false}
|
|
491
|
+
- notification: {log|email|slack|etc}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**Error Strategies:**
|
|
495
|
+
|
|
496
|
+
| Strategy | When to Use | Example |
|
|
497
|
+
|----------|-------------|---------|
|
|
498
|
+
| **retry** | Transient errors (API timeout, rate limit) | AI call failed with 429 |
|
|
499
|
+
| **fallback** | Recoverable errors (AI failed, use default) | Template not found → use default |
|
|
500
|
+
| **abort** | Critical errors (invalid input, missing dependency) | Required file not found → abort |
|
|
501
|
+
|
|
502
|
+
**Fallback Plans:**
|
|
503
|
+
|
|
504
|
+
### Missing Input
|
|
505
|
+
```yaml
|
|
506
|
+
**Error Handling:**
|
|
507
|
+
- strategy: fallback
|
|
508
|
+
- fallback: |
|
|
509
|
+
If user input missing:
|
|
510
|
+
1. Check for default values in config
|
|
511
|
+
2. Prompt user for missing input
|
|
512
|
+
3. If still missing, use task default values
|
|
513
|
+
- retry:
|
|
514
|
+
max_attempts: 1
|
|
515
|
+
backoff: linear
|
|
516
|
+
backoff_ms: 0
|
|
517
|
+
- abort_workflow: false
|
|
518
|
+
- notification: log
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Missing Template
|
|
522
|
+
```yaml
|
|
523
|
+
**Error Handling:**
|
|
524
|
+
- strategy: fallback
|
|
525
|
+
- fallback: |
|
|
526
|
+
If template not found:
|
|
527
|
+
1. Check alternative template paths
|
|
528
|
+
2. Use generic template from .aios-core/product/templates/
|
|
529
|
+
3. If no generic template, create minimal output structure
|
|
530
|
+
- retry:
|
|
531
|
+
max_attempts: 2
|
|
532
|
+
backoff: linear
|
|
533
|
+
backoff_ms: 100
|
|
534
|
+
- abort_workflow: false
|
|
535
|
+
- notification: log + warn_user
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Missing Tool
|
|
539
|
+
```yaml
|
|
540
|
+
**Error Handling:**
|
|
541
|
+
- strategy: abort
|
|
542
|
+
- fallback: N/A (tool required for task)
|
|
543
|
+
- retry:
|
|
544
|
+
max_attempts: 1
|
|
545
|
+
backoff: linear
|
|
546
|
+
backoff_ms: 0
|
|
547
|
+
- abort_workflow: true
|
|
548
|
+
- notification: log + error_user
|
|
549
|
+
- error_message: |
|
|
550
|
+
{PERSONALITY_SLOT: agent_name} needs tool '{tool_name}' to complete this task.
|
|
551
|
+
|
|
552
|
+
**Examples:**
|
|
553
|
+
- Dex: "⚠️ Não consigo implementar sem a tool 'mcp-supabase'. Preciso dela pra continuar."
|
|
554
|
+
- Quinn: "⚠️ Ferramenta 'coderabbit' ausente. Não posso validar sem ela. Bloqueando task."
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
### Missing Data
|
|
558
|
+
```yaml
|
|
559
|
+
**Error Handling:**
|
|
560
|
+
- strategy: fallback
|
|
561
|
+
- fallback: |
|
|
562
|
+
If data file not found:
|
|
563
|
+
1. Check alternative data sources (.aios-core/data/)
|
|
564
|
+
2. Prompt user for manual data entry
|
|
565
|
+
3. Use minimal default data structure
|
|
566
|
+
- retry:
|
|
567
|
+
max_attempts: 1
|
|
568
|
+
backoff: linear
|
|
569
|
+
backoff_ms: 0
|
|
570
|
+
- abort_workflow: false
|
|
571
|
+
- notification: log + warn_user
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Checklist Failure
|
|
575
|
+
```yaml
|
|
576
|
+
**Error Handling:**
|
|
577
|
+
- strategy: retry
|
|
578
|
+
- fallback: Rollback to previous state if retry fails
|
|
579
|
+
- retry:
|
|
580
|
+
max_attempts: 3
|
|
581
|
+
backoff: exponential
|
|
582
|
+
backoff_ms: 500
|
|
583
|
+
- abort_workflow: {depends_on_blocker_flag} # true if blocker=true
|
|
584
|
+
- notification: log + error_user
|
|
585
|
+
- error_message: |
|
|
586
|
+
{PERSONALITY_SLOT: agent_name} detected validation failure:
|
|
587
|
+
- Failed check: {failed_check_description}
|
|
588
|
+
- Error: {validation_error_message}
|
|
589
|
+
|
|
590
|
+
**Examples:**
|
|
591
|
+
- Dex: "⚠️ Build falhou. Tentando novamente com cleanup antes..."
|
|
592
|
+
- Quinn: "⚠️ Post-condition falhou: output schema inválido. Bloqueando execução."
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**Personalized Error Messages:**
|
|
596
|
+
|
|
597
|
+
```javascript
|
|
598
|
+
function generateErrorMessage(agent, errorType, errorDetails) {
|
|
599
|
+
const { archetype, tone, vocabulary } = agent.persona_profile.communication;
|
|
600
|
+
|
|
601
|
+
const templates = {
|
|
602
|
+
Builder: "⚠️ {verb} falhou. Vou debugar e reconstruir.",
|
|
603
|
+
Guardian: "⚠️ Validação falhou. Bloqueando até resolução.",
|
|
604
|
+
Balancer: "⚠️ Conflito detectado. Vou mediar e encontrar solução.",
|
|
605
|
+
Visionary: "⚠️ Planejamento interrompido. Preciso revisar estratégia.",
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
return templates[archetype] || "⚠️ Erro detectado. Aplicando fallback.";
|
|
609
|
+
}
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## Metadata
|
|
615
|
+
|
|
616
|
+
**Purpose:** Link task to stories, versions, dependencies for traceability
|
|
617
|
+
|
|
618
|
+
```yaml
|
|
619
|
+
**Metadata:**
|
|
620
|
+
- story: {STORY-XXX}
|
|
621
|
+
- version: {X.Y.Z}
|
|
622
|
+
- dependencies: [{task1}, {task2}] # Other tasks this depends on
|
|
623
|
+
- breaking_changes: [{change1}, {change2}] # If version is breaking
|
|
624
|
+
- author: {name}
|
|
625
|
+
- created_at: {YYYY-MM-DD}
|
|
626
|
+
- updated_at: {YYYY-MM-DD}
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
**Example:**
|
|
630
|
+
|
|
631
|
+
```yaml
|
|
632
|
+
**Metadata:**
|
|
633
|
+
- story: STORY-6.1.2
|
|
634
|
+
- version: 2.0.0
|
|
635
|
+
- dependencies: [loadAgentPersona, validateVocabulary]
|
|
636
|
+
- breaking_changes:
|
|
637
|
+
- Output format changed: added persona_profile section
|
|
638
|
+
- Removed generic status messages
|
|
639
|
+
- author: Roundtable (Pedro, Brad, Seth, Dan)
|
|
640
|
+
- created_at: 2025-01-14
|
|
641
|
+
- updated_at: 2025-01-14
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
---
|
|
645
|
+
|
|
646
|
+
## Output Format (Standardized)
|
|
647
|
+
|
|
648
|
+
**CRITICAL:** All task outputs MUST follow this structure (see `AGENT-PERSONALIZATION-STANDARD-V1.md`):
|
|
649
|
+
|
|
650
|
+
```markdown
|
|
651
|
+
## 📊 Task Execution Report
|
|
652
|
+
|
|
653
|
+
**Agent:** {agent.name} ({agent.persona_profile.archetype})
|
|
654
|
+
**Task:** {task.name}
|
|
655
|
+
**Mode:** {execution_mode} # yolo | interactive | preflight
|
|
656
|
+
**Started:** {timestamp.start}
|
|
657
|
+
**Completed:** {timestamp.end}
|
|
658
|
+
**Duration:** {duration} ← ALWAYS LINE 7 (familiaridade)
|
|
659
|
+
**Tokens Used:** {tokens.total} total ← ALWAYS LINE 8 (familiaridade)
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
### Status
|
|
664
|
+
{status_icon} {PERSONALIZED_STATUS_MESSAGE} ← PERSONALITY SLOT
|
|
665
|
+
|
|
666
|
+
**Examples:**
|
|
667
|
+
- Dex: "✅ Implementei com sucesso. 3 componentes criados."
|
|
668
|
+
- Quinn: "✅ Validado rigorosamente. 47 edge cases testados."
|
|
669
|
+
- Pax: "✅ Equilibrei as dependências. Tudo alinhado."
|
|
670
|
+
|
|
671
|
+
### Output
|
|
672
|
+
{task_specific_content}
|
|
673
|
+
|
|
674
|
+
### Metrics ← ALWAYS LAST SECTION (familiaridade)
|
|
675
|
+
- Tests: {tests.passed}/{tests.total}
|
|
676
|
+
- Coverage: {coverage}%
|
|
677
|
+
- Linting: {lint.status}
|
|
678
|
+
- Pre-conditions: {pre.passed}/{pre.total}
|
|
679
|
+
- Post-conditions: {post.passed}/{post.total}
|
|
680
|
+
- {task_specific_metric}: {value}
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
{agent.persona_profile.signature_closing} ← PERSONALITY SLOT
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
**Personality Injection Points:**
|
|
687
|
+
1. Status message (use agent vocabulary)
|
|
688
|
+
2. Signature closing (agent signature)
|
|
689
|
+
3. Emoji selection (from archetype palette)
|
|
690
|
+
|
|
691
|
+
**Fixed Positions (NEVER change):**
|
|
692
|
+
1. Section order: Header → Status → Output → Metrics
|
|
693
|
+
2. Duration (line 7)
|
|
694
|
+
3. Tokens (line 8)
|
|
695
|
+
4. Metrics (always last section)
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
|
|
699
|
+
## Testing
|
|
700
|
+
|
|
701
|
+
### Unit Test Template
|
|
702
|
+
|
|
703
|
+
```javascript
|
|
704
|
+
// tests/tasks/{task-name}.test.js
|
|
705
|
+
|
|
706
|
+
describe('{Task Name}', () => {
|
|
707
|
+
describe('Pre-conditions', () => {
|
|
708
|
+
it('should validate all pre-conditions', () => {
|
|
709
|
+
const result = validatePreConditions(task, inputs);
|
|
710
|
+
expect(result.allPassed).toBe(true);
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
it('should block execution if pre-condition fails', () => {
|
|
714
|
+
const invalidInputs = { ...inputs, requiredField: null };
|
|
715
|
+
expect(() => executeTask(task, invalidInputs)).toThrow();
|
|
716
|
+
});
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
describe('Execution', () => {
|
|
720
|
+
it('should execute in YOLO mode autonomously', () => {
|
|
721
|
+
const result = executeTask(task, inputs, { mode: 'yolo' });
|
|
722
|
+
expect(result.status).toBe('success');
|
|
723
|
+
expect(result.decisionLog).toBeDefined();
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
it('should execute in Interactive mode with prompts', () => {
|
|
727
|
+
const result = executeTask(task, inputs, { mode: 'interactive' });
|
|
728
|
+
expect(result.userPrompts.length).toBeGreaterThan(0);
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
it('should execute in Pre-Flight mode with questionnaire', () => {
|
|
732
|
+
const result = executeTask(task, inputs, { mode: 'preflight' });
|
|
733
|
+
expect(result.questionnaire).toBeDefined();
|
|
734
|
+
expect(result.executionPlan).toBeDefined();
|
|
735
|
+
});
|
|
736
|
+
});
|
|
737
|
+
|
|
738
|
+
describe('Post-conditions', () => {
|
|
739
|
+
it('should validate all post-conditions', () => {
|
|
740
|
+
const result = executeTask(task, inputs);
|
|
741
|
+
const validation = validatePostConditions(task, result.output);
|
|
742
|
+
expect(validation.allPassed).toBe(true);
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
it('should rollback if post-condition fails and rollback=true', () => {
|
|
746
|
+
// Mock failure
|
|
747
|
+
const result = executeTaskWithMockedFailure(task);
|
|
748
|
+
expect(result.rolledBack).toBe(true);
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
describe('Output', () => {
|
|
753
|
+
it('should generate standardized output', () => {
|
|
754
|
+
const result = executeTask(task, inputs);
|
|
755
|
+
|
|
756
|
+
// Validate fixed structure
|
|
757
|
+
expect(result.output).toContain('## 📊 Task Execution Report');
|
|
758
|
+
expect(result.output).toContain('**Duration:**');
|
|
759
|
+
expect(result.output).toContain('**Tokens Used:**');
|
|
760
|
+
expect(result.output).toContain('### Status');
|
|
761
|
+
expect(result.output).toContain('### Metrics');
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
it('should inject agent personality', () => {
|
|
765
|
+
const agent = loadAgent('dev');
|
|
766
|
+
const result = executeTask(task, inputs, { agent });
|
|
767
|
+
|
|
768
|
+
expect(result.output).toContain(agent.persona_profile.signature_closing);
|
|
769
|
+
|
|
770
|
+
const hasVocabularyWord = agent.persona_profile.communication.vocabulary
|
|
771
|
+
.some(word => result.statusMessage.includes(word));
|
|
772
|
+
expect(hasVocabularyWord).toBe(true);
|
|
773
|
+
});
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
describe('Error Handling', () => {
|
|
777
|
+
it('should retry on transient errors', () => {
|
|
778
|
+
const mockedError = new Error('Transient error');
|
|
779
|
+
const result = executeTaskWithMockedError(task, mockedError, { strategy: 'retry' });
|
|
780
|
+
expect(result.retryCount).toBeGreaterThan(0);
|
|
781
|
+
expect(result.status).toBe('success');
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
it('should fallback on recoverable errors', () => {
|
|
785
|
+
const result = executeTaskWithMissingTemplate(task);
|
|
786
|
+
expect(result.usedFallback).toBe(true);
|
|
787
|
+
expect(result.status).toBe('success');
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
it('should abort on critical errors', () => {
|
|
791
|
+
const result = executeTaskWithMissingRequiredInput(task);
|
|
792
|
+
expect(result.status).toBe('aborted');
|
|
793
|
+
expect(result.workflowAborted).toBe(true);
|
|
794
|
+
});
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
describe('Performance', () => {
|
|
798
|
+
it('should complete within expected duration', async () => {
|
|
799
|
+
const start = Date.now();
|
|
800
|
+
await executeTask(task, inputs);
|
|
801
|
+
const duration = Date.now() - start;
|
|
802
|
+
|
|
803
|
+
expect(duration).toBeLessThan(task.performance.duration_expected * 1.5);
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
it('should use cache when available', () => {
|
|
807
|
+
const result1 = executeTask(task, inputs);
|
|
808
|
+
const result2 = executeTask(task, inputs); // Should use cache
|
|
809
|
+
|
|
810
|
+
if (task.performance.cacheable) {
|
|
811
|
+
expect(result2.usedCache).toBe(true);
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
---
|
|
819
|
+
|
|
820
|
+
## Examples
|
|
821
|
+
|
|
822
|
+
### Example 1: Simple Deterministic Task (No Mode Selection)
|
|
823
|
+
|
|
824
|
+
**Task:** Load configuration file
|
|
825
|
+
|
|
826
|
+
```yaml
|
|
827
|
+
task: loadConfig()
|
|
828
|
+
responsável: System Loader
|
|
829
|
+
responsavel_type: Agente
|
|
830
|
+
atomic_layer: Config
|
|
831
|
+
|
|
832
|
+
**Entrada:**
|
|
833
|
+
- campo: config_path
|
|
834
|
+
tipo: string
|
|
835
|
+
origem: User Input
|
|
836
|
+
obrigatório: true
|
|
837
|
+
|
|
838
|
+
**Saída:**
|
|
839
|
+
- campo: config
|
|
840
|
+
tipo: object
|
|
841
|
+
destino: state
|
|
842
|
+
persistido: false
|
|
843
|
+
|
|
844
|
+
**Performance:**
|
|
845
|
+
- duration_expected: 50ms
|
|
846
|
+
- cost_estimated: $0
|
|
847
|
+
- cacheable: true
|
|
848
|
+
|
|
849
|
+
**Note:** Execution mode not applicable (deterministic, no decisions)
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
---
|
|
853
|
+
|
|
854
|
+
### Example 2: Complex Creative Task (Mode Selection Applicable)
|
|
855
|
+
|
|
856
|
+
**Task:** Design UI Component
|
|
857
|
+
|
|
858
|
+
```yaml
|
|
859
|
+
task: designComponent()
|
|
860
|
+
responsável: Uma (Empathizer)
|
|
861
|
+
responsavel_type: Agente
|
|
862
|
+
atomic_layer: Molecule
|
|
863
|
+
|
|
864
|
+
**Entrada:**
|
|
865
|
+
- campo: componentSpec
|
|
866
|
+
tipo: object
|
|
867
|
+
origem: User Input
|
|
868
|
+
obrigatório: true
|
|
869
|
+
|
|
870
|
+
**Saída:**
|
|
871
|
+
- campo: componentDesign
|
|
872
|
+
tipo: object
|
|
873
|
+
destino: state
|
|
874
|
+
persistido: true
|
|
875
|
+
|
|
876
|
+
**Performance:**
|
|
877
|
+
- duration_expected: 4000ms
|
|
878
|
+
- cost_estimated: $0.0025
|
|
879
|
+
- cacheable: false
|
|
880
|
+
|
|
881
|
+
**Execution Modes:**
|
|
882
|
+
- YOLO: Auto-generate based on best practices
|
|
883
|
+
- Interactive: Ask user for design preferences at 5 decision points
|
|
884
|
+
- Pre-Flight: Complete questionnaire about brand, audience, goals before designing
|
|
885
|
+
|
|
886
|
+
**Note:** Mode selection highly valuable (creative, subjective decisions)
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
---
|
|
890
|
+
|
|
891
|
+
## Notes
|
|
892
|
+
|
|
893
|
+
- **CRITICAL:** Follow AIOS Task Format Specification V1.0 exactly
|
|
894
|
+
- **CRITICAL:** All outputs use standardized template (familiaridade = produtividade)
|
|
895
|
+
- **CRITICAL:** Track duration and tokens for all executions
|
|
896
|
+
- **CRITICAL:** Use agent's vocabulary and tone consistently
|
|
897
|
+
- See `.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md` for complete spec
|
|
898
|
+
- See `.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md` for personality guidelines
|
|
899
|
+
|
|
900
|
+
---
|
|
901
|
+
|
|
902
|
+
**Template Version:** 2.0
|
|
903
|
+
**Last Updated:** 2025-01-14
|
|
904
|
+
**Applies to:** All tasks with AIOS Task Format V1.0 + Personalized Agents (Story 6.1.2+)
|
|
905
|
+
**Breaking Changes:** Yes (from v1.0 - added execution modes, restructured checklist)
|