@event4u/agent-config 3.0.0 → 3.1.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 (207) hide show
  1. package/.agent-src/commands/install-via-agent.md +129 -0
  2. package/.agent-src/commands/video/from-script.md +1 -1
  3. package/.agent-src/commands/video.md +1 -1
  4. package/.agent-src/contexts/execution/cheap-question-mechanics.md +81 -0
  5. package/.agent-src/rules/caveman-speak.md +2 -2
  6. package/.agent-src/rules/context-hygiene.md +36 -0
  7. package/.agent-src/rules/engineering-safety-floor.md +102 -0
  8. package/.agent-src/rules/finance-safety-floor.md +114 -0
  9. package/.agent-src/rules/git-history-discipline.md +1 -1
  10. package/.agent-src/rules/no-cheap-questions.md +34 -32
  11. package/.agent-src/rules/provider-lifecycle-discipline.md +4 -4
  12. package/.agent-src/rules/strategy-safety-floor.md +114 -0
  13. package/.agent-src/skills/agents-md-thin-root/SKILL.md +15 -9
  14. package/.agent-src/skills/async-python-patterns/SKILL.md +1 -1
  15. package/.agent-src/skills/project-analysis-node-express/SKILL.md +1 -1
  16. package/.agent-src/skills/readme-reviewer/SKILL.md +52 -3
  17. package/.agent-src/skills/readme-writing/SKILL.md +52 -4
  18. package/.agent-src/skills/readme-writing-package/SKILL.md +48 -5
  19. package/.agent-src/skills/systematic-debugging/SKILL.md +41 -0
  20. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  21. package/.agent-src/templates/hooks/pre-commit-frontmatter +66 -0
  22. package/.agent-src/templates/hooks/pre-commit-roadmap-progress +78 -39
  23. package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +4 -1
  24. package/.agent-src/templates/scripts/work_engine/orchestration.py +25 -11
  25. package/.claude-plugin/marketplace.json +2 -1
  26. package/AGENTS.md +10 -8
  27. package/CHANGELOG.md +223 -125
  28. package/README.md +165 -553
  29. package/config/agent-settings.template.yml +0 -7
  30. package/config/discovery/packs.yml +20 -0
  31. package/config/discovery/unassigned-artefacts.yml +2 -0
  32. package/config/gitignore-block.txt +19 -3
  33. package/dist/cli/commands/uiServe.js +13 -4
  34. package/dist/cli/commands/uiServe.js.map +1 -1
  35. package/dist/cli/registry.js +2 -0
  36. package/dist/cli/registry.js.map +1 -1
  37. package/dist/discovery/deprecation-report.md +7 -0
  38. package/dist/discovery/discovery-manifest.json +2107 -1409
  39. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  40. package/dist/discovery/discovery-manifest.summary.md +9 -9
  41. package/dist/discovery/orphan-report.md +10 -0
  42. package/dist/discovery/packs.json +1002 -0
  43. package/dist/discovery/trust-report.md +26 -0
  44. package/dist/discovery/workspaces.json +705 -0
  45. package/dist/mcp/registry-manifest.json +4 -4
  46. package/dist/router.json +1623 -0
  47. package/dist/server/app.js +11 -3
  48. package/dist/server/app.js.map +1 -1
  49. package/dist/server/io/atomicMultiWrite.js +3 -1
  50. package/dist/server/io/atomicMultiWrite.js.map +1 -1
  51. package/dist/server/io/yamlIO.js +22 -0
  52. package/dist/server/io/yamlIO.js.map +1 -1
  53. package/dist/server/routes/ping.js +8 -0
  54. package/dist/server/routes/ping.js.map +1 -1
  55. package/dist/server/routes/schema.js +2 -2
  56. package/dist/server/routes/schema.js.map +1 -1
  57. package/dist/server/routes/settings.js +104 -23
  58. package/dist/server/routes/settings.js.map +1 -1
  59. package/dist/server/routes/userMd.js +37 -27
  60. package/dist/server/routes/userMd.js.map +1 -1
  61. package/dist/server/routes/wizard.js +256 -20
  62. package/dist/server/routes/wizard.js.map +1 -1
  63. package/dist/server/schemas/settings.js +0 -1
  64. package/dist/server/schemas/settings.js.map +1 -1
  65. package/dist/server/token.js +10 -3
  66. package/dist/server/token.js.map +1 -1
  67. package/dist/server/writeRoot.js +28 -11
  68. package/dist/server/writeRoot.js.map +1 -1
  69. package/dist/server/writeRoot.test.js +22 -4
  70. package/dist/server/writeRoot.test.js.map +1 -1
  71. package/dist/shared/userMd/formAdapter.js +29 -51
  72. package/dist/shared/userMd/formAdapter.js.map +1 -1
  73. package/dist/shared/userMd/schema.js +32 -104
  74. package/dist/shared/userMd/schema.js.map +1 -1
  75. package/dist/shared/userMd/utils.js +64 -50
  76. package/dist/shared/userMd/utils.js.map +1 -1
  77. package/dist/ui/assets/index-D-DY1ywI.js +35 -0
  78. package/dist/ui/assets/index-D-DY1ywI.js.map +1 -0
  79. package/dist/ui/index.html +1 -1
  80. package/docs/adrs/router/0001-three-tier-routing.md +5 -5
  81. package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +1 -1
  82. package/docs/architecture.md +3 -3
  83. package/docs/archive/CHANGELOG-pre-3.1.0.md +167 -0
  84. package/docs/catalog.md +30 -26
  85. package/docs/contracts/CHANGELOG-conventions.md +1 -1
  86. package/docs/contracts/agent-user-schema.md +6 -9
  87. package/docs/contracts/consumer-bridge.md +79 -0
  88. package/docs/contracts/discovery-manifest.md +209 -0
  89. package/docs/contracts/discovery-manifest.schema.json +77 -4
  90. package/docs/contracts/explain-trace.schema.json +1 -1
  91. package/docs/contracts/file-ownership-matrix.json +197 -13
  92. package/docs/contracts/frontmatter-contract.md +140 -0
  93. package/docs/contracts/gui-wizard.md +223 -0
  94. package/docs/contracts/installer-agent-mode.md +137 -0
  95. package/docs/contracts/kernel-membership.md +1 -1
  96. package/docs/contracts/mcp-tool-inventory.md +9 -9
  97. package/docs/contracts/namespace.md +6 -6
  98. package/docs/contracts/provider-lifecycle.md +5 -5
  99. package/docs/contracts/rule-router.md +4 -4
  100. package/docs/contracts/settings-api.md +53 -6
  101. package/docs/contracts/smoke-contracts.md +3 -3
  102. package/docs/contracts/trust-and-safety.md +144 -0
  103. package/docs/customization.md +2 -2
  104. package/docs/decisions/ADR-007-agent-discovery-scopes.md +12 -0
  105. package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +24 -0
  106. package/docs/decisions/ADR-015-discovery-manifest-contract.md +146 -0
  107. package/docs/decisions/ADR-016-installer-architecture.md +189 -0
  108. package/docs/decisions/ADR-017-monorepo-physical-layout.md +261 -0
  109. package/docs/decisions/ADR-018-trust-and-safety-layer.md +159 -0
  110. package/docs/decisions/ADR-019-router-json-dist-location.md +124 -0
  111. package/docs/decisions/ADR-020-global-only-consumer-scope.md +123 -0
  112. package/docs/decisions/ADR-021-deployment-shape.md +153 -0
  113. package/docs/decisions/INDEX.md +7 -0
  114. package/docs/deploy/connector-setup.md +129 -0
  115. package/docs/deploy/env-vars.md +70 -0
  116. package/docs/deploy/policy-cookbook.md +130 -0
  117. package/docs/deploy/quickstart.md +112 -0
  118. package/docs/distribution/public-install-smoke.md +68 -0
  119. package/docs/distribution/registries.md +55 -0
  120. package/docs/distribution/telemetry-privacy.md +128 -0
  121. package/docs/distribution/telemetry-schema.md +174 -0
  122. package/docs/featured-skills.md +95 -0
  123. package/docs/getting-started-by-role.md +19 -1
  124. package/docs/getting-started.md +2 -2
  125. package/docs/guidelines/agent-infra/installed-tools-manifest.md +11 -8
  126. package/docs/guidelines/docs/readme-size-and-splitting.md +53 -1
  127. package/docs/installation.md +27 -14
  128. package/docs/maintainers/dev-mode.md +105 -0
  129. package/docs/setup/per-ide/claude-desktop.md +3 -2
  130. package/docs/wizard.md +39 -4
  131. package/package.json +18 -1
  132. package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  133. package/scripts/_cli/cmd_doctor.py +150 -2
  134. package/scripts/_cli/cmd_explain.py +2 -1
  135. package/scripts/_cli/cmd_migrate_to_global.py +415 -0
  136. package/scripts/_cli/cmd_settings_migrate.py +146 -0
  137. package/scripts/_cli/explain_last/route.py +2 -1
  138. package/scripts/_dispatch.bash +36 -3
  139. package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  140. package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  141. package/scripts/_lib/agent_settings.py +4 -1
  142. package/scripts/_lib/agent_src.py +157 -0
  143. package/scripts/agent-config +17 -6
  144. package/scripts/audit_skill_descriptions.py +18 -6
  145. package/scripts/build_discovery_manifest.py +373 -17
  146. package/scripts/check_artefact_checksums.py +104 -0
  147. package/scripts/check_cluster_patterns.py +20 -4
  148. package/scripts/check_command_count_messaging.py +33 -14
  149. package/scripts/check_council_references.py +43 -4
  150. package/scripts/check_overlay_cascade_subdirs.py +7 -3
  151. package/scripts/check_references.py +5 -2
  152. package/scripts/check_reply_consistency.py +32 -9
  153. package/scripts/check_template_pin_drift.py +24 -7
  154. package/scripts/check_token_optimizer_freshness.py +18 -3
  155. package/scripts/compile_router.py +34 -2
  156. package/scripts/compress.py +162 -44
  157. package/scripts/config/presets.py +19 -1
  158. package/scripts/config/profiles.py +16 -1
  159. package/scripts/discovery_stats.py +70 -0
  160. package/scripts/expected_perms.json +47 -0
  161. package/scripts/generate_index.py +78 -46
  162. package/scripts/generate_ownership_matrix.py +98 -43
  163. package/scripts/generate_pack_manifests.py +183 -0
  164. package/scripts/install +18 -1
  165. package/scripts/install.py +934 -59
  166. package/scripts/install.sh +27 -9
  167. package/scripts/lint_agents_layout.py +93 -13
  168. package/scripts/lint_agents_md.py +1 -1
  169. package/scripts/lint_archived_skills.py +32 -16
  170. package/scripts/lint_bench_corpus.py +14 -2
  171. package/scripts/lint_command_tiers.py +15 -2
  172. package/scripts/lint_featured_skills.py +139 -0
  173. package/scripts/lint_framework_leakage.py +33 -6
  174. package/scripts/lint_global_paths.py +147 -0
  175. package/scripts/lint_orchestration_dsl.py +6 -3
  176. package/scripts/lint_pack_boundaries.py +147 -0
  177. package/scripts/lint_pack_first_win.py +103 -0
  178. package/scripts/lint_readme_jargon.py +131 -0
  179. package/scripts/lint_readme_size.py +33 -0
  180. package/scripts/lint_rule_interactions.py +23 -5
  181. package/scripts/lint_rule_tiers.py +12 -3
  182. package/scripts/lint_trust_coherence.py +212 -0
  183. package/scripts/measure_rule_budget.py +22 -4
  184. package/scripts/move_artefact.py +143 -0
  185. package/scripts/new_skill.py +148 -0
  186. package/scripts/plan_physical_move.py +353 -0
  187. package/scripts/refine_ticket_detect.py +30 -7
  188. package/scripts/schemas/command.schema.json +4 -0
  189. package/scripts/skill_linter.py +248 -118
  190. package/scripts/skill_trigger_eval.py +28 -8
  191. package/scripts/smoke/kernel.sh +1 -1
  192. package/scripts/smoke/router.sh +24 -5
  193. package/scripts/smoke/skills.sh +15 -7
  194. package/scripts/smoke_quickstart.py +11 -2
  195. package/scripts/snapshot_agent_outputs.py +144 -0
  196. package/scripts/update_counts.py +45 -17
  197. package/scripts/validate_decision_engine.py +9 -1
  198. package/scripts/validate_discovery_manifest.py +94 -0
  199. package/scripts/validate_frontmatter.py +39 -20
  200. package/scripts/verify_physical_move.py +185 -0
  201. package/templates/agent-user.md +0 -1
  202. package/templates/agent-user.yml +21 -0
  203. package/templates/minimal/agents-overrides-readme.md +46 -0
  204. package/templates/minimal/overrides-gitkeep +2 -0
  205. package/dist/ui/assets/index-BTRcKDlB.js +0 -39
  206. package/dist/ui/assets/index-BTRcKDlB.js.map +0 -1
  207. package/templates/minimal/agents-gitkeep +0 -2
