@event4u/agent-config 2.13.0 → 2.15.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 (74) hide show
  1. package/.agent-src/commands/agents/user/accept.md +117 -0
  2. package/.agent-src/commands/agents/user/init.md +163 -0
  3. package/.agent-src/commands/agents/user/review.md +107 -0
  4. package/.agent-src/commands/agents/user/show.md +109 -0
  5. package/.agent-src/commands/agents/user/update.md +98 -0
  6. package/.agent-src/commands/agents/user.md +66 -0
  7. package/.agent-src/commands/agents.md +2 -0
  8. package/.agent-src/commands/memory/learn-low-impact.md +143 -0
  9. package/.agent-src/rules/ask-when-uncertain.md +10 -6
  10. package/.agent-src/rules/copilot-routing.md +1 -1
  11. package/.agent-src/rules/devcontainer-routing.md +1 -1
  12. package/.agent-src/rules/external-reference-deep-dive.md +1 -1
  13. package/.agent-src/rules/fast-path-marker-visibility.md +38 -0
  14. package/.agent-src/rules/low-impact-corpus-privacy-floor.md +74 -0
  15. package/.agent-src/rules/symfony-routing.md +1 -1
  16. package/.agent-src/skills/ai-council/SKILL.md +208 -8
  17. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  18. package/.claude-plugin/marketplace.json +8 -1
  19. package/CHANGELOG.md +328 -124
  20. package/README.md +21 -6
  21. package/config/agent-settings.template.yml +4 -0
  22. package/config/gitignore-block.txt +17 -0
  23. package/docs/architecture.md +12 -12
  24. package/docs/archive/CHANGELOG-pre-2.11.0.md +141 -0
  25. package/docs/catalog.md +16 -7
  26. package/docs/contracts/adr-architectural-consensus-mechanism.md +4 -3
  27. package/docs/contracts/adr-level-6-productization.md +7 -9
  28. package/docs/contracts/agent-user-schema.md +165 -0
  29. package/docs/contracts/ai-council-config.md +492 -20
  30. package/docs/contracts/command-clusters.md +2 -2
  31. package/docs/contracts/command-surface-tiers.md +3 -2
  32. package/docs/contracts/cost-profile-defaults.md +5 -0
  33. package/docs/contracts/decision-engine-gates.md +5 -0
  34. package/docs/contracts/decision-trace-v1.md +2 -2
  35. package/docs/contracts/file-ownership-matrix.json +1961 -108
  36. package/docs/contracts/installed-tools-lockfile.md +2 -1
  37. package/docs/contracts/low-impact-corpus-format.md +95 -0
  38. package/docs/contracts/mcp-beta-criteria.md +6 -5
  39. package/docs/contracts/mcp-cloud-scope.md +5 -4
  40. package/docs/contracts/multi-tool-projection-fidelity.md +8 -2
  41. package/docs/contracts/release-trunk-sync.md +4 -3
  42. package/docs/contracts/tier-3-contrib-plugin.md +5 -6
  43. package/docs/examples/agent-user.example.md +21 -0
  44. package/docs/getting-started.md +2 -2
  45. package/docs/guidelines/agent-infra/installed-tools-manifest.md +2 -1
  46. package/docs/installation.md +32 -0
  47. package/package.json +1 -1
  48. package/scripts/_cli/cmd_doctor.py +134 -0
  49. package/scripts/ai_council/airgap.py +165 -0
  50. package/scripts/ai_council/cli_hints.py +123 -0
  51. package/scripts/ai_council/clients.py +787 -5
  52. package/scripts/ai_council/compile_corpus.py +178 -0
  53. package/scripts/ai_council/confidence_gate.py +156 -0
  54. package/scripts/ai_council/config.py +1007 -11
  55. package/scripts/ai_council/consensus.py +41 -2
  56. package/scripts/ai_council/events_log.py +137 -0
  57. package/scripts/ai_council/learn_low_impact_preview.py +252 -0
  58. package/scripts/ai_council/low_impact.py +714 -0
  59. package/scripts/ai_council/low_impact_corpus.py +466 -0
  60. package/scripts/ai_council/low_impact_intake.py +163 -0
  61. package/scripts/ai_council/modes.py +6 -1
  62. package/scripts/ai_council/necessity.py +782 -0
  63. package/scripts/ai_council/orchestrator.py +252 -14
  64. package/scripts/ai_council/probation_gate.py +152 -0
  65. package/scripts/ai_council/redact_low_impact_entry.py +155 -0
  66. package/scripts/ai_council/replay.py +155 -0
  67. package/scripts/ai_council/session.py +19 -1
  68. package/scripts/ai_council/shadow_dispatch.py +235 -0
  69. package/scripts/ai_council/solo_dispatch.py +226 -0
  70. package/scripts/audit_cloud_compatibility.py +74 -0
  71. package/scripts/audit_command_surface.py +363 -0
  72. package/scripts/check_council_layout.py +11 -0
  73. package/scripts/council_cli.py +1046 -15
  74. package/scripts/install.sh +12 -0
