create-genia-os 2.4.0 → 3.0.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/bin/index.js +332 -332
- package/package.json +42 -42
- package/template/.aiox-core/constitution.md +171 -0
- package/template/.aiox-core/core-config.yaml +388 -0
- package/template/.aiox-core/development/README.md +142 -0
- package/template/.aiox-core/development/agent-teams/team-all.yaml +15 -0
- package/template/.aiox-core/development/agent-teams/team-fullstack.yaml +18 -0
- package/template/.aiox-core/development/agent-teams/team-ide-minimal.yaml +10 -0
- package/template/.aiox-core/development/agent-teams/team-no-ui.yaml +13 -0
- package/template/.aiox-core/development/agent-teams/team-qa-focused.yaml +155 -0
- package/template/.aiox-core/development/agents/aiox-master.md +463 -0
- package/template/.aiox-core/development/agents/analyst/MEMORY.md +33 -0
- package/template/.aiox-core/development/agents/analyst.md +271 -0
- package/template/.aiox-core/development/agents/architect/MEMORY.md +39 -0
- package/template/.aiox-core/development/agents/architect.md +472 -0
- package/template/.aiox-core/development/agents/data-engineer/MEMORY.md +32 -0
- package/template/.aiox-core/development/agents/data-engineer.md +493 -0
- package/template/.aiox-core/development/agents/dev/MEMORY.md +46 -0
- package/template/.aiox-core/development/agents/dev.md +558 -0
- package/template/.aiox-core/development/agents/devops/MEMORY.md +39 -0
- package/template/.aiox-core/development/agents/devops.md +537 -0
- package/template/.aiox-core/development/agents/pm/MEMORY.md +38 -0
- package/template/.aiox-core/development/agents/pm.md +375 -0
- package/template/.aiox-core/development/agents/po/MEMORY.md +45 -0
- package/template/.aiox-core/development/agents/po.md +333 -0
- package/template/.aiox-core/development/agents/qa/MEMORY.md +42 -0
- package/template/.aiox-core/development/agents/qa.md +447 -0
- package/template/.aiox-core/development/agents/sm/MEMORY.md +31 -0
- package/template/.aiox-core/development/agents/sm.md +285 -0
- package/template/.aiox-core/development/agents/squad-creator.md +342 -0
- package/template/.aiox-core/development/agents/ux/MEMORY.md +31 -0
- package/template/.aiox-core/development/agents/ux-design-expert.md +493 -0
- package/template/.aiox-core/development/checklists/agent-quality-gate.md +559 -0
- package/template/.aiox-core/development/checklists/brownfield-compatibility-checklist.md +114 -0
- package/template/.aiox-core/development/checklists/issue-triage-checklist.md +35 -0
- package/template/.aiox-core/development/checklists/memory-audit-checklist.md +53 -0
- package/template/.aiox-core/development/checklists/self-critique-checklist.md +273 -0
- package/template/.aiox-core/development/data/decision-heuristics-framework.md +621 -0
- package/template/.aiox-core/development/data/quality-dimensions-framework.md +426 -0
- package/template/.aiox-core/development/data/tier-system-framework.md +475 -0
- package/template/.aiox-core/development/scripts/activation-runtime.js +63 -0
- package/template/.aiox-core/development/scripts/agent-assignment-resolver.js +231 -0
- package/template/.aiox-core/development/scripts/agent-config-loader.js +626 -0
- package/template/.aiox-core/development/scripts/agent-exit-hooks.js +96 -0
- package/template/.aiox-core/development/scripts/apply-inline-greeting-all-agents.js +146 -0
- package/template/.aiox-core/development/scripts/approval-workflow.js +643 -0
- package/template/.aiox-core/development/scripts/audit-agent-config.js +380 -0
- package/template/.aiox-core/development/scripts/backlog-manager.js +407 -0
- package/template/.aiox-core/development/scripts/backup-manager.js +607 -0
- package/template/.aiox-core/development/scripts/batch-update-agents-session-context.js +95 -0
- package/template/.aiox-core/development/scripts/branch-manager.js +390 -0
- package/template/.aiox-core/development/scripts/code-quality-improver.js +1329 -0
- package/template/.aiox-core/development/scripts/commit-message-generator.js +850 -0
- package/template/.aiox-core/development/scripts/conflict-resolver.js +675 -0
- package/template/.aiox-core/development/scripts/decision-context.js +228 -0
- package/template/.aiox-core/development/scripts/decision-log-generator.js +293 -0
- package/template/.aiox-core/development/scripts/decision-log-indexer.js +284 -0
- package/template/.aiox-core/development/scripts/decision-recorder.js +168 -0
- package/template/.aiox-core/development/scripts/dependency-analyzer.js +638 -0
- package/template/.aiox-core/development/scripts/dev-context-loader.js +296 -0
- package/template/.aiox-core/development/scripts/diff-generator.js +352 -0
- package/template/.aiox-core/development/scripts/elicitation-engine.js +385 -0
- package/template/.aiox-core/development/scripts/elicitation-session-manager.js +300 -0
- package/template/.aiox-core/development/scripts/generate-greeting.js +109 -0
- package/template/.aiox-core/development/scripts/git-wrapper.js +462 -0
- package/template/.aiox-core/development/scripts/greeting-builder.js +1404 -0
- package/template/.aiox-core/development/scripts/greeting-config-cli.js +85 -0
- package/template/.aiox-core/development/scripts/greeting-preference-manager.js +169 -0
- package/template/.aiox-core/development/scripts/issue-triage.js +171 -0
- package/template/.aiox-core/development/scripts/manifest-preview.js +245 -0
- package/template/.aiox-core/development/scripts/metrics-tracker.js +776 -0
- package/template/.aiox-core/development/scripts/migrate-task-to-v2.js +377 -0
- package/template/.aiox-core/development/scripts/modification-validator.js +555 -0
- package/template/.aiox-core/development/scripts/pattern-learner.js +1225 -0
- package/template/.aiox-core/development/scripts/performance-analyzer.js +758 -0
- package/template/.aiox-core/development/scripts/populate-entity-registry.js +673 -0
- package/template/.aiox-core/development/scripts/refactoring-suggester.js +1148 -0
- package/template/.aiox-core/development/scripts/rollback-handler.js +531 -0
- package/template/.aiox-core/development/scripts/security-checker.js +359 -0
- package/template/.aiox-core/development/scripts/skill-validator.js +341 -0
- package/template/.aiox-core/development/scripts/squad/README.md +112 -0
- package/template/.aiox-core/development/scripts/squad/index.js +123 -0
- package/template/.aiox-core/development/scripts/squad/squad-analyzer.js +637 -0
- package/template/.aiox-core/development/scripts/squad/squad-designer.js +1010 -0
- package/template/.aiox-core/development/scripts/squad/squad-downloader.js +510 -0
- package/template/.aiox-core/development/scripts/squad/squad-extender.js +871 -0
- package/template/.aiox-core/development/scripts/squad/squad-generator.js +1405 -0
- package/template/.aiox-core/development/scripts/squad/squad-loader.js +359 -0
- package/template/.aiox-core/development/scripts/squad/squad-migrator.js +627 -0
- package/template/.aiox-core/development/scripts/squad/squad-publisher.js +629 -0
- package/template/.aiox-core/development/scripts/squad/squad-validator.js +855 -0
- package/template/.aiox-core/development/scripts/story-index-generator.js +337 -0
- package/template/.aiox-core/development/scripts/story-manager.js +375 -0
- package/template/.aiox-core/development/scripts/story-update-hook.js +259 -0
- package/template/.aiox-core/development/scripts/task-identifier-resolver.js +145 -0
- package/template/.aiox-core/development/scripts/template-engine.js +240 -0
- package/template/.aiox-core/development/scripts/template-validator.js +279 -0
- package/template/.aiox-core/development/scripts/test-generator.js +844 -0
- package/template/.aiox-core/development/scripts/test-greeting-system.js +142 -0
- package/template/.aiox-core/development/scripts/transaction-manager.js +590 -0
- package/template/.aiox-core/development/scripts/unified-activation-pipeline.js +815 -0
- package/template/.aiox-core/development/scripts/usage-tracker.js +674 -0
- package/template/.aiox-core/development/scripts/validate-filenames.js +226 -0
- package/template/.aiox-core/development/scripts/validate-task-v2.js +319 -0
- package/template/.aiox-core/development/scripts/verify-workflow-gaps.js +1032 -0
- package/template/.aiox-core/development/scripts/version-tracker.js +527 -0
- package/template/.aiox-core/development/scripts/workflow-navigator.js +327 -0
- package/template/.aiox-core/development/scripts/workflow-state-manager.js +650 -0
- package/template/.aiox-core/development/scripts/workflow-validator.js +769 -0
- package/template/.aiox-core/development/scripts/yaml-validator.js +397 -0
- package/template/.aiox-core/development/tasks/add-mcp.md +436 -0
- package/template/.aiox-core/development/tasks/advanced-elicitation.md +319 -0
- package/template/.aiox-core/development/tasks/analyst-facilitate-brainstorming.md +342 -0
- package/template/.aiox-core/development/tasks/analyze-brownfield.md +456 -0
- package/template/.aiox-core/development/tasks/analyze-cross-artifact.md +357 -0
- package/template/.aiox-core/development/tasks/analyze-framework.md +697 -0
- package/template/.aiox-core/development/tasks/analyze-performance.md +637 -0
- package/template/.aiox-core/development/tasks/analyze-project-structure.md +669 -0
- package/template/.aiox-core/development/tasks/apply-qa-fixes.md +347 -0
- package/template/.aiox-core/development/tasks/architect-analyze-impact.md +834 -0
- package/template/.aiox-core/development/tasks/audit-codebase.md +429 -0
- package/template/.aiox-core/development/tasks/audit-tailwind-config.md +270 -0
- package/template/.aiox-core/development/tasks/audit-utilities.md +358 -0
- package/template/.aiox-core/development/tasks/blocks/README.md +178 -0
- package/template/.aiox-core/development/tasks/blocks/agent-prompt-template.md +115 -0
- package/template/.aiox-core/development/tasks/blocks/context-loading.md +108 -0
- package/template/.aiox-core/development/tasks/blocks/execution-pattern.md +121 -0
- package/template/.aiox-core/development/tasks/blocks/finalization.md +123 -0
- package/template/.aiox-core/development/tasks/bootstrap-shadcn-library.md +286 -0
- package/template/.aiox-core/development/tasks/brownfield-create-epic.md +573 -0
- package/template/.aiox-core/development/tasks/brownfield-create-story.md +364 -0
- package/template/.aiox-core/development/tasks/build-autonomous.md +199 -0
- package/template/.aiox-core/development/tasks/build-component.md +478 -0
- package/template/.aiox-core/development/tasks/build-resume.md +125 -0
- package/template/.aiox-core/development/tasks/build-status.md +155 -0
- package/template/.aiox-core/development/tasks/build.md +141 -0
- package/template/.aiox-core/development/tasks/calculate-roi.md +455 -0
- package/template/.aiox-core/development/tasks/check-docs-links.md +114 -0
- package/template/.aiox-core/development/tasks/ci-cd-configuration.md +764 -0
- package/template/.aiox-core/development/tasks/cleanup-utilities.md +670 -0
- package/template/.aiox-core/development/tasks/cleanup-worktrees.md +39 -0
- package/template/.aiox-core/development/tasks/collaborative-edit.md +1109 -0
- package/template/.aiox-core/development/tasks/compose-molecule.md +284 -0
- package/template/.aiox-core/development/tasks/consolidate-patterns.md +414 -0
- package/template/.aiox-core/development/tasks/correct-course.md +280 -0
- package/template/.aiox-core/development/tasks/create-agent.md +1198 -0
- package/template/.aiox-core/development/tasks/create-brownfield-story.md +727 -0
- package/template/.aiox-core/development/tasks/create-deep-research-prompt.md +506 -0
- package/template/.aiox-core/development/tasks/create-doc.md +360 -0
- package/template/.aiox-core/development/tasks/create-next-story.md +791 -0
- package/template/.aiox-core/development/tasks/create-service.md +414 -0
- package/template/.aiox-core/development/tasks/create-suite.md +291 -0
- package/template/.aiox-core/development/tasks/create-task.md +390 -0
- package/template/.aiox-core/development/tasks/create-workflow.md +430 -0
- package/template/.aiox-core/development/tasks/create-worktree.md +437 -0
- package/template/.aiox-core/development/tasks/db-analyze-hotpaths.md +572 -0
- package/template/.aiox-core/development/tasks/db-apply-migration.md +381 -0
- package/template/.aiox-core/development/tasks/db-bootstrap.md +642 -0
- package/template/.aiox-core/development/tasks/db-domain-modeling.md +693 -0
- package/template/.aiox-core/development/tasks/db-dry-run.md +293 -0
- package/template/.aiox-core/development/tasks/db-env-check.md +260 -0
- package/template/.aiox-core/development/tasks/db-explain.md +631 -0
- package/template/.aiox-core/development/tasks/db-impersonate.md +495 -0
- package/template/.aiox-core/development/tasks/db-load-csv.md +593 -0
- package/template/.aiox-core/development/tasks/db-policy-apply.md +653 -0
- package/template/.aiox-core/development/tasks/db-rls-audit.md +411 -0
- package/template/.aiox-core/development/tasks/db-rollback.md +739 -0
- package/template/.aiox-core/development/tasks/db-run-sql.md +613 -0
- package/template/.aiox-core/development/tasks/db-schema-audit.md +1011 -0
- package/template/.aiox-core/development/tasks/db-seed.md +390 -0
- package/template/.aiox-core/development/tasks/db-smoke-test.md +351 -0
- package/template/.aiox-core/development/tasks/db-snapshot.md +569 -0
- package/template/.aiox-core/development/tasks/db-squad-integration.md +663 -0
- package/template/.aiox-core/development/tasks/db-supabase-setup.md +712 -0
- package/template/.aiox-core/development/tasks/db-verify-order.md +515 -0
- package/template/.aiox-core/development/tasks/deprecate-component.md +957 -0
- package/template/.aiox-core/development/tasks/dev-apply-qa-fixes.md +318 -0
- package/template/.aiox-core/development/tasks/dev-backlog-debt.md +469 -0
- package/template/.aiox-core/development/tasks/dev-develop-story.md +924 -0
- package/template/.aiox-core/development/tasks/dev-improve-code-quality.md +873 -0
- package/template/.aiox-core/development/tasks/dev-optimize-performance.md +1034 -0
- package/template/.aiox-core/development/tasks/dev-suggest-refactoring.md +877 -0
- package/template/.aiox-core/development/tasks/dev-validate-next-story.md +349 -0
- package/template/.aiox-core/development/tasks/document-gotchas.md +477 -0
- package/template/.aiox-core/development/tasks/document-project.md +553 -0
- package/template/.aiox-core/development/tasks/environment-bootstrap.md +1389 -0
- package/template/.aiox-core/development/tasks/execute-checklist.md +308 -0
- package/template/.aiox-core/development/tasks/execute-epic-plan.md +885 -0
- package/template/.aiox-core/development/tasks/export-design-tokens-dtcg.md +274 -0
- package/template/.aiox-core/development/tasks/extend-pattern.md +269 -0
- package/template/.aiox-core/development/tasks/extract-patterns.md +397 -0
- package/template/.aiox-core/development/tasks/extract-tokens.md +467 -0
- package/template/.aiox-core/development/tasks/facilitate-brainstorming-session.md +518 -0
- package/template/.aiox-core/development/tasks/generate-ai-frontend-prompt.md +261 -0
- package/template/.aiox-core/development/tasks/generate-documentation.md +284 -0
- package/template/.aiox-core/development/tasks/generate-migration-strategy.md +522 -0
- package/template/.aiox-core/development/tasks/generate-shock-report.md +501 -0
- package/template/.aiox-core/development/tasks/github-devops-github-pr-automation.md +720 -0
- package/template/.aiox-core/development/tasks/github-devops-pre-push-quality-gate.md +860 -0
- package/template/.aiox-core/development/tasks/github-devops-repository-cleanup.md +374 -0
- package/template/.aiox-core/development/tasks/github-devops-version-management.md +483 -0
- package/template/.aiox-core/development/tasks/github-issue-triage.md +118 -0
- package/template/.aiox-core/development/tasks/gotcha.md +136 -0
- package/template/.aiox-core/development/tasks/gotchas.md +153 -0
- package/template/.aiox-core/development/tasks/health-check.yaml +265 -0
- package/template/.aiox-core/development/tasks/ids-governor.md +94 -0
- package/template/.aiox-core/development/tasks/ids-health.md +89 -0
- package/template/.aiox-core/development/tasks/ids-query.md +154 -0
- package/template/.aiox-core/development/tasks/improve-self.md +823 -0
- package/template/.aiox-core/development/tasks/index-docs.md +388 -0
- package/template/.aiox-core/development/tasks/init-project-status.md +506 -0
- package/template/.aiox-core/development/tasks/integrate-squad.md +314 -0
- package/template/.aiox-core/development/tasks/kb-mode-interaction.md +284 -0
- package/template/.aiox-core/development/tasks/learn-patterns.md +901 -0
- package/template/.aiox-core/development/tasks/list-mcps.md +33 -0
- package/template/.aiox-core/development/tasks/list-worktrees.md +342 -0
- package/template/.aiox-core/development/tasks/mcp-workflow.md +437 -0
- package/template/.aiox-core/development/tasks/merge-worktree.md +42 -0
- package/template/.aiox-core/development/tasks/modify-agent.md +398 -0
- package/template/.aiox-core/development/tasks/modify-task.md +441 -0
- package/template/.aiox-core/development/tasks/modify-workflow.md +510 -0
- package/template/.aiox-core/development/tasks/next.md +325 -0
- package/template/.aiox-core/development/tasks/orchestrate-resume.md +59 -0
- package/template/.aiox-core/development/tasks/orchestrate-status.md +63 -0
- package/template/.aiox-core/development/tasks/orchestrate-stop.md +54 -0
- package/template/.aiox-core/development/tasks/orchestrate.md +65 -0
- package/template/.aiox-core/development/tasks/patterns.md +334 -0
- package/template/.aiox-core/development/tasks/plan-create-context.md +856 -0
- package/template/.aiox-core/development/tasks/plan-create-implementation.md +852 -0
- package/template/.aiox-core/development/tasks/plan-execute-subtask.md +960 -0
- package/template/.aiox-core/development/tasks/po-backlog-add.md +370 -0
- package/template/.aiox-core/development/tasks/po-close-story.md +434 -0
- package/template/.aiox-core/development/tasks/po-manage-story-backlog.md +523 -0
- package/template/.aiox-core/development/tasks/po-pull-story-from-clickup.md +540 -0
- package/template/.aiox-core/development/tasks/po-pull-story.md +316 -0
- package/template/.aiox-core/development/tasks/po-stories-index.md +351 -0
- package/template/.aiox-core/development/tasks/po-sync-story-to-clickup.md +457 -0
- package/template/.aiox-core/development/tasks/po-sync-story.md +303 -0
- package/template/.aiox-core/development/tasks/pr-automation.md +701 -0
- package/template/.aiox-core/development/tasks/project-status.md +280 -0
- package/template/.aiox-core/development/tasks/propose-modification.md +843 -0
- package/template/.aiox-core/development/tasks/publish-npm.md +257 -0
- package/template/.aiox-core/development/tasks/qa-after-creation.md +519 -0
- package/template/.aiox-core/development/tasks/qa-backlog-add-followup.md +425 -0
- package/template/.aiox-core/development/tasks/qa-browser-console-check.md +343 -0
- package/template/.aiox-core/development/tasks/qa-create-fix-request.md +630 -0
- package/template/.aiox-core/development/tasks/qa-evidence-requirements.md +314 -0
- package/template/.aiox-core/development/tasks/qa-false-positive-detection.md +374 -0
- package/template/.aiox-core/development/tasks/qa-fix-issues.md +692 -0
- package/template/.aiox-core/development/tasks/qa-gate.md +430 -0
- package/template/.aiox-core/development/tasks/qa-generate-tests.md +1175 -0
- package/template/.aiox-core/development/tasks/qa-library-validation.md +496 -0
- package/template/.aiox-core/development/tasks/qa-migration-validation.md +583 -0
- package/template/.aiox-core/development/tasks/qa-nfr-assess.md +558 -0
- package/template/.aiox-core/development/tasks/qa-review-build.md +1224 -0
- package/template/.aiox-core/development/tasks/qa-review-proposal.md +1158 -0
- package/template/.aiox-core/development/tasks/qa-review-story.md +714 -0
- package/template/.aiox-core/development/tasks/qa-risk-profile.md +567 -0
- package/template/.aiox-core/development/tasks/qa-run-tests.md +277 -0
- package/template/.aiox-core/development/tasks/qa-security-checklist.md +551 -0
- package/template/.aiox-core/development/tasks/qa-test-design.md +388 -0
- package/template/.aiox-core/development/tasks/qa-trace-requirements.md +477 -0
- package/template/.aiox-core/development/tasks/release-management.md +759 -0
- package/template/.aiox-core/development/tasks/remove-mcp.md +35 -0
- package/template/.aiox-core/development/tasks/remove-worktree.md +433 -0
- package/template/.aiox-core/development/tasks/resolve-github-issue.md +608 -0
- package/template/.aiox-core/development/tasks/review-contributor-pr.md +152 -0
- package/template/.aiox-core/development/tasks/run-design-system-pipeline.md +640 -0
- package/template/.aiox-core/development/tasks/run-workflow-engine.md +859 -0
- package/template/.aiox-core/development/tasks/run-workflow.md +387 -0
- package/template/.aiox-core/development/tasks/search-mcp.md +309 -0
- package/template/.aiox-core/development/tasks/security-audit.md +554 -0
- package/template/.aiox-core/development/tasks/security-scan.md +790 -0
- package/template/.aiox-core/development/tasks/session-resume.md +192 -0
- package/template/.aiox-core/development/tasks/setup-database.md +741 -0
- package/template/.aiox-core/development/tasks/setup-design-system.md +462 -0
- package/template/.aiox-core/development/tasks/setup-github.md +874 -0
- package/template/.aiox-core/development/tasks/setup-llm-routing.md +229 -0
- package/template/.aiox-core/development/tasks/setup-mcp-docker.md +627 -0
- package/template/.aiox-core/development/tasks/setup-project-docs.md +440 -0
- package/template/.aiox-core/development/tasks/shard-doc.md +538 -0
- package/template/.aiox-core/development/tasks/sm-create-next-story.md +480 -0
- package/template/.aiox-core/development/tasks/spec-assess-complexity.md +461 -0
- package/template/.aiox-core/development/tasks/spec-critique.md +603 -0
- package/template/.aiox-core/development/tasks/spec-gather-requirements.md +552 -0
- package/template/.aiox-core/development/tasks/spec-research-dependencies.md +449 -0
- package/template/.aiox-core/development/tasks/spec-write-spec.md +536 -0
- package/template/.aiox-core/development/tasks/squad-creator-analyze.md +315 -0
- package/template/.aiox-core/development/tasks/squad-creator-create.md +312 -0
- package/template/.aiox-core/development/tasks/squad-creator-design.md +334 -0
- package/template/.aiox-core/development/tasks/squad-creator-download.md +167 -0
- package/template/.aiox-core/development/tasks/squad-creator-extend.md +411 -0
- package/template/.aiox-core/development/tasks/squad-creator-list.md +225 -0
- package/template/.aiox-core/development/tasks/squad-creator-migrate.md +243 -0
- package/template/.aiox-core/development/tasks/squad-creator-publish.md +229 -0
- package/template/.aiox-core/development/tasks/squad-creator-sync-ide-command.md +402 -0
- package/template/.aiox-core/development/tasks/squad-creator-sync-synkra.md +315 -0
- package/template/.aiox-core/development/tasks/squad-creator-validate.md +159 -0
- package/template/.aiox-core/development/tasks/story-checkpoint.md +360 -0
- package/template/.aiox-core/development/tasks/sync-documentation.md +865 -0
- package/template/.aiox-core/development/tasks/sync-registry-intel.md +79 -0
- package/template/.aiox-core/development/tasks/tailwind-upgrade.md +294 -0
- package/template/.aiox-core/development/tasks/test-as-user.md +621 -0
- package/template/.aiox-core/development/tasks/test-validation-task.md +171 -0
- package/template/.aiox-core/development/tasks/triage-github-issues.md +356 -0
- package/template/.aiox-core/development/tasks/undo-last.md +347 -0
- package/template/.aiox-core/development/tasks/update-aiox.md +151 -0
- package/template/.aiox-core/development/tasks/update-manifest.md +410 -0
- package/template/.aiox-core/development/tasks/update-source-tree.md +137 -0
- package/template/.aiox-core/development/tasks/ux-create-wireframe.md +617 -0
- package/template/.aiox-core/development/tasks/ux-ds-scan-artifact.md +672 -0
- package/template/.aiox-core/development/tasks/ux-user-research.md +559 -0
- package/template/.aiox-core/development/tasks/validate-agents.md +119 -0
- package/template/.aiox-core/development/tasks/validate-next-story.md +472 -0
- package/template/.aiox-core/development/tasks/validate-tech-preset.md +186 -0
- package/template/.aiox-core/development/tasks/validate-workflow.md +321 -0
- package/template/.aiox-core/development/tasks/verify-subtask.md +235 -0
- package/template/.aiox-core/development/tasks/waves.md +205 -0
- package/template/.aiox-core/development/tasks/yolo-toggle.md +113 -0
- package/template/.aiox-core/development/templates/agent-handoff-tmpl.yaml +48 -0
- package/template/.aiox-core/development/templates/aiox-doc-template.md +494 -0
- package/template/.aiox-core/development/templates/code-intel-integration-pattern.md +199 -0
- package/template/.aiox-core/development/templates/ptc-entity-validation.md +113 -0
- package/template/.aiox-core/development/templates/ptc-qa-gate.md +100 -0
- package/template/.aiox-core/development/templates/ptc-research-aggregation.md +94 -0
- package/template/.aiox-core/development/templates/research-prompt-tmpl.md +486 -0
- package/template/.aiox-core/development/templates/service-template/README.md.hbs +158 -0
- package/template/.aiox-core/development/templates/service-template/__tests__/index.test.ts.hbs +237 -0
- package/template/.aiox-core/development/templates/service-template/client.ts.hbs +403 -0
- package/template/.aiox-core/development/templates/service-template/errors.ts.hbs +182 -0
- package/template/.aiox-core/development/templates/service-template/index.ts.hbs +120 -0
- package/template/.aiox-core/development/templates/service-template/jest.config.js +89 -0
- package/template/.aiox-core/development/templates/service-template/package.json.hbs +87 -0
- package/template/.aiox-core/development/templates/service-template/tsconfig.json +45 -0
- package/template/.aiox-core/development/templates/service-template/types.ts.hbs +145 -0
- package/template/.aiox-core/development/templates/squad/agent-template.md +80 -0
- package/template/.aiox-core/development/templates/squad/checklist-template.md +82 -0
- package/template/.aiox-core/development/templates/squad/data-template.yaml +105 -0
- package/template/.aiox-core/development/templates/squad/script-template.js +179 -0
- package/template/.aiox-core/development/templates/squad/task-template.md +146 -0
- package/template/.aiox-core/development/templates/squad/template-template.md +97 -0
- package/template/.aiox-core/development/templates/squad/tool-template.js +103 -0
- package/template/.aiox-core/development/templates/squad/workflow-template.yaml +123 -0
- package/template/.aiox-core/development/templates/squad-template/LICENSE +21 -0
- package/template/.aiox-core/development/templates/squad-template/README.md +37 -0
- package/template/.aiox-core/development/templates/squad-template/agents/example-agent.yaml +36 -0
- package/template/.aiox-core/development/templates/squad-template/package.json +19 -0
- package/template/.aiox-core/development/templates/squad-template/squad.yaml +25 -0
- package/template/.aiox-core/development/templates/squad-template/tasks/example-task.yaml +46 -0
- package/template/.aiox-core/development/templates/squad-template/templates/example-template.md +24 -0
- package/template/.aiox-core/development/templates/squad-template/tests/example-agent.test.js +53 -0
- package/template/.aiox-core/development/templates/squad-template/workflows/example-workflow.yaml +75 -0
- package/template/.aiox-core/development/templates/subagent-step-prompt.md +120 -0
- package/template/.aiox-core/development/workflows/README.md +88 -0
- package/template/.aiox-core/development/workflows/auto-worktree.yaml +421 -0
- package/template/.aiox-core/development/workflows/brownfield-discovery.yaml +932 -0
- package/template/.aiox-core/development/workflows/brownfield-fullstack.yaml +367 -0
- package/template/.aiox-core/development/workflows/brownfield-service.yaml +244 -0
- package/template/.aiox-core/development/workflows/brownfield-ui.yaml +258 -0
- package/template/.aiox-core/development/workflows/design-system-build-quality.yaml +227 -0
- package/template/.aiox-core/development/workflows/development-cycle.yaml +515 -0
- package/template/.aiox-core/development/workflows/epic-orchestration.yaml +326 -0
- package/template/.aiox-core/development/workflows/greenfield-fullstack.yaml +384 -0
- package/template/.aiox-core/development/workflows/greenfield-service.yaml +276 -0
- package/template/.aiox-core/development/workflows/greenfield-ui.yaml +282 -0
- package/template/.aiox-core/development/workflows/qa-loop.yaml +443 -0
- package/template/.aiox-core/development/workflows/spec-pipeline.yaml +576 -0
- package/template/.aiox-core/development/workflows/story-development-cycle.yaml +284 -0
- package/template/.aiox-core/elicitation/agent-elicitation.js +272 -0
- package/template/.aiox-core/elicitation/task-elicitation.js +281 -0
- package/template/.aiox-core/elicitation/workflow-elicitation.js +315 -0
- package/template/.aiox-core/framework-config.yaml +158 -0
- package/template/.aiox-core/hooks/gemini/after-tool.js +77 -0
- package/template/.aiox-core/hooks/gemini/before-agent.js +79 -0
- package/template/.aiox-core/hooks/gemini/before-tool.js +114 -0
- package/template/.aiox-core/hooks/gemini/rewind-handler.js +68 -0
- package/template/.aiox-core/hooks/gemini/session-end.js +90 -0
- package/template/.aiox-core/hooks/gemini/session-start.js +90 -0
- package/template/.aiox-core/hooks/ids-post-commit.js +116 -0
- package/template/.aiox-core/hooks/ids-pre-push.js +123 -0
- package/template/.aiox-core/hooks/unified/README.md +338 -0
- package/template/.aiox-core/hooks/unified/hook-interface.js +159 -0
- package/template/.aiox-core/hooks/unified/hook-registry.js +143 -0
- package/template/.aiox-core/hooks/unified/index.js +36 -0
- package/template/.aiox-core/hooks/unified/runners/precompact-runner.js +96 -0
- package/template/.aiox-core/manifests/schema/manifest-schema.json +190 -0
- package/template/.aiox-core/presets/README.md +358 -0
- package/template/.aiox-core/product/README.md +56 -0
- package/template/.aiox-core/product/checklists/accessibility-wcag-checklist.md +80 -0
- package/template/.aiox-core/product/checklists/architect-checklist.md +444 -0
- package/template/.aiox-core/product/checklists/change-checklist.md +183 -0
- package/template/.aiox-core/product/checklists/component-quality-checklist.md +74 -0
- package/template/.aiox-core/product/checklists/database-design-checklist.md +119 -0
- package/template/.aiox-core/product/checklists/dba-predeploy-checklist.md +97 -0
- package/template/.aiox-core/product/checklists/dba-rollback-checklist.md +99 -0
- package/template/.aiox-core/product/checklists/migration-readiness-checklist.md +75 -0
- package/template/.aiox-core/product/checklists/pattern-audit-checklist.md +88 -0
- package/template/.aiox-core/product/checklists/pm-checklist.md +376 -0
- package/template/.aiox-core/product/checklists/po-master-checklist.md +442 -0
- package/template/.aiox-core/product/checklists/pre-push-checklist.md +108 -0
- package/template/.aiox-core/product/checklists/release-checklist.md +122 -0
- package/template/.aiox-core/product/checklists/self-critique-checklist.md +386 -0
- package/template/.aiox-core/product/checklists/story-dod-checklist.md +102 -0
- package/template/.aiox-core/product/checklists/story-draft-checklist.md +216 -0
- package/template/.aiox-core/product/data/atomic-design-principles.md +108 -0
- package/template/.aiox-core/product/data/brainstorming-techniques.md +37 -0
- package/template/.aiox-core/product/data/consolidation-algorithms.md +142 -0
- package/template/.aiox-core/product/data/database-best-practices.md +182 -0
- package/template/.aiox-core/product/data/design-token-best-practices.md +107 -0
- package/template/.aiox-core/product/data/elicitation-methods.md +135 -0
- package/template/.aiox-core/product/data/integration-patterns.md +207 -0
- package/template/.aiox-core/product/data/migration-safety-guide.md +329 -0
- package/template/.aiox-core/product/data/mode-selection-best-practices.md +471 -0
- package/template/.aiox-core/product/data/postgres-tuning-guide.md +300 -0
- package/template/.aiox-core/product/data/rls-security-patterns.md +333 -0
- package/template/.aiox-core/product/data/roi-calculation-guide.md +142 -0
- package/template/.aiox-core/product/data/supabase-patterns.md +330 -0
- package/template/.aiox-core/product/data/test-levels-framework.md +149 -0
- package/template/.aiox-core/product/data/test-priorities-matrix.md +175 -0
- package/template/.aiox-core/product/data/wcag-compliance-guide.md +267 -0
- package/template/.aiox-core/product/templates/activation-instructions-inline-greeting.yaml +63 -0
- package/template/.aiox-core/product/templates/activation-instructions-template.md +258 -0
- package/template/.aiox-core/product/templates/adr.hbs +125 -0
- package/template/.aiox-core/product/templates/agent-template.yaml +121 -0
- package/template/.aiox-core/product/templates/aiox-ai-config.yaml +106 -0
- package/template/.aiox-core/product/templates/architecture-tmpl.yaml +651 -0
- package/template/.aiox-core/product/templates/brainstorming-output-tmpl.yaml +156 -0
- package/template/.aiox-core/product/templates/brownfield-architecture-tmpl.yaml +476 -0
- package/template/.aiox-core/product/templates/brownfield-prd-tmpl.yaml +280 -0
- package/template/.aiox-core/product/templates/brownfield-risk-report-tmpl.yaml +277 -0
- package/template/.aiox-core/product/templates/changelog-template.md +134 -0
- package/template/.aiox-core/product/templates/command-rationalization-matrix.md +152 -0
- package/template/.aiox-core/product/templates/competitor-analysis-tmpl.yaml +293 -0
- package/template/.aiox-core/product/templates/component-react-tmpl.tsx +98 -0
- package/template/.aiox-core/product/templates/current-approach-tmpl.md +56 -0
- package/template/.aiox-core/product/templates/dbdr.hbs +241 -0
- package/template/.aiox-core/product/templates/design-story-tmpl.yaml +587 -0
- package/template/.aiox-core/product/templates/ds-artifact-analysis.md +70 -0
- package/template/.aiox-core/product/templates/engine/elicitation.js +297 -0
- package/template/.aiox-core/product/templates/engine/index.js +308 -0
- package/template/.aiox-core/product/templates/engine/loader.js +231 -0
- package/template/.aiox-core/product/templates/engine/renderer.js +343 -0
- package/template/.aiox-core/product/templates/engine/schemas/adr.schema.json +102 -0
- package/template/.aiox-core/product/templates/engine/schemas/dbdr.schema.json +205 -0
- package/template/.aiox-core/product/templates/engine/schemas/epic.schema.json +175 -0
- package/template/.aiox-core/product/templates/engine/schemas/pmdr.schema.json +175 -0
- package/template/.aiox-core/product/templates/engine/schemas/prd-v2.schema.json +300 -0
- package/template/.aiox-core/product/templates/engine/schemas/prd.schema.json +152 -0
- package/template/.aiox-core/product/templates/engine/schemas/story.schema.json +222 -0
- package/template/.aiox-core/product/templates/engine/schemas/task.schema.json +154 -0
- package/template/.aiox-core/product/templates/engine/validator.js +294 -0
- package/template/.aiox-core/product/templates/epic.hbs +212 -0
- package/template/.aiox-core/product/templates/eslintrc-security.json +32 -0
- package/template/.aiox-core/product/templates/front-end-architecture-tmpl.yaml +206 -0
- package/template/.aiox-core/product/templates/front-end-spec-tmpl.yaml +349 -0
- package/template/.aiox-core/product/templates/fullstack-architecture-tmpl.yaml +805 -0
- package/template/.aiox-core/product/templates/gemini/settings.json +79 -0
- package/template/.aiox-core/product/templates/github-actions-cd.yml +212 -0
- package/template/.aiox-core/product/templates/github-actions-ci.yml +172 -0
- package/template/.aiox-core/product/templates/github-pr-template.md +67 -0
- package/template/.aiox-core/product/templates/gordon-mcp.yaml +140 -0
- package/template/.aiox-core/product/templates/ide-rules/antigravity-rules.md +115 -0
- package/template/.aiox-core/product/templates/ide-rules/claude-rules.md +356 -0
- package/template/.aiox-core/product/templates/ide-rules/codex-rules.md +65 -0
- package/template/.aiox-core/product/templates/ide-rules/copilot-rules.md +92 -0
- package/template/.aiox-core/product/templates/ide-rules/cursor-rules.md +115 -0
- package/template/.aiox-core/product/templates/ide-rules/gemini-rules.md +87 -0
- package/template/.aiox-core/product/templates/index-strategy-tmpl.yaml +53 -0
- package/template/.aiox-core/product/templates/market-research-tmpl.yaml +252 -0
- package/template/.aiox-core/product/templates/mcp-workflow.js +271 -0
- package/template/.aiox-core/product/templates/migration-plan-tmpl.yaml +1022 -0
- package/template/.aiox-core/product/templates/migration-strategy-tmpl.md +524 -0
- package/template/.aiox-core/product/templates/personalized-agent-template.md +258 -0
- package/template/.aiox-core/product/templates/personalized-checklist-template.md +340 -0
- package/template/.aiox-core/product/templates/personalized-task-template-v2.md +905 -0
- package/template/.aiox-core/product/templates/personalized-task-template.md +344 -0
- package/template/.aiox-core/product/templates/personalized-template-file.yaml +322 -0
- package/template/.aiox-core/product/templates/personalized-workflow-template.yaml +460 -0
- package/template/.aiox-core/product/templates/pmdr.hbs +186 -0
- package/template/.aiox-core/product/templates/prd-tmpl.yaml +202 -0
- package/template/.aiox-core/product/templates/prd-v2.0.hbs +216 -0
- package/template/.aiox-core/product/templates/prd.hbs +201 -0
- package/template/.aiox-core/product/templates/project-brief-tmpl.yaml +221 -0
- package/template/.aiox-core/product/templates/qa-gate-tmpl.yaml +240 -0
- package/template/.aiox-core/product/templates/qa-report-tmpl.md +234 -0
- package/template/.aiox-core/product/templates/rls-policies-tmpl.yaml +1203 -0
- package/template/.aiox-core/product/templates/schema-design-tmpl.yaml +428 -0
- package/template/.aiox-core/product/templates/shock-report-tmpl.html +502 -0
- package/template/.aiox-core/product/templates/spec-tmpl.md +234 -0
- package/template/.aiox-core/product/templates/state-persistence-tmpl.yaml +219 -0
- package/template/.aiox-core/product/templates/statusline/statusline-script.js +188 -0
- package/template/.aiox-core/product/templates/statusline/track-agent.sh +68 -0
- package/template/.aiox-core/product/templates/story-tmpl.yaml +368 -0
- package/template/.aiox-core/product/templates/story.hbs +263 -0
- package/template/.aiox-core/product/templates/task-execution-report.md +495 -0
- package/template/.aiox-core/product/templates/task-template.md +123 -0
- package/template/.aiox-core/product/templates/task.hbs +170 -0
- package/template/.aiox-core/product/templates/tmpl-comment-on-examples.sql +158 -0
- package/template/.aiox-core/product/templates/tmpl-migration-script.sql +91 -0
- package/template/.aiox-core/product/templates/tmpl-rls-granular-policies.sql +104 -0
- package/template/.aiox-core/product/templates/tmpl-rls-kiss-policy.sql +10 -0
- package/template/.aiox-core/product/templates/tmpl-rls-roles.sql +135 -0
- package/template/.aiox-core/product/templates/tmpl-rls-simple.sql +77 -0
- package/template/.aiox-core/product/templates/tmpl-rls-tenant.sql +152 -0
- package/template/.aiox-core/product/templates/tmpl-rollback-script.sql +77 -0
- package/template/.aiox-core/product/templates/tmpl-seed-data.sql +140 -0
- package/template/.aiox-core/product/templates/tmpl-smoke-test.sql +16 -0
- package/template/.aiox-core/product/templates/tmpl-staging-copy-merge.sql +139 -0
- package/template/.aiox-core/product/templates/tmpl-stored-proc.sql +140 -0
- package/template/.aiox-core/product/templates/tmpl-trigger.sql +152 -0
- package/template/.aiox-core/product/templates/tmpl-view-materialized.sql +133 -0
- package/template/.aiox-core/product/templates/tmpl-view.sql +177 -0
- package/template/.aiox-core/product/templates/token-exports-css-tmpl.css +240 -0
- package/template/.aiox-core/product/templates/token-exports-tailwind-tmpl.js +395 -0
- package/template/.aiox-core/product/templates/tokens-schema-tmpl.yaml +305 -0
- package/template/.aiox-core/product/templates/workflow-template.yaml +151 -0
- package/template/.aiox-core/project-config.yaml +166 -0
- package/template/.aiox-core/quality/metrics-collector.js +599 -0
- package/template/.aiox-core/quality/metrics-hook.js +260 -0
- package/template/.aiox-core/quality/schemas/quality-metrics.schema.json +233 -0
- package/template/.aiox-core/quality/seed-metrics.js +336 -0
- package/template/.aiox-core/schemas/README.md +403 -0
- package/template/.aiox-core/schemas/agent-v3-schema.json +394 -0
- package/template/.aiox-core/schemas/squad-design-schema.json +299 -0
- package/template/.aiox-core/schemas/squad-schema.json +185 -0
- package/template/.aiox-core/schemas/task-v3-schema.json +353 -0
- package/template/.aiox-core/schemas/validate-v3-schema.js +430 -0
- package/template/.aiox-core/user-guide.md +1409 -0
- package/template/.aiox-core/utils/aiox-validator.js +25 -0
- package/template/.aiox-core/utils/filters/constants.js +10 -0
- package/template/.aiox-core/utils/filters/content-filter.js +223 -0
- package/template/.aiox-core/utils/filters/field-filter.js +126 -0
- package/template/.aiox-core/utils/filters/index.js +180 -0
- package/template/.aiox-core/utils/filters/schema-filter.js +157 -0
- package/template/.aiox-core/utils/format-duration.js +95 -0
- package/template/.aiox-core/workflow-intelligence/__tests__/confidence-scorer.test.js +334 -0
- package/template/.aiox-core/workflow-intelligence/__tests__/integration.test.js +339 -0
- package/template/.aiox-core/workflow-intelligence/__tests__/suggestion-engine.test.js +437 -0
- package/template/.aiox-core/workflow-intelligence/__tests__/wave-analyzer.test.js +447 -0
- package/template/.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js +302 -0
- package/template/.aiox-core/workflow-intelligence/engine/confidence-scorer.js +306 -0
- package/template/.aiox-core/workflow-intelligence/engine/output-formatter.js +299 -0
- package/template/.aiox-core/workflow-intelligence/engine/suggestion-engine.js +797 -0
- package/template/.aiox-core/workflow-intelligence/engine/wave-analyzer.js +683 -0
- package/template/.aiox-core/workflow-intelligence/index.js +329 -0
- package/template/.aiox-core/workflow-intelligence/learning/capture-hook.js +147 -0
- package/template/.aiox-core/workflow-intelligence/learning/gotcha-registry.js +653 -0
- package/template/.aiox-core/workflow-intelligence/learning/index.js +305 -0
- package/template/.aiox-core/workflow-intelligence/learning/pattern-capture.js +329 -0
- package/template/.aiox-core/workflow-intelligence/learning/pattern-store.js +497 -0
- package/template/.aiox-core/workflow-intelligence/learning/pattern-validator.js +309 -0
- package/template/.aiox-core/workflow-intelligence/learning/qa-feedback.js +585 -0
- package/template/.aiox-core/workflow-intelligence/learning/semantic-search.js +521 -0
- package/template/.aiox-core/workflow-intelligence/registry/workflow-registry.js +357 -0
- package/template/.aiox-core/working-in-the-brownfield.md +361 -0
- package/template/.antigravity/rules/agents/aiox-master.md +97 -0
- package/template/.antigravity/rules/agents/analyst.md +41 -0
- package/template/.antigravity/rules/agents/architect.md +50 -0
- package/template/.antigravity/rules/agents/data-engineer.md +43 -0
- package/template/.antigravity/rules/agents/dev.md +74 -0
- package/template/.antigravity/rules/agents/devops.md +71 -0
- package/template/.antigravity/rules/agents/pm.md +50 -0
- package/template/.antigravity/rules/agents/po.md +45 -0
- package/template/.antigravity/rules/agents/qa.md +57 -0
- package/template/.antigravity/rules/agents/sm.md +34 -0
- package/template/.antigravity/rules/agents/squad-creator.md +41 -0
- package/template/.antigravity/rules/agents/ux-design-expert.md +12 -0
- package/template/.claude/CLAUDE.md +313 -97
- package/template/.claude/commands/AIOX/agents/aiox-master.md +465 -0
- package/template/.claude/commands/AIOX/agents/analyst.md +273 -0
- package/template/.claude/commands/AIOX/agents/architect.md +474 -0
- package/template/.claude/commands/AIOX/agents/data-engineer.md +495 -0
- package/template/.claude/commands/AIOX/agents/dev.md +560 -0
- package/template/.claude/commands/AIOX/agents/devops.md +539 -0
- package/template/.claude/commands/AIOX/agents/pm.md +377 -0
- package/template/.claude/commands/AIOX/agents/po.md +335 -0
- package/template/.claude/commands/AIOX/agents/qa.md +449 -0
- package/template/.claude/commands/AIOX/agents/sm.md +287 -0
- package/template/.claude/commands/AIOX/agents/squad-creator.md +344 -0
- package/template/.claude/commands/AIOX/agents/ux-design-expert.md +495 -0
- package/template/.claude/commands/AIOX/scripts/agent-config-loader.js +624 -0
- package/template/.claude/commands/AIOX/scripts/generate-greeting.js +160 -0
- package/template/.claude/commands/AIOX/scripts/greeting-builder.js +866 -0
- package/template/.claude/commands/AIOX/scripts/session-context-loader.js +286 -0
- package/template/.claude/commands/AIOX/stories/story-6.1.4.md +1404 -0
- package/template/.claude/commands/cohort-squad/agents/cohort-manager.md +145 -0
- package/template/.claude/commands/design-system/agents/brad-frost.md +1097 -0
- package/template/.claude/commands/design-system/agents/dan-mall.md +857 -0
- package/template/.claude/commands/design-system/agents/dave-malouf.md +2272 -0
- package/template/.claude/commands/design-system/agents/design-chief.md +102 -0
- package/template/.claude/commands/design-system/agents/nano-banana-generator.md +162 -0
- package/template/.claude/commands/greet.md +101 -0
- package/template/.claude/commands/synapse/manager.md +75 -0
- package/template/.claude/commands/synapse/tasks/add-rule.md +94 -0
- package/template/.claude/commands/synapse/tasks/create-command.md +109 -0
- package/template/.claude/commands/synapse/tasks/create-domain.md +127 -0
- package/template/.claude/commands/synapse/tasks/diagnose-synapse.md +245 -0
- package/template/.claude/commands/synapse/tasks/edit-rule.md +109 -0
- package/template/.claude/commands/synapse/tasks/suggest-domain.md +116 -0
- package/template/.claude/commands/synapse/tasks/toggle-domain.md +83 -0
- package/template/.claude/commands/synapse/templates/domain-template +8 -0
- package/template/.claude/commands/synapse/templates/manifest-entry-template +4 -0
- package/template/.claude/commands/synapse/utils/manifest-parser-reference.md +134 -0
- package/template/.claude/hooks/README.md +194 -0
- package/template/.claude/hooks/enforce-architecture-first.py +196 -0
- package/template/.claude/hooks/enforce-git-push-authority.sh +33 -0
- package/template/.claude/hooks/install-hooks.sh +41 -0
- package/template/.claude/hooks/mind-clone-governance.py +192 -0
- package/template/.claude/hooks/pre-commit-version-check.sh +156 -0
- package/template/.claude/hooks/precompact-session-digest.cjs +141 -87
- package/template/.claude/hooks/precompact-wrapper.cjs +46 -0
- package/template/.claude/hooks/read-protection.py +151 -0
- package/template/.claude/hooks/slug-validation.py +176 -0
- package/template/.claude/hooks/sql-governance.py +155 -38
- package/template/.claude/hooks/synapse-engine.cjs +91 -324
- package/template/.claude/hooks/synapse-wrapper.cjs +57 -0
- package/template/.claude/hooks/write-path-validation.py +169 -34
- package/template/.claude/rules/agent-authority.md +105 -39
- package/template/.claude/rules/agent-handoff.md +97 -71
- package/template/.claude/rules/agent-memory-imports.md +15 -0
- package/template/.claude/rules/coderabbit-integration.md +101 -0
- package/template/.claude/rules/ids-principles.md +119 -52
- package/template/.claude/rules/mcp-usage.md +176 -49
- package/template/.claude/rules/story-lifecycle.md +145 -87
- package/template/.claude/rules/tool-examples.md +64 -0
- package/template/.claude/rules/tool-response-filtering.md +57 -0
- package/template/.claude/rules/workflow-execution.md +150 -68
- package/template/.claude/settings.json +26 -58
- package/template/.synapse/agent-aiox-master +15 -0
- package/template/.synapse/agent-analyst +14 -38
- package/template/.synapse/agent-architect +16 -44
- package/template/.synapse/agent-data-engineer +17 -0
- package/template/.synapse/agent-dev +18 -8
- package/template/.synapse/agent-devops +17 -53
- package/template/.synapse/agent-pm +16 -37
- package/template/.synapse/agent-po +15 -48
- package/template/.synapse/agent-qa +16 -42
- package/template/.synapse/agent-sm +13 -68
- package/template/.synapse/agent-squad-creator +14 -0
- package/template/.synapse/agent-ux +15 -0
- package/template/.synapse/commands +109 -0
- package/template/.synapse/constitution +49 -44
- package/template/.synapse/context +25 -8
- package/template/.synapse/global +24 -47
- package/template/.synapse/manifest +56 -14
- package/template/.synapse/workflow-arch-review +15 -0
- package/template/.synapse/workflow-epic-create +16 -0
- package/template/.synapse/workflow-story-dev +20 -0
- package/template/AGENTS.md +75 -0
- package/template/README.md +746 -53
- package/template/.claude/agent-memory/analyst/MEMORY.md +0 -20
- package/template/.claude/agent-memory/architect/MEMORY.md +0 -20
- package/template/.claude/agent-memory/dev/MEMORY.md +0 -20
- package/template/.claude/agent-memory/devops/MEMORY.md +0 -20
- package/template/.claude/agent-memory/pm/MEMORY.md +0 -20
- package/template/.claude/agent-memory/po/MEMORY.md +0 -20
- package/template/.claude/agent-memory/qa/MEMORY.md +0 -20
- package/template/.claude/agent-memory/reviewer/MEMORY.md +0 -20
- package/template/.claude/agent-memory/sm/MEMORY.md +0 -20
- package/template/.claude/commands/analyst.md +0 -55
- package/template/.claude/commands/architect.md +0 -56
- package/template/.claude/commands/dev.md +0 -63
- package/template/.claude/commands/devops.md +0 -64
- package/template/.claude/commands/plan-story.md +0 -70
- package/template/.claude/commands/pm.md +0 -51
- package/template/.claude/commands/po.md +0 -69
- package/template/.claude/commands/project-state.md +0 -35
- package/template/.claude/commands/project-sync.md +0 -44
- package/template/.claude/commands/qa.md +0 -67
- package/template/.claude/commands/reviewer.md +0 -63
- package/template/.claude/commands/sm.md +0 -82
- package/template/.claude/commands/squad.md +0 -56
- package/template/.claude/hooks/enforce-git-push-authority.py +0 -70
- package/template/.claude/hooks/metrics-tracker.cjs +0 -65
- package/template/.claude/rules/agent-memory.md +0 -61
- package/template/.claude/rules/new-project.md +0 -157
- package/template/.claude/settings.local.json +0 -14
- package/template/.genia/CONSTITUTION.md +0 -129
- package/template/.genia/contexts/api-patterns.md +0 -134
- package/template/.genia/contexts/nextjs-react.md +0 -210
- package/template/.genia/contexts/projeto.md +0 -18
- package/template/.genia/contexts/supabase.md +0 -152
- package/template/.genia/contexts/whatsapp-cloud.md +0 -176
- package/template/.genia/core-config.yaml +0 -192
- package/template/.genia/development/agents/analyst.md +0 -138
- package/template/.genia/development/agents/architect.md +0 -171
- package/template/.genia/development/agents/dev.md +0 -160
- package/template/.genia/development/agents/devops.md +0 -200
- package/template/.genia/development/agents/pm.md +0 -142
- package/template/.genia/development/agents/po.md +0 -165
- package/template/.genia/development/agents/qa.md +0 -183
- package/template/.genia/development/agents/reviewer.md +0 -198
- package/template/.genia/development/agents/sm.md +0 -230
- package/template/.genia/development/checklists/architecture-review.md +0 -189
- package/template/.genia/development/checklists/pre-commit.md +0 -205
- package/template/.genia/development/checklists/pre-deploy.md +0 -230
- package/template/.genia/development/checklists/qa-gate.md +0 -216
- package/template/.genia/development/checklists/story-dod.md +0 -155
- package/template/.genia/development/tasks/code-review.md +0 -197
- package/template/.genia/development/tasks/criar-prd.md +0 -170
- package/template/.genia/development/tasks/criar-spec.md +0 -188
- package/template/.genia/development/tasks/criar-story.md +0 -185
- package/template/.genia/development/tasks/debug-sistematico.md +0 -230
- package/template/.genia/development/tasks/dev-implement.md +0 -199
- package/template/.genia/development/tasks/qa-review.md +0 -224
- package/template/.genia/development/workflows/brownfield.md +0 -178
- package/template/.genia/development/workflows/delivery.md +0 -208
- package/template/.genia/development/workflows/development.md +0 -189
- package/template/.genia/development/workflows/greenfield.md +0 -166
- package/template/.genia/development/workflows/planning.md +0 -167
- package/template/.genia/development/workflows/qa-loop.md +0 -179
- package/template/.genia/development/workflows/spec-pipeline.md +0 -192
- package/template/.genia/development/workflows/story-development-cycle.md +0 -252
- package/template/.genia/guidelines/clean-code.md +0 -98
- package/template/.genia/guidelines/testing.md +0 -176
- package/template/.genia/skills/design/canvas-design.md +0 -109
- package/template/.genia/skills/design/frontend-design.md +0 -140
- package/template/.genia/skills/dev/mcp-builder.md +0 -172
- package/template/.genia/skills/dev/webapp-testing.md +0 -150
- package/template/.genia/skills/documents/docx.md +0 -153
- package/template/.genia/skills/documents/pdf.md +0 -134
- package/template/.genia/skills/documents/pptx.md +0 -118
- package/template/.genia/skills/documents/xlsx.md +0 -140
- package/template/.synapse/agent-reviewer +0 -43
|
@@ -0,0 +1,1404 @@
|
|
|
1
|
+
# Story 6.1.4: Unified Greeting System Integration (v4 - Expanded)
|
|
2
|
+
|
|
3
|
+
**Story ID:** 6.1.4
|
|
4
|
+
**Epic:** Epic-6.1 - Agent Identity System
|
|
5
|
+
**Wave:** Wave 1 (Foundation)
|
|
6
|
+
**Status:** 📋 Ready to Start
|
|
7
|
+
**Priority:** 🔴 Critical
|
|
8
|
+
**Owner:** Dev (Dex)
|
|
9
|
+
**Created:** 2025-01-14
|
|
10
|
+
**Updated:** 2025-01-17 (v4 - Unified System Integration)
|
|
11
|
+
**Duration:** 2.5 days (20 hours)
|
|
12
|
+
**Investment:** $250.00
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 📋 Objective
|
|
17
|
+
|
|
18
|
+
**EXPANDED SCOPE:** Implement a unified greeting system that integrates all greeting components (session context, project status, agent personalization, user preferences) into a single, optimized, and maintainable solution. This story unifies Stories 6.1.1 through 6.1.6 into a cohesive system that actually works.
|
|
19
|
+
|
|
20
|
+
**Original Scope (Already Implemented):**
|
|
21
|
+
- ✅ User-configurable greeting preferences (auto/minimal/named/archetypal)
|
|
22
|
+
- ✅ `GreetingPreferenceManager` class
|
|
23
|
+
- ✅ CLI commands for preference management
|
|
24
|
+
- ✅ Integration with `GreetingBuilder`
|
|
25
|
+
|
|
26
|
+
**New Scope (This Story):**
|
|
27
|
+
- 🔄 Expand `agent-config-loader.js` to load complete agent definitions
|
|
28
|
+
- 🔄 Create unified `generate-greeting.js` wrapper
|
|
29
|
+
- 🔄 Modify `greeting-builder.js` to accept pre-loaded context
|
|
30
|
+
- 🔄 Update all 11 agents to use unified system
|
|
31
|
+
- 🔄 Implement session state updates after commands
|
|
32
|
+
- 🔄 Consolidate duplicate scripts
|
|
33
|
+
- 🔄 Fix integration issues identified in technical review
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🎯 Story
|
|
38
|
+
|
|
39
|
+
**As a** AIOX framework user,
|
|
40
|
+
**I want** agents to use a unified greeting system that integrates session context, project status, agent personalization, and user preferences,
|
|
41
|
+
**So that** I have a consistent, fast, and contextually relevant experience when activating any agent.
|
|
42
|
+
|
|
43
|
+
**Business Value:**
|
|
44
|
+
- Unifies all previous greeting-related work (Stories 6.1.1-6.1.6)
|
|
45
|
+
- Fixes integration issues preventing components from working together
|
|
46
|
+
- Provides optimal performance (<150ms with timeout protection)
|
|
47
|
+
- Maintains backward compatibility with fallbacks
|
|
48
|
+
- Simplifies architecture by consolidating duplicate scripts
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 🔗 Context: Integration of Previous Stories
|
|
53
|
+
|
|
54
|
+
### Stories Already Implemented (But Not Integrated):
|
|
55
|
+
|
|
56
|
+
**Story 6.1.1:** Agent Persona Definitions ✅
|
|
57
|
+
- Agent definitions with `persona_profile.greeting_levels`
|
|
58
|
+
- **Status:** Implemented, but agents don't use it
|
|
59
|
+
|
|
60
|
+
**Story 6.1.2.4:** Project Status Context ✅
|
|
61
|
+
- `project-status-loader.js` with 60s cache
|
|
62
|
+
- **Status:** Implemented, but agents don't use it
|
|
63
|
+
|
|
64
|
+
**Story 6.1.2.5:** Contextual Agent Load Integration ✅
|
|
65
|
+
- `greeting-builder.js` with session detection
|
|
66
|
+
- `session-context-loader.js` for multi-agent continuity
|
|
67
|
+
- `context-detector.js` for session type detection
|
|
68
|
+
- `workflow-navigator.js` for workflow suggestions
|
|
69
|
+
- **Status:** Implemented, but agents don't use it
|
|
70
|
+
|
|
71
|
+
**Story 6.1.2.6:** Framework Configuration System ✅
|
|
72
|
+
- `agent-config-loader.js` for lazy loading
|
|
73
|
+
- **Status:** Implemented, but doesn't load agent definitions
|
|
74
|
+
|
|
75
|
+
**Story 6.1.4 (Original):** Greeting Preferences ✅
|
|
76
|
+
- `greeting-preference-manager.js`
|
|
77
|
+
- `greeting-config-cli.js`
|
|
78
|
+
- **Status:** Implemented, but agents don't use it
|
|
79
|
+
|
|
80
|
+
**Story 6.1.6:** Output Formatter ✅
|
|
81
|
+
- Output formatting utilities
|
|
82
|
+
- **Status:** Implemented
|
|
83
|
+
|
|
84
|
+
### Current Problem:
|
|
85
|
+
|
|
86
|
+
**Agents use inline logic in STEP 3:**
|
|
87
|
+
```yaml
|
|
88
|
+
- STEP 3: |
|
|
89
|
+
Generate contextual greeting using inline logic:
|
|
90
|
+
1. Detect session type: If first message → "new"
|
|
91
|
+
2. Build greeting manually...
|
|
92
|
+
3. Get project status (use Bash tool)...
|
|
93
|
+
4. Show commands...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Problems:**
|
|
97
|
+
- ❌ Claude Code doesn't have access to `conversationHistory`
|
|
98
|
+
- ❌ Session detection always returns "new"
|
|
99
|
+
- ❌ Commands always show "full" visibility
|
|
100
|
+
- ❌ Doesn't use any of the developed scripts
|
|
101
|
+
- ❌ Session state never updated after commands
|
|
102
|
+
|
|
103
|
+
### Solution:
|
|
104
|
+
|
|
105
|
+
**Unified greeting generator called via Node.js:**
|
|
106
|
+
```yaml
|
|
107
|
+
- STEP 3: |
|
|
108
|
+
Generate greeting by executing unified greeting generator:
|
|
109
|
+
1. Execute: node .aiox-core/scripts/generate-greeting.js {agent-id}
|
|
110
|
+
2. Capture the complete output
|
|
111
|
+
3. Display the greeting exactly as returned
|
|
112
|
+
|
|
113
|
+
If execution fails:
|
|
114
|
+
- Fallback to simple greeting: "{icon} {name} ready"
|
|
115
|
+
- Show: "Type *help to see available commands"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 📊 Technical Analysis Summary
|
|
121
|
+
|
|
122
|
+
### Analysis Documents Integrated:
|
|
123
|
+
|
|
124
|
+
1. **QA Analysis** (`docs/qa/comprehensive-greeting-system-analysis.md`)
|
|
125
|
+
- Identified integration failure between components
|
|
126
|
+
- Proposed unified wrapper solution
|
|
127
|
+
- Performance targets: <50ms (cache), <150ms (no cache)
|
|
128
|
+
|
|
129
|
+
2. **Architect Consolidation Analysis** (`docs/architecture/scripts-consolidation-analysis.md`)
|
|
130
|
+
- Identified duplicate scripts (`config-loader.js` vs `agent-config-loader.js`)
|
|
131
|
+
- Recommended expanding `agent-config-loader.js` instead of creating new loader
|
|
132
|
+
- Identified 4 temporary migration scripts to delete
|
|
133
|
+
|
|
134
|
+
3. **Architect Technical Review** (`docs/architecture/technical-review-greeting-system-unification.md`)
|
|
135
|
+
- Identified 3 critical issues:
|
|
136
|
+
1. `AgentConfigLoader` doesn't return complete agent definition
|
|
137
|
+
2. Context structure inconsistency (duplicate loading)
|
|
138
|
+
3. Missing validation of agent structure
|
|
139
|
+
- Approved architecture with mandatory modifications
|
|
140
|
+
|
|
141
|
+
### Critical Issues to Fix:
|
|
142
|
+
|
|
143
|
+
1. **🔴 CRITICAL:** Expand `agent-config-loader.js` to load complete agent definitions
|
|
144
|
+
2. **🔴 CRITICAL:** Modify `greeting-builder.js` to accept pre-loaded context
|
|
145
|
+
3. **🔴 CRITICAL:** Create `generate-greeting.js` using expanded loader
|
|
146
|
+
4. **🟡 MEDIUM:** Add validation and normalization of agent definitions
|
|
147
|
+
5. **🟡 MEDIUM:** Improve error handling and logging
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 📋 Tasks Breakdown
|
|
152
|
+
|
|
153
|
+
### Phase 1: Script Consolidation (4.5 hours)
|
|
154
|
+
|
|
155
|
+
**Task 1.1: Expand `agent-config-loader.js` (2 hours)**
|
|
156
|
+
|
|
157
|
+
**Objective:** Add capability to load complete agent definition from markdown file
|
|
158
|
+
|
|
159
|
+
**Implementation:**
|
|
160
|
+
|
|
161
|
+
Add to `.aiox-core/scripts/agent-config-loader.js`:
|
|
162
|
+
|
|
163
|
+
```javascript
|
|
164
|
+
/**
|
|
165
|
+
* Agent definition cache (5 min TTL)
|
|
166
|
+
*/
|
|
167
|
+
const agentDefCache = new Map();
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Load complete agent definition from markdown file
|
|
171
|
+
*
|
|
172
|
+
* @param {Object} options - Load options
|
|
173
|
+
* @param {boolean} options.skipCache - Skip cache and force reload
|
|
174
|
+
* @returns {Promise<Object>} Complete agent definition (agent, persona_profile, commands, etc.)
|
|
175
|
+
*/
|
|
176
|
+
async loadAgentDefinition(options = {}) {
|
|
177
|
+
const skipCache = options.skipCache || false;
|
|
178
|
+
const cacheKey = this.agentId;
|
|
179
|
+
|
|
180
|
+
// Check cache
|
|
181
|
+
if (!skipCache && agentDefCache.has(cacheKey)) {
|
|
182
|
+
const cached = agentDefCache.get(cacheKey);
|
|
183
|
+
if (Date.now() - cached.timestamp < 5 * 60 * 1000) {
|
|
184
|
+
return cached.definition;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Load from file
|
|
189
|
+
const agentPath = path.join(process.cwd(), '.aiox-core', 'agents', `${this.agentId}.md`);
|
|
190
|
+
|
|
191
|
+
try {
|
|
192
|
+
const content = await fs.readFile(agentPath, 'utf8');
|
|
193
|
+
|
|
194
|
+
// Extract YAML block (handle both ```yaml and ```yml)
|
|
195
|
+
const yamlMatch = content.match(/```ya?ml\n([\s\S]*?)\n```/);
|
|
196
|
+
if (!yamlMatch) {
|
|
197
|
+
throw new Error(`No YAML block found in ${this.agentId}.md`);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const agentDef = yaml.load(yamlMatch[1]);
|
|
201
|
+
|
|
202
|
+
// Validate structure
|
|
203
|
+
if (!agentDef.agent || !agentDef.agent.id) {
|
|
204
|
+
throw new Error(`Invalid agent definition: missing agent.id`);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Normalize and validate
|
|
208
|
+
const normalized = this._normalizeAgentDefinition(agentDef);
|
|
209
|
+
|
|
210
|
+
// Cache
|
|
211
|
+
agentDefCache.set(cacheKey, {
|
|
212
|
+
definition: normalized,
|
|
213
|
+
timestamp: Date.now()
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
return normalized;
|
|
217
|
+
} catch (error) {
|
|
218
|
+
if (error.code === 'ENOENT') {
|
|
219
|
+
throw new Error(`Agent file not found: ${this.agentId}.md`);
|
|
220
|
+
}
|
|
221
|
+
throw new Error(`Failed to load agent definition for ${this.agentId}: ${error.message}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Normalize agent definition with defaults
|
|
227
|
+
* @private
|
|
228
|
+
* @param {Object} agentDef - Raw agent definition
|
|
229
|
+
* @returns {Object} Normalized agent definition
|
|
230
|
+
*/
|
|
231
|
+
_normalizeAgentDefinition(agentDef) {
|
|
232
|
+
// Ensure agent object exists
|
|
233
|
+
if (!agentDef.agent) {
|
|
234
|
+
throw new Error('Agent definition missing "agent" section');
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const agent = agentDef.agent;
|
|
238
|
+
|
|
239
|
+
// Normalize: ensure required fields have defaults
|
|
240
|
+
agent.id = agent.id || 'unknown';
|
|
241
|
+
agent.name = agent.name || agent.id;
|
|
242
|
+
agent.icon = agent.icon || '🤖';
|
|
243
|
+
|
|
244
|
+
// Ensure persona_profile exists with greeting_levels
|
|
245
|
+
if (!agentDef.persona_profile) {
|
|
246
|
+
agentDef.persona_profile = {
|
|
247
|
+
greeting_levels: {
|
|
248
|
+
minimal: `${agent.icon} ${agent.id} Agent ready`,
|
|
249
|
+
named: `${agent.icon} ${agent.name} ready`,
|
|
250
|
+
archetypal: `${agent.icon} ${agent.name} ready`
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
} else if (!agentDef.persona_profile.greeting_levels) {
|
|
254
|
+
agentDef.persona_profile.greeting_levels = {
|
|
255
|
+
minimal: `${agent.icon} ${agent.id} Agent ready`,
|
|
256
|
+
named: `${agent.icon} ${agent.name} ready`,
|
|
257
|
+
archetypal: `${agent.icon} ${agent.name} ready`
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Ensure commands array exists
|
|
262
|
+
if (!agentDef.commands || !Array.isArray(agentDef.commands)) {
|
|
263
|
+
agentDef.commands = [];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return agentDef;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Load both config and definition (convenience method)
|
|
271
|
+
*
|
|
272
|
+
* @param {Object} coreConfig - Core configuration
|
|
273
|
+
* @param {Object} options - Load options
|
|
274
|
+
* @returns {Promise<Object>} Combined config and definition
|
|
275
|
+
*/
|
|
276
|
+
async loadComplete(coreConfig, options = {}) {
|
|
277
|
+
const [config, definition] = await Promise.all([
|
|
278
|
+
this.load(coreConfig, options),
|
|
279
|
+
this.loadAgentDefinition(options)
|
|
280
|
+
]);
|
|
281
|
+
|
|
282
|
+
return {
|
|
283
|
+
...config,
|
|
284
|
+
definition,
|
|
285
|
+
agent: definition.agent,
|
|
286
|
+
persona_profile: definition.persona_profile,
|
|
287
|
+
commands: definition.commands || []
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Validation:**
|
|
293
|
+
- ✅ Loads agent definition from markdown file
|
|
294
|
+
- ✅ Extracts YAML block correctly
|
|
295
|
+
- ✅ Validates structure (agent.id required)
|
|
296
|
+
- ✅ Normalizes missing fields with defaults
|
|
297
|
+
- ✅ Caches definitions (5 min TTL)
|
|
298
|
+
- ✅ Handles file not found errors gracefully
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
**Task 1.2: Deprecate `config-loader.js` (1 hour)**
|
|
303
|
+
|
|
304
|
+
**Objective:** Mark as deprecated and verify no active usage
|
|
305
|
+
|
|
306
|
+
**Actions:**
|
|
307
|
+
|
|
308
|
+
1. Add deprecation warning to `.aiox-core/scripts/config-loader.js`:
|
|
309
|
+
```javascript
|
|
310
|
+
/**
|
|
311
|
+
* @deprecated Use agent-config-loader.js instead
|
|
312
|
+
* This file will be removed in a future version.
|
|
313
|
+
*
|
|
314
|
+
* Migration guide:
|
|
315
|
+
* - Old: const { loadAgentConfig } = require('./config-loader');
|
|
316
|
+
* - New: const { AgentConfigLoader } = require('./agent-config-loader');
|
|
317
|
+
* const loader = new AgentConfigLoader(agentId);
|
|
318
|
+
* const config = await loader.load(coreConfig);
|
|
319
|
+
*/
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
2. Check for usages:
|
|
323
|
+
```bash
|
|
324
|
+
grep -r "require.*config-loader" .aiox-core/
|
|
325
|
+
grep -r "from.*config-loader" .aiox-core/
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
3. If no usages found: Document deprecation, keep file for now
|
|
329
|
+
4. If usages found: Migrate to `agent-config-loader.js` first
|
|
330
|
+
|
|
331
|
+
**Note:** Based on grep results, `config-loader.js` appears unused. Safe to deprecate.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
**Task 1.3: Delete Temporary Migration Scripts (30 minutes)**
|
|
336
|
+
|
|
337
|
+
**Objective:** Remove completed migration scripts (verify existence first)
|
|
338
|
+
|
|
339
|
+
**Scripts to Delete (verify existence before deletion):**
|
|
340
|
+
1. `.aiox-core/scripts/batch-integrate-greeting-builder.js` ✅ (exists - verified)
|
|
341
|
+
2. `.aiox-core/scripts/apply-inline-greeting-all-agents.js` ❌ (not found - may already be deleted)
|
|
342
|
+
3. `.aiox-core/scripts/update-activation-instructions.js` ✅ (exists - verified)
|
|
343
|
+
4. `.aiox-core/scripts/batch-update-agents-session-context.js` ❌ (not found - may already be deleted)
|
|
344
|
+
|
|
345
|
+
**Implementation Steps:**
|
|
346
|
+
|
|
347
|
+
1. **Verify script existence:**
|
|
348
|
+
```bash
|
|
349
|
+
# Check each script
|
|
350
|
+
test -f .aiox-core/scripts/batch-integrate-greeting-builder.js && echo "EXISTS" || echo "NOT FOUND"
|
|
351
|
+
test -f .aiox-core/scripts/apply-inline-greeting-all-agents.js && echo "EXISTS" || echo "NOT FOUND"
|
|
352
|
+
test -f .aiox-core/scripts/update-activation-instructions.js && echo "EXISTS" || echo "NOT FOUND"
|
|
353
|
+
test -f .aiox-core/scripts/batch-update-agents-session-context.js && echo "EXISTS" || echo "NOT FOUND"
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
2. **Delete existing scripts only:**
|
|
357
|
+
```bash
|
|
358
|
+
# Delete only if file exists (graceful handling)
|
|
359
|
+
[ -f .aiox-core/scripts/batch-integrate-greeting-builder.js ] && rm .aiox-core/scripts/batch-integrate-greeting-builder.js
|
|
360
|
+
[ -f .aiox-core/scripts/update-activation-instructions.js ] && rm .aiox-core/scripts/update-activation-instructions.js
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
3. **Document deletion status:**
|
|
364
|
+
- Log which scripts were deleted
|
|
365
|
+
- Note which scripts were already missing (may have been deleted in previous migration)
|
|
366
|
+
- Update this task with actual deletion results
|
|
367
|
+
|
|
368
|
+
**Justification:**
|
|
369
|
+
- Migrations completed
|
|
370
|
+
- Historical record preserved in Git
|
|
371
|
+
- Reduces confusion
|
|
372
|
+
- Graceful handling of already-deleted scripts
|
|
373
|
+
|
|
374
|
+
**Validation:**
|
|
375
|
+
- ✅ Scripts verified before deletion
|
|
376
|
+
- ✅ Only existing scripts deleted
|
|
377
|
+
- ✅ Deletion status documented
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
### Phase 2: Modify GreetingBuilder (2 hours)
|
|
382
|
+
|
|
383
|
+
**Task 2.1: Modify `greeting-builder.js` to Accept Pre-loaded Context (2 hours)**
|
|
384
|
+
|
|
385
|
+
**Objective:** Prevent duplicate loading of session context and project status
|
|
386
|
+
|
|
387
|
+
**Implementation:**
|
|
388
|
+
|
|
389
|
+
Modify `.aiox-core/scripts/greeting-builder.js`:
|
|
390
|
+
|
|
391
|
+
```javascript
|
|
392
|
+
/**
|
|
393
|
+
* Build contextual greeting (internal implementation)
|
|
394
|
+
* @private
|
|
395
|
+
* @param {Object} agent - Agent definition
|
|
396
|
+
* @param {Object} context - Session context (may contain pre-loaded values)
|
|
397
|
+
* @returns {Promise<string>} Contextual greeting
|
|
398
|
+
*/
|
|
399
|
+
async _buildContextualGreeting(agent, context) {
|
|
400
|
+
// Use pre-loaded values if available, otherwise load
|
|
401
|
+
const sessionType = context.sessionType ||
|
|
402
|
+
await this._safeDetectSessionType(context);
|
|
403
|
+
|
|
404
|
+
const projectStatus = context.projectStatus ||
|
|
405
|
+
await this._safeLoadProjectStatus();
|
|
406
|
+
|
|
407
|
+
// gitConfig always loads (fast, cached)
|
|
408
|
+
const gitConfig = await this._safeCheckGitConfig();
|
|
409
|
+
|
|
410
|
+
// Build greeting sections based on session type
|
|
411
|
+
const sections = [];
|
|
412
|
+
|
|
413
|
+
// 1. Presentation (always)
|
|
414
|
+
sections.push(this.buildPresentation(agent, sessionType));
|
|
415
|
+
|
|
416
|
+
// 2. Role description (new session only)
|
|
417
|
+
if (sessionType === 'new') {
|
|
418
|
+
sections.push(this.buildRoleDescription(agent));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// 3. Project status (if git configured)
|
|
422
|
+
if (gitConfig.configured && projectStatus) {
|
|
423
|
+
sections.push(this.buildProjectStatus(projectStatus, sessionType));
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// 4. Session context message (if existing session)
|
|
427
|
+
if (sessionType !== 'new' && context.sessionMessage) {
|
|
428
|
+
sections.push(context.sessionMessage);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// 5. Workflow suggestions (if workflow session)
|
|
432
|
+
if (sessionType === 'workflow' && context.lastCommands) {
|
|
433
|
+
const suggestions = this.workflowNavigator.getNextSteps(
|
|
434
|
+
context.lastCommands,
|
|
435
|
+
{ agentId: agent.id }
|
|
436
|
+
);
|
|
437
|
+
if (suggestions && suggestions.length > 0) {
|
|
438
|
+
sections.push(this.buildWorkflowSuggestions(suggestions));
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// 6. Commands (filtered by visibility)
|
|
443
|
+
const commands = this.filterCommandsByVisibility(agent, sessionType);
|
|
444
|
+
sections.push(this.buildCommands(commands, sessionType));
|
|
445
|
+
|
|
446
|
+
// 7. Footer
|
|
447
|
+
sections.push(this.buildFooter());
|
|
448
|
+
|
|
449
|
+
return sections.filter(Boolean).join('\n\n');
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
**Key Changes:**
|
|
454
|
+
- ✅ Uses `context.sessionType` if provided (avoids duplicate detection)
|
|
455
|
+
- ✅ Uses `context.projectStatus` if provided (avoids duplicate loading)
|
|
456
|
+
- ✅ Uses `context.sessionMessage` if provided (from session-context-loader)
|
|
457
|
+
- ✅ Uses `context.lastCommands` if provided (for workflow detection)
|
|
458
|
+
- ✅ Falls back to loading if not provided (backward compatible)
|
|
459
|
+
|
|
460
|
+
**Validation:**
|
|
461
|
+
- ✅ Backward compatible (works with old context format)
|
|
462
|
+
- ✅ Uses pre-loaded values when available
|
|
463
|
+
- ✅ Performance improved (no duplicate loading)
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
### Phase 3: Create Unified Greeting Generator (2 hours)
|
|
468
|
+
|
|
469
|
+
**Task 3.1: Create `generate-greeting.js` (2 hours)**
|
|
470
|
+
|
|
471
|
+
**Objective:** Create unified wrapper that orchestrates all greeting components
|
|
472
|
+
|
|
473
|
+
**Implementation:**
|
|
474
|
+
|
|
475
|
+
Create `.aiox-core/scripts/generate-greeting.js`:
|
|
476
|
+
|
|
477
|
+
```javascript
|
|
478
|
+
#!/usr/bin/env node
|
|
479
|
+
/**
|
|
480
|
+
* Unified Greeting Generator
|
|
481
|
+
*
|
|
482
|
+
* Orchestrates all greeting components for optimal performance:
|
|
483
|
+
* - Agent definition (via expanded agent-config-loader.js)
|
|
484
|
+
* - Session context (session-context-loader.js)
|
|
485
|
+
* - Project status (project-status-loader.js)
|
|
486
|
+
* - User preferences (greeting-preference-manager.js)
|
|
487
|
+
* - Contextual adaptation (greeting-builder.js)
|
|
488
|
+
*
|
|
489
|
+
* Performance Targets:
|
|
490
|
+
* - With cache: <50ms
|
|
491
|
+
* - Without cache: <150ms (timeout protection)
|
|
492
|
+
* - Fallback: <10ms
|
|
493
|
+
*
|
|
494
|
+
* Usage: node generate-greeting.js <agent-id>
|
|
495
|
+
*
|
|
496
|
+
* Part of Story 6.1.4: Unified Greeting System Integration
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
const GreetingBuilder = require('./greeting-builder');
|
|
500
|
+
const SessionContextLoader = require('./session-context-loader');
|
|
501
|
+
const ProjectStatusLoader = require('./project-status-loader');
|
|
502
|
+
const { AgentConfigLoader } = require('./agent-config-loader');
|
|
503
|
+
const fs = require('fs').promises;
|
|
504
|
+
const path = require('path');
|
|
505
|
+
const yaml = require('js-yaml');
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Generate unified greeting for agent activation
|
|
509
|
+
*
|
|
510
|
+
* @param {string} agentId - Agent identifier (e.g., 'qa', 'dev')
|
|
511
|
+
* @returns {Promise<string>} Formatted greeting string
|
|
512
|
+
* @throws {Error} If agent file not found or invalid
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* const greeting = await generateGreeting('qa');
|
|
516
|
+
* console.log(greeting);
|
|
517
|
+
*/
|
|
518
|
+
async function generateGreeting(agentId) {
|
|
519
|
+
const startTime = Date.now();
|
|
520
|
+
|
|
521
|
+
try {
|
|
522
|
+
// Load core config
|
|
523
|
+
const coreConfigPath = path.join(process.cwd(), '.aiox-core', 'core-config.yaml');
|
|
524
|
+
const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
|
|
525
|
+
const coreConfig = yaml.load(coreConfigContent);
|
|
526
|
+
|
|
527
|
+
// Load everything in parallel using expanded AgentConfigLoader
|
|
528
|
+
const loader = new AgentConfigLoader(agentId);
|
|
529
|
+
const projectStatusLoader = new ProjectStatusLoader();
|
|
530
|
+
|
|
531
|
+
const [complete, sessionContext, projectStatus] = await Promise.all([
|
|
532
|
+
loader.loadComplete(coreConfig), // Loads config + definition
|
|
533
|
+
loadSessionContext(agentId),
|
|
534
|
+
projectStatusLoader.loadProjectStatus()
|
|
535
|
+
]);
|
|
536
|
+
|
|
537
|
+
// Build unified context
|
|
538
|
+
const context = {
|
|
539
|
+
conversationHistory: [], // Not available in Claude Code
|
|
540
|
+
sessionType: sessionContext.sessionType, // Pre-detected
|
|
541
|
+
projectStatus: projectStatus, // Pre-loaded
|
|
542
|
+
lastCommands: sessionContext.lastCommands || [],
|
|
543
|
+
previousAgent: sessionContext.previousAgent,
|
|
544
|
+
sessionMessage: sessionContext.message,
|
|
545
|
+
workflowActive: sessionContext.workflowActive
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
// Generate greeting using GreetingBuilder
|
|
549
|
+
const builder = new GreetingBuilder();
|
|
550
|
+
const greeting = await builder.buildGreeting(complete.agent, context);
|
|
551
|
+
|
|
552
|
+
const duration = Date.now() - startTime;
|
|
553
|
+
if (duration > 100) {
|
|
554
|
+
console.warn(`[generate-greeting] Slow generation: ${duration}ms`);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return greeting;
|
|
558
|
+
|
|
559
|
+
} catch (error) {
|
|
560
|
+
console.error('[generate-greeting] Error:', {
|
|
561
|
+
agentId,
|
|
562
|
+
error: error.message,
|
|
563
|
+
stack: error.stack,
|
|
564
|
+
timestamp: new Date().toISOString()
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
// Fallback: Simple greeting
|
|
568
|
+
return generateFallbackGreeting(agentId);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Load session context for agent
|
|
574
|
+
* @private
|
|
575
|
+
* @param {string} agentId - Agent ID
|
|
576
|
+
* @returns {Promise<Object>} Session context
|
|
577
|
+
*/
|
|
578
|
+
async function loadSessionContext(agentId) {
|
|
579
|
+
try {
|
|
580
|
+
const loader = new SessionContextLoader();
|
|
581
|
+
return loader.loadContext(agentId);
|
|
582
|
+
} catch (error) {
|
|
583
|
+
console.warn('[generate-greeting] Session context failed:', error.message);
|
|
584
|
+
return {
|
|
585
|
+
sessionType: 'new',
|
|
586
|
+
message: null,
|
|
587
|
+
previousAgent: null,
|
|
588
|
+
lastCommands: [],
|
|
589
|
+
workflowActive: null
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Generate fallback greeting if everything fails
|
|
596
|
+
* @private
|
|
597
|
+
* @param {string} agentId - Agent ID
|
|
598
|
+
* @returns {string} Simple fallback greeting
|
|
599
|
+
*/
|
|
600
|
+
function generateFallbackGreeting(agentId) {
|
|
601
|
+
return `✅ ${agentId} Agent ready\n\nType \`*help\` to see available commands.`;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// CLI interface
|
|
605
|
+
if (require.main === module) {
|
|
606
|
+
const agentId = process.argv[2];
|
|
607
|
+
|
|
608
|
+
if (!agentId) {
|
|
609
|
+
console.error('Usage: node generate-greeting.js <agent-id>');
|
|
610
|
+
console.error('\nExamples:');
|
|
611
|
+
console.error(' node generate-greeting.js qa');
|
|
612
|
+
console.error(' node generate-greeting.js dev');
|
|
613
|
+
process.exit(1);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
generateGreeting(agentId)
|
|
617
|
+
.then(greeting => {
|
|
618
|
+
console.log(greeting);
|
|
619
|
+
process.exit(0);
|
|
620
|
+
})
|
|
621
|
+
.catch(error => {
|
|
622
|
+
console.error('Fatal error:', error.message);
|
|
623
|
+
console.log(generateFallbackGreeting(agentId));
|
|
624
|
+
process.exit(1);
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
module.exports = { generateGreeting };
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
**Validation:**
|
|
632
|
+
- ✅ Loads agent definition via expanded `agent-config-loader.js`
|
|
633
|
+
- ✅ Loads session context in parallel
|
|
634
|
+
- ✅ Loads project status in parallel
|
|
635
|
+
- ✅ Builds unified context object
|
|
636
|
+
- ✅ Passes pre-loaded context to `GreetingBuilder`
|
|
637
|
+
- ✅ Handles errors gracefully with fallback
|
|
638
|
+
- ✅ Performance logging for slow operations
|
|
639
|
+
- ✅ CLI interface for testing
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
### Phase 4: Update Agents (Incremental Approach) (3.5 hours)
|
|
644
|
+
|
|
645
|
+
**Strategy:** Use QA agent as pilot, test thoroughly, then apply to others
|
|
646
|
+
|
|
647
|
+
**Task 4.1: Update QA Agent First (Pilot) (1 hour)**
|
|
648
|
+
|
|
649
|
+
**Objective:** Update only QA agent as proof of concept
|
|
650
|
+
|
|
651
|
+
**Pilot Agent:**
|
|
652
|
+
- `qa.md` (Quinn - Test Architect & Quality Advisor)
|
|
653
|
+
|
|
654
|
+
**New STEP 3 Format:**
|
|
655
|
+
|
|
656
|
+
```yaml
|
|
657
|
+
- STEP 3: |
|
|
658
|
+
Generate greeting by executing unified greeting generator:
|
|
659
|
+
|
|
660
|
+
1. Execute: node .aiox-core/scripts/generate-greeting.js qa
|
|
661
|
+
2. Capture the complete output
|
|
662
|
+
3. Display the greeting exactly as returned
|
|
663
|
+
|
|
664
|
+
If execution fails or times out:
|
|
665
|
+
- Fallback to simple greeting: "✅ qa Agent ready"
|
|
666
|
+
- Show: "Type *help to see available commands"
|
|
667
|
+
|
|
668
|
+
Do NOT modify or interpret the greeting output.
|
|
669
|
+
Display it exactly as received.
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
**Manual Update Steps:**
|
|
673
|
+
|
|
674
|
+
1. Open `.aiox-core/agents/qa.md`
|
|
675
|
+
2. Find STEP 3 section (starts with `- STEP 3: |`)
|
|
676
|
+
3. Replace entire STEP 3 block with new format above
|
|
677
|
+
4. Save file
|
|
678
|
+
5. Test activation: `/AIOX/agents/qa`
|
|
679
|
+
|
|
680
|
+
**Validation Checklist for QA Pilot:**
|
|
681
|
+
- [ ] QA agent file updated correctly
|
|
682
|
+
- [ ] STEP 3 replaced with new format
|
|
683
|
+
- [ ] Agent ID "qa" correctly inserted
|
|
684
|
+
- [ ] Fallback instructions included
|
|
685
|
+
- [ ] File syntax valid (YAML)
|
|
686
|
+
|
|
687
|
+
---
|
|
688
|
+
|
|
689
|
+
**Task 4.2: Test QA Agent Thoroughly (1 hour)**
|
|
690
|
+
|
|
691
|
+
**Objective:** Validate unified greeting system works correctly with QA agent
|
|
692
|
+
|
|
693
|
+
**Test Scenarios:**
|
|
694
|
+
|
|
695
|
+
1. **New Session Test:**
|
|
696
|
+
```bash
|
|
697
|
+
# Clear session state
|
|
698
|
+
rm .aiox/session-state.json
|
|
699
|
+
|
|
700
|
+
# Activate QA agent
|
|
701
|
+
/AIOX/agents/qa
|
|
702
|
+
|
|
703
|
+
# Expected: "new" session type detected
|
|
704
|
+
# Expected: Full greeting with role description
|
|
705
|
+
# Expected: All commands shown (visibility: full, quick, key)
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
2. **Existing Session Test:**
|
|
709
|
+
```bash
|
|
710
|
+
# Create session state
|
|
711
|
+
node -e "const fs = require('fs'); const path = require('path'); const sessionPath = path.join(process.cwd(), '.aiox', 'session-state.json'); fs.mkdirSync(path.dirname(sessionPath), { recursive: true }); fs.writeFileSync(sessionPath, JSON.stringify({ sessionId: 'test-123', startTime: new Date().toISOString(), lastActivity: new Date().toISOString(), agentSequence: [{ id: 'po', name: 'Pax' }], lastCommands: ['create-story'], workflowActive: null }), 'utf8');"
|
|
712
|
+
|
|
713
|
+
# Activate QA agent
|
|
714
|
+
/AIOX/agents/qa
|
|
715
|
+
|
|
716
|
+
# Expected: "existing" session type detected
|
|
717
|
+
# Expected: Quick greeting (no role description)
|
|
718
|
+
# Expected: Reduced commands (visibility: quick, key)
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
3. **Direct Script Test:**
|
|
722
|
+
```bash
|
|
723
|
+
# Test script directly
|
|
724
|
+
node .aiox-core/scripts/generate-greeting.js qa
|
|
725
|
+
|
|
726
|
+
# Expected: Greeting output without errors
|
|
727
|
+
# Expected: Contains agent name "Quinn"
|
|
728
|
+
# Expected: Contains project status (if git configured)
|
|
729
|
+
# Expected: Contains commands list
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
4. **Error Handling Test:**
|
|
733
|
+
```bash
|
|
734
|
+
# Test with invalid agent
|
|
735
|
+
node .aiox-core/scripts/generate-greeting.js invalid-agent
|
|
736
|
+
|
|
737
|
+
# Expected: Fallback greeting shown
|
|
738
|
+
# Expected: No errors thrown
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
5. **Performance Test:**
|
|
742
|
+
```bash
|
|
743
|
+
# Measure execution time
|
|
744
|
+
time node .aiox-core/scripts/generate-greeting.js qa
|
|
745
|
+
|
|
746
|
+
# Expected: <150ms (with timeout protection)
|
|
747
|
+
# Expected: <50ms if cache hit
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
**Success Criteria:**
|
|
751
|
+
- ✅ QA agent activates successfully
|
|
752
|
+
- ✅ Greeting generated correctly
|
|
753
|
+
- ✅ Session type detected correctly
|
|
754
|
+
- ✅ Commands filtered by visibility
|
|
755
|
+
- ✅ Project status shown (if git configured)
|
|
756
|
+
- ✅ Fallback works on errors
|
|
757
|
+
- ✅ Performance within targets
|
|
758
|
+
|
|
759
|
+
**If QA Pilot Fails:**
|
|
760
|
+
- Stop and fix issues before proceeding
|
|
761
|
+
- Don't update other agents until QA works perfectly
|
|
762
|
+
- Document issues and solutions
|
|
763
|
+
|
|
764
|
+
---
|
|
765
|
+
|
|
766
|
+
**Task 4.3: Apply to Remaining 10 Agents (1.5 hours)**
|
|
767
|
+
|
|
768
|
+
**Objective:** Update remaining agents only after QA pilot validated
|
|
769
|
+
|
|
770
|
+
**Prerequisites:**
|
|
771
|
+
- ✅ QA agent tested and working perfectly
|
|
772
|
+
- ✅ All test scenarios passed
|
|
773
|
+
- ✅ No errors or issues identified
|
|
774
|
+
|
|
775
|
+
**Agents to Update (After QA Validation):**
|
|
776
|
+
1. `dev.md`
|
|
777
|
+
2. `po.md`
|
|
778
|
+
3. `sm.md`
|
|
779
|
+
4. `pm.md`
|
|
780
|
+
5. `architect.md`
|
|
781
|
+
6. `analyst.md`
|
|
782
|
+
7. `data-engineer.md`
|
|
783
|
+
8. `devops.md`
|
|
784
|
+
9. `aiox-master.md`
|
|
785
|
+
10. `ux-design-expert.md`
|
|
786
|
+
|
|
787
|
+
**Implementation Script:**
|
|
788
|
+
|
|
789
|
+
Create script `.aiox/temp-update-remaining-agents.js`:
|
|
790
|
+
|
|
791
|
+
```javascript
|
|
792
|
+
const fs = require('fs');
|
|
793
|
+
const path = require('path');
|
|
794
|
+
|
|
795
|
+
const AGENTS_DIR = path.join(process.cwd(), '.aiox-core', 'agents');
|
|
796
|
+
const REMAINING_AGENTS = [
|
|
797
|
+
'dev', 'po', 'sm', 'pm', 'architect', 'analyst',
|
|
798
|
+
'data-engineer', 'devops', 'aiox-master', 'ux-design-expert'
|
|
799
|
+
];
|
|
800
|
+
|
|
801
|
+
const NEW_STEP_3_TEMPLATE = ` - STEP 3: |
|
|
802
|
+
Generate greeting by executing unified greeting generator:
|
|
803
|
+
|
|
804
|
+
1. Execute: node .aiox-core/scripts/generate-greeting.js {agent-id}
|
|
805
|
+
2. Capture the complete output
|
|
806
|
+
3. Display the greeting exactly as returned
|
|
807
|
+
|
|
808
|
+
If execution fails or times out:
|
|
809
|
+
- Fallback to simple greeting: "{icon} {name} ready"
|
|
810
|
+
- Show: "Type *help to see available commands"
|
|
811
|
+
|
|
812
|
+
Do NOT modify or interpret the greeting output.
|
|
813
|
+
Display it exactly as received.`;
|
|
814
|
+
|
|
815
|
+
function updateAgent(agentId) {
|
|
816
|
+
const filePath = path.join(AGENTS_DIR, `${agentId}.md`);
|
|
817
|
+
|
|
818
|
+
if (!fs.existsSync(filePath)) {
|
|
819
|
+
console.error(`❌ Agent file not found: ${filePath}`);
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
824
|
+
|
|
825
|
+
// Find and replace STEP 3
|
|
826
|
+
const step3Pattern = / - STEP 3: \|[\s\S]*?(?= - STEP 4:|$)/;
|
|
827
|
+
|
|
828
|
+
// Get agent icon and name from file for fallback
|
|
829
|
+
const iconMatch = content.match(/icon:\s*(.+)/);
|
|
830
|
+
const nameMatch = content.match(/name:\s*(.+)/);
|
|
831
|
+
const icon = iconMatch ? iconMatch[1].trim() : '🤖';
|
|
832
|
+
const name = nameMatch ? nameMatch[1].trim() : agentId;
|
|
833
|
+
|
|
834
|
+
const newStep3 = NEW_STEP_3_TEMPLATE
|
|
835
|
+
.replace(/{agent-id}/g, agentId)
|
|
836
|
+
.replace('{icon}', icon)
|
|
837
|
+
.replace('{name}', name);
|
|
838
|
+
|
|
839
|
+
if (step3Pattern.test(content)) {
|
|
840
|
+
content = content.replace(step3Pattern, newStep3);
|
|
841
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
842
|
+
console.log(`✅ Updated ${agentId}.md`);
|
|
843
|
+
return true;
|
|
844
|
+
} else {
|
|
845
|
+
console.warn(`⚠️ STEP 3 pattern not found in ${agentId}.md`);
|
|
846
|
+
return false;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// Update remaining agents
|
|
851
|
+
console.log('🔄 Updating remaining agents (QA already done)...\n');
|
|
852
|
+
let updated = 0;
|
|
853
|
+
for (const agentId of REMAINING_AGENTS) {
|
|
854
|
+
if (updateAgent(agentId)) {
|
|
855
|
+
updated++;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
console.log(`\n✅ Updated ${updated} of ${REMAINING_AGENTS.length} agents`);
|
|
860
|
+
console.log(`📊 Total: ${updated + 1} agents (including QA pilot)`);
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
**Validation:**
|
|
864
|
+
- ✅ All 10 remaining agents updated
|
|
865
|
+
- ✅ STEP 3 replaced correctly
|
|
866
|
+
- ✅ Agent IDs correctly inserted
|
|
867
|
+
- ✅ Icons and names extracted for fallback
|
|
868
|
+
- ✅ Fallback instructions included
|
|
869
|
+
|
|
870
|
+
**Quick Validation Test:**
|
|
871
|
+
```bash
|
|
872
|
+
# Test each agent activation
|
|
873
|
+
for agent in dev po sm pm architect analyst data-engineer devops aiox-master ux-design-expert; do
|
|
874
|
+
echo "Testing $agent..."
|
|
875
|
+
node .aiox-core/scripts/generate-greeting.js $agent
|
|
876
|
+
echo "---"
|
|
877
|
+
done
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
---
|
|
881
|
+
|
|
882
|
+
### Phase 5: Session State Updates (2 hours)
|
|
883
|
+
|
|
884
|
+
**Task 5.1: Create Command Execution Hook (1 hour)**
|
|
885
|
+
|
|
886
|
+
**Objective:** Update session state after command execution
|
|
887
|
+
|
|
888
|
+
**Implementation:**
|
|
889
|
+
|
|
890
|
+
Create `.aiox-core/scripts/command-execution-hook.js`:
|
|
891
|
+
|
|
892
|
+
```javascript
|
|
893
|
+
/**
|
|
894
|
+
* Command Execution Hook
|
|
895
|
+
*
|
|
896
|
+
* Updates session state after command execution to maintain
|
|
897
|
+
* accurate session context for future agent activations.
|
|
898
|
+
*
|
|
899
|
+
* Part of Story 6.1.4: Unified Greeting System Integration
|
|
900
|
+
*/
|
|
901
|
+
|
|
902
|
+
const SessionContextLoader = require('./session-context-loader');
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Update session state after command execution
|
|
906
|
+
*
|
|
907
|
+
* Should be called after each command execution to maintain
|
|
908
|
+
* accurate session context for future agent activations.
|
|
909
|
+
*
|
|
910
|
+
* @param {string} agentId - Agent ID executing the command
|
|
911
|
+
* @param {string} agentName - Agent name (for display)
|
|
912
|
+
* @param {string} command - Command name executed
|
|
913
|
+
* @returns {void}
|
|
914
|
+
*
|
|
915
|
+
* @example
|
|
916
|
+
* updateSessionAfterCommand('qa', 'Quinn', 'analyze-framework');
|
|
917
|
+
*/
|
|
918
|
+
function updateSessionAfterCommand(agentId, agentName, command) {
|
|
919
|
+
try {
|
|
920
|
+
const loader = new SessionContextLoader();
|
|
921
|
+
loader.updateSession(agentId, agentName, command);
|
|
922
|
+
} catch (error) {
|
|
923
|
+
// Non-blocking: Session update failure shouldn't break command execution
|
|
924
|
+
console.warn('[command-hook] Failed to update session:', error.message);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
module.exports = { updateSessionAfterCommand };
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
**Note:** This hook is created but not automatically integrated. Integration requires:
|
|
932
|
+
- Modifying task execution system (future story)
|
|
933
|
+
- Or manual calls in critical commands (documentation)
|
|
934
|
+
|
|
935
|
+
**For now:** Document usage pattern for future integration.
|
|
936
|
+
|
|
937
|
+
---
|
|
938
|
+
|
|
939
|
+
**Task 5.2: Document Session Update Pattern (1 hour)**
|
|
940
|
+
|
|
941
|
+
**Objective:** Document how to integrate session updates
|
|
942
|
+
|
|
943
|
+
**Documentation:**
|
|
944
|
+
|
|
945
|
+
Create `.aiox-core/docs/session-update-pattern.md`:
|
|
946
|
+
|
|
947
|
+
```markdown
|
|
948
|
+
# Session Update Pattern
|
|
949
|
+
|
|
950
|
+
## Overview
|
|
951
|
+
|
|
952
|
+
To maintain accurate session context, update session state after command execution.
|
|
953
|
+
|
|
954
|
+
## Usage
|
|
955
|
+
|
|
956
|
+
```javascript
|
|
957
|
+
const { updateSessionAfterCommand } = require('./command-execution-hook');
|
|
958
|
+
|
|
959
|
+
// After command execution
|
|
960
|
+
updateSessionAfterCommand('qa', 'Quinn', 'analyze-framework');
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
## Integration Points
|
|
964
|
+
|
|
965
|
+
1. **Task Execution:** Add hook call after task completion
|
|
966
|
+
2. **Command Execution:** Add hook call after command completion
|
|
967
|
+
3. **Manual Updates:** Call directly when needed
|
|
968
|
+
|
|
969
|
+
## Future Integration
|
|
970
|
+
|
|
971
|
+
Automatic integration will be added in future story:
|
|
972
|
+
- Task execution system will call hook automatically
|
|
973
|
+
- Command execution system will call hook automatically
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
---
|
|
977
|
+
|
|
978
|
+
### Phase 6: Testing & Validation (4 hours)
|
|
979
|
+
|
|
980
|
+
**Task 6.1: Unit Tests (2 hours)**
|
|
981
|
+
|
|
982
|
+
**Note:** Test directory structure verified - `tests/unit/` and `tests/integration/` already exist ✅
|
|
983
|
+
|
|
984
|
+
Create `tests/unit/generate-greeting.test.js`:
|
|
985
|
+
|
|
986
|
+
```javascript
|
|
987
|
+
/**
|
|
988
|
+
* Unit Tests for Unified Greeting Generator
|
|
989
|
+
*/
|
|
990
|
+
|
|
991
|
+
const { generateGreeting } = require('../../.aiox-core/scripts/generate-greeting');
|
|
992
|
+
|
|
993
|
+
describe('generateGreeting', () => {
|
|
994
|
+
it('should generate greeting for valid agent', async () => {
|
|
995
|
+
const greeting = await generateGreeting('qa');
|
|
996
|
+
expect(greeting).toContain('Quinn');
|
|
997
|
+
expect(greeting).toContain('ready');
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
it('should fallback for invalid agent', async () => {
|
|
1001
|
+
const greeting = await generateGreeting('invalid-agent');
|
|
1002
|
+
expect(greeting).toContain('Agent ready');
|
|
1003
|
+
expect(greeting).toContain('*help');
|
|
1004
|
+
});
|
|
1005
|
+
|
|
1006
|
+
it('should include project status when git configured', async () => {
|
|
1007
|
+
const greeting = await generateGreeting('dev');
|
|
1008
|
+
// May or may not include project status depending on git config
|
|
1009
|
+
expect(greeting).toBeTruthy();
|
|
1010
|
+
});
|
|
1011
|
+
|
|
1012
|
+
it('should respect user preferences', async () => {
|
|
1013
|
+
// Test with different preferences
|
|
1014
|
+
// Requires mocking GreetingPreferenceManager
|
|
1015
|
+
});
|
|
1016
|
+
});
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
**Task 6.2: Integration Tests (2 hours)**
|
|
1020
|
+
|
|
1021
|
+
Create `tests/integration/greeting-system-integration.test.js`:
|
|
1022
|
+
|
|
1023
|
+
```javascript
|
|
1024
|
+
/**
|
|
1025
|
+
* Integration Tests for Unified Greeting System
|
|
1026
|
+
*/
|
|
1027
|
+
|
|
1028
|
+
describe('Greeting System Integration', () => {
|
|
1029
|
+
it('should generate greeting with all components integrated', async () => {
|
|
1030
|
+
// Test full flow:
|
|
1031
|
+
// 1. Load agent definition
|
|
1032
|
+
// 2. Load session context
|
|
1033
|
+
// 3. Load project status
|
|
1034
|
+
// 4. Generate greeting
|
|
1035
|
+
// 5. Verify output
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
it('should handle new session correctly', async () => {
|
|
1039
|
+
// Clear session state
|
|
1040
|
+
// Generate greeting
|
|
1041
|
+
// Verify "new" session type detected
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
it('should handle existing session correctly', async () => {
|
|
1045
|
+
// Create session state
|
|
1046
|
+
// Generate greeting
|
|
1047
|
+
// Verify "existing" session type detected
|
|
1048
|
+
});
|
|
1049
|
+
|
|
1050
|
+
it('should update session state after command', async () => {
|
|
1051
|
+
// Execute command
|
|
1052
|
+
// Update session
|
|
1053
|
+
// Verify session state updated
|
|
1054
|
+
});
|
|
1055
|
+
});
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
---
|
|
1059
|
+
|
|
1060
|
+
## ✅ Acceptance Criteria
|
|
1061
|
+
|
|
1062
|
+
### Must Have
|
|
1063
|
+
|
|
1064
|
+
- [ ] `agent-config-loader.js` expanded with `loadAgentDefinition()` and `loadComplete()`
|
|
1065
|
+
- [ ] `greeting-builder.js` modified to accept pre-loaded context
|
|
1066
|
+
- [ ] `generate-greeting.js` created and functional
|
|
1067
|
+
- [ ] QA agent updated and tested as pilot
|
|
1068
|
+
- [ ] QA agent validated with all test scenarios
|
|
1069
|
+
- [ ] Remaining 10 agents updated after QA validation
|
|
1070
|
+
- [ ] Session state updates after commands (hook created)
|
|
1071
|
+
- [ ] Performance targets met: <50ms (cache), <150ms (no cache)
|
|
1072
|
+
- [ ] Fallback works if Node.js unavailable
|
|
1073
|
+
- [ ] Backward compatible with existing code
|
|
1074
|
+
- [ ] Unit tests pass (10+ test cases)
|
|
1075
|
+
- [ ] Integration tests pass (5+ test cases)
|
|
1076
|
+
|
|
1077
|
+
### Should Have
|
|
1078
|
+
|
|
1079
|
+
- [ ] `config-loader.js` deprecated (marked, usage checked)
|
|
1080
|
+
- [ ] Temporary migration scripts deleted (verified and removed)
|
|
1081
|
+
- [ ] Agent definition validation and normalization
|
|
1082
|
+
- [ ] Improved error logging
|
|
1083
|
+
- [ ] Documentation updated
|
|
1084
|
+
|
|
1085
|
+
### Nice to Have
|
|
1086
|
+
|
|
1087
|
+
- [ ] Performance metrics dashboard
|
|
1088
|
+
- [ ] Greeting preview command
|
|
1089
|
+
- [ ] Session state visualization
|
|
1090
|
+
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
## 🤖 CodeRabbit Integration
|
|
1094
|
+
|
|
1095
|
+
### Story Type Analysis
|
|
1096
|
+
|
|
1097
|
+
**Primary Type:** Infrastructure/Integration
|
|
1098
|
+
**Secondary Type(s):** Architecture, Performance Optimization
|
|
1099
|
+
**Complexity:** Medium
|
|
1100
|
+
|
|
1101
|
+
### Specialized Agent Assignment
|
|
1102
|
+
|
|
1103
|
+
**Primary Agents:**
|
|
1104
|
+
- @dev: Core implementation, code quality, integration safety
|
|
1105
|
+
- @architect: Architecture validation, pattern compliance
|
|
1106
|
+
|
|
1107
|
+
**Supporting Agents:**
|
|
1108
|
+
- @qa: Story validation, test coverage verification
|
|
1109
|
+
|
|
1110
|
+
### Quality Gate Tasks
|
|
1111
|
+
|
|
1112
|
+
- [ ] **Pre-Commit (@dev):** Run before marking story complete
|
|
1113
|
+
- Focus: Code quality, error handling, fallback mechanisms
|
|
1114
|
+
- Validate: All error paths have fallbacks
|
|
1115
|
+
- Check: Performance targets met (<50ms cache, <150ms no cache)
|
|
1116
|
+
|
|
1117
|
+
- [ ] **Pre-PR (@dev):** Run before creating pull request
|
|
1118
|
+
- Focus: Integration safety, backward compatibility
|
|
1119
|
+
- Validate: No breaking changes to existing agent activation
|
|
1120
|
+
- Check: All 11 agents still activate correctly
|
|
1121
|
+
|
|
1122
|
+
- [ ] **Pre-Deployment:** N/A (Infrastructure story, no production deployment)
|
|
1123
|
+
|
|
1124
|
+
### CodeRabbit Focus Areas
|
|
1125
|
+
|
|
1126
|
+
**Primary Focus:**
|
|
1127
|
+
- **Error Handling:** Try-catch blocks, fallback mechanisms, graceful degradation
|
|
1128
|
+
- **Performance:** Caching strategies, timeout protection, parallel loading
|
|
1129
|
+
- **Integration:** Component interaction patterns, context passing, session state management
|
|
1130
|
+
|
|
1131
|
+
**Secondary Focus:**
|
|
1132
|
+
- **Code Quality:** Method naming, documentation, validation logic
|
|
1133
|
+
- **Backward Compatibility:** Existing agent activation still works, no breaking changes
|
|
1134
|
+
- **Testing:** Unit test coverage, integration test scenarios, performance benchmarks
|
|
1135
|
+
|
|
1136
|
+
**Specific Patterns to Validate:**
|
|
1137
|
+
|
|
1138
|
+
1. **Error Handling Pattern:**
|
|
1139
|
+
```javascript
|
|
1140
|
+
// All async operations must have try-catch
|
|
1141
|
+
try {
|
|
1142
|
+
const result = await operation();
|
|
1143
|
+
return result;
|
|
1144
|
+
} catch (error) {
|
|
1145
|
+
console.error('[component] Error:', error.message);
|
|
1146
|
+
return fallbackValue;
|
|
1147
|
+
}
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
2. **Performance Pattern:**
|
|
1151
|
+
```javascript
|
|
1152
|
+
// Cache checks before expensive operations
|
|
1153
|
+
if (cache.has(key) && !isExpired(cache.get(key))) {
|
|
1154
|
+
return cache.get(key).value;
|
|
1155
|
+
}
|
|
1156
|
+
```
|
|
1157
|
+
|
|
1158
|
+
3. **Integration Pattern:**
|
|
1159
|
+
```javascript
|
|
1160
|
+
// Pre-loaded context prevents duplicate loading
|
|
1161
|
+
const context = {
|
|
1162
|
+
sessionType: preLoadedSessionType || await detectSessionType(),
|
|
1163
|
+
projectStatus: preLoadedProjectStatus || await loadProjectStatus()
|
|
1164
|
+
};
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
---
|
|
1168
|
+
|
|
1169
|
+
## 📁 Files Modified
|
|
1170
|
+
|
|
1171
|
+
### New Files Created
|
|
1172
|
+
|
|
1173
|
+
- `.aiox-core/scripts/generate-greeting.js` (Unified greeting generator)
|
|
1174
|
+
- `.aiox-core/scripts/command-execution-hook.js` (Session update hook)
|
|
1175
|
+
- `.aiox-core/docs/session-update-pattern.md` (Documentation)
|
|
1176
|
+
- `tests/unit/generate-greeting.test.js` (Unit tests)
|
|
1177
|
+
- `tests/integration/greeting-system-integration.test.js` (Integration tests)
|
|
1178
|
+
|
|
1179
|
+
### Files Modified
|
|
1180
|
+
|
|
1181
|
+
- `.aiox-core/scripts/agent-config-loader.js` (Expanded with `loadAgentDefinition()` and `loadComplete()`)
|
|
1182
|
+
- `.aiox-core/scripts/greeting-builder.js` (Modified to accept pre-loaded context)
|
|
1183
|
+
- `.aiox-core/scripts/config-loader.js` (Deprecated warning added)
|
|
1184
|
+
- `.aiox-core/agents/qa.md` (Pilot - STEP 3 updated first)
|
|
1185
|
+
- `.aiox-core/agents/*.md` (Remaining 10 agents - STEP 3 updated after QA validation)
|
|
1186
|
+
|
|
1187
|
+
### Files Deleted
|
|
1188
|
+
|
|
1189
|
+
- `.aiox-core/scripts/batch-integrate-greeting-builder.js` (Temporary migration script)
|
|
1190
|
+
- `.aiox-core/scripts/apply-inline-greeting-all-agents.js` (Temporary migration script)
|
|
1191
|
+
- `.aiox-core/scripts/update-activation-instructions.js` (Temporary migration script)
|
|
1192
|
+
- `.aiox-core/scripts/batch-update-agents-session-context.js` (Temporary migration script)
|
|
1193
|
+
|
|
1194
|
+
### Files Referenced (No Changes)
|
|
1195
|
+
|
|
1196
|
+
- `.aiox-core/scripts/session-context-loader.js` (Used by generate-greeting.js)
|
|
1197
|
+
- `.aiox-core/scripts/project-status-loader.js` (Used by generate-greeting.js)
|
|
1198
|
+
- `.aiox-core/scripts/greeting-preference-manager.js` (Used by greeting-builder.js)
|
|
1199
|
+
- `.aiox-core/scripts/context-detector.js` (Used by greeting-builder.js)
|
|
1200
|
+
- `.aiox-core/scripts/workflow-navigator.js` (Used by greeting-builder.js)
|
|
1201
|
+
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
## 💰 Investment Breakdown
|
|
1205
|
+
|
|
1206
|
+
- **Phase 1: Script Consolidation:** 4.5 hours @ $12.50/hr = $56.25
|
|
1207
|
+
- **Phase 2: Modify GreetingBuilder:** 2 hours @ $12.50/hr = $25.00
|
|
1208
|
+
- **Phase 3: Create Unified Generator:** 2 hours @ $12.50/hr = $25.00
|
|
1209
|
+
- **Phase 4: Update Agents (Incremental):** 3.5 hours @ $12.50/hr = $43.75
|
|
1210
|
+
- Task 4.1: Update QA pilot (1h)
|
|
1211
|
+
- Task 4.2: Test QA thoroughly (1h)
|
|
1212
|
+
- Task 4.3: Apply to remaining 10 agents (1.5h)
|
|
1213
|
+
- **Phase 5: Session State Updates:** 2 hours @ $12.50/hr = $25.00
|
|
1214
|
+
- **Phase 6: Testing & Validation:** 4 hours @ $12.50/hr = $50.00
|
|
1215
|
+
- **Buffer (10%):** 2.05 hours @ $12.50/hr = $25.63
|
|
1216
|
+
|
|
1217
|
+
**Total:** 20.5 hours = $256.25
|
|
1218
|
+
|
|
1219
|
+
---
|
|
1220
|
+
|
|
1221
|
+
## 🎯 Success Metrics
|
|
1222
|
+
|
|
1223
|
+
- **Integration:** All components work together seamlessly
|
|
1224
|
+
- **Performance:** <50ms (cache), <150ms (no cache), <10ms (fallback)
|
|
1225
|
+
- **Compatibility:** 100% backward compatible
|
|
1226
|
+
- **Test Coverage:** ≥80% for new code
|
|
1227
|
+
- **Code Quality:** No duplicate scripts, clean architecture
|
|
1228
|
+
- **User Experience:** Consistent, fast, contextually relevant greetings
|
|
1229
|
+
|
|
1230
|
+
---
|
|
1231
|
+
|
|
1232
|
+
## ⚠️ Risks & Mitigation
|
|
1233
|
+
|
|
1234
|
+
### Risk 1: Agent definition loading fails
|
|
1235
|
+
- **Likelihood:** Low
|
|
1236
|
+
- **Impact:** High
|
|
1237
|
+
- **Mitigation:**
|
|
1238
|
+
- Validation and normalization
|
|
1239
|
+
- Fallback to simple greeting
|
|
1240
|
+
- Error logging
|
|
1241
|
+
|
|
1242
|
+
### Risk 2: Performance degradation
|
|
1243
|
+
- **Likelihood:** Low
|
|
1244
|
+
- **Impact:** Medium
|
|
1245
|
+
- **Mitigation:**
|
|
1246
|
+
- Cache agent definitions (5 min)
|
|
1247
|
+
- Parallel loading
|
|
1248
|
+
- Timeout protection (150ms)
|
|
1249
|
+
- Performance logging
|
|
1250
|
+
|
|
1251
|
+
### Risk 3: Breaking existing functionality
|
|
1252
|
+
- **Likelihood:** Low
|
|
1253
|
+
- **Impact:** High
|
|
1254
|
+
- **Mitigation:**
|
|
1255
|
+
- Backward compatible changes
|
|
1256
|
+
- Fallback mechanisms
|
|
1257
|
+
- Comprehensive testing
|
|
1258
|
+
- Gradual rollout
|
|
1259
|
+
|
|
1260
|
+
---
|
|
1261
|
+
|
|
1262
|
+
## 📝 Implementation Notes
|
|
1263
|
+
|
|
1264
|
+
### Critical Implementation Details
|
|
1265
|
+
|
|
1266
|
+
1. **Agent Definition Loading:**
|
|
1267
|
+
- Use expanded `agent-config-loader.js` (don't create new loader)
|
|
1268
|
+
- Cache definitions for 5 minutes
|
|
1269
|
+
- Validate and normalize structure
|
|
1270
|
+
|
|
1271
|
+
2. **Context Pre-loading:**
|
|
1272
|
+
- Load session context and project status in parallel
|
|
1273
|
+
- Pass pre-loaded values to `GreetingBuilder`
|
|
1274
|
+
- Avoid duplicate loading
|
|
1275
|
+
|
|
1276
|
+
3. **Error Handling:**
|
|
1277
|
+
- Fallback to simple greeting on any error
|
|
1278
|
+
- Log errors with context
|
|
1279
|
+
- Don't break agent activation
|
|
1280
|
+
|
|
1281
|
+
4. **Performance:**
|
|
1282
|
+
- Parallel loading where possible
|
|
1283
|
+
- Cache everything that can be cached
|
|
1284
|
+
- Timeout protection (150ms)
|
|
1285
|
+
|
|
1286
|
+
### Testing Strategy
|
|
1287
|
+
|
|
1288
|
+
1. **Unit Tests:**
|
|
1289
|
+
- Test `loadAgentDefinition()` method
|
|
1290
|
+
- Test `loadComplete()` method
|
|
1291
|
+
- Test `generateGreeting()` function
|
|
1292
|
+
- Test error handling
|
|
1293
|
+
|
|
1294
|
+
2. **Integration Tests:**
|
|
1295
|
+
- Test full greeting generation flow
|
|
1296
|
+
- Test with different session types
|
|
1297
|
+
- Test with different preferences
|
|
1298
|
+
- Test error scenarios
|
|
1299
|
+
|
|
1300
|
+
3. **Manual Testing:**
|
|
1301
|
+
- Activate each agent
|
|
1302
|
+
- Verify greeting output
|
|
1303
|
+
- Test fallback scenarios
|
|
1304
|
+
- Verify performance
|
|
1305
|
+
|
|
1306
|
+
---
|
|
1307
|
+
|
|
1308
|
+
## 🔗 Related Documents
|
|
1309
|
+
|
|
1310
|
+
- **Epic:** [Epic-6.1](../epics/epic-6.1.md)
|
|
1311
|
+
- **Prerequisites:**
|
|
1312
|
+
- Story 6.1.1 - Agent Persona Definitions ✅
|
|
1313
|
+
- Story 6.1.2.4 - Project Status Context ✅
|
|
1314
|
+
- Story 6.1.2.5 - Contextual Agent Load Integration ✅
|
|
1315
|
+
- Story 6.1.2.6 - Framework Configuration System ✅
|
|
1316
|
+
- Story 6.1.4 (Original) - Greeting Preferences ✅
|
|
1317
|
+
- **Analysis Documents:**
|
|
1318
|
+
- `docs/qa/comprehensive-greeting-system-analysis.md`
|
|
1319
|
+
- `docs/architecture/scripts-consolidation-analysis.md`
|
|
1320
|
+
- `docs/architecture/technical-review-greeting-system-unification.md`
|
|
1321
|
+
|
|
1322
|
+
---
|
|
1323
|
+
|
|
1324
|
+
## 📋 Example Usage
|
|
1325
|
+
|
|
1326
|
+
### After Implementation
|
|
1327
|
+
|
|
1328
|
+
**User activates agent:**
|
|
1329
|
+
```bash
|
|
1330
|
+
/AIOX/agents/qa
|
|
1331
|
+
```
|
|
1332
|
+
|
|
1333
|
+
**Agent STEP 3 executes:**
|
|
1334
|
+
```bash
|
|
1335
|
+
node .aiox-core/scripts/generate-greeting.js qa
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1338
|
+
**Output:**
|
|
1339
|
+
```
|
|
1340
|
+
✅ Quinn (Guardian) ready. Let's ensure quality!
|
|
1341
|
+
|
|
1342
|
+
**Role:** Test Architect & Quality Advisor
|
|
1343
|
+
|
|
1344
|
+
📊 **Project Status:**
|
|
1345
|
+
- 🌿 **Branch:** main
|
|
1346
|
+
- 📝 **Modified:** 135 files
|
|
1347
|
+
- 📖 **Recent:** feat(story-6.1.6): complete QA review
|
|
1348
|
+
|
|
1349
|
+
**Available Commands:**
|
|
1350
|
+
- `*analyze-framework`: Comprehensive framework analysis
|
|
1351
|
+
- `*validate-story`: Validate story quality
|
|
1352
|
+
...
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
**If execution fails:**
|
|
1356
|
+
```
|
|
1357
|
+
✅ qa Agent ready
|
|
1358
|
+
|
|
1359
|
+
Type *help to see available commands.
|
|
1360
|
+
```
|
|
1361
|
+
|
|
1362
|
+
---
|
|
1363
|
+
|
|
1364
|
+
## 📝 Change Log
|
|
1365
|
+
|
|
1366
|
+
| Date | Version | Changes | Author |
|
|
1367
|
+
|------|---------|---------|--------|
|
|
1368
|
+
| 2025-01-17 | 4.1 | Added CodeRabbit Integration section, clarified migration scripts deletion process, verified test directory structure | Pax (po) |
|
|
1369
|
+
| 2025-01-17 | 4.0 | Expanded to unified system integration, integrated all analyses, added script consolidation, added session updates | Pax (po) + Aria (architect) |
|
|
1370
|
+
| 2025-01-16 | 3.0 | Validation improvements, integration tests added | Pax (po) |
|
|
1371
|
+
| 2025-01-15 | 2.0 | Major rewrite to integrate with Story 6.1.2.5 | Quinn (qa) |
|
|
1372
|
+
| 2025-01-14 | 1.0 | Initial story creation | Unknown |
|
|
1373
|
+
|
|
1374
|
+
---
|
|
1375
|
+
|
|
1376
|
+
**Status:** 📋 Ready to Start
|
|
1377
|
+
**Next Steps:** Begin Phase 1 - Script Consolidation
|
|
1378
|
+
**Estimated Completion:** 2.5 days
|
|
1379
|
+
|
|
1380
|
+
---
|
|
1381
|
+
|
|
1382
|
+
## 🎯 Implementation Strategy: QA Pilot First
|
|
1383
|
+
|
|
1384
|
+
**Rationale:** Use QA agent as pilot to validate system before applying to all agents. This prevents wasting time and tokens on agents that may have issues.
|
|
1385
|
+
|
|
1386
|
+
**Approach:**
|
|
1387
|
+
1. ✅ Implement all infrastructure (Phases 1-3)
|
|
1388
|
+
2. ✅ Update only QA agent first (Phase 4.1)
|
|
1389
|
+
3. ✅ Test QA agent thoroughly (Phase 4.2)
|
|
1390
|
+
4. ✅ Fix any issues found
|
|
1391
|
+
5. ✅ Apply to remaining 10 agents only after QA validated (Phase 4.3)
|
|
1392
|
+
|
|
1393
|
+
**Benefits:**
|
|
1394
|
+
- 🎯 Catch issues early with single agent
|
|
1395
|
+
- 🎯 Validate approach before scaling
|
|
1396
|
+
- 🎯 Save time and tokens
|
|
1397
|
+
- 🎯 Build confidence before full rollout
|
|
1398
|
+
|
|
1399
|
+
**QA Agent Selection:**
|
|
1400
|
+
- ✅ Well-defined persona and commands
|
|
1401
|
+
- ✅ Used frequently (good for testing)
|
|
1402
|
+
- ✅ Representative of other agents
|
|
1403
|
+
- ✅ Easy to validate output quality
|
|
1404
|
+
|