aios-core 2.1.5 → 2.1.6

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 (29) hide show
  1. package/.aios-core/development/tasks/analyze-brownfield.md +456 -0
  2. package/.aios-core/development/tasks/setup-project-docs.md +440 -0
  3. package/.aios-core/infrastructure/scripts/documentation-integrity/brownfield-analyzer.js +501 -0
  4. package/.aios-core/infrastructure/scripts/documentation-integrity/config-generator.js +368 -0
  5. package/.aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js +308 -0
  6. package/.aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js +331 -0
  7. package/.aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js +312 -0
  8. package/.aios-core/infrastructure/scripts/documentation-integrity/index.js +74 -0
  9. package/.aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js +389 -0
  10. package/.aios-core/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +176 -0
  11. package/.aios-core/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +127 -0
  12. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -0
  13. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -0
  14. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -0
  15. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -0
  16. package/.aios-core/infrastructure/templates/project-docs/coding-standards-tmpl.md +346 -0
  17. package/.aios-core/infrastructure/templates/project-docs/source-tree-tmpl.md +177 -0
  18. package/.aios-core/infrastructure/templates/project-docs/tech-stack-tmpl.md +267 -0
  19. package/package.json +1 -1
  20. package/packages/installer/src/config/templates/env-template.js +2 -2
  21. package/packages/installer/src/wizard/wizard.js +185 -34
  22. package/packages/installer/tests/integration/environment-configuration.test.js +2 -1
  23. package/packages/installer/tests/unit/env-template.test.js +3 -2
  24. package/.aios-core/development/tasks/validate-structure.md +0 -243
  25. package/.aios-core/infrastructure/scripts/source-tree-guardian/index.js +0 -375
  26. package/.aios-core/infrastructure/scripts/source-tree-guardian/manifest-generator.js +0 -410
  27. package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/naming-rules.yaml +0 -285
  28. package/.aios-core/infrastructure/scripts/source-tree-guardian/rules/placement-rules.yaml +0 -262
  29. package/.aios-core/infrastructure/scripts/source-tree-guardian/validator.js +0 -468
