@event4u/agent-config 9.15.0 → 9.17.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/AGENTS.md +1 -1
- package/CHANGELOG.md +74 -0
- package/README.md +1 -1
- package/dist/agent-src/commands/agent-handoff.md +100 -48
- package/dist/agent-src/commands/commit.md +1 -1
- package/dist/agent-src/commands/condense.md +19 -64
- package/dist/agent-src/commands/evals/agent-handoff.json +13 -1
- package/dist/agent-src/commands/memory/promote.md +14 -1
- package/dist/agent-src/commands/mode.md +9 -5
- package/dist/agent-src/commands/optimize/deep.md +72 -11
- package/dist/agent-src/contexts/authority/commit-mechanics.md +5 -5
- package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
- package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -1
- package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +4 -1
- package/dist/agent-src/contexts/execution/autonomy-mechanics.md +27 -1
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +5 -2
- package/dist/agent-src/profiles/agency.yml +3 -3
- package/dist/agent-src/profiles/content_creator.yml +2 -2
- package/dist/agent-src/profiles/developer.yml +2 -2
- package/dist/agent-src/profiles/finance.yml +1 -1
- package/dist/agent-src/profiles/founder.yml +2 -2
- package/dist/agent-src/profiles/ops.yml +2 -2
- package/dist/agent-src/rules/architecture.md +2 -2
- package/dist/agent-src/rules/autonomous-execution.md +1 -1
- package/dist/agent-src/rules/context-hygiene.md +3 -2
- package/dist/agent-src/rules/domain-safety-pii.md +1 -1
- package/dist/agent-src/rules/output-discipline.md +9 -2
- package/dist/agent-src/rules/token-budget-discipline.md +2 -2
- package/dist/agent-src/rules/user-interaction.md +3 -4
- package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
- package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +4 -4
- package/dist/agent-src/skills/copilot-config/SKILL.md +1 -1
- package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +7 -4
- package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
- package/dist/agent-src/skills/fe-design/SKILL.md +1 -1
- package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/persona-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/readme-reviewer/SKILL.md +2 -1
- package/dist/agent-src/skills/rule-writing/SKILL.md +4 -2
- package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
- package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
- package/dist/agent-src/skills/tailwind-engineer/SKILL.md +3 -1
- package/dist/agent-src/skills/token-optimizer/SKILL.md +2 -2
- package/dist/agent-src/skills/ui-component-architect/SKILL.md +6 -3
- package/dist/agent-src/templates/agent-settings.md +13 -15
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +6 -2
- package/dist/agent-src/templates/persona.md +2 -2
- package/dist/agent-src/templates/roadmaps.md +1 -1
- package/dist/agent-src/templates/rule.md +1 -1
- package/dist/agent-src/templates/skill.md +1 -1
- package/dist/cli/mcp/content.js +1 -1
- package/dist/cli/mcp/content.js.map +1 -1
- package/dist/cli/registry.js +1 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/{chunk-ZXXJLL5K.js → chunk-BSLUHV2F.js} +127 -1487
- package/dist/cli-delegate/{chunk-H574KOUH.js → chunk-IMSXPRVH.js} +24 -1
- package/dist/cli-delegate/chunk-VSYT7OHO.js +1382 -0
- package/dist/cli-delegate/chunk-XGA2NTU4.js +3727 -0
- package/dist/cli-delegate/cmd_conformance.js +4 -3
- package/dist/cli-delegate/cmd_converge.js +3 -3
- package/dist/cli-delegate/cmd_doctor.js +3 -2
- package/dist/cli-delegate/cmd_export.js +4 -4
- package/dist/cli-delegate/cmd_handoff.js +3194 -0
- package/dist/cli-delegate/cmd_memory_get.js +35 -3754
- package/dist/cli-delegate/cmd_migrate.js +2 -2
- package/dist/cli-delegate/cmd_prune.js +4 -4
- package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
- package/dist/cli-delegate/cmd_sync.js +4 -4
- package/dist/cli-delegate/cmd_uninstall.js +4 -4
- package/dist/cli-delegate/cmd_update.js +3 -3
- package/dist/cli-delegate/cmd_upgrade.js +3 -3
- package/dist/cli-delegate/cmd_validate.js +4 -4
- package/dist/cli-delegate/cmd_versions.js +3 -3
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +31 -31
- 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/hooks/dispatch.js +602 -507
- package/dist/install/install.mjs +23 -0
- package/dist/mcp/awesome-mcp-servers.row.md +1 -1
- package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +25 -3
- package/dist/scripts/_lib/agent_src.js +39 -6
- package/dist/scripts/_lib/agent_src.js.map +1 -1
- package/dist/server/routes/workspace.js +1 -1
- package/dist/server/routes/workspace.js.map +1 -1
- package/dist/server/schemas/settings.js +13 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/shared/userMd/utils.js +1 -1
- package/dist/shared/userMd/utils.js.map +1 -1
- package/dist/ui/assets/index-DmR0mbk4.js +26 -0
- package/dist/ui/assets/index-DmR0mbk4.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/docs/guidelines/abstraction-thresholds.md +53 -0
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +1 -1
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +7 -0
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +2 -2
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +5 -3
- package/docs/guidelines/agent-infra/size-and-scope.md +8 -2
- package/docs/guidelines/component-oriented-and-oop-development.md +11 -6
- package/docs/guidelines/docs/readme-size-and-splitting.md +5 -2
- package/llms.txt +1 -0
- package/package.json +4 -4
- package/src/config/agent-settings.template.yml +25 -1
- package/src/config/budget-routing.json +7 -0
- package/src/config/evaluator-budgets.json +8 -11
- package/src/config/gate-coverage.yml +30 -0
- package/src/scripts/_cli/cmd_handoff.ts +405 -0
- package/src/scripts/_cli/handoff_generate.ts +453 -0
- package/src/scripts/_cli/handoff_sessions.ts +435 -0
- package/src/scripts/_dispatch.bash +9 -0
- package/src/scripts/_lib/agent_src.ts +36 -6
- package/src/scripts/_lib/release_material.ts +156 -0
- package/src/scripts/_lib/tier_budget_routing.ts +154 -28
- package/src/scripts/anchor_scoring_run.ts +1 -1
- package/src/scripts/bench_persona_placebo.ts +1 -1
- package/src/scripts/bench_quality_run.ts +1 -1
- package/src/scripts/check_cli_registry_budget_sync.ts +168 -0
- package/src/scripts/check_condensation.ts +2 -1
- package/src/scripts/check_finding_dispositions.ts +278 -0
- package/src/scripts/check_gate_coverage.ts +1 -1
- package/src/scripts/check_pack_size.ts +4 -3
- package/src/scripts/check_references.ts +1 -0
- package/src/scripts/check_release_highlights.ts +300 -0
- package/src/scripts/check_release_pr_shape.ts +4 -0
- package/src/scripts/check_release_surface_equality.ts +132 -0
- package/src/scripts/check_reply_consistency.ts +187 -138
- package/src/scripts/check_token_quality_golden.ts +1 -1
- package/src/scripts/cost/budget.mjs +18 -4
- package/src/scripts/handoff_context_hook.ts +148 -0
- package/src/scripts/hook_manifest.yaml +17 -7
- package/src/scripts/hooks/concern_registry.ts +2 -0
- package/src/scripts/lint_abstraction_thresholds.ts +325 -0
- package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
- package/src/scripts/lint_profile_personas.ts +153 -0
- package/src/scripts/lint_token_budget_discipline.ts +148 -0
- package/src/scripts/release.ts +264 -37
- package/src/scripts/release_drill.ts +491 -0
- package/src/scripts/routing_doctor.ts +76 -1
- package/src/scripts/schemas/command.schema.json +33 -0
- package/src/scripts/self_review_gate.ts +41 -3
- package/src/scripts/skill_linter.ts +3 -1
- package/src/scripts/smoke/router.sh +1 -1
- package/src/scripts/update_counts.ts +60 -12
- package/src/server/schemas/settings.ts +23 -0
- package/src/shared/userMd/utils.ts +1 -1
- package/dist/ui/assets/index-DJY_vQVn.js +0 -40
- package/dist/ui/assets/index-DJY_vQVn.js.map +0 -1
- package/dist/cli-delegate/{chunk-XX6TOPD7.js → chunk-WR6GTRHJ.js} +3 -3
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
* the `check_quality_regression.gateVerdict` pattern.
|
|
30
30
|
*/
|
|
31
31
|
import { spawnSync } from 'node:child_process';
|
|
32
|
-
import {
|
|
32
|
+
import { createHash } from 'node:crypto';
|
|
33
|
+
import { appendFileSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
33
34
|
import path from 'node:path';
|
|
34
35
|
import { fileURLToPath } from 'node:url';
|
|
35
36
|
|
|
@@ -50,6 +51,20 @@ export interface Finding {
|
|
|
50
51
|
file?: string;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Stable identifier for a finding — sha256 of kind|title|file, 12 hex chars
|
|
56
|
+
* (release-truth Phase 3). The id keys the disposition ledger
|
|
57
|
+
* (`agents/evidence/release-findings/<version>.json`): the 9.14.0 symlink
|
|
58
|
+
* finding merged with no traceable disposition precisely because findings
|
|
59
|
+
* carried no identity that outlived the PR comment.
|
|
60
|
+
*/
|
|
61
|
+
export function findingId(f: Pick<Finding, 'kind' | 'title' | 'file'>): string {
|
|
62
|
+
return createHash('sha256')
|
|
63
|
+
.update(`${f.kind}|${f.title}|${f.file ?? ''}`)
|
|
64
|
+
.digest('hex')
|
|
65
|
+
.slice(0, 12);
|
|
66
|
+
}
|
|
67
|
+
|
|
53
68
|
/**
|
|
54
69
|
* A finding is merge-blocking iff it is security- or claim-affecting AND at
|
|
55
70
|
* least `high` severity. Style and correctness findings advise; low/medium
|
|
@@ -332,7 +347,7 @@ export function renderReview(findings: Finding[], enforce: boolean, escalation:
|
|
|
332
347
|
const rows = findings
|
|
333
348
|
.map((f) => {
|
|
334
349
|
const marker = classifyBlocking(f) ? 'Blocking' : 'Advisory';
|
|
335
|
-
return `| ${f.severity} (${marker}) | ${f.kind} | ${f.file ?? '—'} | ${f.title} |`;
|
|
350
|
+
return `| ${findingId(f)} | ${f.severity} (${marker}) | ${f.kind} | ${f.file ?? '—'} | ${f.title} |`;
|
|
336
351
|
})
|
|
337
352
|
.join('\n');
|
|
338
353
|
const verdictLine = blocking.length
|
|
@@ -340,7 +355,14 @@ export function renderReview(findings: Finding[], enforce: boolean, escalation:
|
|
|
340
355
|
? `❌ ${blocking.length} merge-blocking finding(s) (security/claim × high+).`
|
|
341
356
|
: `⚠️ ${blocking.length} finding(s) WOULD block merge under an enforced gate (advisory now).`
|
|
342
357
|
: '✅ No merge-blocking findings (style/correctness advise only).';
|
|
343
|
-
|
|
358
|
+
// Machine-readable block (release-truth Phase 3): invisible in the rendered
|
|
359
|
+
// comment; `check_finding_dispositions --pr` reads it as the TRIGGER that
|
|
360
|
+
// demands committed dispositions. The comment is transport, never the
|
|
361
|
+
// record — the record is `agents/evidence/release-findings/<version>.json`.
|
|
362
|
+
const machine = `\n\n<!-- release-findings-json: ${JSON.stringify(
|
|
363
|
+
findings.map((f) => ({ finding_id: findingId(f), severity: f.severity, kind: f.kind, title: f.title, file: f.file ?? null })),
|
|
364
|
+
)} -->`;
|
|
365
|
+
return `${banner}\n\n${verdictLine}\n\n| id | severity | kind | file | finding |\n|---|---|---|---|---|\n${rows}${esc}${machine}`;
|
|
344
366
|
}
|
|
345
367
|
|
|
346
368
|
function postReview(body: string): void {
|
|
@@ -432,6 +454,22 @@ export function main(argv: string[]): 0 | 2 {
|
|
|
432
454
|
return 0; // no credit / transport / API error → never blocks the merge
|
|
433
455
|
}
|
|
434
456
|
const findings = parseFindings(resp.text);
|
|
457
|
+
const outIdx = argv.indexOf('--findings-out');
|
|
458
|
+
if (outIdx >= 0 && argv[outIdx + 1]) {
|
|
459
|
+
// Durable ingestion input for the disposition ledger (release-truth
|
|
460
|
+
// Phase 3): `check_finding_dispositions --ingest <this file>`.
|
|
461
|
+
writeFileSync(
|
|
462
|
+
argv[outIdx + 1]!,
|
|
463
|
+
JSON.stringify(
|
|
464
|
+
{
|
|
465
|
+
schema_version: 1,
|
|
466
|
+
findings: findings.map((f) => ({ finding_id: findingId(f), ...f })),
|
|
467
|
+
},
|
|
468
|
+
null,
|
|
469
|
+
2,
|
|
470
|
+
) + '\n',
|
|
471
|
+
);
|
|
472
|
+
}
|
|
435
473
|
const body = renderReview(findings, enforce, plan.escalation);
|
|
436
474
|
postReview(body);
|
|
437
475
|
|
|
@@ -2554,7 +2554,9 @@ function lint_interaction_quality(p: string, text: string): Issue[] {
|
|
|
2554
2554
|
].some((kw) => textLower.includes(kw));
|
|
2555
2555
|
|
|
2556
2556
|
if (hasQuestionContext) {
|
|
2557
|
-
|
|
2557
|
+
// 'decision point' is the ADR-214 cadence boundary ("one decision
|
|
2558
|
+
// point = one question") that replaced the simple-vs-complex split.
|
|
2559
|
+
const hasSimple = ['simple', 'binary', 'independent', 'decision point'].some((kw) => textLower.includes(kw));
|
|
2558
2560
|
const hasComplex = ['complex', 'one at a time', 'one question'].some((kw) => textLower.includes(kw));
|
|
2559
2561
|
if (!(hasSimple && hasComplex)) {
|
|
2560
2562
|
issues.push(
|
|
@@ -34,25 +34,73 @@ const _HERE = fileURLToPath(import.meta.url);
|
|
|
34
34
|
// REPO_ROOT = <file>.parent.parent.parent — two dirs up from src/scripts.
|
|
35
35
|
export const REPO_ROOT = path.resolve(path.dirname(_HERE), '..', '..');
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Recursively walk a directory, yielding files whose basename matches.
|
|
39
|
+
*
|
|
40
|
+
* Symlink confinement (release-truth Phase 3): a symlink — leaf or directory —
|
|
41
|
+
* is honored only when its target resolves inside the walk root; external
|
|
42
|
+
* targets, broken links, and cycles are ignored. Directory symlinks are
|
|
43
|
+
* followed through a visited-realpath set so a self-referential link
|
|
44
|
+
* terminates instead of recursing to stack exhaustion.
|
|
45
|
+
*/
|
|
38
46
|
function* _rglob(dir: string, match: (name: string) => boolean): Generator<string> {
|
|
39
|
-
let
|
|
47
|
+
let rootReal: string;
|
|
40
48
|
try {
|
|
41
|
-
|
|
49
|
+
rootReal = fs.realpathSync(dir);
|
|
42
50
|
} catch {
|
|
43
51
|
return;
|
|
44
52
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
const confined = (p: string): string | null => {
|
|
54
|
+
try {
|
|
55
|
+
const real = fs.realpathSync(p);
|
|
56
|
+
const rel = path.relative(rootReal, real);
|
|
57
|
+
const inside = real === rootReal || (rel !== '' && !rel.startsWith('..') && !path.isAbsolute(rel));
|
|
58
|
+
return inside ? real : null;
|
|
59
|
+
} catch {
|
|
60
|
+
return null; // broken symlink → explicitly not yielded
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const visited = new Set<string>([rootReal]);
|
|
64
|
+
function* walk(current: string): Generator<string> {
|
|
65
|
+
let entries: fs.Dirent[];
|
|
66
|
+
try {
|
|
67
|
+
entries = fs.readdirSync(current, { withFileTypes: true });
|
|
68
|
+
} catch {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// Sort for determinism (Path.rglob order is filesystem-dependent in
|
|
72
|
+
// Python; we only count, so order does not affect the result).
|
|
73
|
+
entries.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
|
74
|
+
for (const e of entries) {
|
|
75
|
+
const full = path.join(current, e.name);
|
|
76
|
+
if (e.isDirectory()) {
|
|
77
|
+
yield* walk(full);
|
|
78
|
+
} else if (e.isSymbolicLink()) {
|
|
79
|
+
const real = confined(full);
|
|
80
|
+
if (real === null) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
let st: fs.Stats;
|
|
84
|
+
try {
|
|
85
|
+
st = fs.statSync(full);
|
|
86
|
+
} catch {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (st.isDirectory()) {
|
|
90
|
+
if (visited.has(real)) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
visited.add(real);
|
|
94
|
+
yield* walk(full);
|
|
95
|
+
} else if (st.isFile() && match(e.name)) {
|
|
96
|
+
yield full;
|
|
97
|
+
}
|
|
98
|
+
} else if (e.isFile() && match(e.name)) {
|
|
99
|
+
yield full;
|
|
100
|
+
}
|
|
54
101
|
}
|
|
55
102
|
}
|
|
103
|
+
yield* walk(dir);
|
|
56
104
|
}
|
|
57
105
|
|
|
58
106
|
/** Yield immediate child files of dir matching `match`. */
|
|
@@ -247,6 +247,29 @@ export const settingsSchema = z.object({
|
|
|
247
247
|
'Whether skills marked token_budget_class: rich may load in full (exempt from telegraph-speak + thin-projector trimming), consumed by the token-budget-discipline rule. on = allowed (default); off = fall back to standard condensed behavior; ask = surface an estimated token delta (tokens, not dollars) and ask once per session before loading.',
|
|
248
248
|
),
|
|
249
249
|
}).default({ rich_skills: 'on' }),
|
|
250
|
+
verbosity: z.object({
|
|
251
|
+
intent_announcements: z.boolean().default(false).describe(
|
|
252
|
+
'Intent narration before tool batches ("Let me check X…"). Only honored when personal.play_by_play is ALSO true (the direct-answers narration carve-out requires both). false (default) = act and emit the result.',
|
|
253
|
+
),
|
|
254
|
+
preview_artifacts: z.boolean().default(false).describe(
|
|
255
|
+
'Show generated commit messages, PR titles/bodies, branch names before acting. false (default) = use generated content directly (/commit terse path).',
|
|
256
|
+
),
|
|
257
|
+
routine_confirmations: z.boolean().default(false).describe(
|
|
258
|
+
'Confirmation prompts for routine workflow steps with one obvious answer. Iron-Law gates (commit-policy, scope-control git-ops, Hard Floor) ALWAYS ask regardless.',
|
|
259
|
+
),
|
|
260
|
+
offer_council_in_delivery: z.boolean().default(false).describe(
|
|
261
|
+
'Offer "run AI Council on this?" inside delivery commands (/feature-plan, /review-changes, /roadmap-create). Council commands themselves are unaffected.',
|
|
262
|
+
),
|
|
263
|
+
post_action_reports: z.enum(['off', 'minimal', 'full']).default('minimal').describe(
|
|
264
|
+
'Status blocks after a successful action. off = errors only; minimal (default) = one-line confirmation; full = bullet list.',
|
|
265
|
+
),
|
|
266
|
+
}).default({
|
|
267
|
+
intent_announcements: false,
|
|
268
|
+
preview_artifacts: false,
|
|
269
|
+
routine_confirmations: false,
|
|
270
|
+
offer_council_in_delivery: false,
|
|
271
|
+
post_action_reports: 'minimal',
|
|
272
|
+
}),
|
|
250
273
|
code_style: z.object({
|
|
251
274
|
docblocks: z.enum(['minimal', 'full']).default('minimal').describe(
|
|
252
275
|
'Consumed by the code-comment-discipline rule. minimal (default) = no signature-mirroring docblocks; docblocks only for machine-relevant precision (generics, array shapes) or genuine why-context. full = the exported public surface of a library package may carry one-line summary docblocks; the redundancy ban still holds.',
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* Drop once no consumer ships the legacy file.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import yaml from 'js-yaml';
|
|
26
|
+
import * as yaml from 'js-yaml';
|
|
27
27
|
|
|
28
28
|
/** Frontmatter fence used by the legacy `.agent-user.md` format. */
|
|
29
29
|
const FRONTMATTER_FENCE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
|