aios-core 2.1.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/.session/current-session.json +14 -0
- package/.aios-core/cli/commands/generate/index.js +222 -0
- package/.aios-core/cli/commands/manifest/index.js +46 -0
- package/.aios-core/cli/commands/manifest/regenerate.js +96 -0
- package/.aios-core/cli/commands/manifest/validate.js +66 -0
- package/.aios-core/cli/commands/mcp/add.js +234 -0
- package/.aios-core/cli/commands/mcp/index.js +76 -0
- package/.aios-core/cli/commands/mcp/link.js +217 -0
- package/.aios-core/cli/commands/mcp/setup.js +164 -0
- package/.aios-core/cli/commands/mcp/status.js +183 -0
- package/.aios-core/cli/commands/metrics/cleanup.js +91 -0
- package/.aios-core/cli/commands/metrics/index.js +65 -0
- package/.aios-core/cli/commands/metrics/record.js +154 -0
- package/.aios-core/cli/commands/metrics/seed.js +126 -0
- package/.aios-core/cli/commands/metrics/show.js +209 -0
- package/.aios-core/cli/commands/migrate/analyze.js +353 -0
- package/.aios-core/cli/commands/migrate/backup.js +352 -0
- package/.aios-core/cli/commands/migrate/execute.js +292 -0
- package/.aios-core/cli/commands/migrate/index.js +441 -0
- package/.aios-core/cli/commands/migrate/rollback.js +323 -0
- package/.aios-core/cli/commands/migrate/update-imports.js +396 -0
- package/.aios-core/cli/commands/migrate/validate.js +452 -0
- package/.aios-core/cli/commands/qa/index.js +56 -0
- package/.aios-core/cli/commands/qa/run.js +163 -0
- package/.aios-core/cli/commands/qa/status.js +195 -0
- package/.aios-core/cli/commands/workers/formatters/info-formatter.js +274 -0
- package/.aios-core/cli/commands/workers/formatters/list-table.js +265 -0
- package/.aios-core/cli/commands/workers/formatters/list-tree.js +159 -0
- package/.aios-core/cli/commands/workers/index.js +56 -0
- package/.aios-core/cli/commands/workers/info.js +194 -0
- package/.aios-core/cli/commands/workers/list.js +214 -0
- package/.aios-core/cli/commands/workers/search-filters.js +185 -0
- package/.aios-core/cli/commands/workers/search-keyword.js +310 -0
- package/.aios-core/cli/commands/workers/search-semantic.js +293 -0
- package/.aios-core/cli/commands/workers/search.js +154 -0
- package/.aios-core/cli/commands/workers/utils/pagination.js +102 -0
- package/.aios-core/cli/index.js +128 -0
- package/.aios-core/cli/utils/output-formatter-cli.js +232 -0
- package/.aios-core/cli/utils/score-calculator.js +221 -0
- package/.aios-core/core/README.md +229 -0
- package/.aios-core/core/config/config-cache.js +233 -0
- package/.aios-core/core/config/config-loader.js +277 -0
- package/.aios-core/core/data/agent-config-requirements.yaml +368 -0
- package/.aios-core/core/data/aios-kb.md +924 -0
- package/.aios-core/core/data/workflow-patterns.yaml +267 -0
- package/.aios-core/core/docs/SHARD-TRANSLATION-GUIDE.md +335 -0
- package/.aios-core/core/docs/component-creation-guide.md +458 -0
- package/.aios-core/core/docs/session-update-pattern.md +307 -0
- package/.aios-core/core/docs/template-syntax.md +267 -0
- package/.aios-core/core/docs/troubleshooting-guide.md +625 -0
- package/.aios-core/core/elicitation/agent-elicitation.js +272 -0
- package/.aios-core/core/elicitation/elicitation-engine.js +479 -0
- package/.aios-core/core/elicitation/session-manager.js +320 -0
- package/.aios-core/core/elicitation/task-elicitation.js +281 -0
- package/.aios-core/core/elicitation/workflow-elicitation.js +315 -0
- package/.aios-core/core/index.esm.js +42 -0
- package/.aios-core/core/index.js +76 -0
- package/.aios-core/core/manifest/manifest-generator.js +386 -0
- package/.aios-core/core/manifest/manifest-validator.js +429 -0
- package/.aios-core/core/mcp/config-migrator.js +340 -0
- package/.aios-core/core/mcp/global-config-manager.js +369 -0
- package/.aios-core/core/mcp/index.js +34 -0
- package/.aios-core/core/mcp/os-detector.js +188 -0
- package/.aios-core/core/mcp/symlink-manager.js +413 -0
- package/.aios-core/core/migration/migration-config.yaml +83 -0
- package/.aios-core/core/migration/module-mapping.yaml +89 -0
- package/.aios-core/core/quality-gates/base-layer.js +134 -0
- package/.aios-core/core/quality-gates/checklist-generator.js +329 -0
- package/.aios-core/core/quality-gates/focus-area-recommender.js +359 -0
- package/.aios-core/core/quality-gates/human-review-orchestrator.js +529 -0
- package/.aios-core/core/quality-gates/layer1-precommit.js +336 -0
- package/.aios-core/core/quality-gates/layer2-pr-automation.js +324 -0
- package/.aios-core/core/quality-gates/layer3-human-review.js +348 -0
- package/.aios-core/core/quality-gates/notification-manager.js +550 -0
- package/.aios-core/core/quality-gates/quality-gate-config.yaml +86 -0
- package/.aios-core/core/quality-gates/quality-gate-manager.js +601 -0
- package/.aios-core/core/registry/README.md +179 -0
- package/.aios-core/core/registry/build-registry.js +452 -0
- package/.aios-core/core/registry/registry-loader.js +330 -0
- package/.aios-core/core/registry/registry-schema.json +166 -0
- package/.aios-core/core/registry/service-registry.json +6586 -0
- package/.aios-core/core/registry/validate-registry.js +340 -0
- package/.aios-core/core/session/context-detector.js +229 -0
- package/.aios-core/core/session/context-loader.js +288 -0
- package/.aios-core/core/utils/output-formatter.js +298 -0
- package/.aios-core/core/utils/security-utils.js +333 -0
- package/.aios-core/core/utils/yaml-validator.js +419 -0
- package/.aios-core/core-config.yaml +382 -0
- package/.aios-core/data/agent-config-requirements.yaml +368 -0
- package/.aios-core/data/aios-kb.md +924 -0
- package/.aios-core/data/technical-preferences.md +4 -0
- package/.aios-core/data/workflow-patterns.yaml +267 -0
- package/.aios-core/development/README.md +142 -0
- package/.aios-core/development/agent-teams/team-all.yaml +15 -0
- package/.aios-core/development/agent-teams/team-fullstack.yaml +18 -0
- package/.aios-core/development/agent-teams/team-ide-minimal.yaml +10 -0
- package/.aios-core/development/agent-teams/team-no-ui.yaml +13 -0
- package/.aios-core/development/agent-teams/team-qa-focused.yaml +155 -0
- package/.aios-core/development/agents/aios-master.md +339 -0
- package/.aios-core/development/agents/analyst.md +195 -0
- package/.aios-core/development/agents/architect.md +359 -0
- package/.aios-core/development/agents/data-engineer.md +468 -0
- package/.aios-core/development/agents/dev.md +390 -0
- package/.aios-core/development/agents/devops.md +398 -0
- package/.aios-core/development/agents/pm.md +198 -0
- package/.aios-core/development/agents/po.md +256 -0
- package/.aios-core/development/agents/qa.md +312 -0
- package/.aios-core/development/agents/sm.md +220 -0
- package/.aios-core/development/agents/ux-design-expert.md +451 -0
- package/.aios-core/development/scripts/agent-assignment-resolver.js +231 -0
- package/.aios-core/development/scripts/agent-config-loader.js +624 -0
- package/.aios-core/development/scripts/agent-exit-hooks.js +96 -0
- package/.aios-core/development/scripts/apply-inline-greeting-all-agents.js +146 -0
- package/.aios-core/development/scripts/audit-agent-config.js +380 -0
- package/.aios-core/development/scripts/backlog-manager.js +404 -0
- package/.aios-core/development/scripts/batch-update-agents-session-context.js +95 -0
- package/.aios-core/development/scripts/decision-context.js +228 -0
- package/.aios-core/development/scripts/decision-log-generator.js +293 -0
- package/.aios-core/development/scripts/decision-log-indexer.js +284 -0
- package/.aios-core/development/scripts/decision-recorder.js +168 -0
- package/.aios-core/development/scripts/dev-context-loader.js +297 -0
- package/.aios-core/development/scripts/generate-greeting.js +160 -0
- package/.aios-core/development/scripts/greeting-builder.js +866 -0
- package/.aios-core/development/scripts/greeting-config-cli.js +85 -0
- package/.aios-core/development/scripts/greeting-preference-manager.js +145 -0
- package/.aios-core/development/scripts/migrate-task-to-v2.js +377 -0
- package/.aios-core/development/scripts/story-index-generator.js +337 -0
- package/.aios-core/development/scripts/story-manager.js +375 -0
- package/.aios-core/development/scripts/story-update-hook.js +259 -0
- package/.aios-core/development/scripts/task-identifier-resolver.js +145 -0
- package/.aios-core/development/scripts/test-greeting-system.js +142 -0
- package/.aios-core/development/scripts/validate-task-v2.js +319 -0
- package/.aios-core/development/scripts/workflow-navigator.js +214 -0
- package/.aios-core/development/tasks/add-mcp.md +319 -0
- package/.aios-core/development/tasks/advanced-elicitation.md +319 -0
- package/.aios-core/development/tasks/analyst-facilitate-brainstorming.md +342 -0
- package/.aios-core/development/tasks/analyze-framework.md +697 -0
- package/.aios-core/development/tasks/analyze-performance.md +637 -0
- package/.aios-core/development/tasks/apply-qa-fixes.md +340 -0
- package/.aios-core/development/tasks/architect-analyze-impact.md +827 -0
- package/.aios-core/development/tasks/audit-codebase.md +429 -0
- package/.aios-core/development/tasks/audit-tailwind-config.md +270 -0
- package/.aios-core/development/tasks/audit-utilities.md +358 -0
- package/.aios-core/development/tasks/bootstrap-shadcn-library.md +286 -0
- package/.aios-core/development/tasks/brownfield-create-epic.md +486 -0
- package/.aios-core/development/tasks/brownfield-create-story.md +357 -0
- package/.aios-core/development/tasks/build-component.md +478 -0
- package/.aios-core/development/tasks/calculate-roi.md +455 -0
- package/.aios-core/development/tasks/ci-cd-configuration.md +764 -0
- package/.aios-core/development/tasks/cleanup-utilities.md +670 -0
- package/.aios-core/development/tasks/collaborative-edit.md +1109 -0
- package/.aios-core/development/tasks/compose-molecule.md +284 -0
- package/.aios-core/development/tasks/consolidate-patterns.md +414 -0
- package/.aios-core/development/tasks/correct-course.md +280 -0
- package/.aios-core/development/tasks/create-agent.md +322 -0
- package/.aios-core/development/tasks/create-brownfield-story.md +727 -0
- package/.aios-core/development/tasks/create-deep-research-prompt.md +499 -0
- package/.aios-core/development/tasks/create-doc.md +316 -0
- package/.aios-core/development/tasks/create-next-story.md +774 -0
- package/.aios-core/development/tasks/create-suite.md +284 -0
- package/.aios-core/development/tasks/create-task.md +372 -0
- package/.aios-core/development/tasks/create-workflow.md +371 -0
- package/.aios-core/development/tasks/db-analyze-hotpaths.md +572 -0
- package/.aios-core/development/tasks/db-apply-migration.md +381 -0
- package/.aios-core/development/tasks/db-bootstrap.md +642 -0
- package/.aios-core/development/tasks/db-domain-modeling.md +693 -0
- package/.aios-core/development/tasks/db-dry-run.md +293 -0
- package/.aios-core/development/tasks/db-env-check.md +260 -0
- package/.aios-core/development/tasks/db-expansion-pack-integration.md +663 -0
- package/.aios-core/development/tasks/db-explain.md +631 -0
- package/.aios-core/development/tasks/db-impersonate.md +495 -0
- package/.aios-core/development/tasks/db-load-csv.md +593 -0
- package/.aios-core/development/tasks/db-policy-apply.md +653 -0
- package/.aios-core/development/tasks/db-rls-audit.md +411 -0
- package/.aios-core/development/tasks/db-rollback.md +739 -0
- package/.aios-core/development/tasks/db-run-sql.md +613 -0
- package/.aios-core/development/tasks/db-schema-audit.md +1011 -0
- package/.aios-core/development/tasks/db-seed.md +390 -0
- package/.aios-core/development/tasks/db-smoke-test.md +351 -0
- package/.aios-core/development/tasks/db-snapshot.md +569 -0
- package/.aios-core/development/tasks/db-supabase-setup.md +712 -0
- package/.aios-core/development/tasks/db-verify-order.md +515 -0
- package/.aios-core/development/tasks/deprecate-component.md +957 -0
- package/.aios-core/development/tasks/dev-apply-qa-fixes.md +318 -0
- package/.aios-core/development/tasks/dev-backlog-debt.md +469 -0
- package/.aios-core/development/tasks/dev-develop-story.md +846 -0
- package/.aios-core/development/tasks/dev-improve-code-quality.md +873 -0
- package/.aios-core/development/tasks/dev-optimize-performance.md +1034 -0
- package/.aios-core/development/tasks/dev-suggest-refactoring.md +871 -0
- package/.aios-core/development/tasks/dev-validate-next-story.md +349 -0
- package/.aios-core/development/tasks/document-project.md +553 -0
- package/.aios-core/development/tasks/environment-bootstrap.md +1311 -0
- package/.aios-core/development/tasks/execute-checklist.md +301 -0
- package/.aios-core/development/tasks/export-design-tokens-dtcg.md +274 -0
- package/.aios-core/development/tasks/extend-pattern.md +269 -0
- package/.aios-core/development/tasks/extract-tokens.md +467 -0
- package/.aios-core/development/tasks/facilitate-brainstorming-session.md +518 -0
- package/.aios-core/development/tasks/generate-ai-frontend-prompt.md +261 -0
- package/.aios-core/development/tasks/generate-documentation.md +284 -0
- package/.aios-core/development/tasks/generate-migration-strategy.md +522 -0
- package/.aios-core/development/tasks/generate-shock-report.md +501 -0
- package/.aios-core/development/tasks/github-devops-github-pr-automation.md +427 -0
- package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +733 -0
- package/.aios-core/development/tasks/github-devops-repository-cleanup.md +374 -0
- package/.aios-core/development/tasks/github-devops-version-management.md +483 -0
- package/.aios-core/development/tasks/improve-self.md +823 -0
- package/.aios-core/development/tasks/index-docs.md +388 -0
- package/.aios-core/development/tasks/init-project-status.md +506 -0
- package/.aios-core/development/tasks/integrate-expansion-pack.md +314 -0
- package/.aios-core/development/tasks/kb-mode-interaction.md +284 -0
- package/.aios-core/development/tasks/learn-patterns.md +901 -0
- package/.aios-core/development/tasks/mcp-workflow.md +437 -0
- package/.aios-core/development/tasks/modify-agent.md +382 -0
- package/.aios-core/development/tasks/modify-task.md +425 -0
- package/.aios-core/development/tasks/modify-workflow.md +466 -0
- package/.aios-core/development/tasks/po-backlog-add.md +370 -0
- package/.aios-core/development/tasks/po-manage-story-backlog.md +523 -0
- package/.aios-core/development/tasks/po-pull-story-from-clickup.md +540 -0
- package/.aios-core/development/tasks/po-pull-story.md +316 -0
- package/.aios-core/development/tasks/po-stories-index.md +351 -0
- package/.aios-core/development/tasks/po-sync-story-to-clickup.md +457 -0
- package/.aios-core/development/tasks/po-sync-story.md +303 -0
- package/.aios-core/development/tasks/pr-automation.md +701 -0
- package/.aios-core/development/tasks/propose-modification.md +843 -0
- package/.aios-core/development/tasks/qa-backlog-add-followup.md +425 -0
- package/.aios-core/development/tasks/qa-gate.md +374 -0
- package/.aios-core/development/tasks/qa-generate-tests.md +1175 -0
- package/.aios-core/development/tasks/qa-nfr-assess.md +558 -0
- package/.aios-core/development/tasks/qa-review-proposal.md +1158 -0
- package/.aios-core/development/tasks/qa-review-story.md +683 -0
- package/.aios-core/development/tasks/qa-risk-profile.md +567 -0
- package/.aios-core/development/tasks/qa-run-tests.md +277 -0
- package/.aios-core/development/tasks/qa-test-design.md +388 -0
- package/.aios-core/development/tasks/qa-trace-requirements.md +477 -0
- package/.aios-core/development/tasks/release-management.md +723 -0
- package/.aios-core/development/tasks/security-audit.md +554 -0
- package/.aios-core/development/tasks/security-scan.md +790 -0
- package/.aios-core/development/tasks/setup-database.md +741 -0
- package/.aios-core/development/tasks/setup-design-system.md +462 -0
- package/.aios-core/development/tasks/setup-github.md +874 -0
- package/.aios-core/development/tasks/setup-llm-routing.md +229 -0
- package/.aios-core/development/tasks/setup-mcp-docker.md +584 -0
- package/.aios-core/development/tasks/shard-doc.md +538 -0
- package/.aios-core/development/tasks/sm-create-next-story.md +480 -0
- package/.aios-core/development/tasks/sync-documentation.md +865 -0
- package/.aios-core/development/tasks/tailwind-upgrade.md +294 -0
- package/.aios-core/development/tasks/test-as-user.md +621 -0
- package/.aios-core/development/tasks/test-validation-task.md +171 -0
- package/.aios-core/development/tasks/undo-last.md +347 -0
- package/.aios-core/development/tasks/update-manifest.md +410 -0
- package/.aios-core/development/tasks/ux-create-wireframe.md +617 -0
- package/.aios-core/development/tasks/ux-ds-scan-artifact.md +672 -0
- package/.aios-core/development/tasks/ux-user-research.md +559 -0
- package/.aios-core/development/tasks/validate-next-story.md +423 -0
- package/.aios-core/development/tasks/validate-structure.md +243 -0
- package/.aios-core/development/workflows/README.md +84 -0
- package/.aios-core/development/workflows/brownfield-fullstack.yaml +297 -0
- package/.aios-core/development/workflows/brownfield-service.yaml +187 -0
- package/.aios-core/development/workflows/brownfield-ui.yaml +197 -0
- package/.aios-core/development/workflows/greenfield-fullstack.yaml +333 -0
- package/.aios-core/development/workflows/greenfield-service.yaml +206 -0
- package/.aios-core/development/workflows/greenfield-ui.yaml +235 -0
- package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +335 -0
- package/.aios-core/docs/component-creation-guide.md +458 -0
- package/.aios-core/docs/session-update-pattern.md +307 -0
- package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +572 -0
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +185 -0
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +354 -0
- package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +1963 -0
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +821 -0
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +1190 -0
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +439 -0
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +1339 -0
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +5398 -0
- package/.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md +697 -0
- package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +511 -0
- package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +556 -0
- package/.aios-core/docs/standards/STANDARDS-INDEX.md +210 -0
- package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +550 -0
- package/.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md +1414 -0
- package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +523 -0
- package/.aios-core/docs/template-syntax.md +267 -0
- package/.aios-core/docs/troubleshooting-guide.md +625 -0
- package/.aios-core/elicitation/agent-elicitation.js +272 -0
- package/.aios-core/elicitation/task-elicitation.js +281 -0
- package/.aios-core/elicitation/workflow-elicitation.js +315 -0
- package/.aios-core/index.d.ts +8 -0
- package/.aios-core/index.esm.js +16 -0
- package/.aios-core/index.js +16 -0
- package/.aios-core/infrastructure/README.md +126 -0
- package/.aios-core/infrastructure/index.js +199 -0
- package/.aios-core/infrastructure/integrations/pm-adapters/README.md +59 -0
- package/.aios-core/infrastructure/integrations/pm-adapters/clickup-adapter.js +345 -0
- package/.aios-core/infrastructure/integrations/pm-adapters/github-adapter.js +392 -0
- package/.aios-core/infrastructure/integrations/pm-adapters/jira-adapter.js +448 -0
- package/.aios-core/infrastructure/integrations/pm-adapters/local-adapter.js +175 -0
- package/.aios-core/infrastructure/scripts/_archived/final-todo-count.js +122 -0
- package/.aios-core/infrastructure/scripts/_archived/fix-yaml-formatting.js +89 -0
- package/.aios-core/infrastructure/scripts/_archived/migration-generator.js +780 -0
- package/.aios-core/infrastructure/scripts/_archived/migration-path-generator.js +950 -0
- package/.aios-core/infrastructure/scripts/_archived/phase2-entrada-saida-errors.js +425 -0
- package/.aios-core/infrastructure/scripts/_archived/phase2-spot-check.js +132 -0
- package/.aios-core/infrastructure/scripts/_archived/phase3-tools-scripts-validation.js +381 -0
- package/.aios-core/infrastructure/scripts/_archived/phase4-metadata-performance.js +203 -0
- package/.aios-core/infrastructure/scripts/_archived/test-yaml-parsing.js +24 -0
- package/.aios-core/infrastructure/scripts/_archived/verify-yaml-fix.js +51 -0
- package/.aios-core/infrastructure/scripts/aios-validator.js +294 -0
- package/.aios-core/infrastructure/scripts/approval-workflow.js +643 -0
- package/.aios-core/infrastructure/scripts/atomic-layer-classifier.js +308 -0
- package/.aios-core/infrastructure/scripts/backup-manager.js +607 -0
- package/.aios-core/infrastructure/scripts/batch-creator.js +608 -0
- package/.aios-core/infrastructure/scripts/branch-manager.js +391 -0
- package/.aios-core/infrastructure/scripts/capability-analyzer.js +535 -0
- package/.aios-core/infrastructure/scripts/clickup-helpers.js +226 -0
- package/.aios-core/infrastructure/scripts/code-quality-improver.js +1312 -0
- package/.aios-core/infrastructure/scripts/commit-message-generator.js +850 -0
- package/.aios-core/infrastructure/scripts/component-generator.js +738 -0
- package/.aios-core/infrastructure/scripts/component-metadata.js +627 -0
- package/.aios-core/infrastructure/scripts/component-search.js +277 -0
- package/.aios-core/infrastructure/scripts/config-cache.js +322 -0
- package/.aios-core/infrastructure/scripts/config-loader.js +349 -0
- package/.aios-core/infrastructure/scripts/conflict-resolver.js +675 -0
- package/.aios-core/infrastructure/scripts/coverage-analyzer.js +882 -0
- package/.aios-core/infrastructure/scripts/dependency-analyzer.js +638 -0
- package/.aios-core/infrastructure/scripts/dependency-impact-analyzer.js +703 -0
- package/.aios-core/infrastructure/scripts/diff-generator.js +129 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/brownfield-analyzer.js +501 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/config-generator.js +329 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js +282 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js +331 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js +313 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/index.js +74 -0
- package/.aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js +358 -0
- package/.aios-core/infrastructure/scripts/documentation-synchronizer.js +1432 -0
- package/.aios-core/infrastructure/scripts/framework-analyzer.js +746 -0
- package/.aios-core/infrastructure/scripts/git-config-detector.js +293 -0
- package/.aios-core/infrastructure/scripts/git-wrapper.js +443 -0
- package/.aios-core/infrastructure/scripts/improvement-engine.js +758 -0
- package/.aios-core/infrastructure/scripts/improvement-validator.js +710 -0
- package/.aios-core/infrastructure/scripts/llm-routing/install-llm-routing.js +267 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free.cmd +80 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free.sh +62 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-max.cmd +26 -0
- package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-max.sh +18 -0
- package/.aios-core/infrastructure/scripts/modification-risk-assessment.js +970 -0
- package/.aios-core/infrastructure/scripts/modification-validator.js +555 -0
- package/.aios-core/infrastructure/scripts/output-formatter.js +297 -0
- package/.aios-core/infrastructure/scripts/performance-analyzer.js +758 -0
- package/.aios-core/infrastructure/scripts/performance-and-error-resolver.js +258 -0
- package/.aios-core/infrastructure/scripts/performance-optimizer.js +1902 -0
- package/.aios-core/infrastructure/scripts/performance-tracker.js +452 -0
- package/.aios-core/infrastructure/scripts/pm-adapter-factory.js +181 -0
- package/.aios-core/infrastructure/scripts/pm-adapter.js +134 -0
- package/.aios-core/infrastructure/scripts/project-status-loader.js +445 -0
- package/.aios-core/infrastructure/scripts/refactoring-suggester.js +1139 -0
- package/.aios-core/infrastructure/scripts/repository-detector.js +64 -0
- package/.aios-core/infrastructure/scripts/sandbox-tester.js +618 -0
- package/.aios-core/infrastructure/scripts/security-checker.js +359 -0
- package/.aios-core/infrastructure/scripts/source-tree-guardian/index.js +375 -0
- package/.aios-core/infrastructure/scripts/source-tree-guardian/manifest-generator.js +410 -0
- package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/naming-rules.yaml +285 -0
- package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/placement-rules.yaml +262 -0
- package/.aios-core/infrastructure/scripts/source-tree-guardian/validator.js +468 -0
- package/.aios-core/infrastructure/scripts/spot-check-validator.js +149 -0
- package/.aios-core/infrastructure/scripts/status-mapper.js +115 -0
- package/.aios-core/infrastructure/scripts/template-engine.js +240 -0
- package/.aios-core/infrastructure/scripts/template-validator.js +279 -0
- package/.aios-core/infrastructure/scripts/test-generator.js +844 -0
- package/.aios-core/infrastructure/scripts/test-quality-assessment.js +1081 -0
- package/.aios-core/infrastructure/scripts/test-utilities-fast.js +126 -0
- package/.aios-core/infrastructure/scripts/test-utilities.js +200 -0
- package/.aios-core/infrastructure/scripts/tool-resolver.js +360 -0
- package/.aios-core/infrastructure/scripts/transaction-manager.js +590 -0
- package/.aios-core/infrastructure/scripts/usage-analytics.js +634 -0
- package/.aios-core/infrastructure/scripts/validate-output-pattern.js +213 -0
- package/.aios-core/infrastructure/scripts/visual-impact-generator.js +1056 -0
- package/.aios-core/infrastructure/scripts/yaml-validator.js +397 -0
- package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -0
- package/.aios-core/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +182 -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 -0
- package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -0
- package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -0
- package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -0
- 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/project-status-loader.test.js +394 -0
- package/.aios-core/infrastructure/tests/regression-suite-v2.md +621 -0
- package/.aios-core/infrastructure/tests/utilities-audit-results.json +501 -0
- package/.aios-core/infrastructure/tests/validate-module.js +97 -0
- package/.aios-core/infrastructure/tools/README.md +222 -0
- package/.aios-core/infrastructure/tools/cli/github-cli.yaml +200 -0
- package/.aios-core/infrastructure/tools/cli/llm-routing.yaml +126 -0
- package/.aios-core/infrastructure/tools/cli/railway-cli.yaml +260 -0
- package/.aios-core/infrastructure/tools/cli/supabase-cli.yaml +224 -0
- package/.aios-core/infrastructure/tools/local/ffmpeg.yaml +261 -0
- package/.aios-core/infrastructure/tools/mcp/21st-dev-magic.yaml +127 -0
- package/.aios-core/infrastructure/tools/mcp/browser.yaml +103 -0
- package/.aios-core/infrastructure/tools/mcp/clickup.yaml +534 -0
- package/.aios-core/infrastructure/tools/mcp/context7.yaml +78 -0
- package/.aios-core/infrastructure/tools/mcp/desktop-commander.yaml +180 -0
- package/.aios-core/infrastructure/tools/mcp/exa.yaml +103 -0
- package/.aios-core/infrastructure/tools/mcp/google-workspace.yaml +930 -0
- package/.aios-core/infrastructure/tools/mcp/n8n.yaml +551 -0
- package/.aios-core/infrastructure/tools/mcp/supabase.yaml +808 -0
- package/.aios-core/install-manifest.yaml +347 -0
- package/.aios-core/manifests/agents.csv +1 -0
- package/.aios-core/manifests/schema/manifest-schema.json +190 -0
- package/.aios-core/manifests/tasks.csv +121 -0
- package/.aios-core/manifests/workers.csv +204 -0
- package/.aios-core/package.json +103 -0
- package/.aios-core/product/README.md +56 -0
- package/.aios-core/product/checklists/architect-checklist.md +444 -0
- package/.aios-core/product/checklists/change-checklist.md +183 -0
- package/.aios-core/product/checklists/database-design-checklist.md +119 -0
- package/.aios-core/product/checklists/dba-predeploy-checklist.md +97 -0
- package/.aios-core/product/checklists/dba-rollback-checklist.md +99 -0
- package/.aios-core/product/checklists/pm-checklist.md +376 -0
- package/.aios-core/product/checklists/po-master-checklist.md +442 -0
- package/.aios-core/product/checklists/pre-push-checklist.md +108 -0
- package/.aios-core/product/checklists/release-checklist.md +122 -0
- package/.aios-core/product/checklists/story-dod-checklist.md +102 -0
- package/.aios-core/product/checklists/story-draft-checklist.md +216 -0
- package/.aios-core/product/data/brainstorming-techniques.md +37 -0
- package/.aios-core/product/data/elicitation-methods.md +135 -0
- package/.aios-core/product/data/mode-selection-best-practices.md +471 -0
- package/.aios-core/product/data/test-levels-framework.md +149 -0
- package/.aios-core/product/data/test-priorities-matrix.md +175 -0
- package/.aios-core/product/templates/1mcp-config.yaml +225 -0
- package/.aios-core/product/templates/activation-instructions-inline-greeting.yaml +63 -0
- package/.aios-core/product/templates/activation-instructions-template.md +258 -0
- package/.aios-core/product/templates/adr.hbs +125 -0
- package/.aios-core/product/templates/agent-template.yaml +121 -0
- package/.aios-core/product/templates/architecture-tmpl.yaml +651 -0
- package/.aios-core/product/templates/brainstorming-output-tmpl.yaml +156 -0
- package/.aios-core/product/templates/brownfield-architecture-tmpl.yaml +476 -0
- package/.aios-core/product/templates/brownfield-prd-tmpl.yaml +280 -0
- package/.aios-core/product/templates/changelog-template.md +134 -0
- package/.aios-core/product/templates/command-rationalization-matrix.md +152 -0
- package/.aios-core/product/templates/competitor-analysis-tmpl.yaml +293 -0
- package/.aios-core/product/templates/component-react-tmpl.tsx +98 -0
- package/.aios-core/product/templates/dbdr.hbs +241 -0
- package/.aios-core/product/templates/design-story-tmpl.yaml +587 -0
- package/.aios-core/product/templates/ds-artifact-analysis.md +70 -0
- package/.aios-core/product/templates/engine/elicitation.js +298 -0
- package/.aios-core/product/templates/engine/index.js +308 -0
- package/.aios-core/product/templates/engine/loader.js +231 -0
- package/.aios-core/product/templates/engine/renderer.js +343 -0
- package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -0
- package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -0
- package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -0
- package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -0
- package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -0
- package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -0
- package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -0
- package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -0
- package/.aios-core/product/templates/engine/validator.js +294 -0
- package/.aios-core/product/templates/epic.hbs +212 -0
- package/.aios-core/product/templates/eslintrc-security.json +32 -0
- package/.aios-core/product/templates/front-end-architecture-tmpl.yaml +206 -0
- package/.aios-core/product/templates/front-end-spec-tmpl.yaml +349 -0
- package/.aios-core/product/templates/fullstack-architecture-tmpl.yaml +805 -0
- package/.aios-core/product/templates/github-actions-cd.yml +212 -0
- package/.aios-core/product/templates/github-actions-ci.yml +172 -0
- package/.aios-core/product/templates/github-pr-template.md +67 -0
- package/.aios-core/product/templates/gordon-mcp.yaml +140 -0
- package/.aios-core/product/templates/ide-rules/antigravity-rules.md +115 -0
- package/.aios-core/product/templates/ide-rules/claude-rules.md +221 -0
- package/.aios-core/product/templates/ide-rules/cline-rules.md +84 -0
- package/.aios-core/product/templates/ide-rules/copilot-rules.md +92 -0
- package/.aios-core/product/templates/ide-rules/cursor-rules.md +115 -0
- package/.aios-core/product/templates/ide-rules/gemini-rules.md +85 -0
- package/.aios-core/product/templates/ide-rules/roo-rules.md +86 -0
- package/.aios-core/product/templates/ide-rules/trae-rules.md +104 -0
- package/.aios-core/product/templates/ide-rules/windsurf-rules.md +80 -0
- package/.aios-core/product/templates/index-strategy-tmpl.yaml +53 -0
- package/.aios-core/product/templates/market-research-tmpl.yaml +252 -0
- package/.aios-core/product/templates/mcp-workflow.js +271 -0
- package/.aios-core/product/templates/migration-plan-tmpl.yaml +1022 -0
- package/.aios-core/product/templates/migration-strategy-tmpl.md +524 -0
- package/.aios-core/product/templates/personalized-agent-template.md +258 -0
- package/.aios-core/product/templates/personalized-checklist-template.md +340 -0
- package/.aios-core/product/templates/personalized-task-template-v2.md +905 -0
- package/.aios-core/product/templates/personalized-task-template.md +344 -0
- package/.aios-core/product/templates/personalized-template-file.yaml +322 -0
- package/.aios-core/product/templates/personalized-workflow-template.yaml +460 -0
- package/.aios-core/product/templates/pmdr.hbs +186 -0
- package/.aios-core/product/templates/prd-tmpl.yaml +202 -0
- package/.aios-core/product/templates/prd-v2.0.hbs +216 -0
- package/.aios-core/product/templates/prd.hbs +201 -0
- package/.aios-core/product/templates/project-brief-tmpl.yaml +221 -0
- package/.aios-core/product/templates/qa-gate-tmpl.yaml +240 -0
- package/.aios-core/product/templates/rls-policies-tmpl.yaml +1203 -0
- package/.aios-core/product/templates/schema-design-tmpl.yaml +428 -0
- package/.aios-core/product/templates/shock-report-tmpl.html +502 -0
- package/.aios-core/product/templates/state-persistence-tmpl.yaml +219 -0
- package/.aios-core/product/templates/story-tmpl.yaml +332 -0
- package/.aios-core/product/templates/story.hbs +263 -0
- package/.aios-core/product/templates/task-execution-report.md +495 -0
- package/.aios-core/product/templates/task-template.md +123 -0
- package/.aios-core/product/templates/task.hbs +170 -0
- package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -0
- package/.aios-core/product/templates/tmpl-migration-script.sql +91 -0
- package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -0
- package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -0
- package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -0
- package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -0
- package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -0
- package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -0
- package/.aios-core/product/templates/tmpl-seed-data.sql +140 -0
- package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -0
- package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -0
- package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -0
- package/.aios-core/product/templates/tmpl-trigger.sql +152 -0
- package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -0
- package/.aios-core/product/templates/tmpl-view.sql +177 -0
- package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -0
- package/.aios-core/product/templates/token-exports-tailwind-tmpl.js +395 -0
- package/.aios-core/product/templates/tokens-schema-tmpl.yaml +305 -0
- package/.aios-core/product/templates/workflow-template.yaml +134 -0
- package/.aios-core/quality/metrics-collector.js +572 -0
- package/.aios-core/quality/metrics-hook.js +260 -0
- package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -0
- package/.aios-core/quality/seed-metrics.js +336 -0
- package/.aios-core/scripts/README.md +354 -0
- package/.aios-core/scripts/aios-doc-template.md +325 -0
- package/.aios-core/scripts/batch-migrate-phase1.ps1 +36 -0
- package/.aios-core/scripts/batch-migrate-phase2.ps1 +88 -0
- package/.aios-core/scripts/batch-migrate-phase3.ps1 +45 -0
- package/.aios-core/scripts/command-execution-hook.js +201 -0
- package/.aios-core/scripts/context-detector.js +226 -0
- package/.aios-core/scripts/elicitation-engine.js +385 -0
- package/.aios-core/scripts/elicitation-session-manager.js +300 -0
- package/.aios-core/scripts/migrate-framework-docs.sh +300 -0
- package/.aios-core/scripts/session-context-loader.js +286 -0
- package/.aios-core/scripts/test-template-system.js +941 -0
- package/.aios-core/scripts/validate-phase1.ps1 +35 -0
- package/.aios-core/scripts/workflow-management.md +69 -0
- package/.aios-core/tasks/find-component.md.legacy +391 -0
- package/.aios-core/tasks/generate-commit-message.md.legacy +426 -0
- package/.aios-core/tasks/generate-migration.md.legacy +382 -0
- package/.aios-core/tasks/rollback-modification.md.legacy +307 -0
- package/.aios-core/tasks/update-tests.md.legacy +283 -0
- package/.aios-core/user-guide.md +1413 -0
- package/.aios-core/working-in-the-brownfield.md +361 -0
- package/.claude/CLAUDE.md +221 -0
- package/LICENSE +48 -0
- package/README.md +703 -0
- package/bin/aios-init-old.js +532 -0
- package/bin/aios-init-v4.js +390 -0
- package/bin/aios-init.backup-v1.1.4.js +352 -0
- package/bin/aios-init.js +736 -0
- package/bin/aios-minimal.js +26 -0
- package/bin/aios.js +279 -0
- package/bin/migrate-pm-config.js +219 -0
- package/bin/modules/env-config.js +436 -0
- package/bin/modules/mcp-installer.js +383 -0
- package/bin/utils/install-errors.js +339 -0
- package/bin/utils/install-transaction.js +445 -0
- package/index.d.ts +19 -0
- package/index.esm.js +21 -0
- package/index.js +94 -0
- package/package.json +161 -0
- package/packages/installer/package.json +39 -0
- package/packages/installer/src/config/configure-environment.js +312 -0
- package/packages/installer/src/config/templates/core-config-template.js +183 -0
- package/packages/installer/src/config/templates/env-template.js +127 -0
- package/packages/installer/src/config/validation/config-validator.js +243 -0
- package/packages/installer/src/detection/detect-project-type.js +81 -0
- package/packages/installer/src/wizard/wizard.js +244 -0
- package/packages/installer/tests/integration/environment-configuration.test.js +328 -0
- package/packages/installer/tests/integration/wizard-detection.test.js +349 -0
- package/packages/installer/tests/unit/config-validator.test.js +315 -0
- package/packages/installer/tests/unit/detection/detect-project-type.test.js +401 -0
- package/packages/installer/tests/unit/env-template.test.js +185 -0
- package/src/config/ide-configs.js +189 -0
- package/src/installer/aios-core-installer.js +319 -0
- package/src/installer/dependency-installer.js +335 -0
- package/src/utils/aios-colors.js +234 -0
- package/src/wizard/feedback.js +218 -0
- package/src/wizard/ide-config-generator.js +488 -0
- package/src/wizard/ide-selector.js +84 -0
- package/src/wizard/index.js +589 -0
- package/src/wizard/questions.js +249 -0
- package/src/wizard/validation/index.js +120 -0
- package/src/wizard/validation/report-generator.js +269 -0
- package/src/wizard/validation/troubleshooting-system.js +346 -0
- package/src/wizard/validation/validators/config-validator.js +362 -0
- package/src/wizard/validation/validators/dependency-validator.js +333 -0
- package/src/wizard/validation/validators/file-structure-validator.js +181 -0
- package/src/wizard/validation/validators/mcp-health-checker.js +310 -0
- package/src/wizard/validators.js +274 -0
- package/templates/squad/LICENSE +21 -0
- package/templates/squad/README.md +37 -0
- package/templates/squad/agents/example-agent.yaml +36 -0
- package/templates/squad/package.json +19 -0
- package/templates/squad/squad.yaml +25 -0
- package/templates/squad/tasks/example-task.yaml +46 -0
- package/templates/squad/templates/example-template.md +24 -0
- package/templates/squad/tests/example-agent.test.js +53 -0
- package/templates/squad/workflows/example-workflow.yaml +54 -0
- package/tools/package-builder.js +35 -0
|
@@ -0,0 +1,1414 @@
|
|
|
1
|
+
# AIOS Task Format Specification V1.0
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-11-13
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Status:** Standard
|
|
6
|
+
**Author:** Brad Frost Cognitive Clone
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
This document defines the UNIVERSAL format for AIOS Tasks, ensuring consistency, scalability, and reusability across workflows, executors, and teams.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Task Format Overview
|
|
17
|
+
|
|
18
|
+
Every AIOS Task MUST follow this structure:
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
#### Step X: [Task Name]
|
|
22
|
+
|
|
23
|
+
task: taskIdentifier()
|
|
24
|
+
responsável: [Role or Service Name]
|
|
25
|
+
responsavel_type: Agente | Worker | Humano | Clone
|
|
26
|
+
atomic_layer: [Atom | Molecule | Organism | Template | Page | Config | Strategy | Content | Media | Layout | Analysis]
|
|
27
|
+
|
|
28
|
+
**Entrada:**
|
|
29
|
+
- campo: [name]
|
|
30
|
+
tipo: [type]
|
|
31
|
+
origem: [source step]
|
|
32
|
+
obrigatório: [true|false]
|
|
33
|
+
padrão: [default value] (optional)
|
|
34
|
+
|
|
35
|
+
**Saída:**
|
|
36
|
+
- campo: [name]
|
|
37
|
+
tipo: [type]
|
|
38
|
+
destino: [destination step(s)]
|
|
39
|
+
persistido: [true|false]
|
|
40
|
+
|
|
41
|
+
**Checklist:**
|
|
42
|
+
pre-conditions:
|
|
43
|
+
- [ ] [condition description]
|
|
44
|
+
tipo: pre-condition
|
|
45
|
+
blocker: [true|false]
|
|
46
|
+
validação: [validation logic or test path]
|
|
47
|
+
|
|
48
|
+
post-conditions:
|
|
49
|
+
- [ ] [condition description]
|
|
50
|
+
tipo: post-condition
|
|
51
|
+
blocker: [true|false]
|
|
52
|
+
validação: [validation logic or test path]
|
|
53
|
+
|
|
54
|
+
acceptance-criteria:
|
|
55
|
+
- [ ] [acceptance description]
|
|
56
|
+
tipo: acceptance
|
|
57
|
+
blocker: [false]
|
|
58
|
+
story: [STORY-XXX]
|
|
59
|
+
manual_check: [true|false]
|
|
60
|
+
|
|
61
|
+
**Template:** (optional)
|
|
62
|
+
- path: [relative path to template file]
|
|
63
|
+
- type: [input|output|prompt|ui|script]
|
|
64
|
+
- version: [X.Y.Z]
|
|
65
|
+
- variables: [array of variable names]
|
|
66
|
+
|
|
67
|
+
**Tools:** (optional)
|
|
68
|
+
- [tool_name]:
|
|
69
|
+
version: [X.Y.Z]
|
|
70
|
+
used_for: [description]
|
|
71
|
+
shared_with: [array of step IDs]
|
|
72
|
+
|
|
73
|
+
**Scripts:** (optional)
|
|
74
|
+
- [script_path]:
|
|
75
|
+
description: [what it does]
|
|
76
|
+
language: [javascript|python|bash|etc]
|
|
77
|
+
|
|
78
|
+
**Performance:**
|
|
79
|
+
- duration_expected: [X]ms
|
|
80
|
+
- cost_estimated: $[Y] (for AI executors)
|
|
81
|
+
- cacheable: [true|false]
|
|
82
|
+
- cache_key: [cache identifier] (if cacheable)
|
|
83
|
+
- parallelizable: [true|false]
|
|
84
|
+
- parallel_with: [array of step IDs] (if parallelizable)
|
|
85
|
+
- skippable_when: [array of conditions]
|
|
86
|
+
|
|
87
|
+
**Error Handling:**
|
|
88
|
+
- strategy: [retry|fallback|abort]
|
|
89
|
+
- fallback: [description or default value] (if strategy=fallback)
|
|
90
|
+
- retry:
|
|
91
|
+
max_attempts: [N]
|
|
92
|
+
backoff: [linear|exponential]
|
|
93
|
+
backoff_ms: [initial backoff in milliseconds]
|
|
94
|
+
- abort_workflow: [true|false]
|
|
95
|
+
- notification: [log|email|slack|etc]
|
|
96
|
+
|
|
97
|
+
**Metadata:**
|
|
98
|
+
- story: [STORY-XXX]
|
|
99
|
+
- version: [X.Y.Z]
|
|
100
|
+
- dependencies: [array of step IDs]
|
|
101
|
+
- breaking_changes: [array of changes from previous version]
|
|
102
|
+
- author: [name]
|
|
103
|
+
- created_at: [YYYY-MM-DD]
|
|
104
|
+
- updated_at: [YYYY-MM-DD]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Field Definitions
|
|
110
|
+
|
|
111
|
+
### Required Fields
|
|
112
|
+
|
|
113
|
+
#### 1. `task`
|
|
114
|
+
|
|
115
|
+
**Type:** `string` (function name)
|
|
116
|
+
**Required:** ✅ Yes
|
|
117
|
+
**Format:** `camelCase()` with parentheses
|
|
118
|
+
|
|
119
|
+
**Purpose:** Unique identifier for the task function.
|
|
120
|
+
|
|
121
|
+
**Validation:**
|
|
122
|
+
- Must be unique across workflow
|
|
123
|
+
- Must be valid JavaScript function name
|
|
124
|
+
- Must end with `()`
|
|
125
|
+
|
|
126
|
+
**Examples:**
|
|
127
|
+
```yaml
|
|
128
|
+
task: loadFormatConfig()
|
|
129
|
+
task: analyzeBrief()
|
|
130
|
+
task: designCTAComponent()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
#### 2. `responsável`
|
|
136
|
+
|
|
137
|
+
**Type:** `string`
|
|
138
|
+
**Required:** ✅ Yes
|
|
139
|
+
**Format:** Free text (role or service name)
|
|
140
|
+
|
|
141
|
+
**Purpose:** Human-readable name of the responsible entity.
|
|
142
|
+
|
|
143
|
+
**Examples:**
|
|
144
|
+
```yaml
|
|
145
|
+
responsável: Creative Director
|
|
146
|
+
responsável: format-loader.js
|
|
147
|
+
responsável: OpenRouter Vision Model
|
|
148
|
+
responsável: Brad Frost Clone
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
#### 3. `responsavel_type`
|
|
154
|
+
|
|
155
|
+
**Type:** `enum`
|
|
156
|
+
**Required:** ✅ Yes
|
|
157
|
+
**Values:** `Agente | Worker | Humano | Clone`
|
|
158
|
+
|
|
159
|
+
**Purpose:** Defines the executor type for orchestration, cost tracking, and error handling.
|
|
160
|
+
|
|
161
|
+
**Validation:**
|
|
162
|
+
- Must be one of the 4 allowed values
|
|
163
|
+
- Determines execution environment
|
|
164
|
+
|
|
165
|
+
**Decision Tree:** See `EXECUTOR-DECISION-TREE.md`
|
|
166
|
+
|
|
167
|
+
**Examples:**
|
|
168
|
+
```yaml
|
|
169
|
+
responsavel_type: Agente # AI-powered execution
|
|
170
|
+
responsavel_type: Worker # Script-based execution
|
|
171
|
+
responsavel_type: Humano # Manual human execution
|
|
172
|
+
responsavel_type: Clone # Mind emulation with heuristics
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
#### 4. `atomic_layer`
|
|
178
|
+
|
|
179
|
+
**Type:** `enum`
|
|
180
|
+
**Required:** ✅ Yes (for design-related tasks), ⚠️ Optional (for config/strategy)
|
|
181
|
+
**Values:**
|
|
182
|
+
- **Atomic Design:** `Atom | Molecule | Organism | Template | Page`
|
|
183
|
+
- **Other Layers:** `Config | Strategy | Content | Media | Layout | Analysis`
|
|
184
|
+
|
|
185
|
+
**Purpose:** Maps task to Atomic Design layer for architecture validation.
|
|
186
|
+
|
|
187
|
+
**Validation:**
|
|
188
|
+
- Design tasks MUST specify Atomic Design layer
|
|
189
|
+
- Non-design tasks SHOULD specify functional layer
|
|
190
|
+
|
|
191
|
+
**Examples:**
|
|
192
|
+
```yaml
|
|
193
|
+
atomic_layer: Atom # Step 7a: Design CTA (single component)
|
|
194
|
+
atomic_layer: Molecule # Step 8a: Compose Text Group (title + body + cta)
|
|
195
|
+
atomic_layer: Organism # Step 8c: Content Area (complete section)
|
|
196
|
+
atomic_layer: Template # Step 13: Render HTML (structure)
|
|
197
|
+
atomic_layer: Page # Step 14: Export PNG (final instance)
|
|
198
|
+
atomic_layer: Config # Step 1: Load Format Config
|
|
199
|
+
atomic_layer: Strategy # Step 3: Analyze Brief
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
#### 5. `Entrada` (Inputs)
|
|
205
|
+
|
|
206
|
+
**Type:** `array of objects`
|
|
207
|
+
**Required:** ✅ Yes (can be empty array if no inputs)
|
|
208
|
+
|
|
209
|
+
**Purpose:** Defines all inputs required by the task, with types, sources, and constraints.
|
|
210
|
+
|
|
211
|
+
**Structure:**
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
**Entrada:**
|
|
215
|
+
- campo: [field name]
|
|
216
|
+
tipo: [type definition]
|
|
217
|
+
origem: [source step or config]
|
|
218
|
+
obrigatório: [true|false]
|
|
219
|
+
padrão: [default value] (optional)
|
|
220
|
+
validação: [validation rule] (optional)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Field Details:**
|
|
224
|
+
|
|
225
|
+
| Sub-field | Type | Required | Description |
|
|
226
|
+
|-----------|------|----------|-------------|
|
|
227
|
+
| `campo` | string | ✅ Yes | Field name (camelCase) |
|
|
228
|
+
| `tipo` | string | ✅ Yes | Type definition (see Type System below) |
|
|
229
|
+
| `origem` | string | ✅ Yes | Source step ID or "config" or "user input" |
|
|
230
|
+
| `obrigatório` | boolean | ✅ Yes | Whether field is required |
|
|
231
|
+
| `padrão` | any | ⚠️ Optional | Default value if not provided |
|
|
232
|
+
| `validação` | string | ⚠️ Optional | Validation rule or JSON Schema reference |
|
|
233
|
+
|
|
234
|
+
**Examples:**
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
**Entrada:**
|
|
238
|
+
- campo: adCopy
|
|
239
|
+
tipo: object { title: string, body: string, cta: string }
|
|
240
|
+
origem: Step 5 (craftCopy)
|
|
241
|
+
obrigatório: true
|
|
242
|
+
validação: |
|
|
243
|
+
title.length >= 1 && title.length <= 100
|
|
244
|
+
body.length >= 1 && body.length <= 500
|
|
245
|
+
cta.length >= 1 && cta.length <= 30
|
|
246
|
+
|
|
247
|
+
- campo: brand
|
|
248
|
+
tipo: object (Brand schema)
|
|
249
|
+
origem: Step 2 (loadBrand)
|
|
250
|
+
obrigatório: true
|
|
251
|
+
|
|
252
|
+
- campo: ready_copy
|
|
253
|
+
tipo: object { title?, body?, cta? } | null
|
|
254
|
+
origem: User Input (config)
|
|
255
|
+
obrigatório: false
|
|
256
|
+
padrão: null
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
#### 6. `Saída` (Outputs)
|
|
262
|
+
|
|
263
|
+
**Type:** `array of objects`
|
|
264
|
+
**Required:** ✅ Yes (can be empty array if no outputs)
|
|
265
|
+
|
|
266
|
+
**Purpose:** Defines all outputs produced by the task, with types, destinations, and persistence.
|
|
267
|
+
|
|
268
|
+
**Structure:**
|
|
269
|
+
|
|
270
|
+
```yaml
|
|
271
|
+
**Saída:**
|
|
272
|
+
- campo: [field name]
|
|
273
|
+
tipo: [type definition]
|
|
274
|
+
destino: [destination step(s) or state]
|
|
275
|
+
persistido: [true|false]
|
|
276
|
+
cache_key: [key] (if cacheable)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Field Details:**
|
|
280
|
+
|
|
281
|
+
| Sub-field | Type | Required | Description |
|
|
282
|
+
|-----------|------|----------|-------------|
|
|
283
|
+
| `campo` | string | ✅ Yes | Field name (camelCase) |
|
|
284
|
+
| `tipo` | string | ✅ Yes | Type definition |
|
|
285
|
+
| `destino` | string or array | ✅ Yes | Destination step(s) or "state" or "output" |
|
|
286
|
+
| `persistido` | boolean | ✅ Yes | Whether saved to ad-spec.json or DB |
|
|
287
|
+
| `cache_key` | string | ⚠️ Optional | Cache key if output is cacheable |
|
|
288
|
+
|
|
289
|
+
**Examples:**
|
|
290
|
+
|
|
291
|
+
```yaml
|
|
292
|
+
**Saída:**
|
|
293
|
+
- campo: formatConfig
|
|
294
|
+
tipo: object { formatId, canvas, safeZones, contentArea }
|
|
295
|
+
destino: [Step 8, Step 10, Step 11, Step 12, Step 13, Step 14]
|
|
296
|
+
persistido: false # Kept in memory only
|
|
297
|
+
|
|
298
|
+
- campo: adAnalysis
|
|
299
|
+
tipo: object { goal, targetAudience, urgencyLevel, emotionalTriggers }
|
|
300
|
+
destino: state (ad-spec.json)
|
|
301
|
+
persistido: true
|
|
302
|
+
|
|
303
|
+
- campo: designTokens
|
|
304
|
+
tipo: object { spacing, typography, colors, radius, shadows }
|
|
305
|
+
destino: Step 13 (renderHTML)
|
|
306
|
+
persistido: false
|
|
307
|
+
cache_key: format_${formatConfig.formatId}_${formatConfig.orientation}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
### Optional Fields
|
|
313
|
+
|
|
314
|
+
#### 7. `Checklist`
|
|
315
|
+
|
|
316
|
+
**Type:** `object with arrays`
|
|
317
|
+
**Required:** ⚠️ Recommended
|
|
318
|
+
|
|
319
|
+
**Purpose:** Defines validations (pre-conditions, post-conditions, acceptance criteria) for automated and manual testing.
|
|
320
|
+
|
|
321
|
+
**Structure:**
|
|
322
|
+
|
|
323
|
+
```yaml
|
|
324
|
+
**Checklist:**
|
|
325
|
+
pre-conditions:
|
|
326
|
+
- [ ] [description]
|
|
327
|
+
tipo: pre-condition
|
|
328
|
+
blocker: [true|false]
|
|
329
|
+
validação: [logic or test path]
|
|
330
|
+
error_message: [message if fails]
|
|
331
|
+
|
|
332
|
+
post-conditions:
|
|
333
|
+
- [ ] [description]
|
|
334
|
+
tipo: post-condition
|
|
335
|
+
blocker: [true|false]
|
|
336
|
+
validação: [logic or test path]
|
|
337
|
+
rollback: [true|false]
|
|
338
|
+
|
|
339
|
+
acceptance-criteria:
|
|
340
|
+
- [ ] [description]
|
|
341
|
+
tipo: acceptance
|
|
342
|
+
blocker: false
|
|
343
|
+
story: [STORY-XXX]
|
|
344
|
+
manual_check: [true|false]
|
|
345
|
+
test: [test file path]
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**Checklist Types:**
|
|
349
|
+
|
|
350
|
+
1. **Pre-conditions** (Run BEFORE task)
|
|
351
|
+
- Validate inputs exist and are valid
|
|
352
|
+
- Check dependencies are met
|
|
353
|
+
- Verify environment is ready
|
|
354
|
+
- **Blocking:** Task aborts if pre-condition fails
|
|
355
|
+
|
|
356
|
+
2. **Post-conditions** (Run AFTER task)
|
|
357
|
+
- Validate outputs match schema
|
|
358
|
+
- Check business rules
|
|
359
|
+
- Verify no side effects
|
|
360
|
+
- **Blocking:** Task rolls back if post-condition fails
|
|
361
|
+
|
|
362
|
+
3. **Acceptance Criteria** (Run AFTER workflow)
|
|
363
|
+
- Validate Story requirements
|
|
364
|
+
- Can be manual (human review)
|
|
365
|
+
- Can be automated (integration tests)
|
|
366
|
+
- **Non-blocking:** Log failure, continue workflow
|
|
367
|
+
|
|
368
|
+
**Examples:**
|
|
369
|
+
|
|
370
|
+
```yaml
|
|
371
|
+
**Checklist:**
|
|
372
|
+
pre-conditions:
|
|
373
|
+
- [ ] brand.typography exists and is valid
|
|
374
|
+
tipo: pre-condition
|
|
375
|
+
blocker: true
|
|
376
|
+
validação: |
|
|
377
|
+
if (!brand.typography || !brand.typography.primaryFont) {
|
|
378
|
+
throw new Error("Brand typography not loaded");
|
|
379
|
+
}
|
|
380
|
+
error_message: "Brand typography missing or invalid"
|
|
381
|
+
|
|
382
|
+
- [ ] adCopy.title is not empty
|
|
383
|
+
tipo: pre-condition
|
|
384
|
+
blocker: true
|
|
385
|
+
validação: "expect(adCopy.title).toBeTruthy()"
|
|
386
|
+
error_message: "Copy title is required"
|
|
387
|
+
|
|
388
|
+
post-conditions:
|
|
389
|
+
- [ ] typography.title.htmlContent is valid HTML
|
|
390
|
+
tipo: post-condition
|
|
391
|
+
blocker: true
|
|
392
|
+
validação: |
|
|
393
|
+
const isValid = await validateHTML(typography.title.htmlContent);
|
|
394
|
+
if (!isValid) throw new Error("Invalid HTML");
|
|
395
|
+
rollback: false
|
|
396
|
+
|
|
397
|
+
- [ ] All required transformations applied
|
|
398
|
+
tipo: post-condition
|
|
399
|
+
blocker: true
|
|
400
|
+
validação: |
|
|
401
|
+
expect(typography.title.transformations).toBeInstanceOf(Array);
|
|
402
|
+
expect(typography.title.transformations.length).toBeGreaterThan(0);
|
|
403
|
+
rollback: false
|
|
404
|
+
|
|
405
|
+
acceptance-criteria:
|
|
406
|
+
- [ ] Typography matches brand voice (bold, uppercase for urgent CTAs)
|
|
407
|
+
tipo: acceptance
|
|
408
|
+
blocker: false
|
|
409
|
+
story: STORY-006
|
|
410
|
+
manual_check: false
|
|
411
|
+
test: "tests/typography-brand-voice.test.js"
|
|
412
|
+
|
|
413
|
+
- [ ] Transformations are visually appealing
|
|
414
|
+
tipo: acceptance
|
|
415
|
+
blocker: false
|
|
416
|
+
story: STORY-006
|
|
417
|
+
manual_check: true
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
#### 8. `Template`
|
|
423
|
+
|
|
424
|
+
**Type:** `object`
|
|
425
|
+
**Required:** ⚠️ Optional (but recommended for Agente executors)
|
|
426
|
+
|
|
427
|
+
**Purpose:** References template files that define input/output schemas, prompts, or UI forms.
|
|
428
|
+
|
|
429
|
+
**Structure:**
|
|
430
|
+
|
|
431
|
+
```yaml
|
|
432
|
+
**Template:**
|
|
433
|
+
- path: [relative path]
|
|
434
|
+
type: [input|output|prompt|ui|script]
|
|
435
|
+
version: [X.Y.Z]
|
|
436
|
+
variables: [array of variable names used in template]
|
|
437
|
+
schema: [JSON Schema reference] (optional)
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**Template Types:**
|
|
441
|
+
|
|
442
|
+
| Type | Purpose | Example |
|
|
443
|
+
|------|---------|---------|
|
|
444
|
+
| `input` | Validates input schema | `templates/input-schemas/analyze-brief.json` |
|
|
445
|
+
| `output` | Validates output schema | `templates/output-schemas/analyze-brief.json` |
|
|
446
|
+
| `prompt` | AI agent prompt structure | `expansion-packs/.../analyze-ad-brief.md` |
|
|
447
|
+
| `ui` | Human interface form | `templates/ui-forms/manual-approval.html` |
|
|
448
|
+
| `script` | Worker script template | `templates/scripts/image-processor.sh` |
|
|
449
|
+
|
|
450
|
+
**Examples:**
|
|
451
|
+
|
|
452
|
+
```yaml
|
|
453
|
+
# Agente executor with prompt template
|
|
454
|
+
**Template:**
|
|
455
|
+
- path: expansion-packs/instagram-content-creator/tasks/ads/analyze-ad-brief.md
|
|
456
|
+
type: prompt
|
|
457
|
+
version: 2.1.0
|
|
458
|
+
variables: [brief_text, brand_id, campaign_goal, ready_copy]
|
|
459
|
+
schema: expansion-packs/instagram-content-creator/schemas/analyze-brief-output.json
|
|
460
|
+
|
|
461
|
+
# Worker executor with script template
|
|
462
|
+
**Template:**
|
|
463
|
+
- path: scripts/utils/format-loader.js
|
|
464
|
+
type: script
|
|
465
|
+
version: 1.0.0
|
|
466
|
+
variables: [format_id, orientation]
|
|
467
|
+
|
|
468
|
+
# Humano executor with UI form
|
|
469
|
+
**Template:**
|
|
470
|
+
- path: templates/ui-forms/manual-review-ad-quality.html
|
|
471
|
+
type: ui
|
|
472
|
+
version: 1.0.0
|
|
473
|
+
variables: [ad_preview_url, quality_criteria]
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
#### 9. `Tools`
|
|
479
|
+
|
|
480
|
+
**Type:** `object`
|
|
481
|
+
**Required:** ⚠️ Recommended (to document reusability)
|
|
482
|
+
|
|
483
|
+
**Purpose:** Catalogs reusable tools/functions used by the task, enabling:
|
|
484
|
+
- **Reusability tracking** (which tasks share tools)
|
|
485
|
+
- **Versioning** (tool updates affect which tasks)
|
|
486
|
+
- **Cost tracking** (tool API costs)
|
|
487
|
+
|
|
488
|
+
**Structure:**
|
|
489
|
+
|
|
490
|
+
```yaml
|
|
491
|
+
**Tools:**
|
|
492
|
+
- [tool_name]:
|
|
493
|
+
version: [X.Y.Z]
|
|
494
|
+
used_for: [description]
|
|
495
|
+
shared_with: [array of step IDs or "global"]
|
|
496
|
+
cost: $[Y] per call (optional)
|
|
497
|
+
cacheable: [true|false] (optional)
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
**Examples:**
|
|
501
|
+
|
|
502
|
+
```yaml
|
|
503
|
+
**Tools:**
|
|
504
|
+
- callAgent:
|
|
505
|
+
version: 1.0.0
|
|
506
|
+
used_for: AIOS agent caller with retry logic
|
|
507
|
+
shared_with: [Step 3, Step 4, Step 5, Step 6, Step 7, Step 8, Step 9, Step 11]
|
|
508
|
+
cost: varies by agent
|
|
509
|
+
|
|
510
|
+
- validateHTML:
|
|
511
|
+
version: 2.1.0
|
|
512
|
+
used_for: HTML validation using htmlhint
|
|
513
|
+
shared_with: [Step 6, Step 13]
|
|
514
|
+
|
|
515
|
+
- detectFaces:
|
|
516
|
+
version: 1.0.0
|
|
517
|
+
used_for: Face detection via OpenRouter Gemini 2.5 Flash
|
|
518
|
+
shared_with: [Step 10]
|
|
519
|
+
cost: $0.002 per image
|
|
520
|
+
|
|
521
|
+
- validateContrast:
|
|
522
|
+
version: 1.0.0
|
|
523
|
+
used_for: WCAG AA color contrast validation
|
|
524
|
+
shared_with: [Step 2, Step 7]
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
#### 10. `Scripts`
|
|
530
|
+
|
|
531
|
+
**Type:** `object`
|
|
532
|
+
**Required:** ⚠️ Optional (for Worker executors primarily)
|
|
533
|
+
|
|
534
|
+
**Purpose:** References custom scripts executed by the task.
|
|
535
|
+
|
|
536
|
+
**Structure:**
|
|
537
|
+
|
|
538
|
+
```yaml
|
|
539
|
+
**Scripts:**
|
|
540
|
+
- [script_path]:
|
|
541
|
+
description: [what it does]
|
|
542
|
+
language: [javascript|python|bash|etc]
|
|
543
|
+
version: [X.Y.Z] (optional)
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
**Examples:**
|
|
547
|
+
|
|
548
|
+
```yaml
|
|
549
|
+
**Scripts:**
|
|
550
|
+
- scripts/utils/format-loader.js:
|
|
551
|
+
description: Loads format configuration from JSON file
|
|
552
|
+
language: javascript
|
|
553
|
+
version: 1.0.0
|
|
554
|
+
|
|
555
|
+
- scripts/utils/face-detection.js:
|
|
556
|
+
description: Wrapper for OpenRouter face detection API
|
|
557
|
+
language: javascript
|
|
558
|
+
version: 1.2.0
|
|
559
|
+
|
|
560
|
+
- scripts/export/puppeteer-renderer.js:
|
|
561
|
+
description: Renders HTML to PNG using Puppeteer
|
|
562
|
+
language: javascript
|
|
563
|
+
version: 2.0.0
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
#### 11. `Performance`
|
|
569
|
+
|
|
570
|
+
**Type:** `object`
|
|
571
|
+
**Required:** ⚠️ Recommended (for optimization)
|
|
572
|
+
|
|
573
|
+
**Purpose:** Documents expected performance metrics and optimization opportunities.
|
|
574
|
+
|
|
575
|
+
**Structure:**
|
|
576
|
+
|
|
577
|
+
```yaml
|
|
578
|
+
**Performance:**
|
|
579
|
+
- duration_expected: [X]ms
|
|
580
|
+
- cost_estimated: $[Y] (for AI)
|
|
581
|
+
- cacheable: [true|false]
|
|
582
|
+
- cache_key: [identifier] (if cacheable)
|
|
583
|
+
- parallelizable: [true|false]
|
|
584
|
+
- parallel_with: [array of step IDs]
|
|
585
|
+
- skippable_when: [array of conditions]
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
**Examples:**
|
|
589
|
+
|
|
590
|
+
```yaml
|
|
591
|
+
# AI task (expensive, slow, not cacheable)
|
|
592
|
+
**Performance:**
|
|
593
|
+
- duration_expected: 3500ms
|
|
594
|
+
- cost_estimated: $0.0015
|
|
595
|
+
- cacheable: false
|
|
596
|
+
- parallelizable: false
|
|
597
|
+
|
|
598
|
+
# Config load (fast, cacheable)
|
|
599
|
+
**Performance:**
|
|
600
|
+
- duration_expected: 100ms
|
|
601
|
+
- cost_estimated: $0
|
|
602
|
+
- cacheable: true
|
|
603
|
+
- cache_key: format_${format_id}_${orientation}
|
|
604
|
+
- parallelizable: false
|
|
605
|
+
|
|
606
|
+
# Image selection (can run in parallel with template selection)
|
|
607
|
+
**Performance:**
|
|
608
|
+
- duration_expected: 2500ms
|
|
609
|
+
- cost_estimated: $0.001
|
|
610
|
+
- cacheable: false
|
|
611
|
+
- parallelizable: true
|
|
612
|
+
- parallel_with: [Step 4]
|
|
613
|
+
|
|
614
|
+
# Brief analysis (skippable in ready_copy mode)
|
|
615
|
+
**Performance:**
|
|
616
|
+
- duration_expected: 4000ms
|
|
617
|
+
- cost_estimated: $0.0025
|
|
618
|
+
- cacheable: false
|
|
619
|
+
- parallelizable: false
|
|
620
|
+
- skippable_when: [ready_copy=true]
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
625
|
+
#### 12. `Error Handling`
|
|
626
|
+
|
|
627
|
+
**Type:** `object`
|
|
628
|
+
**Required:** ⚠️ Recommended (for robustness)
|
|
629
|
+
|
|
630
|
+
**Purpose:** Defines error handling strategy for resilience.
|
|
631
|
+
|
|
632
|
+
**Structure:**
|
|
633
|
+
|
|
634
|
+
```yaml
|
|
635
|
+
**Error Handling:**
|
|
636
|
+
- strategy: [retry|fallback|abort]
|
|
637
|
+
- fallback: [description or value] (if strategy=fallback)
|
|
638
|
+
- retry:
|
|
639
|
+
max_attempts: [N]
|
|
640
|
+
backoff: [linear|exponential]
|
|
641
|
+
backoff_ms: [initial delay]
|
|
642
|
+
- abort_workflow: [true|false]
|
|
643
|
+
- notification: [log|email|slack|etc]
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
**Strategies:**
|
|
647
|
+
|
|
648
|
+
| Strategy | When to Use | Example |
|
|
649
|
+
|----------|-------------|---------|
|
|
650
|
+
| `retry` | Transient errors (API timeout, rate limit) | AI agent call failed with 429 |
|
|
651
|
+
| `fallback` | Recoverable errors (AI failed, use default) | Template selection → fallback to default |
|
|
652
|
+
| `abort` | Critical errors (invalid brand_id, missing template) | Brand not found → abort workflow |
|
|
653
|
+
|
|
654
|
+
**Examples:**
|
|
655
|
+
|
|
656
|
+
```yaml
|
|
657
|
+
# AI task with retry + fallback
|
|
658
|
+
**Error Handling:**
|
|
659
|
+
- strategy: fallback
|
|
660
|
+
- fallback: |
|
|
661
|
+
If AI fails, use config.ready_copy as analysis.
|
|
662
|
+
If ready_copy not available, use default analysis:
|
|
663
|
+
{ goal: "conversion", urgencyLevel: "medium", targetAudience: "general" }
|
|
664
|
+
- retry:
|
|
665
|
+
max_attempts: 3
|
|
666
|
+
backoff: exponential
|
|
667
|
+
backoff_ms: 1000
|
|
668
|
+
- abort_workflow: false
|
|
669
|
+
- notification: log
|
|
670
|
+
|
|
671
|
+
# Config load (critical - abort on failure)
|
|
672
|
+
**Error Handling:**
|
|
673
|
+
- strategy: abort
|
|
674
|
+
- retry:
|
|
675
|
+
max_attempts: 2
|
|
676
|
+
backoff: linear
|
|
677
|
+
backoff_ms: 500
|
|
678
|
+
- abort_workflow: true
|
|
679
|
+
- notification: email + slack
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
#### 13. `Metadata`
|
|
685
|
+
|
|
686
|
+
**Type:** `object`
|
|
687
|
+
**Required:** ⚠️ Recommended (for traceability)
|
|
688
|
+
|
|
689
|
+
**Purpose:** Links task to Stories, versions, and dependencies for project management.
|
|
690
|
+
|
|
691
|
+
**Structure:**
|
|
692
|
+
|
|
693
|
+
```yaml
|
|
694
|
+
**Metadata:**
|
|
695
|
+
- story: [STORY-XXX]
|
|
696
|
+
- version: [X.Y.Z]
|
|
697
|
+
- dependencies: [array of step IDs]
|
|
698
|
+
- breaking_changes: [array of changes]
|
|
699
|
+
- author: [name]
|
|
700
|
+
- created_at: [YYYY-MM-DD]
|
|
701
|
+
- updated_at: [YYYY-MM-DD]
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
**Examples:**
|
|
705
|
+
|
|
706
|
+
```yaml
|
|
707
|
+
**Metadata:**
|
|
708
|
+
- story: STORY-010.1
|
|
709
|
+
- version: 2.1.0
|
|
710
|
+
- dependencies: [Step 10]
|
|
711
|
+
- breaking_changes:
|
|
712
|
+
- Output format changed: added computedSpacing object
|
|
713
|
+
- Removed nested fallback (SMELL 1 fix)
|
|
714
|
+
- author: Brad Frost Clone
|
|
715
|
+
- created_at: 2025-11-10
|
|
716
|
+
- updated_at: 2025-11-13
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
## Type System
|
|
722
|
+
|
|
723
|
+
### Basic Types
|
|
724
|
+
|
|
725
|
+
```yaml
|
|
726
|
+
string # Text
|
|
727
|
+
number # Number (integer or float)
|
|
728
|
+
boolean # true or false
|
|
729
|
+
null # Null value
|
|
730
|
+
any # Any type (avoid when possible)
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
### Complex Types
|
|
734
|
+
|
|
735
|
+
```yaml
|
|
736
|
+
array # Array of items
|
|
737
|
+
array<string> # Array of strings
|
|
738
|
+
array<number> # Array of numbers
|
|
739
|
+
|
|
740
|
+
object # Generic object
|
|
741
|
+
object { key: type, key: type } # Object with defined keys
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
### Optional Types
|
|
745
|
+
|
|
746
|
+
```yaml
|
|
747
|
+
string | null # String or null
|
|
748
|
+
object { key?: type } # Object with optional key (? suffix)
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
### Custom Types (Reference Schemas)
|
|
752
|
+
|
|
753
|
+
```yaml
|
|
754
|
+
Brand # References schemas/Brand.json
|
|
755
|
+
FormatConfig # References schemas/FormatConfig.json
|
|
756
|
+
AdAnalysis # References schemas/AdAnalysis.json
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
**Examples:**
|
|
760
|
+
|
|
761
|
+
```yaml
|
|
762
|
+
- campo: adCopy
|
|
763
|
+
tipo: object { title: string, body: string, cta: string }
|
|
764
|
+
|
|
765
|
+
- campo: faces
|
|
766
|
+
tipo: array<object { top: number, left: number, bottom: number, right: number }>
|
|
767
|
+
|
|
768
|
+
- campo: ready_copy
|
|
769
|
+
tipo: object { title?: string, body?: string, cta?: string } | null
|
|
770
|
+
|
|
771
|
+
- campo: brand
|
|
772
|
+
tipo: Brand # References schemas/Brand.json
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
## Validation Rules
|
|
778
|
+
|
|
779
|
+
### Required Field Validation
|
|
780
|
+
|
|
781
|
+
```javascript
|
|
782
|
+
function validateTask(task) {
|
|
783
|
+
const required = ['task', 'responsável', 'responsavel_type', 'atomic_layer', 'Entrada', 'Saída'];
|
|
784
|
+
|
|
785
|
+
for (const field of required) {
|
|
786
|
+
if (!task[field]) {
|
|
787
|
+
throw new Error(`Missing required field: ${field}`);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// Validate executor type
|
|
792
|
+
const validExecutors = ['Agente', 'Worker', 'Humano', 'Clone'];
|
|
793
|
+
if (!validExecutors.includes(task.responsavel_type)) {
|
|
794
|
+
throw new Error(`Invalid responsavel_type: ${task.responsavel_type}`);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
// Validate atomic layer
|
|
798
|
+
const validLayers = ['Atom', 'Molecule', 'Organism', 'Template', 'Page', 'Config', 'Strategy', 'Content', 'Media', 'Layout', 'Analysis'];
|
|
799
|
+
if (!validLayers.includes(task.atomic_layer)) {
|
|
800
|
+
throw new Error(`Invalid atomic_layer: ${task.atomic_layer}`);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
return true;
|
|
804
|
+
}
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
### Input/Output Validation
|
|
808
|
+
|
|
809
|
+
```javascript
|
|
810
|
+
function validateInputOutput(io, type) {
|
|
811
|
+
const required = ['campo', 'tipo', 'origem', 'obrigatório'];
|
|
812
|
+
|
|
813
|
+
for (const item of io) {
|
|
814
|
+
for (const field of required) {
|
|
815
|
+
if (!item[field] && field !== 'origem') { // origem not required for output
|
|
816
|
+
throw new Error(`${type} missing required field: ${field}`);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
return true;
|
|
822
|
+
}
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
---
|
|
826
|
+
|
|
827
|
+
## Examples by Executor Type
|
|
828
|
+
|
|
829
|
+
### Agente (AI-Powered)
|
|
830
|
+
|
|
831
|
+
```yaml
|
|
832
|
+
#### Step 3: Analyze Brief
|
|
833
|
+
|
|
834
|
+
task: analyzeBrief()
|
|
835
|
+
responsável: Ad Strategist
|
|
836
|
+
responsavel_type: Agente
|
|
837
|
+
atomic_layer: Strategy
|
|
838
|
+
|
|
839
|
+
**Entrada:**
|
|
840
|
+
- campo: brief_text
|
|
841
|
+
tipo: string
|
|
842
|
+
origem: User Input (config)
|
|
843
|
+
obrigatório: true
|
|
844
|
+
validação: "length >= 50"
|
|
845
|
+
|
|
846
|
+
- campo: brand
|
|
847
|
+
tipo: Brand
|
|
848
|
+
origem: Step 2 (loadBrand)
|
|
849
|
+
obrigatório: true
|
|
850
|
+
|
|
851
|
+
- campo: ready_copy
|
|
852
|
+
tipo: object { title?, body?, cta? } | null
|
|
853
|
+
origem: User Input (config)
|
|
854
|
+
obrigatório: false
|
|
855
|
+
padrão: null
|
|
856
|
+
|
|
857
|
+
**Saída:**
|
|
858
|
+
- campo: adAnalysis
|
|
859
|
+
tipo: object { goal, targetAudience, urgencyLevel, emotionalTriggers, keyMessage }
|
|
860
|
+
destino: state (ad-spec.json)
|
|
861
|
+
persistido: true
|
|
862
|
+
|
|
863
|
+
**Checklist:**
|
|
864
|
+
pre-conditions:
|
|
865
|
+
- [ ] brief_text has minimum 50 characters
|
|
866
|
+
tipo: pre-condition
|
|
867
|
+
blocker: true
|
|
868
|
+
validação: "expect(brief_text.length).toBeGreaterThanOrEqual(50)"
|
|
869
|
+
|
|
870
|
+
post-conditions:
|
|
871
|
+
- [ ] adAnalysis contains all required fields
|
|
872
|
+
tipo: post-condition
|
|
873
|
+
blocker: true
|
|
874
|
+
validação: |
|
|
875
|
+
expect(adAnalysis.goal).toBeTruthy();
|
|
876
|
+
expect(adAnalysis.urgencyLevel).toMatch(/high|medium|low/);
|
|
877
|
+
|
|
878
|
+
acceptance-criteria:
|
|
879
|
+
- [ ] Analysis aligns with brand voice
|
|
880
|
+
tipo: acceptance
|
|
881
|
+
blocker: false
|
|
882
|
+
story: STORY-003
|
|
883
|
+
manual_check: false
|
|
884
|
+
test: "tests/brief-analysis-brand-alignment.test.js"
|
|
885
|
+
|
|
886
|
+
**Template:**
|
|
887
|
+
- path: expansion-packs/instagram-content-creator/tasks/ads/analyze-ad-brief.md
|
|
888
|
+
type: prompt
|
|
889
|
+
version: 2.1.0
|
|
890
|
+
variables: [brief_text, brand_id, campaign_goal, ready_copy]
|
|
891
|
+
|
|
892
|
+
**Tools:**
|
|
893
|
+
- callAgent:
|
|
894
|
+
version: 1.0.0
|
|
895
|
+
used_for: Execute AI agent with retry
|
|
896
|
+
shared_with: [Step 4, Step 5, Step 6, Step 7, Step 8, Step 9, Step 11]
|
|
897
|
+
|
|
898
|
+
**Scripts:**
|
|
899
|
+
- N/A
|
|
900
|
+
|
|
901
|
+
**Performance:**
|
|
902
|
+
- duration_expected: 4000ms
|
|
903
|
+
- cost_estimated: $0.0025
|
|
904
|
+
- cacheable: false
|
|
905
|
+
- parallelizable: false
|
|
906
|
+
- skippable_when: [ready_copy=true]
|
|
907
|
+
|
|
908
|
+
**Error Handling:**
|
|
909
|
+
- strategy: fallback
|
|
910
|
+
- fallback: |
|
|
911
|
+
Use config.ready_copy as analysis if available.
|
|
912
|
+
Otherwise, use default analysis: { goal: "conversion", urgencyLevel: "medium", targetAudience: "general" }
|
|
913
|
+
- retry:
|
|
914
|
+
max_attempts: 3
|
|
915
|
+
backoff: exponential
|
|
916
|
+
backoff_ms: 1000
|
|
917
|
+
- abort_workflow: false
|
|
918
|
+
- notification: log
|
|
919
|
+
|
|
920
|
+
**Metadata:**
|
|
921
|
+
- story: STORY-003
|
|
922
|
+
- version: 2.0.0
|
|
923
|
+
- dependencies: [Step 2]
|
|
924
|
+
- breaking_changes: []
|
|
925
|
+
- author: Creative Team
|
|
926
|
+
- created_at: 2025-10-01
|
|
927
|
+
- updated_at: 2025-11-10
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
---
|
|
931
|
+
|
|
932
|
+
### Worker (Script-Based)
|
|
933
|
+
|
|
934
|
+
```yaml
|
|
935
|
+
#### Step 1: Load Format Configuration
|
|
936
|
+
|
|
937
|
+
task: loadFormatConfig()
|
|
938
|
+
responsável: format-loader.js
|
|
939
|
+
responsavel_type: Worker
|
|
940
|
+
atomic_layer: Config
|
|
941
|
+
|
|
942
|
+
**Entrada:**
|
|
943
|
+
- campo: format_id
|
|
944
|
+
tipo: string
|
|
945
|
+
origem: User Input (config)
|
|
946
|
+
obrigatório: true
|
|
947
|
+
validação: "format_id in ['instagram-stories', 'instagram-reels', 'instagram-feed-square', 'instagram-feed-portrait']"
|
|
948
|
+
|
|
949
|
+
- campo: orientation
|
|
950
|
+
tipo: string
|
|
951
|
+
origem: User Input (config)
|
|
952
|
+
obrigatório: false
|
|
953
|
+
padrão: "portrait"
|
|
954
|
+
validação: "orientation in ['portrait', 'landscape']"
|
|
955
|
+
|
|
956
|
+
**Saída:**
|
|
957
|
+
- campo: formatConfig
|
|
958
|
+
tipo: FormatConfig
|
|
959
|
+
destino: [Step 8, Step 10, Step 11, Step 12, Step 13, Step 14]
|
|
960
|
+
persistido: false
|
|
961
|
+
|
|
962
|
+
**Checklist:**
|
|
963
|
+
pre-conditions:
|
|
964
|
+
- [ ] format_id is valid
|
|
965
|
+
tipo: pre-condition
|
|
966
|
+
blocker: true
|
|
967
|
+
validação: |
|
|
968
|
+
const validFormats = ['instagram-stories', 'instagram-reels', 'instagram-feed-square', 'instagram-feed-portrait'];
|
|
969
|
+
if (!validFormats.includes(format_id)) {
|
|
970
|
+
throw new Error(`Invalid format_id: ${format_id}`);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
post-conditions:
|
|
974
|
+
- [ ] formatConfig.safeZones are defined
|
|
975
|
+
tipo: post-condition
|
|
976
|
+
blocker: true
|
|
977
|
+
validação: |
|
|
978
|
+
expect(formatConfig.safeZones).toBeDefined();
|
|
979
|
+
expect(formatConfig.safeZones.top).toBeGreaterThan(0);
|
|
980
|
+
|
|
981
|
+
- [ ] formatConfig.contentArea.height calculated correctly
|
|
982
|
+
tipo: post-condition
|
|
983
|
+
blocker: true
|
|
984
|
+
validação: |
|
|
985
|
+
const expectedHeight = formatConfig.canvas.height - formatConfig.safeZones.top - formatConfig.safeZones.bottom;
|
|
986
|
+
expect(formatConfig.contentArea.height).toBe(expectedHeight);
|
|
987
|
+
|
|
988
|
+
**Template:**
|
|
989
|
+
- path: config/ad-formats.json
|
|
990
|
+
type: input
|
|
991
|
+
version: 1.0.0
|
|
992
|
+
variables: [format_id, orientation]
|
|
993
|
+
schema: schemas/FormatConfig.json
|
|
994
|
+
|
|
995
|
+
**Tools:**
|
|
996
|
+
- N/A
|
|
997
|
+
|
|
998
|
+
**Scripts:**
|
|
999
|
+
- scripts/utils/format-loader.js:
|
|
1000
|
+
description: Reads format JSON and calculates content area
|
|
1001
|
+
language: javascript
|
|
1002
|
+
version: 1.0.0
|
|
1003
|
+
|
|
1004
|
+
**Performance:**
|
|
1005
|
+
- duration_expected: 50ms
|
|
1006
|
+
- cost_estimated: $0
|
|
1007
|
+
- cacheable: true
|
|
1008
|
+
- cache_key: format_${format_id}_${orientation}
|
|
1009
|
+
- parallelizable: true
|
|
1010
|
+
- parallel_with: [Step 2]
|
|
1011
|
+
- skippable_when: []
|
|
1012
|
+
|
|
1013
|
+
**Error Handling:**
|
|
1014
|
+
- strategy: abort
|
|
1015
|
+
- retry:
|
|
1016
|
+
max_attempts: 2
|
|
1017
|
+
backoff: linear
|
|
1018
|
+
backoff_ms: 100
|
|
1019
|
+
- abort_workflow: true
|
|
1020
|
+
- notification: log + email
|
|
1021
|
+
|
|
1022
|
+
**Metadata:**
|
|
1023
|
+
- story: DECISION-02
|
|
1024
|
+
- version: 1.0.0
|
|
1025
|
+
- dependencies: []
|
|
1026
|
+
- breaking_changes: []
|
|
1027
|
+
- author: Brad Frost Clone
|
|
1028
|
+
- created_at: 2025-11-10
|
|
1029
|
+
- updated_at: 2025-11-10
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
---
|
|
1033
|
+
|
|
1034
|
+
### Humano (Manual Review)
|
|
1035
|
+
|
|
1036
|
+
```yaml
|
|
1037
|
+
#### Step 15: Quality Review (Optional)
|
|
1038
|
+
|
|
1039
|
+
task: reviewAdQuality()
|
|
1040
|
+
responsável: Quality Assurance Team
|
|
1041
|
+
responsavel_type: Humano
|
|
1042
|
+
atomic_layer: Page
|
|
1043
|
+
|
|
1044
|
+
**Entrada:**
|
|
1045
|
+
- campo: final_ad_png
|
|
1046
|
+
tipo: string (file path)
|
|
1047
|
+
origem: Step 14 (exportPNG)
|
|
1048
|
+
obrigatório: true
|
|
1049
|
+
|
|
1050
|
+
- campo: ad_spec
|
|
1051
|
+
tipo: object (complete ad specification)
|
|
1052
|
+
origem: state (ad-spec.json)
|
|
1053
|
+
obrigatório: true
|
|
1054
|
+
|
|
1055
|
+
- campo: quality_criteria
|
|
1056
|
+
tipo: array<string>
|
|
1057
|
+
origem: config
|
|
1058
|
+
obrigatório: true
|
|
1059
|
+
padrão: ["brand_alignment", "text_legibility", "visual_appeal", "no_face_coverage"]
|
|
1060
|
+
|
|
1061
|
+
**Saída:**
|
|
1062
|
+
- campo: quality_review
|
|
1063
|
+
tipo: object { approved: boolean, score: number, feedback: string, reviewer: string }
|
|
1064
|
+
destino: state (ad-spec.json)
|
|
1065
|
+
persistido: true
|
|
1066
|
+
|
|
1067
|
+
**Checklist:**
|
|
1068
|
+
pre-conditions:
|
|
1069
|
+
- [ ] final_ad_png file exists
|
|
1070
|
+
tipo: pre-condition
|
|
1071
|
+
blocker: true
|
|
1072
|
+
validação: |
|
|
1073
|
+
const fs = require('fs');
|
|
1074
|
+
if (!fs.existsSync(final_ad_png)) {
|
|
1075
|
+
throw new Error(`Ad PNG not found: ${final_ad_png}`);
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
acceptance-criteria:
|
|
1079
|
+
- [ ] Ad meets all quality criteria
|
|
1080
|
+
tipo: acceptance
|
|
1081
|
+
blocker: false
|
|
1082
|
+
story: STORY-QA
|
|
1083
|
+
manual_check: true
|
|
1084
|
+
|
|
1085
|
+
- [ ] Reviewer provided detailed feedback
|
|
1086
|
+
tipo: acceptance
|
|
1087
|
+
blocker: false
|
|
1088
|
+
story: STORY-QA
|
|
1089
|
+
manual_check: true
|
|
1090
|
+
|
|
1091
|
+
**Template:**
|
|
1092
|
+
- path: templates/ui-forms/quality-review-form.html
|
|
1093
|
+
type: ui
|
|
1094
|
+
version: 1.0.0
|
|
1095
|
+
variables: [final_ad_png, ad_spec, quality_criteria]
|
|
1096
|
+
|
|
1097
|
+
**Tools:**
|
|
1098
|
+
- N/A
|
|
1099
|
+
|
|
1100
|
+
**Scripts:**
|
|
1101
|
+
- N/A
|
|
1102
|
+
|
|
1103
|
+
**Performance:**
|
|
1104
|
+
- duration_expected: 180000ms # 3 minutes (manual review)
|
|
1105
|
+
- cost_estimated: $5 # Human labor cost
|
|
1106
|
+
- cacheable: false
|
|
1107
|
+
- parallelizable: false
|
|
1108
|
+
- skippable_when: [skip_qa=true, batch_mode=true]
|
|
1109
|
+
|
|
1110
|
+
**Error Handling:**
|
|
1111
|
+
- strategy: fallback
|
|
1112
|
+
- fallback: Auto-approve if reviewer doesn't respond within 10 minutes
|
|
1113
|
+
- retry:
|
|
1114
|
+
max_attempts: 1
|
|
1115
|
+
backoff: linear
|
|
1116
|
+
backoff_ms: 600000 # 10 minutes
|
|
1117
|
+
- abort_workflow: false
|
|
1118
|
+
- notification: slack
|
|
1119
|
+
|
|
1120
|
+
**Metadata:**
|
|
1121
|
+
- story: STORY-QA
|
|
1122
|
+
- version: 1.0.0
|
|
1123
|
+
- dependencies: [Step 14]
|
|
1124
|
+
- breaking_changes: []
|
|
1125
|
+
- author: QA Team
|
|
1126
|
+
- created_at: 2025-11-13
|
|
1127
|
+
- updated_at: 2025-11-13
|
|
1128
|
+
```
|
|
1129
|
+
|
|
1130
|
+
---
|
|
1131
|
+
|
|
1132
|
+
### Clone (Mind Emulation)
|
|
1133
|
+
|
|
1134
|
+
```yaml
|
|
1135
|
+
#### Step 7c: Validate Components (Brad Frost Clone)
|
|
1136
|
+
|
|
1137
|
+
task: validateComponentsAtomicDesign()
|
|
1138
|
+
responsável: Brad Frost Clone
|
|
1139
|
+
responsavel_type: Clone
|
|
1140
|
+
atomic_layer: Atom
|
|
1141
|
+
|
|
1142
|
+
**Entrada:**
|
|
1143
|
+
- campo: ctaComponent
|
|
1144
|
+
tipo: object { text, style, colors }
|
|
1145
|
+
origem: Step 7a (designCTAComponent)
|
|
1146
|
+
obrigatório: true
|
|
1147
|
+
|
|
1148
|
+
- campo: badgeComponent
|
|
1149
|
+
tipo: object { text, style, colors } | null
|
|
1150
|
+
origem: Step 7b (designBadgeComponent)
|
|
1151
|
+
obrigatório: false
|
|
1152
|
+
|
|
1153
|
+
**Saída:**
|
|
1154
|
+
- campo: validation_result
|
|
1155
|
+
tipo: object { valid: boolean, violations: array<object { rule, severity, message }> }
|
|
1156
|
+
destino: state (ad-spec.json)
|
|
1157
|
+
persistido: true
|
|
1158
|
+
|
|
1159
|
+
**Checklist:**
|
|
1160
|
+
pre-conditions:
|
|
1161
|
+
- [ ] ctaComponent exists
|
|
1162
|
+
tipo: pre-condition
|
|
1163
|
+
blocker: true
|
|
1164
|
+
validação: "expect(ctaComponent).toBeDefined()"
|
|
1165
|
+
|
|
1166
|
+
post-conditions:
|
|
1167
|
+
- [ ] No Atomic Design violations detected
|
|
1168
|
+
tipo: post-condition
|
|
1169
|
+
blocker: true
|
|
1170
|
+
validação: |
|
|
1171
|
+
if (!validation_result.valid) {
|
|
1172
|
+
const criticalViolations = validation_result.violations.filter(v => v.severity === 'critical');
|
|
1173
|
+
if (criticalViolations.length > 0) {
|
|
1174
|
+
throw new Error(`Atomic Design violations: ${criticalViolations.map(v => v.message).join(', ')}`);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
- [ ] All components are context-agnostic (no positioning)
|
|
1179
|
+
tipo: post-condition
|
|
1180
|
+
blocker: true
|
|
1181
|
+
validação: |
|
|
1182
|
+
if (ctaComponent.position || ctaComponent.size) {
|
|
1183
|
+
throw new Error("CTA component has positioning data (DECISION-03 violation)");
|
|
1184
|
+
}
|
|
1185
|
+
if (badgeComponent && (badgeComponent.position || badgeComponent.size)) {
|
|
1186
|
+
throw new Error("Badge component has positioning data (DECISION-03 violation)");
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
acceptance-criteria:
|
|
1190
|
+
- [ ] Components follow Brad Frost's Atomic Design principles
|
|
1191
|
+
tipo: acceptance
|
|
1192
|
+
blocker: false
|
|
1193
|
+
story: DECISION-03
|
|
1194
|
+
manual_check: false
|
|
1195
|
+
|
|
1196
|
+
**Clone Configuration:**
|
|
1197
|
+
- heuristics: clones/brad_frost/heuristics.yaml
|
|
1198
|
+
- axioms: clones/brad_frost/axioms.yaml
|
|
1199
|
+
- ai_fallback: true
|
|
1200
|
+
|
|
1201
|
+
**Tools:**
|
|
1202
|
+
- callAgent:
|
|
1203
|
+
version: 1.0.0
|
|
1204
|
+
used_for: AI validation when heuristics are inconclusive
|
|
1205
|
+
shared_with: [Step 3, Step 4, Step 5, Step 6, Step 7, Step 8, Step 9, Step 11]
|
|
1206
|
+
|
|
1207
|
+
- validateHeuristics:
|
|
1208
|
+
version: 1.0.0
|
|
1209
|
+
used_for: Apply Brad Frost's design heuristics
|
|
1210
|
+
shared_with: [Step 7c only]
|
|
1211
|
+
|
|
1212
|
+
- validateAxioms:
|
|
1213
|
+
version: 1.0.0
|
|
1214
|
+
used_for: Validate against Atomic Design axioms
|
|
1215
|
+
shared_with: [Step 7c only]
|
|
1216
|
+
|
|
1217
|
+
**Scripts:**
|
|
1218
|
+
- clones/brad_frost/validate-atomic-design.js:
|
|
1219
|
+
description: Atomic Design validation with heuristics + axioms
|
|
1220
|
+
language: javascript
|
|
1221
|
+
version: 1.0.0
|
|
1222
|
+
|
|
1223
|
+
**Performance:**
|
|
1224
|
+
- duration_expected: 1500ms
|
|
1225
|
+
- cost_estimated: $0.001 # Mostly heuristics, minimal AI
|
|
1226
|
+
- cacheable: false
|
|
1227
|
+
- parallelizable: false
|
|
1228
|
+
- skippable_when: [skip_validation=true]
|
|
1229
|
+
|
|
1230
|
+
**Error Handling:**
|
|
1231
|
+
- strategy: abort
|
|
1232
|
+
- fallback: N/A (validation must pass)
|
|
1233
|
+
- retry:
|
|
1234
|
+
max_attempts: 1
|
|
1235
|
+
backoff: linear
|
|
1236
|
+
backoff_ms: 0
|
|
1237
|
+
- abort_workflow: true
|
|
1238
|
+
- notification: log + slack
|
|
1239
|
+
|
|
1240
|
+
**Metadata:**
|
|
1241
|
+
- story: DECISION-03
|
|
1242
|
+
- version: 1.0.0
|
|
1243
|
+
- dependencies: [Step 7a, Step 7b]
|
|
1244
|
+
- breaking_changes: []
|
|
1245
|
+
- author: Brad Frost Clone
|
|
1246
|
+
- created_at: 2025-11-13
|
|
1247
|
+
- updated_at: 2025-11-13
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
---
|
|
1251
|
+
|
|
1252
|
+
## Validation Checklist
|
|
1253
|
+
|
|
1254
|
+
Use this checklist to validate any AIOS Task:
|
|
1255
|
+
|
|
1256
|
+
### Required Fields
|
|
1257
|
+
|
|
1258
|
+
- [ ] `task` is defined and unique
|
|
1259
|
+
- [ ] `responsável` is defined
|
|
1260
|
+
- [ ] `responsavel_type` is one of: Agente, Worker, Humano, Clone
|
|
1261
|
+
- [ ] `atomic_layer` is defined (or explicitly marked N/A)
|
|
1262
|
+
- [ ] `Entrada` is defined (array, can be empty)
|
|
1263
|
+
- [ ] `Saída` is defined (array, can be empty)
|
|
1264
|
+
|
|
1265
|
+
### Input/Output Quality
|
|
1266
|
+
|
|
1267
|
+
- [ ] All inputs have: campo, tipo, origem, obrigatório
|
|
1268
|
+
- [ ] All outputs have: campo, tipo, destino, persistido
|
|
1269
|
+
- [ ] Types are well-defined (not just "object" or "any")
|
|
1270
|
+
- [ ] Sources/destinations reference valid steps
|
|
1271
|
+
|
|
1272
|
+
### Checklist Quality
|
|
1273
|
+
|
|
1274
|
+
- [ ] Pre-conditions validate inputs
|
|
1275
|
+
- [ ] Post-conditions validate outputs
|
|
1276
|
+
- [ ] Acceptance criteria link to Stories
|
|
1277
|
+
- [ ] Blocking conditions are appropriate
|
|
1278
|
+
- [ ] Validation logic is executable
|
|
1279
|
+
|
|
1280
|
+
### Templates & Tools
|
|
1281
|
+
|
|
1282
|
+
- [ ] Template referenced (if applicable)
|
|
1283
|
+
- [ ] Tools cataloged (if applicable)
|
|
1284
|
+
- [ ] Scripts listed (if applicable)
|
|
1285
|
+
- [ ] All references are valid paths
|
|
1286
|
+
|
|
1287
|
+
### Performance & Error Handling
|
|
1288
|
+
|
|
1289
|
+
- [ ] Duration expected is realistic
|
|
1290
|
+
- [ ] Cost estimated (for AI)
|
|
1291
|
+
- [ ] Cacheability considered
|
|
1292
|
+
- [ ] Parallelization opportunities identified
|
|
1293
|
+
- [ ] Error handling strategy defined
|
|
1294
|
+
- [ ] Retry logic appropriate
|
|
1295
|
+
|
|
1296
|
+
### Metadata
|
|
1297
|
+
|
|
1298
|
+
- [ ] Story linked (if applicable)
|
|
1299
|
+
- [ ] Version defined
|
|
1300
|
+
- [ ] Dependencies listed
|
|
1301
|
+
- [ ] Breaking changes documented
|
|
1302
|
+
|
|
1303
|
+
---
|
|
1304
|
+
|
|
1305
|
+
## Migration Guide (v2.0 → v3.0)
|
|
1306
|
+
|
|
1307
|
+
### Step 1: Add Missing Required Fields
|
|
1308
|
+
|
|
1309
|
+
```yaml
|
|
1310
|
+
# BEFORE (v2.0 - incomplete)
|
|
1311
|
+
#### Step 3: Analyze Brief
|
|
1312
|
+
|
|
1313
|
+
task: analyzeBrief()
|
|
1314
|
+
responsável: Ad Strategist
|
|
1315
|
+
|
|
1316
|
+
**Entrada:**
|
|
1317
|
+
**Saída:**
|
|
1318
|
+
|
|
1319
|
+
# AFTER (v3.0 - complete)
|
|
1320
|
+
#### Step 3: Analyze Brief
|
|
1321
|
+
|
|
1322
|
+
task: analyzeBrief()
|
|
1323
|
+
responsável: Ad Strategist
|
|
1324
|
+
responsavel_type: Agente # ← ADDED
|
|
1325
|
+
atomic_layer: Strategy # ← ADDED
|
|
1326
|
+
|
|
1327
|
+
**Entrada:**
|
|
1328
|
+
- campo: brief_text
|
|
1329
|
+
tipo: string
|
|
1330
|
+
origem: User Input (config)
|
|
1331
|
+
obrigatório: true
|
|
1332
|
+
|
|
1333
|
+
**Saída:**
|
|
1334
|
+
- campo: adAnalysis
|
|
1335
|
+
tipo: object { ... }
|
|
1336
|
+
destino: state (ad-spec.json)
|
|
1337
|
+
persistido: true
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
### Step 2: Structure Checklists
|
|
1341
|
+
|
|
1342
|
+
```yaml
|
|
1343
|
+
# BEFORE (v2.0 - inline validations)
|
|
1344
|
+
**Validações:**
|
|
1345
|
+
- ✅ brief_text has minimum 50 characters
|
|
1346
|
+
- ✅ adAnalysis contains required fields
|
|
1347
|
+
|
|
1348
|
+
# AFTER (v3.0 - structured checklist)
|
|
1349
|
+
**Checklist:**
|
|
1350
|
+
pre-conditions:
|
|
1351
|
+
- [ ] brief_text has minimum 50 characters
|
|
1352
|
+
tipo: pre-condition
|
|
1353
|
+
blocker: true
|
|
1354
|
+
validação: "expect(brief_text.length).toBeGreaterThanOrEqual(50)"
|
|
1355
|
+
|
|
1356
|
+
post-conditions:
|
|
1357
|
+
- [ ] adAnalysis contains all required fields
|
|
1358
|
+
tipo: post-condition
|
|
1359
|
+
blocker: true
|
|
1360
|
+
validação: |
|
|
1361
|
+
expect(adAnalysis.goal).toBeTruthy();
|
|
1362
|
+
expect(adAnalysis.urgencyLevel).toMatch(/high|medium|low/);
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1365
|
+
### Step 3: Add Performance Metrics
|
|
1366
|
+
|
|
1367
|
+
```yaml
|
|
1368
|
+
# BEFORE (v2.0 - no metrics)
|
|
1369
|
+
(no performance section)
|
|
1370
|
+
|
|
1371
|
+
# AFTER (v3.0 - with metrics)
|
|
1372
|
+
**Performance:**
|
|
1373
|
+
- duration_expected: 4000ms
|
|
1374
|
+
- cost_estimated: $0.0025
|
|
1375
|
+
- cacheable: false
|
|
1376
|
+
- parallelizable: false
|
|
1377
|
+
- skippable_when: [ready_copy=true]
|
|
1378
|
+
```
|
|
1379
|
+
|
|
1380
|
+
### Step 4: Add Error Handling
|
|
1381
|
+
|
|
1382
|
+
```yaml
|
|
1383
|
+
# BEFORE (v2.0 - implicit)
|
|
1384
|
+
(no error handling section)
|
|
1385
|
+
|
|
1386
|
+
# AFTER (v3.0 - explicit)
|
|
1387
|
+
**Error Handling:**
|
|
1388
|
+
- strategy: fallback
|
|
1389
|
+
- fallback: Use default analysis
|
|
1390
|
+
- retry:
|
|
1391
|
+
max_attempts: 3
|
|
1392
|
+
backoff: exponential
|
|
1393
|
+
backoff_ms: 1000
|
|
1394
|
+
- abort_workflow: false
|
|
1395
|
+
- notification: log
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
---
|
|
1399
|
+
|
|
1400
|
+
## Version History
|
|
1401
|
+
|
|
1402
|
+
| Version | Date | Author | Changes |
|
|
1403
|
+
|---------|------|--------|---------|
|
|
1404
|
+
| 1.0.0 | 2025-11-13 | Brad Frost Clone | Initial specification |
|
|
1405
|
+
|
|
1406
|
+
---
|
|
1407
|
+
|
|
1408
|
+
**END OF TASK FORMAT SPECIFICATION**
|
|
1409
|
+
|
|
1410
|
+
**Related Documents:**
|
|
1411
|
+
- `EXECUTOR-DECISION-TREE.md` - How to choose executor type
|
|
1412
|
+
- `TEMPLATE-SYSTEM-GUIDE.md` - Template design patterns
|
|
1413
|
+
- `TOOLS-AND-SCRIPTS-CATALOG.md` - Available tools reference
|
|
1414
|
+
|