aios-core 2.2.2 → 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.
Files changed (107) hide show
  1. package/.aios-core/.session/current-session.json +14 -14
  2. package/.aios-core/cli/commands/migrate/validate.js +1 -1
  3. package/.aios-core/core/docs/session-update-pattern.md +17 -10
  4. package/.aios-core/core/elicitation/elicitation-engine.js +11 -6
  5. package/.aios-core/core/elicitation/session-manager.js +2 -1
  6. package/.aios-core/core/registry/registry-schema.json +166 -166
  7. package/.aios-core/core/registry/service-registry.json +6585 -6585
  8. package/.aios-core/core-config.yaml +66 -1
  9. package/.aios-core/data/agent-config-requirements.yaml +5 -5
  10. package/.aios-core/development/agents/devops.md +12 -0
  11. package/.aios-core/development/scripts/squad/README.md +112 -0
  12. package/.aios-core/development/scripts/squad/index.js +41 -0
  13. package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
  14. package/.aios-core/development/scripts/squad/squad-validator.js +685 -0
  15. package/.aios-core/development/tasks/add-mcp.md +11 -5
  16. package/.aios-core/development/tasks/github-devops-github-pr-automation.md +240 -3
  17. package/.aios-core/development/tasks/search-mcp.md +309 -0
  18. package/.aios-core/development/tasks/setup-mcp-docker.md +11 -8
  19. package/.aios-core/development/tasks/squad-creator-validate.md +151 -0
  20. package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +3 -3
  21. package/.aios-core/index.d.ts +7 -7
  22. package/.aios-core/index.js +1 -1
  23. package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
  24. package/.aios-core/infrastructure/scripts/component-generator.js +1 -1
  25. package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
  26. package/.aios-core/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +41 -0
  27. package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
  28. package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
  29. package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
  30. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
  31. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
  32. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
  33. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
  34. package/.aios-core/infrastructure/tests/utilities-audit-results.json +500 -500
  35. package/.aios-core/infrastructure/tools/README.md +1 -1
  36. package/.aios-core/install-manifest.yaml +4 -1
  37. package/.aios-core/manifests/schema/manifest-schema.json +190 -190
  38. package/.aios-core/manifests/workers.csv +203 -203
  39. package/.aios-core/package.json +102 -102
  40. package/.aios-core/product/templates/activation-instructions-template.md +7 -7
  41. package/.aios-core/product/templates/adr.hbs +125 -125
  42. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
  43. package/.aios-core/product/templates/dbdr.hbs +241 -241
  44. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
  45. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
  46. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
  47. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
  48. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
  49. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
  50. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
  51. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
  52. package/.aios-core/product/templates/epic.hbs +212 -212
  53. package/.aios-core/product/templates/eslintrc-security.json +32 -32
  54. package/.aios-core/product/templates/github-actions-cd.yml +212 -212
  55. package/.aios-core/product/templates/github-actions-ci.yml +172 -172
  56. package/.aios-core/product/templates/pmdr.hbs +186 -186
  57. package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
  58. package/.aios-core/product/templates/prd.hbs +201 -201
  59. package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
  60. package/.aios-core/product/templates/story.hbs +263 -263
  61. package/.aios-core/product/templates/task.hbs +170 -170
  62. package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
  63. package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
  64. package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
  65. package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
  66. package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
  67. package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
  68. package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
  69. package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
  70. package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
  71. package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
  72. package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
  73. package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
  74. package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
  75. package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
  76. package/.aios-core/product/templates/tmpl-view.sql +177 -177
  77. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
  78. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
  79. package/.aios-core/schemas/squad-schema.json +185 -0
  80. package/.aios-core/scripts/README.md +90 -322
  81. package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
  82. package/.claude/rules/mcp-usage.md +116 -100
  83. package/LICENSE +48 -48
  84. package/README.md +3 -4
  85. package/bin/aios.js +2 -1
  86. package/package.json +1 -3
  87. package/packages/installer/package.json +39 -39
  88. package/templates/squad/LICENSE +21 -21
  89. package/templates/squad/README.md +37 -37
  90. package/templates/squad/agents/example-agent.yaml +36 -36
  91. package/templates/squad/package.json +19 -19
  92. package/templates/squad/squad.yaml +25 -25
  93. package/templates/squad/tasks/example-task.yaml +46 -46
  94. package/templates/squad/templates/example-template.md +24 -24
  95. package/templates/squad/tests/example-agent.test.js +53 -53
  96. package/templates/squad/workflows/example-workflow.yaml +54 -54
  97. package/tools/diagnose-npx-issue.ps1 +96 -96
  98. package/tools/quick-diagnose.cmd +85 -85
  99. package/tools/quick-diagnose.ps1 +117 -117
  100. package/.aios-core/core/data/agent-config-requirements.yaml +0 -368
  101. package/.aios-core/core/data/aios-kb.md +0 -924
  102. package/.aios-core/core/data/workflow-patterns.yaml +0 -267
  103. package/.aios-core/product/templates/1mcp-config.yaml +0 -225
  104. package/.aios-core/scripts/context-detector.js +0 -226
  105. package/.aios-core/scripts/elicitation-engine.js +0 -385
  106. package/.aios-core/scripts/elicitation-session-manager.js +0 -300
  107. package/.claude/CLAUDE.md +0 -221
