@event4u/agent-config 5.6.1 → 5.8.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/.agent-src/commands/agent-handoff.md +1 -1
- package/.agent-src/commands/agent-status.md +1 -1
- package/.agent-src/commands/agents/audit.md +1 -1
- package/.agent-src/commands/agents/init.md +1 -1
- package/.agent-src/commands/agents/user/accept.md +3 -3
- package/.agent-src/commands/agents/user/init.md +4 -4
- package/.agent-src/commands/agents/user/show.md +3 -3
- package/.agent-src/commands/agents/user/update.md +3 -3
- package/.agent-src/commands/agents/user.md +1 -1
- package/.agent-src/commands/agents.md +1 -1
- package/.agent-src/commands/analytics/prune.md +1 -1
- package/.agent-src/commands/analytics/show.md +1 -1
- package/.agent-src/commands/analytics.md +1 -1
- package/.agent-src/commands/bug-fix.md +1 -1
- package/.agent-src/commands/challenge-me.md +1 -1
- package/.agent-src/commands/chat-history/import.md +1 -1
- package/.agent-src/commands/chat-history/learn.md +1 -1
- package/.agent-src/commands/chat-history/show.md +1 -1
- package/.agent-src/commands/chat-history.md +1 -1
- package/.agent-src/commands/check-current-md.md +1 -1
- package/.agent-src/commands/condense.md +1 -1
- package/.agent-src/commands/context.md +1 -1
- package/.agent-src/commands/cost-report.md +13 -8
- package/.agent-src/commands/council.md +3 -3
- package/.agent-src/commands/create-pr/description-only.md +1 -1
- package/.agent-src/commands/create-pr.md +1 -1
- package/.agent-src/commands/e2e-heal.md +1 -1
- package/.agent-src/commands/e2e-plan.md +1 -1
- package/.agent-src/commands/feature.md +1 -1
- package/.agent-src/commands/fix/ci.md +1 -1
- package/.agent-src/commands/fix/portability.md +1 -1
- package/.agent-src/commands/fix/pr-bot-comments.md +1 -1
- package/.agent-src/commands/fix/pr-comments.md +1 -1
- package/.agent-src/commands/fix/pr-developer-comments.md +1 -1
- package/.agent-src/commands/fix/refs.md +1 -1
- package/.agent-src/commands/fix/seeder.md +1 -1
- package/.agent-src/commands/fix.md +1 -1
- package/.agent-src/commands/judge.md +1 -1
- package/.agent-src/commands/knowledge/cross-repo.md +1 -1
- package/.agent-src/commands/knowledge/forget.md +1 -1
- package/.agent-src/commands/knowledge/ingest.md +1 -1
- package/.agent-src/commands/knowledge/list.md +1 -1
- package/.agent-src/commands/knowledge.md +1 -1
- package/.agent-src/commands/memory/add.md +1 -1
- package/.agent-src/commands/memory/learn-low-impact.md +1 -1
- package/.agent-src/commands/memory/load.md +1 -1
- package/.agent-src/commands/memory/mine-session.md +1 -1
- package/.agent-src/commands/memory/promote.md +1 -1
- package/.agent-src/commands/memory/propose.md +1 -1
- package/.agent-src/commands/memory.md +1 -1
- package/.agent-src/commands/mode.md +1 -1
- package/.agent-src/commands/optimize/agents-dir.md +1 -1
- package/.agent-src/commands/optimize/augmentignore.md +1 -1
- package/.agent-src/commands/optimize/rtk.md +1 -1
- package/.agent-src/commands/optimize/skills.md +1 -1
- package/.agent-src/commands/optimize.md +1 -1
- package/.agent-src/commands/orchestrate.md +1 -1
- package/.agent-src/commands/override/create.md +1 -1
- package/.agent-src/commands/override/manage.md +1 -1
- package/.agent-src/commands/override.md +1 -1
- package/.agent-src/commands/package-reset.md +1 -1
- package/.agent-src/commands/prediction-pool.md +234 -0
- package/.agent-src/commands/profile/activate.md +81 -0
- package/.agent-src/commands/profile/deactivate.md +68 -0
- package/.agent-src/commands/profile/show.md +70 -0
- package/.agent-src/commands/profile.md +68 -0
- package/.agent-src/commands/project-health.md +1 -1
- package/.agent-src/commands/quality-fix.md +1 -1
- package/.agent-src/commands/roadmap/process-full.md +1 -1
- package/.agent-src/commands/roadmap/process-phase.md +1 -1
- package/.agent-src/commands/roadmap/process-step.md +1 -1
- package/.agent-src/commands/roadmap.md +1 -1
- package/.agent-src/commands/set-cost-profile.md +9 -9
- package/.agent-src/commands/skill/preview.md +3 -3
- package/.agent-src/commands/skill.md +1 -1
- package/.agent-src/commands/skills/discover.md +1 -1
- package/.agent-src/commands/skills.md +1 -1
- package/.agent-src/commands/sync-agent-settings.md +3 -3
- package/.agent-src/commands/sync-gitignore/fix.md +1 -1
- package/.agent-src/commands/sync-gitignore.md +1 -1
- package/.agent-src/commands/update-form-request-messages.md +1 -1
- package/.agent-src/presets/README.md +1 -1
- package/.agent-src/profiles/README.md +1 -1
- package/.agent-src/rules/non-destructive-by-default.md +2 -1
- package/.agent-src/skills/check-refs/SKILL.md +1 -1
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +1 -1
- package/.agent-src/skills/git-workflow/SKILL.md +1 -1
- package/.agent-src/skills/jira-integration/SKILL.md +1 -1
- package/.agent-src/skills/markitdown/SKILL.md +1 -1
- package/.agent-src/skills/prediction-pool-optimizer/SKILL.md +314 -0
- package/.agent-src/skills/prediction-pool-optimizer/evals/triggers.json +20 -0
- package/.agent-src/skills/prediction-pool-optimizer/reference/ev-fixtures.md +175 -0
- package/.agent-src/skills/prediction-pool-optimizer/reference/odds-and-bonus.md +109 -0
- package/.agent-src/skills/rtk-output-filtering/SKILL.md +1 -1
- package/.agent-src/skills/script-writing/SKILL.md +1 -1
- package/.agent-src/skills/token-optimizer/SKILL.md +1 -1
- package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -1
- package/.agent-src/templates/agent-settings.md +7 -7
- package/.agent-src/templates/agents/agent-project-settings.example.yml +2 -2
- package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +54 -6
- package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +1 -1
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +9 -7
- package/.agent-src/templates/scripts/work_engine/hooks/settings.py +9 -10
- package/.agent-src/templates/scripts/work_engine/scoring/memory_visibility.py +17 -4
- package/.claude-plugin/marketplace.json +370 -364
- package/CHANGELOG.md +108 -0
- package/README.md +2 -2
- package/config/agent-settings.template.yml +11 -2
- package/config/discovery/packs.yml +11 -0
- package/config/discovery/session-profiles.yml +37 -0
- package/config/discovery/workspaces.yml +1 -1
- package/config/profiles/balanced.ini +1 -1
- package/config/profiles/full.ini +1 -1
- package/config/profiles/minimal.ini +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +254 -100
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +41 -6
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +19 -6
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/server/io/substituteTemplate.js +3 -3
- package/dist/server/io/substituteTemplate.js.map +1 -1
- package/dist/server/routes/settings.js +2 -2
- package/dist/server/routes/settings.js.map +1 -1
- package/dist/server/schemas/settings.js +4 -2
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/ui/assets/{index-DVsyUMZe.js → index-5lFqAKL0.js} +2 -2
- package/dist/ui/assets/index-5lFqAKL0.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/docs/architecture/current-onboard-baseline.md +3 -3
- package/docs/architecture.md +2 -2
- package/docs/catalog.md +11 -5
- package/docs/contracts/adr-level-6-productization.md +1 -1
- package/docs/contracts/command-clusters.md +2 -0
- package/docs/contracts/config-presets.md +2 -2
- package/docs/contracts/cost-profile-defaults.md +5 -5
- package/docs/contracts/discovery-manifest.schema.json +1 -1
- package/docs/contracts/explain-trace.schema.json +3 -3
- package/docs/contracts/memory-visibility-v1.md +15 -7
- package/docs/contracts/profile-system.md +2 -2
- package/docs/contracts/session-profile-overlay.md +120 -0
- package/docs/contracts/settings-api.md +3 -3
- package/docs/contracts/value-report-schema.md +14 -1
- package/docs/customization.md +47 -5
- package/docs/decisions/ADR-010-profile-pack-preset-boundary.md +47 -11
- package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +16 -2
- package/docs/decisions/ADR-034-per-skill-model-recommendation-transport.md +1 -1
- package/docs/decisions/ADR-036-global-install-browser-wizard-handoff.md +106 -0
- package/docs/decisions/ADR-037-cost-profile-untangle.md +117 -0
- package/docs/decisions/ADR-038-canonical-settings-path.md +66 -0
- package/docs/decisions/ADR-039-claude-skills-untracked.md +139 -0
- package/docs/decisions/ADR-rule-kernel-and-router.md +1 -1
- package/docs/decisions/INDEX.md +4 -0
- package/docs/development.md +12 -0
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/layered-settings.md +10 -4
- package/docs/installation.md +3 -3
- package/docs/setup/mcp-client-config.md +1 -1
- package/docs/skills-catalog.md +5 -1
- package/docs/value.md +9 -7
- package/docs/wizard.md +1 -1
- package/llms.txt +4 -0
- package/package.json +1 -1
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_cli/cmd_doctor.py +3 -2
- package/scripts/_cli/cmd_explain.py +1 -1
- package/scripts/_cli/cmd_versions.py +2 -2
- package/scripts/_cli/explain_last/inputs.py +11 -8
- package/scripts/_cli/explain_last/sections/inputs.py +1 -1
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/scripts/_lib/agent_settings.py +54 -6
- package/scripts/_lib/agent_src.py +30 -0
- package/scripts/_lib/value_ladder.py +99 -2
- package/scripts/_lib/value_report.py +30 -16
- package/scripts/ai_council/modes.py +1 -1
- package/scripts/ai_council/session.py +5 -1
- package/scripts/audit_command_surface.py +7 -1
- package/scripts/audit_initial_context.py +26 -2
- package/scripts/check_gate_paths.py +117 -0
- package/scripts/check_references.py +51 -2
- package/scripts/check_skill_requires.py +143 -0
- package/scripts/check_test_coverage_diff.py +180 -0
- package/scripts/compile_router.py +5 -1
- package/scripts/condense.py +92 -4
- package/scripts/config/session_profiles.py +492 -0
- package/scripts/council_cli.py +5 -1
- package/scripts/first-run.sh +11 -11
- package/scripts/hook_manifest.yaml +15 -7
- package/scripts/hooks/dispatch_hook.py +8 -0
- package/scripts/install +14 -1
- package/scripts/install-hooks.sh +2 -1
- package/scripts/install.py +203 -433
- package/scripts/install_anthropic_key.sh +1 -1
- package/scripts/install_openai_key.sh +1 -1
- package/scripts/inventory_abstraction_budget.py +6 -1
- package/scripts/lint_agents_md.py +11 -4
- package/scripts/lint_discovery_vocabulary.py +5 -5
- package/scripts/lint_hook_concern_budget.py +5 -1
- package/scripts/lint_marketplace.py +18 -7
- package/scripts/lint_roadmap_ci_steps.py +5 -1
- package/scripts/lint_roadmap_complexity.py +5 -1
- package/scripts/lint_value_dashboard.py +1 -1
- package/scripts/mcp_server/prompts.py +5 -1
- package/scripts/prediction-pool/adapters/_schema.md +42 -0
- package/scripts/prediction-pool/adapters/kicktipp.yml +23 -0
- package/scripts/prediction-pool/poisson_sim.py +167 -0
- package/scripts/prediction-pool/pool_winsim.py +236 -0
- package/scripts/prediction-pool/score_ev.py +188 -0
- package/scripts/profile_staleness_hook.py +69 -0
- package/scripts/render_value_md.py +1 -0
- package/scripts/roadmap_progress_hook.py +56 -6
- package/scripts/schemas/agent-settings.schema.json +77 -0
- package/scripts/schemas/skill.schema.json +7 -0
- package/scripts/smoke_quickstart.py +7 -6
- package/scripts/sync_agent_settings.py +12 -5
- package/scripts/validate_agent_settings.py +124 -0
- package/scripts/validate_decision_engine.py +5 -1
- package/templates/minimal/.agent-settings.yml +1 -1
- package/dist/ui/assets/index-DVsyUMZe.js.map +0 -1
- package/scripts/measure_roadmap_trajectory.py +0 -112
- package/scripts/verify_roadmap_closure.py +0 -327
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Verifies the 3-step Quickstart from a fresh-project perspective:
|
|
5
5
|
|
|
6
6
|
1. `scripts/install.py --project <tmpdir>` produces a usable
|
|
7
|
-
`.agent-settings.yml` with the documented default `
|
|
7
|
+
`.agent-settings.yml` with the documented default `rule_loading_tier`.
|
|
8
8
|
2. The decision_engine block (P2.x of road-to-productization) parses
|
|
9
9
|
cleanly through the same engine parser the runtime uses.
|
|
10
10
|
3. The work-engine state-file format (`agents/runtime/state/<id>.json`) is
|
|
@@ -61,23 +61,24 @@ def _check_installer_runs(tmpdir: Path) -> tuple[int, Path | None]:
|
|
|
61
61
|
_fail(f"installer exited {result.returncode}\nstdout:\n{result.stdout}\nstderr:\n{result.stderr}"),
|
|
62
62
|
None,
|
|
63
63
|
)
|
|
64
|
-
settings
|
|
64
|
+
# ADR-038: installer writes the canonical settings file under agents/settings/.
|
|
65
|
+
settings = tmpdir / "agents" / "settings" / ".agent-settings.yml"
|
|
65
66
|
if not settings.exists():
|
|
66
|
-
return _fail("
|
|
67
|
+
return _fail("agents/settings/.agent-settings.yml not written by installer"), None
|
|
67
68
|
return 0, settings
|
|
68
69
|
|
|
69
70
|
|
|
70
71
|
def _check_default_profile(settings: Path) -> int:
|
|
71
|
-
"""Step 2 — assert default
|
|
72
|
+
"""Step 2 — assert default rule_loading_tier matches the contract."""
|
|
72
73
|
import yaml
|
|
73
74
|
|
|
74
75
|
parsed = yaml.safe_load(settings.read_text(encoding="utf-8"))
|
|
75
76
|
if not isinstance(parsed, dict):
|
|
76
77
|
return _fail(f"{settings.name}: top-level is not a YAML mapping")
|
|
77
|
-
profile = parsed.get("
|
|
78
|
+
profile = parsed.get("rule_loading_tier")
|
|
78
79
|
if profile != EXPECTED_DEFAULT_PROFILE:
|
|
79
80
|
return _fail(
|
|
80
|
-
f"
|
|
81
|
+
f"rule_loading_tier drift: docs/contracts/rule-loading-tier-defaults.md "
|
|
81
82
|
f"declares '{EXPECTED_DEFAULT_PROFILE}', settings has '{profile!r}'"
|
|
82
83
|
)
|
|
83
84
|
return 0
|
|
@@ -85,12 +85,14 @@ def render_diff(old_text: str, new_text: str, path: str) -> str:
|
|
|
85
85
|
|
|
86
86
|
def main(argv: list[str] | None = None) -> int:
|
|
87
87
|
ap = argparse.ArgumentParser(description=__doc__)
|
|
88
|
-
ap.add_argument("--path", default=
|
|
89
|
-
help=
|
|
88
|
+
ap.add_argument("--path", default=None,
|
|
89
|
+
help="target settings file (default: canonical "
|
|
90
|
+
"agents/settings/.agent-settings.yml, falling back to "
|
|
91
|
+
"a legacy repo-root .agent-settings.yml — ADR-038)")
|
|
90
92
|
ap.add_argument("--template", default=str(DEFAULT_TEMPLATE),
|
|
91
93
|
help="path to the settings template")
|
|
92
94
|
ap.add_argument("--profile", default=None,
|
|
93
|
-
help="
|
|
95
|
+
help="rule_loading_tier preset (minimal|balanced|full). "
|
|
94
96
|
"Default: inferred from target, else 'minimal'")
|
|
95
97
|
ap.add_argument("--profile-dir", default=str(DEFAULT_PROFILE_DIR),
|
|
96
98
|
help="directory containing profile .ini files")
|
|
@@ -102,13 +104,18 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
102
104
|
help="suppress summary on success")
|
|
103
105
|
args = ap.parse_args(argv)
|
|
104
106
|
|
|
105
|
-
target =
|
|
107
|
+
target = (
|
|
108
|
+
Path(args.path) if args.path is not None
|
|
109
|
+
else _install._resolve_settings_read(Path.cwd())
|
|
110
|
+
)
|
|
106
111
|
template_path = Path(args.template)
|
|
107
112
|
profile_dir = Path(args.profile_dir)
|
|
108
113
|
|
|
109
114
|
try:
|
|
110
115
|
user_data = load_user(target)
|
|
111
|
-
profile = args.profile or str(
|
|
116
|
+
profile = args.profile or str(
|
|
117
|
+
user_data.get("rule_loading_tier") or user_data.get("cost_profile") or "minimal"
|
|
118
|
+
)
|
|
112
119
|
if profile not in _install.SUPPORTED_PROFILES:
|
|
113
120
|
print(f"error: unsupported profile {profile!r}", file=sys.stderr)
|
|
114
121
|
return 2
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Agent-settings schema validator (rule_loading_tier untangle, 2026-06-01).
|
|
3
|
+
|
|
4
|
+
Validates ``config/agent-settings.template.yml`` and any local
|
|
5
|
+
``.agent-settings.yml`` against
|
|
6
|
+
``scripts/schemas/agent-settings.schema.json``. The schema is
|
|
7
|
+
deliberately permissive (``additionalProperties: true`` everywhere) and
|
|
8
|
+
only enum-constrains the value-bearing keys that have historically been
|
|
9
|
+
overloaded with a foreign vocabulary — the root cause of the
|
|
10
|
+
``rule_loading_tier`` / memory-cadence collision. Its job is to make a
|
|
11
|
+
value-vocabulary collision a hard CI failure.
|
|
12
|
+
|
|
13
|
+
Template placeholders (``__RULE_LOADING_TIER__``, ``__USER_TYPE__``) are
|
|
14
|
+
substituted with their installer defaults before validation, mirroring
|
|
15
|
+
``scripts/install.py``.
|
|
16
|
+
|
|
17
|
+
Exit codes:
|
|
18
|
+
- 0 — every checked file validates.
|
|
19
|
+
- 1 — at least one schema violation (unknown enum value, wrong type).
|
|
20
|
+
- 3 — bootstrap failure (missing dependency / schema file).
|
|
21
|
+
|
|
22
|
+
Contract: docs/contracts/cost-profile-defaults.md +
|
|
23
|
+
docs/contracts/memory-visibility-v1.md. Wired into ``task ci`` via
|
|
24
|
+
``taskfiles/ci-fast.yml``.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
|
|
29
|
+
import json
|
|
30
|
+
import sys
|
|
31
|
+
from pathlib import Path
|
|
32
|
+
try: # invocation-agnostic import (repo-root-on-path vs scripts-on-path)
|
|
33
|
+
from scripts._lib.agent_settings import project_settings_path
|
|
34
|
+
except ModuleNotFoundError: # pragma: no cover
|
|
35
|
+
from _lib.agent_settings import project_settings_path
|
|
36
|
+
|
|
37
|
+
try:
|
|
38
|
+
import yaml
|
|
39
|
+
except ImportError: # pragma: no cover — bootstrap guard
|
|
40
|
+
print("::error::PyYAML not installed; cannot validate agent settings")
|
|
41
|
+
sys.exit(3)
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
import jsonschema
|
|
45
|
+
except ImportError: # pragma: no cover — bootstrap guard
|
|
46
|
+
print("::error::jsonschema not installed; cannot validate agent settings")
|
|
47
|
+
sys.exit(3)
|
|
48
|
+
|
|
49
|
+
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
50
|
+
SCHEMA_PATH = REPO_ROOT / "scripts" / "schemas" / "agent-settings.schema.json"
|
|
51
|
+
TEMPLATE_PATH = REPO_ROOT / "config" / "agent-settings.template.yml"
|
|
52
|
+
LOCAL_PATHS = [project_settings_path(REPO_ROOT)]
|
|
53
|
+
|
|
54
|
+
# Installer-default substitutions, mirroring scripts/install.py so the
|
|
55
|
+
# template validates as it would after a fresh `balanced` install.
|
|
56
|
+
PLACEHOLDERS = {
|
|
57
|
+
"__RULE_LOADING_TIER__": "balanced",
|
|
58
|
+
"__USER_TYPE__": "",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _load_yaml(path: Path, *, substitute: bool) -> dict | None:
|
|
63
|
+
if not path.is_file():
|
|
64
|
+
return None
|
|
65
|
+
text = path.read_text(encoding="utf-8")
|
|
66
|
+
if substitute:
|
|
67
|
+
for placeholder, value in PLACEHOLDERS.items():
|
|
68
|
+
text = text.replace(placeholder, value)
|
|
69
|
+
try:
|
|
70
|
+
raw = yaml.safe_load(text)
|
|
71
|
+
except yaml.YAMLError as exc:
|
|
72
|
+
print(f"::error file={path}::malformed YAML: {exc}")
|
|
73
|
+
return {}
|
|
74
|
+
if raw is None:
|
|
75
|
+
return {}
|
|
76
|
+
if not isinstance(raw, dict):
|
|
77
|
+
print(f"::error file={path}::top-level must be a mapping")
|
|
78
|
+
return {}
|
|
79
|
+
return raw
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _validate(path: Path, doc: dict, validator: jsonschema.Draft7Validator) -> int:
|
|
83
|
+
errors = sorted(validator.iter_errors(doc), key=lambda e: list(e.path))
|
|
84
|
+
if not errors:
|
|
85
|
+
return 0
|
|
86
|
+
for err in errors:
|
|
87
|
+
loc = ".".join(str(p) for p in err.path) or "<root>"
|
|
88
|
+
print(f"::error file={path}::{loc}: {err.message}")
|
|
89
|
+
return len(errors)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def main() -> int:
|
|
93
|
+
if not SCHEMA_PATH.is_file():
|
|
94
|
+
print(f"::error::schema missing: {SCHEMA_PATH}")
|
|
95
|
+
return 3
|
|
96
|
+
schema = json.loads(SCHEMA_PATH.read_text(encoding="utf-8"))
|
|
97
|
+
validator = jsonschema.Draft7Validator(schema)
|
|
98
|
+
|
|
99
|
+
total_errors = 0
|
|
100
|
+
checked = 0
|
|
101
|
+
|
|
102
|
+
template = _load_yaml(TEMPLATE_PATH, substitute=True)
|
|
103
|
+
if template is None:
|
|
104
|
+
print(f"::error file={TEMPLATE_PATH}::template missing")
|
|
105
|
+
return 1
|
|
106
|
+
total_errors += _validate(TEMPLATE_PATH, template, validator)
|
|
107
|
+
checked += 1
|
|
108
|
+
|
|
109
|
+
for local in LOCAL_PATHS:
|
|
110
|
+
doc = _load_yaml(local, substitute=False)
|
|
111
|
+
if doc is None:
|
|
112
|
+
continue
|
|
113
|
+
total_errors += _validate(local, doc, validator)
|
|
114
|
+
checked += 1
|
|
115
|
+
|
|
116
|
+
if total_errors:
|
|
117
|
+
print(f"agent-settings schema: {total_errors} violation(s) across {checked} file(s)")
|
|
118
|
+
return 1
|
|
119
|
+
print(f"agent-settings schema: OK ({checked} file(s) validated)")
|
|
120
|
+
return 0
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
if __name__ == "__main__":
|
|
124
|
+
sys.exit(main())
|
|
@@ -19,6 +19,10 @@ from __future__ import annotations
|
|
|
19
19
|
|
|
20
20
|
import sys
|
|
21
21
|
from pathlib import Path
|
|
22
|
+
try: # invocation-agnostic import (repo-root-on-path vs scripts-on-path)
|
|
23
|
+
from scripts._lib.agent_settings import project_settings_path
|
|
24
|
+
except ModuleNotFoundError: # pragma: no cover
|
|
25
|
+
from _lib.agent_settings import project_settings_path
|
|
22
26
|
|
|
23
27
|
try:
|
|
24
28
|
import yaml
|
|
@@ -48,7 +52,7 @@ from work_engine.scoring.decision_engine import ( # noqa: E402
|
|
|
48
52
|
# canonical — its absence is itself a regression).
|
|
49
53
|
TEMPLATE_PATH = REPO_ROOT / "config" / "agent-settings.template.yml"
|
|
50
54
|
# Project-level overrides developers may have on disk locally.
|
|
51
|
-
LOCAL_PATHS = [REPO_ROOT
|
|
55
|
+
LOCAL_PATHS = [project_settings_path(REPO_ROOT)]
|
|
52
56
|
|
|
53
57
|
|
|
54
58
|
def _load_yaml(path: Path) -> dict | None:
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
# --- Cost profile ---
|
|
16
16
|
# Master switch for which rule tiers load. Options: minimal | balanced | full.
|
|
17
17
|
# `balanced` is the recommended default; flip to `minimal` for kernel-only.
|
|
18
|
-
|
|
18
|
+
rule_loading_tier: balanced
|
|
19
19
|
|
|
20
20
|
# --- Version pin (opt-in) ---
|
|
21
21
|
# Leave commented out to follow whatever `agent-config` is on $PATH (per D4).
|