@event4u/agent-config 9.5.0 → 9.7.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +84 -942
- package/README.md +17 -17
- package/dist/agent-src/README.md +2 -2
- package/dist/agent-src/commands/agents/audit.md +2 -3
- package/dist/agent-src/commands/agents/optimize.md +2 -3
- package/dist/agent-src/commands/agents/user/review.md +4 -5
- package/dist/agent-src/commands/agents/user/show.md +4 -5
- package/dist/agent-src/commands/agents/user/update.md +4 -5
- package/dist/agent-src/commands/agents/user.md +2 -3
- package/dist/agent-src/commands/analytics/prune.md +2 -3
- package/dist/agent-src/commands/analytics/show.md +2 -3
- package/dist/agent-src/commands/analyze/decision.md +2 -3
- package/dist/agent-src/commands/analyze/incident.md +2 -3
- package/dist/agent-src/commands/analyze/near-miss.md +2 -3
- package/dist/agent-src/commands/analyze/postmortem.md +2 -3
- package/dist/agent-src/commands/analyze/premortem.md +2 -3
- package/dist/agent-src/commands/analyze/reference-repo.md +2 -3
- package/dist/agent-src/commands/brand/identity.md +2 -3
- package/dist/agent-src/commands/brand/review.md +2 -3
- package/dist/agent-src/commands/brand/strategy.md +2 -3
- package/dist/agent-src/commands/brand/tokens.md +2 -3
- package/dist/agent-src/commands/brand/voice.md +2 -3
- package/dist/agent-src/commands/bug/fix.md +2 -3
- package/dist/agent-src/commands/bug/investigate.md +2 -3
- package/dist/agent-src/commands/challenge-me/vision.md +2 -3
- package/dist/agent-src/commands/challenge-me/with-docs.md +2 -3
- package/dist/agent-src/commands/chat-history/import.md +2 -3
- package/dist/agent-src/commands/commit/in-chunks.md +2 -3
- package/dist/agent-src/commands/context/create.md +2 -3
- package/dist/agent-src/commands/context/refactor.md +2 -3
- package/dist/agent-src/commands/cost/report.md +2 -3
- package/dist/agent-src/commands/council/analysis.md +2 -3
- package/dist/agent-src/commands/council/debate.md +2 -3
- package/dist/agent-src/commands/council/design.md +2 -3
- package/dist/agent-src/commands/council/optimize.md +2 -3
- package/dist/agent-src/commands/council/pr.md +2 -3
- package/dist/agent-src/commands/feature/dev.md +2 -3
- package/dist/agent-src/commands/feature/explore.md +2 -3
- package/dist/agent-src/commands/feature/plan.md +2 -3
- package/dist/agent-src/commands/feature/refactor.md +2 -3
- package/dist/agent-src/commands/feature/roadmap.md +2 -3
- package/dist/agent-src/commands/fix/ci.md +2 -3
- package/dist/agent-src/commands/fix/comments.md +2 -3
- package/dist/agent-src/commands/fix/pr-comments.md +2 -3
- package/dist/agent-src/commands/fix/quality.md +2 -3
- package/dist/agent-src/commands/fix/route.md +2 -3
- package/dist/agent-src/commands/fix/seeder.md +2 -3
- package/dist/agent-src/commands/ghostwriter/delete.md +2 -3
- package/dist/agent-src/commands/ghostwriter/fetch.md +2 -3
- package/dist/agent-src/commands/ghostwriter/list.md +2 -3
- package/dist/agent-src/commands/ghostwriter/show.md +2 -3
- package/dist/agent-src/commands/ghostwriter/write.md +2 -3
- package/dist/agent-src/commands/image/analyse.md +2 -3
- package/dist/agent-src/commands/image/create.md +2 -3
- package/dist/agent-src/commands/image/verify.md +2 -3
- package/dist/agent-src/commands/knowledge/cross-repo.md +2 -3
- package/dist/agent-src/commands/knowledge/forget.md +2 -3
- package/dist/agent-src/commands/knowledge/ingest.md +2 -3
- package/dist/agent-src/commands/knowledge/list.md +2 -3
- package/dist/agent-src/commands/memory/add.md +2 -3
- package/dist/agent-src/commands/memory/learn-low-impact.md +2 -3
- package/dist/agent-src/commands/module/create.md +2 -3
- package/dist/agent-src/commands/module/explore.md +2 -3
- package/dist/agent-src/commands/optimize/agents-dir.md +2 -3
- package/dist/agent-src/commands/optimize/project.md +2 -3
- package/dist/agent-src/commands/optimize/prompt.md +2 -3
- package/dist/agent-src/commands/optimize/skills.md +2 -3
- package/dist/agent-src/commands/override/create.md +2 -3
- package/dist/agent-src/commands/override/manage.md +2 -3
- package/dist/agent-src/commands/post-as/ghostwriter.md +2 -3
- package/dist/agent-src/commands/post-as/me.md +2 -3
- package/dist/agent-src/commands/pr/create/description-only.md +2 -3
- package/dist/agent-src/commands/pr/create.md +1 -1
- package/dist/agent-src/commands/profile/activate.md +2 -3
- package/dist/agent-src/commands/profile/deactivate.md +2 -3
- package/dist/agent-src/commands/profile/show.md +2 -3
- package/dist/agent-src/commands/project/analyze.md +2 -3
- package/dist/agent-src/commands/project/health.md +2 -3
- package/dist/agent-src/commands/research/deep.md +2 -3
- package/dist/agent-src/commands/research/report.md +2 -3
- package/dist/agent-src/commands/review/changes.md +2 -3
- package/dist/agent-src/commands/review/routing.md +2 -3
- package/dist/agent-src/commands/roadmap/ai-council.md +2 -3
- package/dist/agent-src/commands/roadmap/create.md +2 -3
- package/dist/agent-src/commands/roadmap/materialize.md +2 -3
- package/dist/agent-src/commands/roadmap/process-full.md +2 -3
- package/dist/agent-src/commands/roadmap/process-phase.md +2 -3
- package/dist/agent-src/commands/roadmap/process-step.md +2 -3
- package/dist/agent-src/commands/skill/preview.md +2 -3
- package/dist/agent-src/commands/skills/discover.md +2 -3
- package/dist/agent-src/commands/sync/gitignore/fix.md +3 -4
- package/dist/agent-src/commands/tdd/green.md +2 -3
- package/dist/agent-src/commands/tdd/red.md +2 -3
- package/dist/agent-src/commands/tdd/refactor.md +2 -3
- package/dist/agent-src/commands/team/adversarial.md +2 -3
- package/dist/agent-src/commands/team/review.md +2 -3
- package/dist/agent-src/commands/team-knowledge/bootstrap.md +2 -3
- package/dist/agent-src/commands/team-knowledge/consolidate.md +2 -3
- package/dist/agent-src/commands/tests/create.md +2 -3
- package/dist/agent-src/commands/tests/e2e-heal.md +2 -3
- package/dist/agent-src/commands/tests/e2e-plan.md +2 -3
- package/dist/agent-src/commands/tests/execute.md +2 -3
- package/dist/agent-src/commands/video/from-script.md +2 -3
- package/dist/agent-src/commands/video/from-song.md +2 -3
- package/dist/agent-src/commands/video/scene.md +2 -3
- package/dist/agent-src/commands/video/stitch.md +2 -3
- package/dist/agent-src/commands/video/storyboard.md +2 -3
- package/dist/agent-src/commands/worktree/cleanup.md +2 -3
- package/dist/agent-src/commands/worktree/create.md +2 -3
- package/dist/agent-src/commands/worktree/status.md +2 -3
- package/dist/agent-src/commands/worktree/verify.md +2 -3
- package/dist/agent-src/contexts/contracts/command-suggestion-flow.md +10 -0
- package/dist/agent-src/rules/downstream-changes.md +31 -1
- package/dist/agent-src/skills/agent-docs-writing/SKILL.md +34 -16
- package/dist/agent-src/skills/agents-md-thin-root/SKILL.md +9 -9
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/github-workflows/doc-impact.yml +101 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +113 -113
- 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 +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/mcp/awesome-mcp-servers.row.md +1 -1
- package/dist/mcp/mcp-cloudflare-catalogue.json +1 -1
- package/dist/mcp/registry-manifest.json +3 -3
- package/docs/CLAIMS.md +2 -1
- package/docs/archive/CHANGELOG-6.0.0-overview.md +953 -0
- package/docs/benchmark.md +33 -9
- package/docs/decisions/ADR-122-adversarial-verification-council.md +30 -0
- package/docs/decisions/ADR-123-runtime-security-scope-and-spawn-hardening.md +142 -0
- package/docs/decisions/INDEX.md +1 -0
- package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +26 -0
- package/docs/spawn-site-policy.md +72 -0
- package/docs/threat-model.md +2 -1
- package/package.json +2 -2
- package/src/agent-src/README.md +2 -2
- package/src/scripts/_lib/adversarial_bench_score.ts +106 -0
- package/src/scripts/_lib/spawn_env.ts +120 -0
- package/src/scripts/ai_council/clients.ts +6 -0
- package/src/scripts/bench_adversarial_council.ts +292 -0
- package/src/scripts/check_no_new_legacy_path.ts +2 -0
- package/src/scripts/check_source_pointer_freshness.ts +165 -0
- package/src/scripts/hooks/dispatch_hook.ts +5 -1
- package/src/scripts/hot_context_hook.ts +2 -0
- package/src/scripts/lint_readme_serial_comma.ts +169 -0
- package/src/scripts/roadmap_progress_hook.ts +2 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* CI guard for the no-serial-comma house style in README.md prose.
|
|
4
|
+
*
|
|
5
|
+
* House style: prose never puts a comma directly before a final "and" / "or"
|
|
6
|
+
* (no Oxford / serial comma). `skills, commands and rules` — NOT
|
|
7
|
+
* `skills, commands, and rules`. README.md is the public claim surface for a
|
|
8
|
+
* package whose whole pitch is "every headline claim is machine-checked", so a
|
|
9
|
+
* drifting comma style in the copy is the same class of defect as a drifting
|
|
10
|
+
* number: this guard turns a one-off copy fix into a permanent build gate.
|
|
11
|
+
*
|
|
12
|
+
* Prose only. Fenced code, inline `backtick` spans, HTML comments (claim
|
|
13
|
+
* markers), URLs, and Markdown table rows are masked before matching so the
|
|
14
|
+
* guard never trips on code, data, or link syntax.
|
|
15
|
+
*
|
|
16
|
+
* Exit codes: 0 clean · 1 violation found / README missing.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import * as fs from 'node:fs';
|
|
20
|
+
import * as path from 'node:path';
|
|
21
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
22
|
+
|
|
23
|
+
const _HERE = fileURLToPath(import.meta.url);
|
|
24
|
+
|
|
25
|
+
const README = 'README.md';
|
|
26
|
+
|
|
27
|
+
// A comma, whitespace, then a final coordinating conjunction as a whole word.
|
|
28
|
+
const SERIAL_COMMA = /,[ \t]+(and|or)\b/gi;
|
|
29
|
+
|
|
30
|
+
/** Python str.splitlines() — drops the trailing empty element. */
|
|
31
|
+
function _splitlines(text: string): string[] {
|
|
32
|
+
if (text === '') {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
const normalised = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
36
|
+
const parts = normalised.split('\n');
|
|
37
|
+
if (parts[parts.length - 1] === '') {
|
|
38
|
+
parts.pop();
|
|
39
|
+
}
|
|
40
|
+
return parts;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Return per-line content with everything that is not prose masked out.
|
|
45
|
+
*
|
|
46
|
+
* Order matters: HTML comments and fenced regions blank the whole line; on a
|
|
47
|
+
* surviving prose line we then blank inline backtick spans, URLs, and — for a
|
|
48
|
+
* Markdown table row — the whole line, so a `, and` inside code, a link, or a
|
|
49
|
+
* data cell never counts as a style violation.
|
|
50
|
+
*/
|
|
51
|
+
function _stripNoise(lines: string[]): string[] {
|
|
52
|
+
const urlRe = /https?:\/\/\S+|\(\.[\w./-]+\)/g;
|
|
53
|
+
const backtickRe = /`[^`]*`/g;
|
|
54
|
+
const cleaned: string[] = [];
|
|
55
|
+
let inFence = false;
|
|
56
|
+
let inHtml = false;
|
|
57
|
+
for (const raw of lines) {
|
|
58
|
+
const line = raw;
|
|
59
|
+
if (line.includes('<!--') && !line.includes('-->')) {
|
|
60
|
+
inHtml = true;
|
|
61
|
+
}
|
|
62
|
+
if (inHtml) {
|
|
63
|
+
cleaned.push('');
|
|
64
|
+
if (line.includes('-->')) {
|
|
65
|
+
inHtml = false;
|
|
66
|
+
}
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const stripped = line.trim();
|
|
70
|
+
if (stripped.startsWith('```')) {
|
|
71
|
+
inFence = !inFence;
|
|
72
|
+
cleaned.push('');
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (inFence) {
|
|
76
|
+
cleaned.push('');
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
// Single-line HTML comment (e.g. a claim marker) — blank it.
|
|
80
|
+
let content = line.replace(/<!--[\s\S]*?-->/g, ' ');
|
|
81
|
+
// Markdown table row — data, not prose.
|
|
82
|
+
if (content.trim().startsWith('|')) {
|
|
83
|
+
cleaned.push('');
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
// Mask code spans / URLs with a word-char placeholder (not a space):
|
|
87
|
+
// a space would let a `code`-span sitting between a list comma and the
|
|
88
|
+
// final "and" / "or" collapse into a phantom ", or" (the first list
|
|
89
|
+
// comma is legitimate — only a comma *directly* before and/or counts).
|
|
90
|
+
content = content.replace(backtickRe, 'x').replace(urlRe, 'x');
|
|
91
|
+
cleaned.push(content);
|
|
92
|
+
}
|
|
93
|
+
return cleaned;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface Hit {
|
|
97
|
+
line: number;
|
|
98
|
+
match: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function collect_hits(text: string): Hit[] {
|
|
102
|
+
const lines = _stripNoise(_splitlines(text));
|
|
103
|
+
const hits: Hit[] = [];
|
|
104
|
+
lines.forEach((content, idx) => {
|
|
105
|
+
SERIAL_COMMA.lastIndex = 0;
|
|
106
|
+
let m: RegExpExecArray | null;
|
|
107
|
+
while ((m = SERIAL_COMMA.exec(content)) !== null) {
|
|
108
|
+
hits.push({ line: idx + 1, match: m[0].trim() });
|
|
109
|
+
if (m.index === SERIAL_COMMA.lastIndex) {
|
|
110
|
+
SERIAL_COMMA.lastIndex += 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return hits;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function main(): number {
|
|
118
|
+
const quiet = process.argv.slice(2).includes('--quiet');
|
|
119
|
+
if (!fs.existsSync(README)) {
|
|
120
|
+
process.stderr.write(`error: ${README} not found\n`);
|
|
121
|
+
return 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const hits = collect_hits(fs.readFileSync(README, 'utf-8'));
|
|
125
|
+
|
|
126
|
+
if (hits.length > 0) {
|
|
127
|
+
process.stdout.write(
|
|
128
|
+
`FAIL ${README}: ${hits.length} serial-comma violation(s) in prose ` +
|
|
129
|
+
`(house style: no comma before a final "and" / "or").\n`,
|
|
130
|
+
);
|
|
131
|
+
for (const { line, match } of hits) {
|
|
132
|
+
const lineStr = String(line).padStart(4, ' ');
|
|
133
|
+
process.stdout.write(` L${lineStr} -> "${match}"\n`);
|
|
134
|
+
}
|
|
135
|
+
process.stdout.write('\nFix: drop the comma before the final "and" / "or".\n');
|
|
136
|
+
return 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (!quiet) {
|
|
140
|
+
process.stdout.write(`OK ${README}: no serial-comma violations in prose.\n`);
|
|
141
|
+
}
|
|
142
|
+
return 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function _isCliEntry(): boolean {
|
|
146
|
+
if (process.argv[1] === undefined) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
|
|
150
|
+
if (import.meta.url === argvUrl) {
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
// A symlinked invocation (installed `.augment/` projection, or macOS
|
|
154
|
+
// /var → /private/var temp dirs) makes the raw URLs differ. Compare
|
|
155
|
+
// realpaths so the entry guard still fires under a symlink.
|
|
156
|
+
try {
|
|
157
|
+
const here = fs.realpathSync(fileURLToPath(import.meta.url));
|
|
158
|
+
const argv = fs.realpathSync(path.resolve(process.argv[1]));
|
|
159
|
+
return here === argv;
|
|
160
|
+
} catch {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (_isCliEntry() || process.argv[1] === _HERE) {
|
|
166
|
+
process.exit(main());
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { README, SERIAL_COMMA, collect_hits, main };
|
|
@@ -38,6 +38,7 @@ import fs from "node:fs";
|
|
|
38
38
|
import path from "node:path";
|
|
39
39
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
40
40
|
|
|
41
|
+
import { hardenedSpawnEnv } from "./_lib/spawn_env.js";
|
|
41
42
|
import { log_dispatch_issue } from "./hooks/dispatch_issues.js";
|
|
42
43
|
|
|
43
44
|
export const REPLAY_ENV_VAR = "AGENT_CONFIG_REPLAY";
|
|
@@ -414,6 +415,7 @@ export function run(
|
|
|
414
415
|
cwd: root,
|
|
415
416
|
stdio: ["ignore", "ignore", "ignore"],
|
|
416
417
|
timeout: 30000,
|
|
418
|
+
env: hardenedSpawnEnv(),
|
|
417
419
|
});
|
|
418
420
|
} catch {
|
|
419
421
|
// never propagate regenerator failures into the agent loop
|