@event4u/agent-config 2.19.0 → 2.20.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.
Files changed (92) hide show
  1. package/.agent-src/commands/agent-status.md +29 -0
  2. package/.agent-src/commands/onboard.md +221 -81
  3. package/.agent-src/packs/README.md +49 -0
  4. package/.agent-src/packs/agency-delivery.yml +63 -0
  5. package/.agent-src/packs/content-engine.yml +53 -0
  6. package/.agent-src/packs/founder-mvp.yml +51 -0
  7. package/.agent-src/presets/README.md +26 -0
  8. package/.agent-src/presets/balanced.yml +34 -0
  9. package/.agent-src/presets/fast.yml +31 -0
  10. package/.agent-src/presets/strict.yml +38 -0
  11. package/.agent-src/profiles/README.md +29 -0
  12. package/.agent-src/profiles/agency.yml +27 -0
  13. package/.agent-src/profiles/content_creator.yml +25 -0
  14. package/.agent-src/profiles/developer.yml +26 -0
  15. package/.agent-src/profiles/finance.yml +24 -0
  16. package/.agent-src/profiles/founder.yml +25 -0
  17. package/.agent-src/profiles/ops.yml +25 -0
  18. package/.agent-src/rules/no-cheap-questions.md +25 -17
  19. package/.agent-src/skills/adr-create/SKILL.md +78 -68
  20. package/.agent-src/skills/subagent-orchestration/SKILL.md +33 -0
  21. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  22. package/.agent-src/templates/skill-archive-note.md +101 -0
  23. package/.claude-plugin/marketplace.json +1 -1
  24. package/CHANGELOG.md +52 -30
  25. package/README.md +68 -72
  26. package/config/agent-settings.template.yml +22 -0
  27. package/docs/adrs/caveman/0001-default-off-until-bench.md +93 -0
  28. package/docs/adrs/caveman/README.md +9 -0
  29. package/docs/adrs/cost/0001-hard-stop-hook.md +114 -0
  30. package/docs/adrs/cost/README.md +9 -0
  31. package/docs/adrs/memory/0001-consumer-side-snapshot.md +111 -0
  32. package/docs/adrs/memory/README.md +9 -0
  33. package/docs/adrs/router/0001-three-tier-routing.md +119 -0
  34. package/docs/adrs/router/README.md +9 -0
  35. package/docs/adrs/schema/0001-json-schema-frontmatter.md +102 -0
  36. package/docs/adrs/schema/README.md +9 -0
  37. package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +99 -0
  38. package/docs/adrs/smoke/README.md +9 -0
  39. package/docs/architecture/current-onboard-baseline.md +126 -0
  40. package/docs/architecture/current-safety-behavior.md +137 -0
  41. package/docs/archive/CHANGELOG-pre-2.16.0.md +48 -0
  42. package/docs/contracts/adr-layout.md +108 -0
  43. package/docs/contracts/benchmark-corpus-spec.md +97 -0
  44. package/docs/contracts/benchmark-report-schema.md +111 -0
  45. package/docs/contracts/command-clusters.md +1 -0
  46. package/docs/contracts/command-taxonomy.md +137 -0
  47. package/docs/contracts/compression-default-kill-criterion.md +69 -0
  48. package/docs/contracts/config-presets.md +144 -0
  49. package/docs/contracts/cost-dashboard.md +143 -0
  50. package/docs/contracts/cost-enforcement.md +134 -0
  51. package/docs/contracts/file-ownership-matrix.json +0 -7
  52. package/docs/contracts/mcp-tool-inventory.md +53 -0
  53. package/docs/contracts/measurement-baseline.md +102 -0
  54. package/docs/contracts/namespace.md +125 -0
  55. package/docs/contracts/profile-system.md +142 -0
  56. package/docs/contracts/safety-model.md +129 -0
  57. package/docs/contracts/smoke-contracts.md +144 -0
  58. package/docs/contracts/workflow-packs.md +121 -0
  59. package/docs/decisions/ADR-010-profile-pack-preset-boundary.md +132 -0
  60. package/docs/decisions/INDEX.md +1 -0
  61. package/docs/featured-commands.md +27 -0
  62. package/docs/parity/bench-ruflo.json +58 -0
  63. package/docs/parity/bench.json +41 -0
  64. package/docs/parity/ruflo.md +46 -0
  65. package/docs/profiles.md +91 -0
  66. package/package.json +1 -1
  67. package/scripts/_cli/cmd_explain.py +250 -0
  68. package/scripts/_lib/bench_cost.py +138 -0
  69. package/scripts/_lib/bench_quality.py +118 -0
  70. package/scripts/_lib/bench_report.py +150 -0
  71. package/scripts/agent-config +13 -0
  72. package/scripts/audit_adr_coverage.py +175 -0
  73. package/scripts/audit_mcp_tools.py +146 -0
  74. package/scripts/bench_baseline_ready.py +108 -0
  75. package/scripts/bench_drift_check.py +151 -0
  76. package/scripts/bench_per_tool.py +216 -0
  77. package/scripts/bench_run.py +155 -0
  78. package/scripts/config/__init__.py +9 -0
  79. package/scripts/config/presets.py +206 -0
  80. package/scripts/config/profiles.py +173 -0
  81. package/scripts/cost/budget.mjs +73 -12
  82. package/scripts/cost/preflight.mjs +89 -0
  83. package/scripts/lint_archived_skills.py +143 -0
  84. package/scripts/lint_bench_corpus.py +161 -0
  85. package/scripts/lint_namespace.py +135 -0
  86. package/scripts/skill_overlap.py +204 -0
  87. package/scripts/skill_usage_collect.py +191 -0
  88. package/scripts/skill_usage_report.py +162 -0
  89. package/scripts/smoke/kernel.sh +101 -0
  90. package/scripts/smoke/router.sh +129 -0
  91. package/scripts/smoke/schema.sh +71 -0
  92. package/scripts/smoke/skills.sh +101 -0
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env bash
2
+ # scripts/smoke/skills.sh — skills-tier smoke (step-11 Phase 3 Step 5).
3
+ #
4
+ # Picks 5 random skills (deterministic seed = epoch day) from
5
+ # .agent-src.uncompressed/skills/*/SKILL.md and asserts:
6
+ # 1. SKILL.md exists.
7
+ # 2. Frontmatter parses + validates against scripts/schemas/skill.schema.json.
8
+ # 3. `name:` field matches the parent directory name.
9
+ # 4. Total skill count ≥ EXPECTED_MIN_SKILLS (regression lock against
10
+ # accidental directory removal).
11
+ #
12
+ # Runtime ceiling: 30 s.
13
+ # Output: table by default, baseline line on stdout last; SMOKE_QUIET=1
14
+ # suppresses the table.
15
+ # Contract: docs/contracts/smoke-contracts.md § 3.4
16
+
17
+ set -euo pipefail
18
+
19
+ EXPECTED_MIN_SKILLS=205
20
+ SAMPLE_SIZE=5
21
+
22
+ quiet="${SMOKE_QUIET:-0}"
23
+ log() { [ "$quiet" = "1" ] || printf '%s\n' "$*"; }
24
+
25
+ result=$(python3 <<'PY'
26
+ import os, sys, time, hashlib, pathlib, glob
27
+ sys.path.insert(0, "scripts")
28
+ from validate_frontmatter import parse_frontmatter, load_schema, validate
29
+
30
+ root = ".agent-src.uncompressed/skills"
31
+ skills = sorted(
32
+ d for d in os.listdir(root)
33
+ if os.path.isdir(os.path.join(root, d))
34
+ and os.path.exists(os.path.join(root, d, "SKILL.md"))
35
+ )
36
+ total = len(skills)
37
+ print(f"TOTAL_SKILLS={total}")
38
+
39
+ # Deterministic seed = epoch day → same sample within 24h, drifts daily.
40
+ seed = int(time.time() // 86400)
41
+ import random
42
+ rng = random.Random(seed)
43
+ sample = rng.sample(skills, min(5, total))
44
+
45
+ schema = load_schema("skill")
46
+
47
+ failures = []
48
+ for name in sample:
49
+ path = os.path.join(root, name, "SKILL.md")
50
+ text = open(path, encoding="utf-8").read()
51
+ fm, _ = parse_frontmatter(text)
52
+ if fm is None:
53
+ failures.append(f"{name}: no frontmatter")
54
+ continue
55
+ errs = validate(fm, schema)
56
+ if errs:
57
+ for e in errs:
58
+ failures.append(f"{name}: {e.format()}")
59
+ continue
60
+ declared = fm.get("name")
61
+ if declared != name:
62
+ failures.append(f"{name}: name field='{declared}' ≠ directory='{name}'")
63
+
64
+ print(f"SAMPLE={','.join(sample)}")
65
+ print(f"SAMPLE_PASS={len(sample) - len([f for f in failures])}")
66
+ print(f"SAMPLE_TOTAL={len(sample)}")
67
+ for f in failures:
68
+ print(f" FAIL: {f}")
69
+ PY
70
+ )
71
+
72
+ TOTAL_SKILLS=$(echo "$result" | grep '^TOTAL_SKILLS=' | cut -d= -f2)
73
+ SAMPLE=$(echo "$result" | grep '^SAMPLE=' | cut -d= -f2)
74
+ SAMPLE_PASS=$(echo "$result" | grep '^SAMPLE_PASS=' | cut -d= -f2)
75
+ SAMPLE_TOTAL=$(echo "$result" | grep '^SAMPLE_TOTAL=' | cut -d= -f2)
76
+ FAILS=$(echo "$result" | grep -c '^ FAIL:' || true)
77
+
78
+ log "## Skills smoke"
79
+ log ""
80
+ log "| Check | Value |"
81
+ log "|---|---:|"
82
+ log "| Total skills | $TOTAL_SKILLS (≥ $EXPECTED_MIN_SKILLS) |"
83
+ log "| Sample size | $SAMPLE_TOTAL |"
84
+ log "| Sample (epoch-day seed) | $SAMPLE |"
85
+ log "| Sample pass | $SAMPLE_PASS/$SAMPLE_TOTAL |"
86
+
87
+ exit_code=0
88
+ if [ "$TOTAL_SKILLS" -lt "$EXPECTED_MIN_SKILLS" ]; then
89
+ echo "❌ skill count $TOTAL_SKILLS < $EXPECTED_MIN_SKILLS (unexpected deletion?)"
90
+ exit_code=1
91
+ fi
92
+ if [ "$FAILS" -gt 0 ]; then
93
+ echo "❌ sample failures:"
94
+ echo "$result" | grep '^ FAIL:'
95
+ exit_code=1
96
+ fi
97
+
98
+ log ""
99
+ echo "BASELINE: $TOTAL_SKILLS skills · $SAMPLE_PASS/$SAMPLE_TOTAL random sample passes (seed=epoch-day)"
100
+
101
+ exit $exit_code