-
-
Notifications
You must be signed in to change notification settings - Fork 743
feat(squad-creator): add internalization quality system #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,13 @@ Validates a squad against the JSON Schema and TASK-FORMAT-SPECIFICATION-V1. | |
| - Warns if project-level reference doesn't exist | ||
| - Errors if local reference doesn't exist | ||
|
|
||
| ### 6. Internalization Gate | ||
| - Scans all agent files in `agents/` for presence of `dependencies.context` key | ||
| - **CRITICAL ERROR** if any agent contains `dependencies.context` — external runtime dependencies are forbidden | ||
| - Checks that agent YAML has substantive `core_principles` (not empty or single-item) | ||
| - Checks that agent `commands` have descriptions longer than 10 chars (signals real behavioral guidance) | ||
| - Warns if agent `persona` sections are skeletal (role/identity under 30 chars) | ||
|
|
||
|
Comment on lines
+70
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Define an explicit error code for the command-description quality check. Line 74 introduces a new check ( Suggested doc patch ### 6. Internalization Gate
...
-- Checks that agent `commands` have descriptions longer than 10 chars (signals real behavioral guidance)
+- Checks that agent `commands` have descriptions longer than 10 chars (signals real behavioral guidance)
+ - Emits `AGENT_SHALLOW_COMMAND_DESC` (Warning) when command descriptions are too brief
...
| `AGENT_EXTERNAL_DEP` | Error | Agent contains dependencies.context (forbidden — must internalize) |
| `AGENT_SHALLOW_PRINCIPLES` | Warning | Agent core_principles is empty or has fewer than 3 entries |
+| `AGENT_SHALLOW_COMMAND_DESC` | Warning | Agent command descriptions are too brief to be operational |
| `AGENT_SKELETAL_PERSONA` | Warning | Agent persona.role/identity are too brief to be operational |As per coding guidelines, "Check that deliverables are well-defined." Also applies to: 131-133 🤖 Prompt for AI Agents |
||
| ## Flow | ||
|
|
||
| ``` | ||
|
|
@@ -79,7 +86,8 @@ Validates a squad against the JSON Schema and TASK-FORMAT-SPECIFICATION-V1. | |
| ├── validateStructure() → Directory check | ||
| ├── validateTasks() → Task format check | ||
| ├── validateAgents() → Agent format check | ||
| └── validateConfigReferences() → Config path check (SQS-10) | ||
| ├── validateConfigReferences() → Config path check (SQS-10) | ||
| └── validateInternalization() → Internalization gate (forbidden dependencies.context) | ||
|
Comment on lines
+89
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Locating squad validator implementation files..."
fd "squad-validator" .aios-core/development/scripts 2>/dev/null || echo "No squad-validator files found in .aios-core/development/scripts"
echo
echo "Searching for validateInternalization definition and usage context..."
rg -n -C3 "validateInternalization\s*\(" .aios-core/development/scripts 2>/dev/null || echo "No validateInternalization found in .aios-core/development/scripts"
echo
echo "Searching validation pipeline ordering around config references/internalization..."
rg -n -C4 "validateConfigReferences|validateInternalization|validate\s*\(" .aios-core/development/scripts 2>/dev/null || echo "No matches found in .aios-core/development/scripts"
echo
echo "Listing files in squad-creator-validate.md directory..."
ls -la .aios-core/development/tasks/ 2>/dev/null | head -20 || echo "Directory not found"
echo
echo "Checking the actual content of squad-creator-validate.md around lines 89-90..."
cat -n .aios-core/development/tasks/squad-creator-validate.md 2>/dev/null | sed -n '85,95p' || echo "File not found"Repository: SynkraAI/aios-core Length of output: 22177
The task documentation references this validation method at line 90, but it does not exist in 🤖 Prompt for AI Agents |
||
|
|
||
| 3. Format and display result | ||
| ├── Show errors (if any) | ||
|
|
@@ -120,6 +128,9 @@ Result: VALID (with warnings) | |
| | `TASK_MISSING_FIELD` | Warning | Task missing recommended field | | ||
| | `AGENT_INVALID_FORMAT` | Warning | Agent file may not follow format | | ||
| | `INVALID_NAMING` | Warning | Filename not in kebab-case | | ||
| | `AGENT_EXTERNAL_DEP` | Error | Agent contains dependencies.context (forbidden — must internalize) | | ||
| | `AGENT_SHALLOW_PRINCIPLES` | Warning | Agent core_principles is empty or has fewer than 3 entries | | ||
| | `AGENT_SKELETAL_PERSONA` | Warning | Agent persona.role/identity are too brief to be operational | | ||
|
|
||
| ## Implementation | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: SynkraAI/aios-core
Length of output: 118
🏁 Script executed:
Repository: SynkraAI/aios-core
Length of output: 44
🏁 Script executed:
rg "calculateInternalizationScore" .aios-core/development/scripts/squad/squad-analyzer.jsRepository: SynkraAI/aios-core
Length of output: 44
🏁 Script executed:
Repository: SynkraAI/aios-core
Length of output: 18240
Implement
calculateInternalizationScoremethod in squad-analyzer.js.Step 4.5 references
analyzer.calculateInternalizationScore(squadPath, inventory), but this method does not exist in.aios-core/development/scripts/squad/squad-analyzer.js. The SquadAnalyzer class includescalculateCoverage()but notcalculateInternalizationScore(). Either implement this method with the documented signature and return structure, or update the task step to use an existing method.🤖 Prompt for AI Agents