@@ -0,0 +1,123 @@
1
+ """Per-provider CLI install hints for ``mode: cli`` members (step-9 P2).
2
+
3
+ When ``build_members`` cannot construct a ``mode: cli`` member because
4
+ the binary is missing on PATH, it records a skip entry of shape
5
+ ``{"member": <provider>, "reason": "binary_missing", "detail": <msg>}``
6
+ in the caller's ``skipped`` list. This module turns that bookkeeping
7
+ into an actionable pre-flight banner — one line per skipped member —
8
+ so the user sees *which* CLI to install, *where* to get it, and
9
+ *how* to disable the CLI route as a fallback.
10
+
11
+ The table is intentionally small and stdlib-only (no HTTP fetch, no
12
+ new dependency): provider → ``(binary, docs_url, one_liner_install)``.
13
+ Surfaced by ``scripts/council_cli.py`` in ``cmd_estimate`` / ``cmd_ask``
14
+ / ``cmd_debate`` immediately after the cost-estimate header so missing
15
+ CLIs are visible BEFORE the cost decision, not buried in stderr.
16
+
17
+ Closes PR #150 follow-up **C1** (Claude · UX). See
18
+ ``agents/roadmaps/step-9-pr150-feedback-hardening.md`` Phase 2.
19
+ """
20
+ from __future__ import annotations
21
+
22
+ from typing import Iterable, Mapping
23
+
24
+ #: Provider → ``(binary, docs_url, one_liner_install)``.
25
+ #:
26
+ #: - ``binary``: executable name the CLI client looks for via
27
+ #: ``shutil.which``. Matches ``default_binary`` on the
28
+ #: ``CliClient`` subclass in ``scripts/ai_council/clients.py``.
29
+ #: - ``docs_url``: canonical install page. Stable upstream URL —
30
+ #: when a vendor renames the page, update here.
31
+ #: - ``one_liner_install``: shortest copy-pasteable install
32
+ #: command. Plain shell, no curl-pipe-bash. Users with stricter
33
+ #: policies are expected to follow ``docs_url`` instead.
34
+ #:
35
+ #: Vendor-official transports (anthropic, openai, gemini) ship as
36
+ #: subscription-authed binaries — install once, ``billable=False``.
37
+ #: Community wrappers (xai, perplexity) consume an API key and stay
38
+ #: ``billable=True`` even on the CLI route — the hint links to the
39
+ #: community project so the user knows what they are installing.
40
+ INSTALL_HINTS: dict[str, tuple[str, str, str]] = {
41
+ "anthropic": (
42
+ "claude",
43
+ "https://docs.anthropic.com/en/docs/claude-code/quickstart",
44
+ "npm install -g @anthropic-ai/claude-code",
45
+ ),
46
+ "openai": (
47
+ "codex",
48
+ "https://github.com/openai/codex",
49
+ "npm install -g @openai/codex",
50
+ ),
51
+ "gemini": (
52
+ "gemini",
53
+ "https://github.com/google-gemini/gemini-cli",
54
+ "npm install -g @google/gemini-cli",
55
+ ),
56
+ "xai": (
57
+ "grok",
58
+ "https://github.com/superagent-ai/grok-cli",
59
+ "npm install -g @superagent-ai/grok-cli",
60
+ ),
61
+ "perplexity": (
62
+ "perplexity",
63
+ "https://github.com/perplexityai/perplexity-cli",
64
+ "npm install -g perplexity-cli",
65
+ ),
66
+ }
67
+
68
+
69
+ def hint_for(provider: str) -> tuple[str, str, str] | None:
70
+ """Return ``(binary, docs_url, one_liner)`` for ``provider``, else ``None``.
71
+
72
+ Unknown providers (community additions not yet table-listed) return
73
+ ``None`` so the caller can fall through to a generic message rather
74
+ than crashing the pre-flight banner.
75
+ """
76
+ return INSTALL_HINTS.get(provider)
77
+
78
+
79
+ def format_install_hints(skipped: Iterable[Mapping[str, object]]) -> str:
80
+ """Render the per-skip pre-flight banner.
81
+
82
+ ``skipped`` is the list ``build_members`` populates — each entry
83
+ carries ``member`` (provider name), ``reason`` (``binary_missing``
84
+ or future variants), and ``detail`` (the raw ``CliClientError``
85
+ message). Output shape, one line per entry:
86
+
87
+ ::
88
+
89
+ council:cli-skip · <provider> · binary not found · install: <one_liner> · docs: <url>
90
+
91
+ For providers with no entry in ``INSTALL_HINTS`` (community additions
92
+ not yet listed), falls back to the raw ``detail`` so the user still
93
+ sees the failure mode.
94
+
95
+ Returns ``""`` when ``skipped`` is empty so callers can write the
96
+ string unconditionally without a leading blank line.
97
+
98
+ Only ``reason == "binary_missing"`` entries get the install line —
99
+ other reasons (future: ``auth_expired``, ``parse_failed`` during
100
+ pre-flight probes) reuse the raw detail without an install hint.
101
+ """
102
+ lines: list[str] = []
103
+ for entry in skipped:
104
+ name = str(entry.get("member", "?"))
105
+ reason = str(entry.get("reason", ""))
106
+ detail = str(entry.get("detail", ""))
107
+ if reason != "binary_missing":
108
+ lines.append(
109
+ f"council:cli-skip · {name} · {reason or 'unknown'} · {detail}"
110
+ )
111
+ continue
112
+ hint = hint_for(name)
113
+ if hint is None:
114
+ lines.append(
115
+ f"council:cli-skip · {name} · binary not found · {detail}"
116
+ )
117
+ continue
118
+ _binary, url, one_liner = hint
119
+ lines.append(
120
+ f"council:cli-skip · {name} · binary not found · "
121
+ f"install: {one_liner} · docs: {url}"
122
+ )
123
+ return "\n".join(lines)