@event4u/agent-config 8.3.0 → 8.4.1
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/.claude-plugin/marketplace.json +4 -426
- package/.claude-plugin/skills/install-agent-config/SKILL.md +32 -0
- package/CHANGELOG.md +25 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli/registry.js +1 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +1 -1
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +1 -1
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +1 -1
- package/dist/mcp/registry-manifest.json +1 -1
- package/docs/contracts/surface-matrix.md +103 -0
- package/package.json +4 -1
- package/src/agent-src/README.md +64 -0
- package/src/agent-src/scripts/archive_completed_roadmaps.ts +497 -0
- package/src/agent-src/scripts/scan-seeder-violations.php +145 -0
- package/src/agent-src/scripts/update_roadmap_progress.ts +1087 -0
- package/src/agent-src/templates/AGENTS.md +34 -0
- package/src/agent-src/templates/scripts/README.md +195 -0
- package/src/agent-src/templates/scripts/check_memory.ts +662 -0
- package/src/agent-src/templates/scripts/check_memory_proposal.ts +370 -0
- package/src/agent-src/templates/scripts/historical-bug-patterns.example.yml +84 -0
- package/src/agent-src/templates/scripts/implement_ticket/__main__.ts +27 -0
- package/src/agent-src/templates/scripts/memory_hash.ts +355 -0
- package/src/agent-src/templates/scripts/memory_lookup.ts +1089 -0
- package/src/agent-src/templates/scripts/memory_report.ts +868 -0
- package/src/agent-src/templates/scripts/memory_signal.ts +444 -0
- package/src/agent-src/templates/scripts/memory_status.ts +215 -0
- package/src/agent-src/templates/scripts/ownership-map.example.yml +87 -0
- package/src/agent-src/templates/scripts/pr-risk-config.example.yml +76 -0
- package/src/agent-src/templates/scripts/pr_review_routing.ts +544 -0
- package/src/agent-src/templates/scripts/pr_risk_review.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/boundary.ts +164 -0
- package/src/agent-src/templates/scripts/telemetry/engagement.ts +479 -0
- package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +394 -0
- package/src/agent-src/templates/scripts/telemetry/settings.ts +210 -0
- package/src/agent-src/templates/scripts/telemetry_record.ts +276 -0
- package/src/agent-src/templates/scripts/telemetry_report.ts +211 -0
- package/src/agent-src/templates/scripts/telemetry_status.ts +333 -0
- package/src/agent-src/templates/scripts/tier_usage_report.ts +619 -0
- package/src/agent-src/templates/scripts/work_engine/__main__.ts +14 -0
- package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +1261 -0
- package/src/agent-src/templates/scripts/work_engine/_lib/user_global_paths.ts +329 -0
- package/src/agent-src/templates/scripts/work_engine/cli.ts +206 -0
- package/src/agent-src/templates/scripts/work_engine/cli_args.ts +249 -0
- package/src/agent-src/templates/scripts/work_engine/delivery_state.ts +225 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/analyze.ts +125 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/implement.ts +189 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/index.ts +94 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/memory.ts +193 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/plan.ts +267 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/refine.ts +518 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/report.ts +379 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/test.ts +268 -0
- package/src/agent-src/templates/scripts/work_engine/directives/backend/verify.ts +258 -0
- package/src/agent-src/templates/scripts/work_engine/directives/index.ts +32 -0
- package/src/agent-src/templates/scripts/work_engine/directives/mixed/contract.ts +243 -0
- package/src/agent-src/templates/scripts/work_engine/directives/mixed/index.ts +108 -0
- package/src/agent-src/templates/scripts/work_engine/directives/mixed/stitch.ts +259 -0
- package/src/agent-src/templates/scripts/work_engine/directives/mixed/ui.ts +216 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/_passthrough.ts +40 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/app_spec.ts +241 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +216 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +506 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +325 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/index.ts +102 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +462 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +474 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts +352 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/_skipped.ts +33 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/apply.ts +213 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/index.ts +111 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/refine.ts +126 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/report.ts +112 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui_trivial/test.ts +164 -0
- package/src/agent-src/templates/scripts/work_engine/dispatcher.ts +515 -0
- package/src/agent-src/templates/scripts/work_engine/emitters.ts +119 -0
- package/src/agent-src/templates/scripts/work_engine/errors.ts +24 -0
- package/src/agent-src/templates/scripts/work_engine/hook_bootstrap.ts +104 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.ts +189 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.ts +41 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.ts +89 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/decision_gate.ts +193 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/decision_trace.ts +304 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/directive_set_guard.ts +110 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/halt_surface_audit.ts +118 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/index.ts +17 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.ts +161 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/state_shape_validation.ts +45 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/builtin/trace.ts +134 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/context.ts +94 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/events.ts +58 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/exceptions.ts +85 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/index.ts +27 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/registry.ts +66 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/runner.ts +90 -0
- package/src/agent-src/templates/scripts/work_engine/hooks/settings.ts +260 -0
- package/src/agent-src/templates/scripts/work_engine/input_builders.ts +260 -0
- package/src/agent-src/templates/scripts/work_engine/intent/classify.ts +466 -0
- package/src/agent-src/templates/scripts/work_engine/migration/v0_to_v1.ts +531 -0
- package/src/agent-src/templates/scripts/work_engine/orchestration.ts +366 -0
- package/src/agent-src/templates/scripts/work_engine/persona_policy.ts +97 -0
- package/src/agent-src/templates/scripts/work_engine/resolvers/diff.ts +135 -0
- package/src/agent-src/templates/scripts/work_engine/resolvers/file.ts +175 -0
- package/src/agent-src/templates/scripts/work_engine/resolvers/prompt.ts +115 -0
- package/src/agent-src/templates/scripts/work_engine/scoring/confidence.ts +415 -0
- package/src/agent-src/templates/scripts/work_engine/scoring/decision_engine.ts +466 -0
- package/src/agent-src/templates/scripts/work_engine/scoring/decision_trace.ts +298 -0
- package/src/agent-src/templates/scripts/work_engine/scoring/memory_visibility.ts +444 -0
- package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +252 -0
- package/src/agent-src/templates/scripts/work_engine/stack/runner.ts +745 -0
- package/src/agent-src/templates/scripts/work_engine/state.ts +1151 -0
- package/src/agent-src/templates/scripts/work_engine/state_io.ts +413 -0
- package/src/config/surface-matrix.yml +213 -0
- package/src/install/atomic.ts +111 -0
- package/src/install/conflict.ts +226 -0
- package/src/install/detect.ts +280 -0
- package/src/install/paths.ts +90 -0
- package/src/install/plan.ts +205 -0
- package/src/install/preflight.ts +210 -0
- package/src/install/selectedTools.ts +52 -0
- package/src/install/toolDetection.ts +120 -0
- package/src/install/txlog.ts +161 -0
- package/src/install/types.ts +175 -0
- package/src/install/wizard-plan.ts +216 -0
- package/src/scripts/_cli/cmd_converge.ts +399 -0
- package/src/scripts/_cli/cmd_doctor.ts +94 -0
- package/src/scripts/_cli/cmd_upgrade.ts +40 -16
- package/src/scripts/_dispatch.bash +13 -0
- package/src/scripts/condense.ts +67 -36
- package/src/scripts/hook_manifest.yaml +16 -7
- package/src/scripts/lint_marketplace.ts +54 -56
- package/src/scripts/lint_surface_matrix.ts +200 -0
- package/src/scripts/prepack-check.mjs +108 -5
- package/src/scripts/surface_probe_hook.ts +231 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Scans all PhpDataSeeder data files for foreign key references that use raw seeder constants
|
|
7
|
+
* instead of getReference(). Raw constants don't trigger lazy initialization of the referenced
|
|
8
|
+
* seeder, causing "items not available" errors when seeders run in unpredictable order.
|
|
9
|
+
*
|
|
10
|
+
* Usage (inside Docker container):
|
|
11
|
+
* php .augment/scripts/scan-seeder-violations.php
|
|
12
|
+
*
|
|
13
|
+
* Used by: /fix-seeder command
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
$seedersDir = __DIR__ . '/../../database/seeders';
|
|
17
|
+
$dataDir = __DIR__ . '/../../database/seeder-data/data';
|
|
18
|
+
|
|
19
|
+
if (!is_dir($seedersDir) || !is_dir($dataDir)) {
|
|
20
|
+
echo "Error: seeders or data directory not found. Run from project root.\n";
|
|
21
|
+
exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Step 1: Build map of seeder short class name -> data file relative path
|
|
25
|
+
$seederMap = [];
|
|
26
|
+
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($seedersDir));
|
|
27
|
+
|
|
28
|
+
foreach ($iterator as $file) {
|
|
29
|
+
if ($file->getExtension() !== 'php') {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$content = file_get_contents($file->getRealPath());
|
|
34
|
+
|
|
35
|
+
if (preg_match('/class\s+(\w+)\s+extends\s+(?:Php|Json)DataSeeder/', $content, $classMatch)
|
|
36
|
+
&& preg_match('/\$dataFile\s*=\s*[\'"]([^\'"]+)[\'"]/', $content, $dataMatch)) {
|
|
37
|
+
$seederMap[$classMatch[1]] = $dataMatch[1];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Known exceptions: circular dependencies where getReference() would cause infinite loops.
|
|
42
|
+
// Format: 'OwnerSeeder' => ['ReferencedSeeder', ...]
|
|
43
|
+
// Currently empty — all circular dependencies have been resolved via two-phase seeding
|
|
44
|
+
// (e.g., UserWageTypeRuleSeeder uses run() to apply project mappings after initReferences).
|
|
45
|
+
$exceptions = [];
|
|
46
|
+
|
|
47
|
+
// Step 2: For each data file, find violations
|
|
48
|
+
$violations = [];
|
|
49
|
+
|
|
50
|
+
foreach ($seederMap as $ownerSeeder => $dataFile) {
|
|
51
|
+
$filePath = $dataDir . '/' . str_replace('\\', '/', $dataFile);
|
|
52
|
+
|
|
53
|
+
if (!file_exists($filePath)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
$lines = file($filePath);
|
|
58
|
+
|
|
59
|
+
if (!$lines) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
$fileExtension = pathinfo($filePath, PATHINFO_EXTENSION);
|
|
64
|
+
|
|
65
|
+
foreach ($lines as $lineNum => $line) {
|
|
66
|
+
if (!preg_match_all('/(\w+Seeder)::([A-Z][A-Z0-9_]+)/', $line, $matches, PREG_SET_ORDER)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
foreach ($matches as $match) {
|
|
71
|
+
$referencedSeeder = $match[1];
|
|
72
|
+
$constant = $match[2];
|
|
73
|
+
|
|
74
|
+
// Skip own seeder constants (primary keys are OK)
|
|
75
|
+
if ($referencedSeeder === $ownerSeeder) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Skip known exceptions (circular dependencies)
|
|
80
|
+
if (isset($exceptions[$ownerSeeder]) && in_array($referencedSeeder, $exceptions[$ownerSeeder], true)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Skip if the line already contains getReference/getReferences for this seeder
|
|
85
|
+
if (preg_match('/' . preg_quote($referencedSeeder, '/') . '::getReference/', $line)) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Check multiline: previous line may have getReference(
|
|
90
|
+
if ($lineNum > 0) {
|
|
91
|
+
$prevLine = $lines[$lineNum - 1];
|
|
92
|
+
if (preg_match('/' . preg_quote($referencedSeeder, '/') . '::getReference\s*\(\s*$/', trim($prevLine))) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$violations[] = [
|
|
98
|
+
'file' => str_replace($dataDir . '/', '', $filePath),
|
|
99
|
+
'line' => $lineNum + 1,
|
|
100
|
+
'owner' => $ownerSeeder,
|
|
101
|
+
'referenced' => $referencedSeeder,
|
|
102
|
+
'constant' => $constant,
|
|
103
|
+
'full' => $referencedSeeder . '::' . $constant,
|
|
104
|
+
'lineContent' => trim($line),
|
|
105
|
+
'extension' => $fileExtension,
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Step 3: Output results
|
|
112
|
+
if (empty($violations)) {
|
|
113
|
+
echo "✅ No violations found.\n";
|
|
114
|
+
exit(0);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
$phpCount = count(array_filter($violations, static fn(array $v): bool => $v['extension'] === 'php'));
|
|
118
|
+
$jsonCount = count(array_filter($violations, static fn(array $v): bool => $v['extension'] === 'json'));
|
|
119
|
+
|
|
120
|
+
echo "Found " . count($violations) . " violation(s)";
|
|
121
|
+
|
|
122
|
+
if ($jsonCount > 0) {
|
|
123
|
+
echo " ($phpCount in PHP files, $jsonCount in JSON files — JSON cannot be auto-fixed)";
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
echo ":\n\n";
|
|
127
|
+
|
|
128
|
+
printf("%-4s %-65s %-6s %-55s %s\n", '#', 'Data File', 'Line', 'Violation', 'Owner');
|
|
129
|
+
echo str_repeat('-', 185) . "\n";
|
|
130
|
+
|
|
131
|
+
foreach ($violations as $i => $v) {
|
|
132
|
+
$prefix = $v['extension'] === 'json' ? '[JSON] ' : '';
|
|
133
|
+
printf(
|
|
134
|
+
"%-4d %-65s %-6d %-55s %s\n",
|
|
135
|
+
$i + 1,
|
|
136
|
+
$prefix . $v['file'],
|
|
137
|
+
$v['line'],
|
|
138
|
+
$v['full'],
|
|
139
|
+
$v['owner']
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
echo "\nPHP violations (auto-fixable): $phpCount\n";
|
|
144
|
+
echo "JSON violations (manual fix needed): $jsonCount\n";
|
|
145
|
+
|