@@ -0,0 +1,151 @@
1
+ ---
2
+ task: Validate Squad
3
+ responsável: @squad-creator
4
+ responsável_type: agent
5
+ atomic_layer: task
6
+ Entrada: |
7
+ - squad_path: Path to the squad directory (default: ./squads/{name})
8
+ - name: Squad name (alternative to full path)
9
+ - strict: If true, warnings become errors (default: false)
10
+ - verbose: If true, show detailed output (default: false)
11
+ Saída: |
12
+ - validation_result: Object with { valid, errors, warnings, suggestions }
13
+ - report: Formatted report for display
14
+ - exit_code: 0 if valid, 1 if invalid
15
+ Checklist:
16
+ - [ ] Resolve squad path via squad-loader
17
+ - [ ] Execute squad-validator.validate()
18
+ - [ ] Format result for output
19
+ - [ ] Return appropriate exit code
20
+ ---
21
+
22
+ # *validate-squad
23
+
24
+ Validates a squad against the JSON Schema and TASK-FORMAT-SPECIFICATION-V1.
25
+
26
+ ## Usage
27
+
28
+ ```
29
+ @squad-creator
30
+ *validate-squad ./squads/my-squad
31
+ *validate-squad my-squad
32
+ *validate-squad my-squad --strict
33
+ *validate-squad my-squad --verbose
34
+ ```
35
+
36
+ ## Parameters
37
+
38
+ | Parameter | Type | Default | Description |
39
+ |-----------|------|---------|-------------|
40
+ | `squad_path` | string | - | Full path to squad directory |
41
+ | `name` | string | - | Squad name (resolves to ./squads/{name}) |
42
+ | `--strict` | flag | false | Treat warnings as errors |
43
+ | `--verbose` | flag | false | Show detailed validation output |
44
+
45
+ ## Validation Checks
46
+
47
+ ### 1. Manifest Validation
48
+ - Checks for `squad.yaml` or `config.yaml` (deprecated)
49
+ - Validates against JSON Schema
50
+ - Required fields: `name`, `version`
51
+
52
+ ### 2. Structure Validation
53
+ - Checks for expected directories: `tasks/`, `agents/`
54
+ - Verifies referenced files exist
55
+
56
+ ### 3. Task Validation (TASK-FORMAT-SPECIFICATION-V1)
57
+ - Checks for required fields in task files
58
+ - Validates naming conventions (kebab-case)
59
+
60
+ ### 4. Agent Validation
61
+ - Checks for valid agent definition format
62
+ - Validates naming conventions
63
+
64
+ ## Flow
65
+
66
+ ```
67
+ 1. Resolve squad path
68
+ ├── If full path provided → use directly
69
+ └── If name provided → resolve via ./squads/{name}/
70
+
71
+ 2. Execute validations
72
+ ├── validateManifest() → Schema check
73
+ ├── validateStructure() → Directory check
74
+ ├── validateTasks() → Task format check
75
+ └── validateAgents() → Agent format check
76
+
77
+ 3. Format and display result
78
+ ├── Show errors (if any)
79
+ ├── Show warnings (if any)
80
+ └── Show final result (VALID/INVALID)
81
+
82
+ 4. Return exit code
83
+ ├── 0 → Valid (or valid with warnings)
84
+ └── 1 → Invalid (errors found)
85
+ ```
86
+
87
+ ## Output Example
88
+
89
+ ```
90
+ Validating squad: ./squads/my-squad/
91
+
92
+ Errors: 0
93
+ Warnings: 2
94
+ - [MISSING_DIRECTORY]: Expected directory not found: workflows/
95
+ Suggestion: mkdir workflows (task-first architecture recommends tasks/ and agents/)
96
+ - [TASK_MISSING_FIELD] (my-task.md): Task missing recommended field: Checklist
97
+ Suggestion: Add "Checklist:" to my-task.md (TASK-FORMAT-SPECIFICATION-V1)
98
+
99
+ Result: VALID (with warnings)
100
+ ```
101
+
102
+ ## Error Codes
103
+
104
+ | Code | Severity | Description |
105
+ |------|----------|-------------|
106
+ | `MANIFEST_NOT_FOUND` | Error | No squad.yaml or config.yaml found |
107
+ | `YAML_PARSE_ERROR` | Error | Invalid YAML syntax |
108
+ | `SCHEMA_ERROR` | Error | Manifest doesn't match JSON Schema |
109
+ | `FILE_NOT_FOUND` | Error | Referenced file doesn't exist |
110
+ | `DEPRECATED_MANIFEST` | Warning | Using config.yaml instead of squad.yaml |
111
+ | `MISSING_DIRECTORY` | Warning | Expected directory not found |
112
+ | `NO_TASKS` | Warning | No task files in tasks/ |
113
+ | `TASK_MISSING_FIELD` | Warning | Task missing recommended field |
114
+ | `AGENT_INVALID_FORMAT` | Warning | Agent file may not follow format |
115
+ | `INVALID_NAMING` | Warning | Filename not in kebab-case |
116
+
117
+ ## Implementation
118
+
119
+ ```javascript
120
+ const { SquadLoader } = require('./.aios-core/development/scripts/squad');
121
+ const { SquadValidator } = require('./.aios-core/development/scripts/squad');
122
+
123
+ async function validateSquad(options) {
124
+ const { squadPath, name, strict, verbose } = options;
125
+
126
+ // Resolve path
127
+ const loader = new SquadLoader();
128
+ let resolvedPath = squadPath;
129
+ if (!squadPath && name) {
130
+ const resolved = await loader.resolve(name);
131
+ resolvedPath = resolved.path;
132
+ }
133
+
134
+ // Validate
135
+ const validator = new SquadValidator({ strict, verbose });
136
+ const result = await validator.validate(resolvedPath);
137
+
138
+ // Format output
139
+ console.log(validator.formatResult(result, resolvedPath));
140
+
141
+ // Return exit code
142
+ return result.valid ? 0 : 1;
143
+ }
144
+ ```
145
+
146
+ ## Related
147
+
148
+ - **Story:** SQS-3 (Squad Validator + JSON Schema)
149
+ - **Dependencies:** squad-loader.js, squad-validator.js
150
+ - **Schema:** .aios-core/schemas/squad-schema.json
151
+ - **Agent:** @squad-creator (Craft)
@@ -30,7 +30,7 @@
30
30
 