@@ -0,0 +1,389 @@
1
+ /**
2
+ * Mode Detector Module
3
+ *
4
+ * Detects installation mode for AIOS projects with three-mode support:
5
+ * - FRAMEWORK_DEV: Contributing to aios-core itself
6
+ * - GREENFIELD: New empty project
7
+ * - BROWNFIELD: Existing project being integrated
8
+ *
9
+ * @module documentation-integrity/mode-detector
10
+ * @version 1.0.0
11
+ * @story 6.9
12
+ */
13
+
14
+ const fs = require('fs');
15
+ const path = require('path');
16
+
17
+ /**
18
+ * Installation modes supported by AIOS
19
+ * @enum {string}
20
+ */
21
+ const InstallationMode = {
22
+ FRAMEWORK_DEV: 'framework-dev',
23
+ GREENFIELD: 'greenfield',
24
+ BROWNFIELD: 'brownfield',
25
+ UNKNOWN: 'unknown',
26
+ };
27
+
28
+ /**
29
+ * Legacy project type mappings (for backward compatibility)
30
+ * @enum {string}
31
+ */
32
+ const LegacyProjectType = {
33
+ EXISTING_AIOS: 'EXISTING_AIOS',
34
+ GREENFIELD: 'GREENFIELD',
35
+ BROWNFIELD: 'BROWNFIELD',
36
+ UNKNOWN: 'UNKNOWN',
37
+ };
38
+
39
+ /**
40
+ * Mode descriptions for display in wizard
41
+ * @type {Object.<string, Object>}
42
+ */
43
+ const ModeDescriptions = {
44
+ [InstallationMode.FRAMEWORK_DEV]: {
45
+ label: '🔧 Framework Development',
46
+ hint: 'Developing aios-core itself - uses framework standards, skips project setup',
47
+ description: 'For AIOS contributors working on the framework',
48
+ },
49
+ [InstallationMode.GREENFIELD]: {
50
+ label: '🆕 New Project (Greenfield)',
51
+ hint: 'Start a fresh project with AIOS - generates project docs, config, and infrastructure',
52
+ description: 'Empty directory setup with full scaffolding',
53
+ },
54
+ [InstallationMode.BROWNFIELD]: {
55
+ label: '📂 Existing Project (Brownfield)',
56
+ hint: 'Add AIOS to existing project - analyzes current structure and adapts',
57
+ description: 'Integration with existing codebase',
58
+ },
59
+ [InstallationMode.UNKNOWN]: {
60
+ label: '❓ Unknown',
61
+ hint: 'Could not determine project type - manual selection required',
62
+ description: 'Manual mode selection needed',
63
+ },
64
+ };
65
+
66
+ /**
67
+ * Detection result with confidence and reasoning
68
+ * @typedef {Object} DetectionResult
69
+ * @property {string} mode - Detected installation mode
70
+ * @property {string} legacyType - Legacy project type for backward compatibility
71
+ * @property {number} confidence - Detection confidence (0-100)
72
+ * @property {string} reason - Human-readable reason for detection
73
+ * @property {Object} markers - Detected markers in the directory
74
+ */
75
+
76
+ /**
77
+ * Detects the installation mode for a target directory
78
+ *
79
+ * Detection Priority Order:
80
+ * 1. FRAMEWORK_DEV - .aios-core/ exists AND is aios-core repo
81
+ * 2. GREENFIELD - directory is empty
82
+ * 3. BROWNFIELD - has package.json, .git, or other project markers
83
+ * 4. UNKNOWN - has files but no recognized markers
84
+ *
85
+ * @param {string} targetDir - Directory to analyze
86
+ * @returns {DetectionResult} Detection result with mode and metadata
87
+ * @throws {Error} If directory cannot be accessed
88
+ */
89
+ function detectInstallationMode(targetDir = process.cwd()) {
90
+ // Validate input
91
+ if (!targetDir || typeof targetDir !== 'string') {
92
+ throw new Error('Invalid targetDir parameter: must be a non-empty string');
93
+ }
94
+
95
+ const normalizedDir = path.resolve(targetDir);
96
+
97
+ // Check if directory exists
98
+ if (!fs.existsSync(normalizedDir)) {
99
+ throw new Error(`Directory does not exist: ${normalizedDir}`);
100
+ }
101
+
102
+ // Collect markers
103
+ const markers = collectMarkers(normalizedDir);
104
+
105
+ // Priority 1: Check for AIOS framework development
106
+ if (markers.hasAiosCore && markers.isAiosCoreRepo) {
107
+ return {
108
+ mode: InstallationMode.FRAMEWORK_DEV,
109
+ legacyType: LegacyProjectType.EXISTING_AIOS,
110
+ confidence: 100,
111
+ reason: 'Detected aios-core repository with .aios-core directory',
112
+ markers,
113
+ };
114
+ }
115
+
116
+ // Priority 2: Check for existing AIOS installation (non-framework)
117
+ if (markers.hasAiosCore && !markers.isAiosCoreRepo) {
118
+ return {
119
+ mode: InstallationMode.BROWNFIELD,
120
+ legacyType: LegacyProjectType.EXISTING_AIOS,
121
+ confidence: 95,
122
+ reason: 'AIOS already installed in user project - treating as brownfield update',
123
+ markers,
124
+ };
125
+ }
126
+
127
+ // Priority 3: Check for empty directory (greenfield)
128
+ if (markers.isEmpty) {
129
+ return {
130
+ mode: InstallationMode.GREENFIELD,
131
+ legacyType: LegacyProjectType.GREENFIELD,
132
+ confidence: 100,
133
+ reason: 'Empty directory detected',
134
+ markers,
135
+ };
136
+ }
137
+
138
+ // Priority 4: Check for project markers (brownfield)
139
+ if (
140
+ markers.hasPackageJson ||
141
+ markers.hasGit ||
142
+ markers.hasPythonProject ||
143
+ markers.hasGoMod ||
144
+ markers.hasCargoToml
145
+ ) {
146
+ const projectTypes = [];
147
+ if (markers.hasPackageJson) projectTypes.push('Node.js');
148
+ if (markers.hasPythonProject) projectTypes.push('Python');
149
+ if (markers.hasGoMod) projectTypes.push('Go');
150
+ if (markers.hasCargoToml) projectTypes.push('Rust');
151
+
152
+ return {
153
+ mode: InstallationMode.BROWNFIELD,
154
+ legacyType: LegacyProjectType.BROWNFIELD,
155
+ confidence: 90,
156
+ reason: `Existing project detected: ${projectTypes.join(', ') || 'Git repository'}`,
157
+ markers,
158
+ };
159
+ }
160
+
161
+ // Priority 5: Directory has files but no recognized markers
162
+ return {
163
+ mode: InstallationMode.UNKNOWN,
164
+ legacyType: LegacyProjectType.UNKNOWN,
165
+ confidence: 0,
166
+ reason: 'Directory has files but no recognized project markers',
167
+ markers,
168
+ };
169
+ }
170
+
171
+ /**
172
+ * Collects all relevant markers from a directory
173
+ *
174
+ * @param {string} targetDir - Directory to scan
175
+ * @returns {Object} Object containing all detected markers
176
+ */
177
+ function collectMarkers(targetDir) {
178
+ const dirContents = fs.readdirSync(targetDir);
179
+
180
+ return {
181
+ // AIOS markers
182
+ hasAiosCore: fs.existsSync(path.join(targetDir, '.aios-core')),
183
+ isAiosCoreRepo: isAiosCoreRepository(targetDir),
184
+
185
+ // Directory state
186
+ isEmpty: dirContents.length === 0,
187
+ fileCount: dirContents.length,
188
+
189
+ // Project markers
190
+ hasPackageJson: fs.existsSync(path.join(targetDir, 'package.json')),
191
+ hasGit: fs.existsSync(path.join(targetDir, '.git')),
192
+
193
+ // Python markers
194
+ hasPythonProject:
195
+ fs.existsSync(path.join(targetDir, 'requirements.txt')) ||
196
+ fs.existsSync(path.join(targetDir, 'pyproject.toml')) ||
197
+ fs.existsSync(path.join(targetDir, 'setup.py')),
198
+
199
+ // Go markers
200
+ hasGoMod: fs.existsSync(path.join(targetDir, 'go.mod')),
201
+
202
+ // Rust markers
203
+ hasCargoToml: fs.existsSync(path.join(targetDir, 'Cargo.toml')),
204
+
205
+ // Existing standards markers
206
+ hasEslintrc:
207
+ fs.existsSync(path.join(targetDir, '.eslintrc.js')) ||
208
+ fs.existsSync(path.join(targetDir, '.eslintrc.json')) ||
209
+ fs.existsSync(path.join(targetDir, '.eslintrc.yaml')),
210
+ hasPrettierrc:
211
+ fs.existsSync(path.join(targetDir, '.prettierrc')) ||
212
+ fs.existsSync(path.join(targetDir, '.prettierrc.json')) ||
213
+ fs.existsSync(path.join(targetDir, 'prettier.config.js')),
214
+ hasTsconfig: fs.existsSync(path.join(targetDir, 'tsconfig.json')),
215
+
216
+ // CI/CD markers
217
+ hasGithubWorkflows: fs.existsSync(path.join(targetDir, '.github', 'workflows')),
218
+ hasGitlabCi: fs.existsSync(path.join(targetDir, '.gitlab-ci.yml')),
219
+ };
220
+ }
221
+
222
+ /**
223
+ * Checks if the target directory is the aios-core repository itself
224
+ *
225
+ * @param {string} targetDir - Directory to check
226
+ * @returns {boolean} True if this is the aios-core repository
227
+ */
228
+ function isAiosCoreRepository(targetDir) {
229
+ const packageJsonPath = path.join(targetDir, 'package.json');
230
+
231
+ if (!fs.existsSync(packageJsonPath)) {
232
+ return false;
233
+ }
234
+
235
+ try {
236
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
237
+
238
+ // Primary check: explicit aios-core package names
239
+ if (packageJson.name === '@aios/core' || packageJson.name === 'aios-core') {
240
+ return true;
241
+ }
242
+
243
+ // Secondary check: workspaces pattern + aios-specific marker file
244
+ // This prevents false positives for generic monorepos
245
+ const hasAiosMarker = fs.existsSync(path.join(targetDir, '.aios-core', 'infrastructure'));
246
+ const hasWorkspaces =
247
+ Array.isArray(packageJson.workspaces) && packageJson.workspaces.includes('packages/*');
248
+
249
+ return hasWorkspaces && hasAiosMarker;
250
+ } catch (error) {
251
+ // Log error for debugging but don't throw - return false for safety
252
+ if (process.env.AIOS_DEBUG) {
253
+ console.warn(`[mode-detector] Error checking aios-core repository: ${error.message}`);
254
+ }
255
+ return false;
256
+ }
257
+ }
258
+
259
+ /**
260
+ * Maps legacy project type to new installation mode
261
+ *
262
+ * @deprecated Use detectInstallationMode().mode directly instead.
263
+ * This function cannot distinguish between FRAMEWORK_DEV and BROWNFIELD
264
+ * for EXISTING_AIOS legacy type (both use EXISTING_AIOS but with different modes).
265
+ * For accurate mode detection, use the mode property from detectInstallationMode().
266
+ *
267
+ * @param {string} legacyType - Legacy project type (EXISTING_AIOS, GREENFIELD, etc.)
268
+ * @param {Object} [context] - Optional context for disambiguation
269
+ * @param {boolean} [context.isAiosCoreRepo] - True if this is the aios-core repository
270
+ * @returns {string} New installation mode
271
+ */
272
+ function mapLegacyTypeToMode(legacyType, context = {}) {
273
+ // EXISTING_AIOS is ambiguous: it can be FRAMEWORK_DEV (aios-core repo)
274
+ // or BROWNFIELD (user project with AIOS installed)
275
+ if (legacyType === LegacyProjectType.EXISTING_AIOS) {
276
+ // Use context to disambiguate if provided
277
+ if (context.isAiosCoreRepo === true) {
278
+ return InstallationMode.FRAMEWORK_DEV;
279
+ }
280
+ if (context.isAiosCoreRepo === false) {
281
+ return InstallationMode.BROWNFIELD;
282
+ }
283
+ // Default to BROWNFIELD as it's safer (won't skip project setup)
284
+ return InstallationMode.BROWNFIELD;
285
+ }
286
+
287
+ const mapping = {
288
+ [LegacyProjectType.GREENFIELD]: InstallationMode.GREENFIELD,
289
+ [LegacyProjectType.BROWNFIELD]: InstallationMode.BROWNFIELD,
290
+ [LegacyProjectType.UNKNOWN]: InstallationMode.UNKNOWN,
291
+ };
292
+
293
+ return mapping[legacyType] || InstallationMode.UNKNOWN;
294
+ }
295
+
296
+ /**
297
+ * Validates user mode selection against auto-detection
298
+ *
299
+ * @param {string} selectedMode - User-selected mode
300
+ * @param {DetectionResult} detected - Auto-detected result
301
+ * @returns {Object} Validation result with warnings if mismatch
302
+ */
303
+ function validateModeSelection(selectedMode, detected) {
304
+ const result = {
305
+ isValid: true,
306
+ warnings: [],
307
+ suggestions: [],
308
+ };
309
+
310
+ // Allow any selection for UNKNOWN detection
311
+ if (detected.mode === InstallationMode.UNKNOWN) {
312
+ return result;
313
+ }
314
+
315
+ // Check for mismatches
316
+ if (selectedMode !== detected.mode) {
317
+ if (selectedMode === InstallationMode.GREENFIELD && !detected.markers.isEmpty) {
318
+ result.warnings.push(
319
+ 'Selected greenfield but directory is not empty. Existing files may be overwritten.',
320
+ );
321
+ }
322
+
323
+ if (selectedMode === InstallationMode.FRAMEWORK_DEV && !detected.markers.isAiosCoreRepo) {
324
+ result.warnings.push(
325
+ 'Selected framework-dev but this does not appear to be the aios-core repository.',
326
+ );
327
+ }
328
+
329
+ if (selectedMode === InstallationMode.BROWNFIELD && detected.markers.isEmpty) {
330
+ result.warnings.push(
331
+ 'Selected brownfield but directory is empty. Consider using greenfield instead.',
332
+ );
333
+ result.suggestions.push(InstallationMode.GREENFIELD);
334
+ }
335
+ }
336
+
337
+ return result;
338
+ }
339
+
340
+ /**
341
+ * Gets mode options for wizard display
342
+ *
343
+ * @param {DetectionResult} [detected] - Optional detected result to highlight recommended
344
+ * @returns {Array<Object>} Array of mode options for wizard
345
+ */
346
+ function getModeOptions(detected = null) {
347
+ const options = [
348
+ {
349
+ value: InstallationMode.GREENFIELD,
350
+ label: ModeDescriptions[InstallationMode.GREENFIELD].label,
351
+ hint: ModeDescriptions[InstallationMode.GREENFIELD].hint,
352
+ },
353
+ {
354
+ value: InstallationMode.BROWNFIELD,
355
+ label: ModeDescriptions[InstallationMode.BROWNFIELD].label,
356
+ hint: ModeDescriptions[InstallationMode.BROWNFIELD].hint,
357
+ },
358
+ {
359
+ value: InstallationMode.FRAMEWORK_DEV,
360
+ label: ModeDescriptions[InstallationMode.FRAMEWORK_DEV].label,
361
+ hint: ModeDescriptions[InstallationMode.FRAMEWORK_DEV].hint,
362
+ },
363
+ ];
364
+
365
+ // If we have detection, mark recommended option
366
+ if (detected && detected.mode !== InstallationMode.UNKNOWN) {
367
+ const recommendedIndex = options.findIndex((opt) => opt.value === detected.mode);
368
+ if (recommendedIndex >= 0) {
369
+ options[recommendedIndex].hint += ' (Recommended)';
370
+ // Move recommended to top
371
+ const recommended = options.splice(recommendedIndex, 1)[0];
372
+ options.unshift(recommended);
373
+ }
374
+ }
375
+
376
+ return options;
377
+ }
378
+
379
+ module.exports = {
380
+ detectInstallationMode,
381
+ collectMarkers,
382
+ isAiosCoreRepository,
383
+ mapLegacyTypeToMode,
384
+ validateModeSelection,
385
+ getModeOptions,
386
+ InstallationMode,
387
+ LegacyProjectType,
388
+ ModeDescriptions,
389
+ };
@@ -0,0 +1,176 @@
1
+ # AIOS Core Configuration
2
+ # Generated by AIOS Documentation Integrity System
3
+ # Mode: Brownfield (Existing Project Integration)
4
+ # Date: {{GENERATED_DATE}}
5
+ #
6
+ # NOTE: This is a template file (.tmpl.yaml) - not raw YAML.
7
+ # Placeholders are processed by the documentation-integrity generator.
8
+
9
+ # =============================================================================
10
+ # PROJECT CONFIGURATION
11
+ # =============================================================================
12
+ project:
13
+ type: USER_PROJECT
14
+ mode: brownfield
15
+ name: "{{PROJECT_NAME}}"
16
+ analyzed: "{{GENERATED_DATE}}"
17
+ version: "{{PROJECT_VERSION}}"
18
+
19
+ # Analysis metadata from brownfield analyzer
20
+ analysis:
21
+ existing_structure: {{HAS_EXISTING_STRUCTURE}}
22
+ existing_workflows: {{HAS_EXISTING_WORKFLOWS}}
23
+ existing_standards: {{HAS_EXISTING_STANDARDS}}
24
+ merge_strategy: "{{MERGE_STRATEGY}}" # parallel | replace | manual
25
+
26
+ # Detected configurations (for reference)
27
+ detected:
28
+ tech_stack: {{DETECTED_TECH_STACK}}
29
+ frameworks: {{DETECTED_FRAMEWORKS}}
30
+ linting: {{DETECTED_LINTING}}
31
+ formatting: {{DETECTED_FORMATTING}}
32
+ testing: {{DETECTED_TESTING}}
33
+
34
+ # =============================================================================
35
+ # DEV CONTEXT LOADING
36
+ # Files loaded automatically when @dev agent activates
37
+ # =============================================================================
38
+ devLoadAlwaysFiles:
39
+ - docs/architecture/coding-standards.md
40
+ - docs/architecture/tech-stack.md
41
+ - docs/architecture/source-tree.md
42
+
43
+ # =============================================================================
44
+ # DEPLOYMENT CONFIGURATION
45
+ # All @devops agent tasks read from this section
46
+ # Analyzed from existing workflows + user confirmation
47
+ # =============================================================================
48
+ deployment:
49
+ # Workflow type (detected or user-selected)
50
+ workflow: {{DEPLOYMENT_WORKFLOW}}
51
+
52
+ # Branch routing configuration (analyzed from existing PR patterns)
53
+ branches:
54
+ staging_targets:
55
+ - "feature/*"
56
+ - "fix/*"
57
+ - "docs/*"
58
+ - "chore/*"
59
+ - "refactor/*"
60
+ - "test/*"
61
+
62
+ production_targets:
63
+ - "hotfix/*"
64
+
65
+ # Detected branch names (may differ from defaults)
66
+ staging_branch: {{STAGING_BRANCH}}
67
+ production_branch: {{PRODUCTION_BRANCH}}
68
+ default_target: {{DEFAULT_TARGET}}
69
+
70
+ # Environment configuration (detected from existing deploy configs)
71
+ environments:
72
+ staging:
73
+ name: "{{STAGING_ENV_NAME}}"
74
+ branch: {{STAGING_BRANCH}}
75
+ auto_deploy: {{STAGING_AUTO_DEPLOY}}
76
+ platform: "{{DEPLOYMENT_PLATFORM}}"
77
+ url: "${STAGING_URL}"
78
+ promotion_message: "After validation, create PR to {{PRODUCTION_BRANCH}} for production"
79
+
80
+ production:
81
+ name: "{{PRODUCTION_ENV_NAME}}"
82
+ branch: {{PRODUCTION_BRANCH}}
83
+ auto_deploy: {{PRODUCTION_AUTO_DEPLOY}}
84
+ platform: "{{DEPLOYMENT_PLATFORM}}"
85
+ url: "${PRODUCTION_URL}"
86
+ promotion_message: "This is the final production deployment"
87
+
88
+ # Quality gates (detected from existing CI)
89
+ quality_gates:
90
+ lint: {{QUALITY_LINT}}
91
+ typecheck: {{QUALITY_TYPECHECK}}
92
+ tests: {{QUALITY_TESTS}}
93
+ security_scan: {{QUALITY_SECURITY}}
94
+ min_coverage: {{MIN_COVERAGE}}
95
+
96
+ # PR defaults
97
+ pr_defaults:
98
+ auto_assign_reviewers: {{AUTO_ASSIGN_REVIEWERS}}
99
+ draft_by_default: {{DRAFT_BY_DEFAULT}}
100
+ include_deployment_info: true
101
+
102
+ # =============================================================================
103
+ # EXISTING CONFIGURATION PRESERVATION
104
+ # References to existing config files that should be respected
105
+ # =============================================================================
106
+ existing_configs:
107
+ # Linting/Formatting (don't override these)
108
+ eslint: {{ESLINT_CONFIG_PATH}}
109
+ prettier: {{PRETTIER_CONFIG_PATH}}
110
+ tsconfig: {{TSCONFIG_PATH}}
111
+ flake8: {{FLAKE8_CONFIG_PATH}}
112
+
113
+ # CI/CD (may need merge)
114
+ github_workflows: {{GITHUB_WORKFLOWS_PATH}}
115
+ gitlab_ci: {{GITLAB_CI_PATH}}
116
+
117
+ # Package management
118
+ package_json: {{PACKAGE_JSON_PATH}}
119
+ requirements_txt: {{REQUIREMENTS_PATH}}
120
+ go_mod: {{GO_MOD_PATH}}
121
+
122
+ # =============================================================================
123
+ # AGENT CONFIGURATION
124
+ # =============================================================================
125
+ agents:
126
+ dev:
127
+ auto_load_context: true
128
+ story_tracking: true
129
+ respect_existing_standards: true
130
+
131
+ qa:
132
+ run_on_pr: true
133
+ coverage_threshold: {{MIN_COVERAGE}}
134
+
135
+ devops:
136
+ auto_detect_workflow: true
137
+ merge_with_existing: {{MERGE_WORKFLOWS}}
138
+
139
+ # =============================================================================
140
+ # FEATURES
141
+ # =============================================================================
142
+ features:
143
+ documentation_integrity: true
144
+ source_tree_guardian: true
145
+ quality_metrics: true
146
+
147
+ documentation_integrity_options:
148
+ generate_source_tree: true
149
+ generate_coding_standards: true
150
+ generate_tech_stack: true
151
+ brownfield_analysis: true
152
+ gitignore_generation: true
153
+ merge_gitignore: true # Merge with existing instead of replace
154
+
155
+ # =============================================================================
156
+ # MIGRATION NOTES
157
+ # Auto-generated notes from brownfield analysis
158
+ # =============================================================================
159
+ migration_notes:
160
+ # Summary of what was detected vs generated
161
+ summary: "{{MIGRATION_SUMMARY}}"
162
+
163
+ # Items requiring manual review
164
+ manual_review_items: {{MANUAL_REVIEW_ITEMS_YAML}}
165
+
166
+ # Potential conflicts detected
167
+ conflicts: {{CONFLICTS_YAML}}
168
+
169
+ # Recommendations
170
+ recommendations: {{RECOMMENDATIONS_YAML}}
171
+
172
+ # =============================================================================
173
+ # CUSTOM CONFIGURATION
174
+ # Project-specific settings
175
+ # =============================================================================
176
+ custom: {}
@@ -0,0 +1,127 @@
1
+ # AIOS Core Configuration
2
+ # Generated by AIOS Documentation Integrity System
3
+ # Mode: Greenfield (New Project)
4
+ # Date: {{GENERATED_DATE}}
5
+
6
+ # =============================================================================
7
+ # PROJECT CONFIGURATION
8
+ # =============================================================================
9
+ project:
10
+ type: USER_PROJECT
11
+ mode: greenfield
12
+ name: "{{PROJECT_NAME}}"
13
+ created: "{{GENERATED_DATE}}"
14
+ version: "0.1.0"
15
+
16
+ # =============================================================================
17
+ # DEV CONTEXT LOADING
18
+ # Files loaded automatically when @dev agent activates
19
+ # =============================================================================
20
+ devLoadAlwaysFiles:
21
+ - docs/architecture/coding-standards.md
22
+ - docs/architecture/tech-stack.md
23
+ - docs/architecture/source-tree.md
24
+
25
+ # =============================================================================
26
+ # DEPLOYMENT CONFIGURATION
27
+ # All @devops agent tasks read from this section
28
+ # See docs/guides/DEPLOYMENT-GUIDE.md for details
29
+ # =============================================================================
30
+ deployment:
31
+ # Workflow type: staging-first (with staging branch) or direct-to-main
32
+ workflow: {{DEPLOYMENT_WORKFLOW}}
33
+
34
+ # Branch routing configuration
35
+ branches:
36
+ # These branch patterns will target staging (if staging-first workflow)
37
+ staging_targets:
38
+ - "feature/*"
39
+ - "fix/*"
40
+ - "docs/*"
41
+ - "chore/*"
42
+ - "refactor/*"
43
+ - "test/*"
44
+
45
+ # These branch patterns will target production directly (emergency fixes)
46
+ production_targets:
47
+ - "hotfix/*"
48
+
49
+ # Branch names
50
+ staging_branch: {{STAGING_BRANCH}}
51
+ production_branch: {{PRODUCTION_BRANCH}}
52
+
53
+ # Default PR target for ambiguous cases
54
+ default_target: {{DEFAULT_TARGET}}
55
+
56
+ # Environment configuration
57
+ environments:
58
+ staging:
59
+ name: "{{STAGING_ENV_NAME}}"
60
+ branch: {{STAGING_BRANCH}}
61
+ auto_deploy: true
62
+ platform: "{{DEPLOYMENT_PLATFORM}}"
63
+ url: "${STAGING_URL}"
64
+ promotion_message: "After validation, create PR to {{PRODUCTION_BRANCH}} for production"
65
+
66
+ production:
67
+ name: "{{PRODUCTION_ENV_NAME}}"
68
+ branch: {{PRODUCTION_BRANCH}}
69
+ auto_deploy: true
70
+ platform: "{{DEPLOYMENT_PLATFORM}}"
71
+ url: "${PRODUCTION_URL}"
72
+ promotion_message: "This is the final production deployment"
73
+
74
+ # Quality gates for PRs
75
+ quality_gates:
76
+ lint: {{QUALITY_LINT}}
77
+ typecheck: {{QUALITY_TYPECHECK}}
78
+ tests: {{QUALITY_TESTS}}
79
+ security_scan: {{QUALITY_SECURITY}}
80
+ min_coverage: {{MIN_COVERAGE}}
81
+
82
+ # PR defaults
83
+ pr_defaults:
84
+ auto_assign_reviewers: false
85
+ draft_by_default: false
86
+ include_deployment_info: true
87
+ labels:
88
+ staging: ["staging", "needs-review"]
89
+ production: ["production", "promotion"]
90
+
91
+ # =============================================================================
92
+ # AGENT CONFIGURATION
93
+ # Agent-specific settings
94
+ # =============================================================================
95
+ agents:
96
+ dev:
97
+ auto_load_context: true
98
+ story_tracking: true
99
+
100
+ qa:
101
+ run_on_pr: true
102
+ coverage_threshold: {{MIN_COVERAGE}}
103
+
104
+ devops:
105
+ auto_detect_workflow: true
106
+
107
+ # =============================================================================
108
+ # FEATURES
109
+ # Feature flags for optional functionality
110
+ # =============================================================================
111
+ features:
112
+ documentation_integrity: true
113
+ source_tree_guardian: true
114
+ quality_metrics: true
115
+
116
+ documentation_integrity_options:
117
+ generate_source_tree: true
118
+ generate_coding_standards: true
119
+ generate_tech_stack: true
120
+ brownfield_analysis: false
121
+ gitignore_generation: true
122
+
123
+ # =============================================================================
124
+ # CUSTOM CONFIGURATION
125
+ # Project-specific settings
126
+ # =============================================================================
127
+ custom: {}