@@ -0,0 +1,129 @@
1
+ # Connector setup — internal AI OS
2
+
3
+ > **Status**: 🚧 **skeleton**. Phase 5 of
4
+ > [`road-to-internal-ai-os-deployment.md`](../../agents/roadmaps/road-to-internal-ai-os-deployment.md)
5
+ > is **not yet implemented**. Phase 5 is contingent on Phase 2 (SSO)
6
+ > and Phase 3 (central policy) shipping first.
7
+ >
8
+ > Open design questions live in
9
+ > [`agents/tmp/council-question-connector-scope.md`](../../agents/tmp/council-question-connector-scope.md).
10
+
11
+ ## Audience
12
+
13
+ An admin at a deploying organization who wants the AI OS to read
14
+ tickets / PRs / Slack threads to ground its plans in the org's actual
15
+ state of work.
16
+
17
+ ## Launch set (planned)
18
+
19
+ | Connector | Read | Write | OAuth shape |
20
+ |---|---|---|---|
21
+ | Linear | v1 | v2 (gated) | per-org app install |
22
+ | GitHub | v1 | v2 (gated) | GitHub App (per-org) |
23
+ | Jira Cloud | v1 | v2 (gated) | per-user OAuth |
24
+ | Slack | v1 | v2 (gated) | per-org app install |
25
+ | Notion | v1 | — | per-user OAuth |
26
+
27
+ **v1** = read-only · **v2** = write paths, each behind explicit org
28
+ policy gate (see [`policy-cookbook.md`](policy-cookbook.md) →
29
+ `connectors.write_enabled`).
30
+
31
+ ## OAuth contract (planned)
32
+
33
+ Each connector lands one of two shapes:
34
+
35
+ ### Per-org app install
36
+
37
+ Admin installs the app once at the org level. Every authenticated
38
+ user inherits read access. Best for Linear / GitHub / Slack where
39
+ the data is org-shared.
40
+
41
+ ### Per-user OAuth
42
+
43
+ Each engineer authorizes their own account. The wizard surfaces a
44
+ per-user "Connect Jira" / "Connect Notion" panel. Best where data is
45
+ user-scoped or per-user permission boundaries matter.
46
+
47
+ ## Token storage (planned)
48
+
49
+ OAuth tokens land in Postgres encrypted with the deployment's
50
+ `SESSION_SECRET` derivative. Rotation happens automatically on
51
+ refresh-token success. A `connector_token_rotated` audit event lands
52
+ on each rotation.
53
+
54
+ ## Rate limits & cost (planned)
55
+
56
+ | Connector | Cost model | Default cache TTL |
57
+ |---|---|---|
58
+ | Linear | Free, generous quota | 5 min for tickets, 1 min for comments |
59
+ | GitHub | 5,000 / hr per token | 10 min for PRs, 2 min for reviews |
60
+ | Jira Cloud | 10 / sec per app | 5 min |
61
+ | Slack | Tier 2 (~20 / min) | 1 min for threads |
62
+ | Notion | 3 / sec per integration | 10 min |
63
+
64
+ The wizard surfaces per-connector cost in the admin panel; user-facing
65
+ flows hide it.
66
+
67
+ ## Setup walkthrough (planned)
68
+
69
+ ### Linear
70
+
71
+ ```text
72
+ 1. Admin → Linear workspace settings → API → OAuth applications.
73
+ 2. Create app, set redirect URI to https://your.host/oauth/linear/callback.
74
+ 3. Copy client_id + client_secret into the AI OS admin panel.
75
+ 4. Authorize once at the org level.
76
+ ```
77
+
78
+ ### GitHub
79
+
80
+ ```text
81
+ 1. Admin → org settings → Developer settings → GitHub Apps → New.
82
+ 2. Permissions: read on Issues, Pull Requests, Contents, Metadata.
83
+ 3. Install on selected repos (or all).
84
+ 4. Copy app_id + private_key into the AI OS admin panel.
85
+ ```
86
+
87
+ ### Jira Cloud
88
+
89
+ ```text
90
+ 🚧 Per-user OAuth flow; each engineer connects on first use.
91
+ ```
92
+
93
+ ### Slack
94
+
95
+ ```text
96
+ 1. Admin → Slack app directory → Create app → from manifest.
97
+ 2. Manifest ships at packages/core/deploy/connectors/slack.manifest.yml
98
+ (does not yet exist).
99
+ 3. Install in workspace, copy bot token + signing secret.
100
+ ```
101
+
102
+ ### Notion
103
+
104
+ ```text
105
+ 🚧 Per-user OAuth flow.
106
+ ```
107
+
108
+ ## Hard-Floor caveats
109
+
110
+ - OAuth token storage → **security-sensitive**, human-reviewed PR.
111
+ - Write paths (v2) → **explicit org-policy gate** before merge.
112
+ - Third-party data caching → cross-tenant isolation review before
113
+ merge (a stray cache-key collision exposes org A's data to org B).
114
+
115
+ ## What's not yet here
116
+
117
+ - No connector code exists in the repo.
118
+ - No OAuth callback routes are registered.
119
+ - No admin panel for connector management.
120
+ - No token-storage schema.
121
+
122
+ All of the above land in Phase 5, contingent on Phases 2 + 3.
123
+
124
+ ## Cross-references
125
+
126
+ - 🚧 Reserved ADR slot: `docs/decisions/ADR-025-connector-scope.md`.
127
+ - Council question: [`agents/tmp/council-question-connector-scope.md`](../../agents/tmp/council-question-connector-scope.md).
128
+ - Quickstart: [`quickstart.md`](quickstart.md).
129
+ - Policy cookbook: [`policy-cookbook.md`](policy-cookbook.md).
@@ -0,0 +1,70 @@
1
+ # Environment variable contract — `agent-config` deployment
2
+
3
+ Phase 1 of [`road-to-internal-ai-os-deployment.md`](../../agents/roadmaps/road-to-internal-ai-os-deployment.md).
4
+ Decision shape: [`ADR-021`](../decisions/ADR-021-deployment-shape.md).
5
+
6
+ This file is the **single source of truth** for environment variables
7
+ read by the deployed container. Every knob below is consumed by either
8
+ the GUI server (TypeScript) or the embedded Python install supervisor.
9
+
10
+ | Variable | Required | Default | Phase | Meaning |
11
+ |---|---|---|---|---|
12
+ | `BIND_HOST` | no | `127.0.0.1` | 1 | Bind address. Set to `0.0.0.0` for container deployments; non-loopback REQUIRES `ALLOWED_HOSTS`. |
13
+ | `GUI_PORT` | no | `8787` | 1 | TCP port the wizard listens on. CLI override: `--port`. |
14
+ | `ALLOWED_HOSTS` | when host ≠ loopback | derived | 1 | Comma-separated `host:port` allowlist for the Host-header gate. Reverse-proxy hostnames go here. |
15
+ | `STORAGE_MODE` | no | `filesystem` | 1+ | `filesystem` (Phase 1) or `postgres` (Phase 2+). Audit log + memory backend. |
16
+ | `SESSION_BACKEND` | no | `memory` | 1+ | `memory` (Phase 1) or `redis` (Phase 3+). Wizard session + per-user state. |
17
+ | `AGENT_CONFIG_PROJECT_ROOT` | no | `/var/lib/agent-config/runtime` | 1 | Mountpoint the container treats as the consumer "project root". |
18
+ | `AGENT_CONFIG_GUI_NO_OPEN` | no | `1` (in image) | 1 | Set to suppress the browser-launch attempt — required in headless containers. |
19
+ | `AUTH_MODE` | no | `none` | 2 | `none` \| `oidc` \| `saml`. **Not yet read by the server** — placeholder for Phase 2. |
20
+ | `OIDC_ISSUER_URL` | yes when `AUTH_MODE=oidc` | — | 2 | OIDC discovery URL. Not yet consumed. |
21
+ | `OIDC_CLIENT_ID` | yes when `AUTH_MODE=oidc` | — | 2 | Not yet consumed. |
22
+ | `OIDC_CLIENT_SECRET` | yes when `AUTH_MODE=oidc` | — | 2 | Not yet consumed. Read from secret manager only. |
23
+ | `POLICY_PATH` | no | `/etc/event4u/policy.yaml` | 3 | Central org-policy YAML mount path. **Not yet read by the server** — placeholder for Phase 3. |
24
+ | `DATABASE_URL` | yes when `STORAGE_MODE=postgres` | — | 2+ | Postgres connection string. Compose-default points at the bundled service. |
25
+ | `REDIS_URL` | yes when `SESSION_BACKEND=redis` | — | 3+ | Redis connection string. Compose-default points at the bundled service. |
26
+
27
+ ## What ships honoring these vs not
28
+
29
+ **Honored today (Phase 1):**
30
+
31
+ - `BIND_HOST` — server respects `--host` flag and `BIND_HOST` env.
32
+ - `GUI_PORT` / `--port` — server listens on this port.
33
+ - `ALLOWED_HOSTS` — `Host:`-header allowlist for the GUI gate.
34
+ - `STORAGE_MODE` / `SESSION_BACKEND` — surfaced in `/api/v1/health`
35
+ responses but **storage and session implementations still default
36
+ to filesystem and memory**. Setting them to `postgres` / `redis`
37
+ in Phase 1 has no effect on storage behavior (and the health
38
+ response will tell you so).
39
+ - `AGENT_CONFIG_PROJECT_ROOT` — the container's runtime mount.
40
+ - `AGENT_CONFIG_GUI_NO_OPEN` — auto-set to `1` in the shipped image
41
+ so the wizard does not try to `xdg-open` a browser from inside a
42
+ container.
43
+
44
+ **Documented now, wired later:**
45
+
46
+ - `AUTH_MODE` and its OIDC dependents — Phase 2.
47
+ - `POLICY_PATH` — Phase 3.
48
+ - `DATABASE_URL` / `REDIS_URL` — Phase 2 / Phase 3 respectively.
49
+
50
+ ## Security posture
51
+
52
+ - **Secrets stay in env or a mounted secret manager.** Never bake
53
+ `OIDC_CLIENT_SECRET`, `DATABASE_URL` with a password, or
54
+ `POSTGRES_PASSWORD` into the image. Compose uses host-env or
55
+ `.env` files; production uses your secrets manager of choice.
56
+ - **`BIND_HOST=0.0.0.0` without `ALLOWED_HOSTS`** — server refuses
57
+ to start. This is intentional: a non-loopback bind without a
58
+ Host-header allowlist is an open invitation for DNS rebinding.
59
+ See [`ADR-021`](../decisions/ADR-021-deployment-shape.md) § Security.
60
+ - **`/api/v1/health`** is the only endpoint exempt from CSRF, but it
61
+ is rate-limited to 1 request per second per remote IP and exposes
62
+ no secrets.
63
+
64
+ ## Cross-references
65
+
66
+ - Image + compose: [`packages/core/deploy/`](../../packages/core/deploy/)
67
+ - ADR: [`ADR-021-deployment-shape.md`](../decisions/ADR-021-deployment-shape.md)
68
+ - Operator quickstart: [`quickstart.md`](quickstart.md)
69
+ - Policy cookbook (Phase 3 preview): [`policy-cookbook.md`](policy-cookbook.md)
70
+ - Connector setup (Phase 5 preview): [`connector-setup.md`](connector-setup.md)
@@ -0,0 +1,130 @@
1
+ # Policy cookbook — internal AI OS
2
+
3
+ > **Status**: 🚧 **skeleton**. Phase 3 of
4
+ > [`road-to-internal-ai-os-deployment.md`](../../agents/roadmaps/road-to-internal-ai-os-deployment.md)
5
+ > is **not yet implemented**. This file documents the **shape** that
6
+ > central org policy will take so operators can review the contract
7
+ > before code lands. Every section below is normative-once-shipped.
8
+ >
9
+ > Open design questions live in
10
+ > [`agents/tmp/council-question-central-policy.md`](../../agents/tmp/council-question-central-policy.md).
11
+
12
+ ## Audience
13
+
14
+ An admin at a deploying organization who needs to set org-wide floors
15
+ (and ceilings) that individual users cannot escape.
16
+
17
+ ## File location (planned)
18
+
19
+ ```text
20
+ /etc/event4u/policy.yaml # inside the container
21
+ ${POLICY_PATH:-./policy.yaml} # bind-mounted from the host
22
+ ```
23
+
24
+ The file is the source of truth. A future admin UI generates this
25
+ file, never the other way around.
26
+
27
+ ## Inheritance model (planned)
28
+
29
+ ```text
30
+ default → org policy → user settings
31
+ ↑ ↑
32
+ | └── user-only knobs (preferred name,
33
+ | IDE, bot icon)
34
+ └── shared knobs (autonomy ceiling, redaction
35
+ allowlist, provider allowlist, cost cap) —
36
+ org wins; user cannot escape upward.
37
+ ```
38
+
39
+ ## Schema sketch (planned)
40
+
41
+ ```yaml
42
+ # /etc/event4u/policy.yaml — example, not yet enforced.
43
+ version: 1
44
+
45
+ autonomy:
46
+ ceiling: review # never | review | apply-low | apply-medium
47
+ user_can_lower: true
48
+
49
+ redaction:
50
+ allowlist_paths: [] # paths users are allowed to disable redaction for
51
+ block_paths: # paths where redaction is mandatory
52
+ - "**/secrets/**"
53
+ - "**/credentials/**"
54
+
55
+ providers:
56
+ allowlist:
57
+ - openai
58
+ - anthropic
59
+ cost_cap_usd_per_day_per_user: 25
60
+ cost_cap_usd_per_day_total: 500
61
+
62
+ audit:
63
+ retention_days: 90
64
+ include_read_actions: false # only state-changing requests by default
65
+ ```
66
+
67
+ ## Recipes (planned)
68
+
69
+ ### Lock autonomy at "review" for all users
70
+
71
+ ```yaml
72
+ autonomy:
73
+ ceiling: review
74
+ user_can_lower: false
75
+ ```
76
+
77
+ ### Cap monthly spend per user
78
+
79
+ ```yaml
80
+ providers:
81
+ cost_cap_usd_per_day_per_user: 5 # ≈ $150/mo at max
82
+ ```
83
+
84
+ ### Restrict providers to those with EU data residency
85
+
86
+ ```yaml
87
+ providers:
88
+ allowlist:
89
+ - anthropic-eu
90
+ - mistral
91
+ ```
92
+
93
+ ### Mandate redaction for `infrastructure/`
94
+
95
+ ```yaml
96
+ redaction:
97
+ block_paths:
98
+ - "infrastructure/**"
99
+ ```
100
+
101
+ ## Hot reload (planned)
102
+
103
+ The server will watch `POLICY_PATH` and apply changes within ~2 s
104
+ without a restart. Sessions are not invalidated; only new
105
+ permissions checks see the new policy. A `policy_reloaded` audit
106
+ event lands on each successful reload.
107
+
108
+ ## Versioning (planned)
109
+
110
+ Operators are expected to check `policy.yaml` into their **own** git
111
+ repo (separate from this project) and mount it read-only into the
112
+ container. `version: 1` is the only currently-defined schema version;
113
+ breaking changes will bump the version + ship a migrator.
114
+
115
+ ## What's not yet here
116
+
117
+ - Schema is not validated by the running server.
118
+ - Hot-reload is not wired.
119
+ - Admin UI does not exist.
120
+ - Audit log table does not exist.
121
+
122
+ All of the above land in Phase 3. Until then, per-user
123
+ `.agent-settings.yml` is the only enforcement surface.
124
+
125
+ ## Cross-references
126
+
127
+ - 🚧 Reserved ADR slot: `docs/decisions/ADR-023-central-policy.md`.
128
+ - Council question: [`agents/tmp/council-question-central-policy.md`](../../agents/tmp/council-question-central-policy.md).
129
+ - Env contract: [`env-vars.md`](env-vars.md) (`POLICY_PATH`).
130
+ - Quickstart: [`quickstart.md`](quickstart.md).
@@ -0,0 +1,112 @@
1
+ # Quickstart — internal AI OS
2
+
3
+ > **Status**: skeleton. Phase 6 of
4
+ > [`road-to-internal-ai-os-deployment.md`](../../agents/roadmaps/road-to-internal-ai-os-deployment.md).
5
+ > The artefacts referenced (Compose, env contract, healthcheck) land in
6
+ > Phase 1; **Phases 2–5 (auth, policy, team context, connectors) are
7
+ > not yet implemented**. Sections flagged `🚧` describe surfaces that
8
+ > only become real after those phases ship.
9
+
10
+ ## Audience
11
+
12
+ A platform / DevOps engineer at a 5–50-person company who wants to
13
+ host `@event4u/agent-config` once for the team behind their existing
14
+ reverse proxy.
15
+
16
+ ## Prerequisites
17
+
18
+ - Docker Engine ≥ 24 with Compose v2.
19
+ - Reverse proxy (nginx / Caddy / Traefik / ALB) terminating TLS at
20
+ a hostname you control.
21
+ - One free TCP port to forward to the container (default 8787).
22
+ - 🚧 **Phase 2+** — your company's SSO / OIDC discovery URL + client
23
+ credentials.
24
+
25
+ ## Five-minute path
26
+
27
+ ```bash
28
+ # 1. Clone the deployment artefacts.
29
+ git clone https://github.com/event4u-app/agent-config.git
30
+ cd agent-config/packages/core/deploy
31
+
32
+ # 2. Copy and edit the environment file.
33
+ cp .env.example .env
34
+ ${EDITOR:-vi} .env
35
+ # Required: ALLOWED_HOSTS=your.host:443
36
+ # Required: POSTGRES_PASSWORD=<long random>
37
+
38
+ # 3. Boot.
39
+ docker compose up -d
40
+
41
+ # 4. Verify.
42
+ curl -fsS http://127.0.0.1:8787/api/v1/health | jq
43
+ # {
44
+ # "status": "ok",
45
+ # "version": "x.y.z",
46
+ # "uptime_seconds": 12,
47
+ # "storage_mode": "filesystem",
48
+ # "session_backend": "memory",
49
+ # ...
50
+ # }
51
+ ```
52
+
53
+ ## Environment contract
54
+
55
+ The full table of variables, their defaults, and validation rules
56
+ lives in [`env-vars.md`](env-vars.md). The minimum a production
57
+ deployment must override:
58
+
59
+ - `ALLOWED_HOSTS` — comma-separated host\:port allowlist for the
60
+ `Host` header. Non-loopback bind without this **refuses to boot**.
61
+ - `POSTGRES_PASSWORD` — `agent-config` user's password.
62
+ - `SESSION_SECRET` — 32-byte random; rotates user sessions when
63
+ changed.
64
+ - 🚧 **Phase 2+** — `AUTH_MODE=oidc` + `OIDC_*` block.
65
+
66
+ ## Reverse-proxy template (Caddy)
67
+
68
+ ```caddyfile
69
+ your.host {
70
+ reverse_proxy 127.0.0.1:8787
71
+ }
72
+ ```
73
+
74
+ The container ships plain HTTP; TLS is the proxy's job. See ADR-021
75
+ for the rationale.
76
+
77
+ ## Healthcheck
78
+
79
+ Every 10 s the Compose `agent-config` service hits
80
+ `/api/v1/health` (1-rps rate limit means this lands inside the
81
+ budget). A non-200 response for two consecutive cycles flips the
82
+ service to `unhealthy` and the orchestrator restarts it.
83
+
84
+ ## What's not yet here
85
+
86
+ | Capability | Phase | Status |
87
+ |---|---|---|
88
+ | SSO / OIDC login | 2 | 🚧 deferred (security-sensitive) |
89
+ | Central org policy | 3 | 🚧 deferred |
90
+ | Team context (shared rules / skills) | 4 | 🚧 deferred |
91
+ | Linear / GitHub / Slack connectors | 5 | 🚧 deferred |
92
+
93
+ Until those land, the deployed instance is a **single-tenant** AI OS
94
+ shared via the reverse proxy. Lock the proxy down with HTTP basic
95
+ auth or an IP allowlist for v1.
96
+
97
+ ## Troubleshooting
98
+
99
+ - **Container exits with `BIND_HOST=0.0.0.0 requires ALLOWED_HOSTS`** —
100
+ add `ALLOWED_HOSTS` to `.env` and `docker compose up -d` again.
101
+ - **`/api/v1/health` returns 503 with `storage_unavailable`** —
102
+ Postgres has not finished its first-boot init. Wait 15 s and retry.
103
+ - **Wizard 404s on every route** — reverse proxy is stripping the
104
+ `Host` header; either preserve it (`proxy_set_header Host $host`)
105
+ or add the proxy hostname to `ALLOWED_HOSTS`.
106
+
107
+ ## Cross-references
108
+
109
+ - ADR-021 — [deployment shape](../decisions/ADR-021-deployment-shape.md).
110
+ - Env contract — [env-vars.md](env-vars.md).
111
+ - 🚧 Policy guide — [policy-cookbook.md](policy-cookbook.md) (Phase 3).
112
+ - 🚧 Connector setup — [connector-setup.md](connector-setup.md) (Phase 5).
@@ -0,0 +1,68 @@
1
+ # Public Install Smoke
2
+
3
+ Cross-platform install matrix for the two consumer entrypoints.
4
+
5
+ > **Authority** — Phase 1 of [`road-to-product-adoption.md`](../../agents/roadmaps/road-to-product-adoption.md). The matrix is the regression guard for Phases 3–5 of that roadmap.
6
+
7
+ ## What the matrix runs
8
+
9
+ Workflow: [`.github/workflows/smoke-public-install.yml`](../../.github/workflows/smoke-public-install.yml).
10
+
11
+ | Axis | Values | Total |
12
+ |---|---|---|
13
+ | OS | `ubuntu-latest` · `macos-latest` · `windows-latest` | 3 |
14
+ | Node | `20` · `22` | 2 |
15
+ | Install path | `setup.sh` (curl) · `agent-config init` (npx bin) · `--dry-run --yes` headless leg | 3 |
16
+ | Total legs | | **18** |
17
+
18
+ Each leg builds a local tarball from the current checkout, extracts it, then invokes the consumer entrypoint against a temp project root. The matrix proves "our installer is correct" — not "the npm registry is reachable".
19
+
20
+ ## Triggers
21
+
22
+ | Trigger | Purpose |
23
+ |---|---|
24
+ | Pull request (path-filtered) | Catch regressions before merge when installer files change |
25
+ | Push to `main` / `master` | Lock the baseline so a green main can be released without surprises |
26
+ | Weekly cron `0 6 * * 1` (Mon 06:00 UTC) | Catch drift from upstream toolchain / registry changes even when no PR touched our installer |
27
+ | `workflow_dispatch` | Manual run for incident triage |
28
+
29
+ ## What the matrix proves
30
+
31
+ - `curl … setup.sh \| bash` resolves a tarball, extracts it, runs `scripts/install`, exits 0 on every OS / Node combination.
32
+ - `npx @event4u/agent-config init` (simulated via `scripts/agent-config init` on the extracted tarball) writes `.claude/` and `.agent-settings.yml` to the target project on every OS / Node combination.
33
+ - The headless `--dry-run --yes` leg accepts non-interactive flags, produces no file writes, exits 0.
34
+
35
+ ## What the matrix deliberately does NOT prove
36
+
37
+ - **Provider credentials.** No OpenAI / Anthropic keys in CI; the `agent-config setup` wizard's provider validation step is exercised by unit tests in `tests/cli/` and `packages/core/installer/tests/`, not this matrix.
38
+ - **The GUI wizard in a real browser.** The `ui:serve` boot path is covered by `vitest` (`tests/cli/uiServe.test.ts`); end-to-end wizard interactions are deferred to a follow-up roadmap.
39
+ - **Network fetch from the public npm registry.** The matrix uses a local tarball on purpose so a flaky registry doesn't fail the smoke. Real-registry health is covered by `publish-npm.yml` after release.
40
+ - **Tooling beyond `claude-code`.** The matrix installs a single tool target to keep wall-clock short. The full per-tool matrix lives in [`tests.yml`](../../.github/workflows/tests.yml) (`install-tests` job, sharded × 4).
41
+
42
+ ## Failure policy
43
+
44
+ - Any leg red → **block merge** (status check required on `main`).
45
+ - Weekly cron red → file an issue with the `regression` label and the failing leg's URL; do not auto-retry.
46
+ - A leg that flakes twice in 14 days → freeze, audit `tests/test_one_liner_entrypoints.sh` for non-determinism, only un-freeze after a green run on three consecutive cron cycles.
47
+
48
+ ## Adapting the test scope
49
+
50
+ The matrix invokes [`tests/test_one_liner_entrypoints.sh`](../../tests/test_one_liner_entrypoints.sh) plus the inline dry-run leg. Adding a new install path means adding a `test_*` function to that shell script — the matrix picks it up automatically.
51
+
52
+ ## Roadmap deviations
53
+
54
+ The Phase 1 roadmap referenced two surfaces that never landed in code:
55
+
56
+ | Roadmap text | Reality | Adaptation |
57
+ |---|---|---|
58
+ | `--no-ui` flag | CLI surface is `--yes` (non-interactive) + `--dry-run` (no writes) | Headless leg uses `--yes --dry-run` |
59
+ | `AGENT_CONFIG_NO_UI=1` env | Not implemented; non-interactive mode is detected via stdin TTY + `--yes` | Same — `--yes` is the canonical CI-safe entry |
60
+
61
+ These deviations are recorded here so a future maintainer reading the roadmap doesn't search for flags that don't exist. The intent of the roadmap step — prove the installer survives headless CI — is preserved.
62
+
63
+ ## See also
64
+
65
+ - [`tests/test_one_liner_entrypoints.sh`](../../tests/test_one_liner_entrypoints.sh) — the smoke harness invoked per matrix leg.
66
+ - [`scripts/install`](../../scripts/install) — the consumer-facing installer orchestrator.
67
+ - [`.github/workflows/tests.yml`](../../.github/workflows/tests.yml) — the broader install integration matrix (Linux + macOS, 35 tests × 4 shards).
68
+ - [`agents/roadmaps/road-to-product-adoption.md`](../../agents/roadmaps/road-to-product-adoption.md) — parent roadmap and acceptance criteria.
@@ -0,0 +1,55 @@
1
+ # External Registry Submissions
2
+
3
+ Track third-party registries / directories we want this package to surface in. Submissions are **human-owner** — they require a GitHub account interacting with another org's PR review or with the GitHub UI to flip settings.
4
+
5
+ > **Authority** — Phase 2 of [`road-to-product-adoption.md`](../../agents/roadmaps/road-to-product-adoption.md). The autonomous roadmap pass cannot open PRs in third-party repos; this file is the handoff.
6
+
7
+ ## Submission status
8
+
9
+ | # | Registry | URL | Submission shape | Status | PR link |
10
+ |---|---|---|---|---|---|
11
+ | 1 | `punkpeye/awesome-mcp-servers` | <https://github.com/punkpeye/awesome-mcp-servers> | One-line entry under the agent-tooling section, links to `README.md` hero anchor | ⬜ open | — |
12
+ | 2 | `mcp.so` | <https://mcp.so/> | Submit via the directory form; same one-line shape | ⬜ open | — |
13
+ | 3 | `mcpservers.org` | <https://mcpservers.org/> | Submit via the directory form; same one-line shape (verify URL current at submission time) | ⬜ open | — |
14
+
15
+ ## Submission template
16
+
17
+ Use this exact text for the awesome-list entry. Adjust the link anchor per directory.
18
+
19
+ ```markdown
20
+ - [event4u/agent-config](https://github.com/event4u-app/agent-config#readme) — Universal AI Agent OS. Audited skills, governance rules, commands, and templates for Claude Code, Cursor, Windsurf, Copilot. Bring your own provider.
21
+ ```
22
+
23
+ ## Submission checklist
24
+
25
+ Before opening any submission PR:
26
+
27
+ - [ ] `README.md` hero block is the current shape (no stale claims).
28
+ - [ ] `Public install smoke (3 OS × 2 Node)` badge is green on `main` for the last 3 cron cycles.
29
+ - [ ] `package.json` `keywords` mirror `.github/topics.yml` `topics:` list (audit per Phase 2.4).
30
+ - [ ] `LICENSE` and `CONTRIBUTING.md` are current.
31
+
32
+ ## GitHub Discussions
33
+
34
+ Roadmap Phase 2 Step 5 calls for opening three Discussions categories: `Show & Tell`, `Q&A`, `Ideas`. This requires repo-admin in the GitHub UI (Settings → Features → Discussions). The README hero should then link to Discussions, not Issues, for first-touch questions.
35
+
36
+ - [ ] Discussions enabled at `https://github.com/event4u-app/agent-config/discussions`
37
+ - [ ] Three categories created: `Show & Tell`, `Q&A`, `Ideas` (no more — keep the surface narrow)
38
+ - [ ] README hero updated to link to Discussions for first-touch questions
39
+
40
+ ## Audit cadence
41
+
42
+ Run a topic / keyword reality check **every quarter**:
43
+
44
+ 1. Run three search queries on GitHub: `AI agent governance`, `MCP skill registry`, `AI video pipeline`.
45
+ 2. For each, verify this repo surfaces within page 2.
46
+ 3. If not, audit `.github/topics.yml` for missing topics and `package.json` `keywords` for alignment.
47
+ 4. Update `notes:` / `equivalents:` in `.github/topics.yml` and re-run `task sync-github-topics`.
48
+
49
+ ## See also
50
+
51
+ - [`.github/topics.yml`](../../.github/topics.yml) — source of truth for GitHub topics.
52
+ - [`package.json`](../../package.json) — `keywords` array, must mirror topics by category.
53
+ - [`docs/distribution/topics-equivalents-decay-policy.md`](./topics-equivalents-decay-policy.md) — when to add / retire `equivalents:` entries.
54
+ - [`docs/distribution/mcp-submission-checklist.md`](./mcp-submission-checklist.md) — MCP-specific submission checklist.
55
+ - [`agents/roadmaps/road-to-product-adoption.md`](../../agents/roadmaps/road-to-product-adoption.md) — parent roadmap.