31
31
  ┌─────────────────────────────────────┐
32
32
  │ LAYER 2: Output Formatter │ ← Template engine (JS)
33
- │ (.aios-core/scripts/)
33
+ │ (.aios-core/infrastructure/scripts/)│
34
34
  └─────────────────────────────────────┘
35
35
 
36
36
  ┌─────────────────────────────────────┐
@@ -156,7 +156,7 @@ archetypes:
156
156
  ### Template Engine Architecture
157
157
 
158
158
  ```javascript
159
- // .aios-core/scripts/output-formatter.js
159
+ // .aios-core/infrastructure/scripts/output-formatter.js
160
160
 
161
161
  class PersonalizedOutputFormatter {
162
162
  constructor(agent, task, results) {
@@ -238,7 +238,7 @@ class PersonalizedOutputFormatter {
238
238
  ### Pattern Validation
239
239
 
240
240
  ```javascript
241
- // .aios-core/scripts/validate-output-pattern.js
241
+ // .aios-core/infrastructure/scripts/validate-output-pattern.js
242
242
 
243
243
  /**
244
244
  * Ensures all task outputs follow standard structure
@@ -1,8 +1,8 @@
1
- // @aios-fullstack/core - TypeScript Definitions
2
- export declare const MetaAgent: any;
3
- export declare const TaskManager: any;
4
- export declare const ElicitationEngine: any;
5
- export declare const TemplateEngine: any;
6
- export declare const ComponentSearch: any;
7
- export declare const DependencyAnalyzer: any;
1
+ // @aios-fullstack/core - TypeScript Definitions
2
+ export declare const MetaAgent: any;
3
+ export declare const TaskManager: any;
4
+ export declare const ElicitationEngine: any;
5
+ export declare const TemplateEngine: any;
6
+ export declare const ComponentSearch: any;
7
+ export declare const DependencyAnalyzer: any;
8
8
  export {};
@@ -1,7 +1,7 @@
1
1
  // @synkra/aios-core/core - CommonJS Entry Point
2
2
  const MetaAgent = require('./infrastructure/scripts/component-generator.js');
3
3
  const TaskManager = require('./infrastructure/scripts/batch-creator.js');
4
- const ElicitationEngine = require('./scripts/elicitation-engine.js');
4
+ const ElicitationEngine = require('./core/elicitation/elicitation-engine.js');
5
5
  const TemplateEngine = require('./infrastructure/scripts/template-engine.js');
6
6
  const ComponentSearch = require('./infrastructure/scripts/component-search.js');
7
7
  const DependencyAnalyzer = require('./infrastructure/scripts/dependency-analyzer.js');
@@ -7,7 +7,7 @@
7
7
  const fs = require('fs-extra');
8
8
  const path = require('path');
9
9
  const ComponentGenerator = require('./component-generator');
10
- const ElicitationEngine = require('../../scripts/elicitation-engine');
10
+ const ElicitationEngine = require('../../core/elicitation/elicitation-engine');
11
11
  const DependencyAnalyzer = require('./dependency-analyzer');
12
12
  const TransactionManager = require('./transaction-manager');
13
13
  const chalk = require('chalk');
@@ -10,7 +10,7 @@ const TemplateEngine = require('./template-engine');
10
10
  const TemplateValidator = require('./template-validator');
11
11
  const SecurityChecker = require('./security-checker');
12
12
  const YAMLValidator = require('./yaml-validator');
13
- const ElicitationEngine = require('../../scripts/elicitation-engine');
13
+ const ElicitationEngine = require('../../core/elicitation/elicitation-engine');
14
14
  // const ComponentPreview = require('./component-preview'); // Archived in archived-utilities/ (Story 3.1.2)
15
15
  // const ManifestPreview = require('./manifest-preview'); // Archived in archived-utilities/ (Story 3.1.3)
16
16
  const ComponentMetadata = require('./component-metadata');