Skip to content

Commit 1c99906

Browse files
nick-inkeepclaude
andcommitted
docs: trim spec for conciseness and remove process references
Remove all references to internal PR evolution (#2052, #8), resolved open questions, and verbose explanations. Frame everything as current state → target state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c4109ae commit 1c99906

1 file changed

Lines changed: 18 additions & 65 deletions

File tree

docs/proposals/consolidate-optional-services.md

Lines changed: 18 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Optional local dev services (Nango, SigNoz, OTEL Collector, Jaeger) currently live in a separate companion repo (`inkeep/agents-optional-local-dev`). A bootstrap shim (`scripts/setup-optional.sh`) in the monorepo clones this companion repo into `.optional-services/` on demand and delegates to its `scripts/setup.sh` (352 lines of credential automation and Docker lifecycle management). The same shim is auto-synced to `create-agents-template/scripts/setup-optional.sh` via lint-staged.
66

7-
This two-repo architecture (established in recently-merged PRs #2052 and #8) creates coordination overhead (paired PRs, sync issues, merge conflicts across repos) without meaningful benefit — licensing research confirmed there's no legal barrier to inlining, and the companion repo's configs are small (~3.3MB).
7+
This two-repo architecture creates coordination overhead (paired PRs, sync across repos) without meaningful benefit — there's no legal barrier to inlining, and the companion repo's configs are small (~3.3MB).
88

99
**Goal:** Fully eliminate the companion repo by moving all optional service configs, Docker Compose definitions, and setup automation directly into the monorepo (and by extension, the `create-agents-template`). Every surface — scripts, docs, deployment guides, gitignore, AI tooling configs — must be updated. The companion repo is archived. No references to `agents-optional-local-dev` or `.optional-services/` remain anywhere in the monorepo. User-facing commands remain identical.
1010

11-
**Starting point:** The current merged state on `main` has:
12-
- Monorepo: `scripts/setup-optional.sh` (57-line shim), `.gitignore` entry for `.optional-services/`, docs referencing the companion repo, lint-staged syncing the shim to the template
13-
- Companion repo: `scripts/setup.sh` (352 lines), `docker-compose.yml`, config dirs (`nango/`, `signoz/`, `otel-collector/`), `.env.docker.example`, LICENSE, README, `nango-instructions.md`
14-
- Template: `create-agents-template/scripts/setup-optional.sh` (identical shim), `.gitignore` entry for `.optional-services/`
11+
**Current state:**
12+
- Monorepo: `scripts/setup-optional.sh` (57-line shim that clones companion repo), `.gitignore` entry for `.optional-services/`, docs referencing the companion repo
13+
- Companion repo: `scripts/setup.sh` (352 lines), `docker-compose.yml`, config dirs (`nango/`, `signoz/`, `otel-collector/`), `.env.docker.example`
14+
- Template: `create-agents-template/scripts/setup-optional.sh` (identical shim via lint-staged)
1515

1616
## 2. Consumers
1717

@@ -109,18 +109,7 @@ ENV_FILE="$REPO_ROOT/.env"
109109
- `--no-update` flag (no repo to update)
110110
- `COMPANION_DIR` / `CALLER_ENV_FILE` export interface
111111

112-
**What's preserved (copied from companion setup.sh):**
113-
- Docker Compose invocation with all 4 profiles
114-
- `set_env_var()` function (atomic env var writing)
115-
- `wait_for_http()` function (health check polling)
116-
- `get_env_var()` function (dotenv reading)
117-
- Nango credential flow (encryption key + UUID v4 secret key generation)
118-
- SigNoz credential flow (admin registration + PAT creation)
119-
- 9 env vars written to `.env`
120-
- 3 env vars written to `optional-services/.env`
121-
- `--stop`, `--status`, `--reset` subcommands
122-
- Pre-flight checks (Docker running, .env exists)
123-
- Error handling and timeout logic
112+
**What's preserved:** All logic from companion `setup.sh` — Docker Compose invocation with all 4 profiles, utility functions (`set_env_var`, `wait_for_http`, `get_env_var`), Nango credential flow, SigNoz credential flow, all 9+3 env vars, `--stop`/`--status`/`--reset` subcommands, pre-flight checks, and error handling.
124113

125114
**Docker Compose path change:**
126115
```bash
@@ -149,19 +138,7 @@ docker compose -f "$SERVICES_DIR/docker-compose.yml" ...
149138
}
150139
```
151140

152-
**How it works:**
153-
1. Developer edits a file in `optional-services/`
154-
2. Developer stages the change
155-
3. Pre-commit hook triggers lint-staged
156-
4. lint-staged matches the `optional-services/**/*` glob
157-
5. rsync copies the entire directory to `create-agents-template/optional-services/`
158-
6. `git add` stages the synced copy
159-
7. Commit includes both source and template copy
160-
161-
**Edge cases:**
162-
- File deletion: `rsync --delete` handles this (removes files from template that don't exist in source)
163-
- New files: rsync copies them automatically
164-
- Binary files: rsync handles these (e.g., `signoz/clickhouse/user_scripts/histogramQuantile`)
141+
rsync fires per-file (lint-staged limitation) but is idempotent. `--delete` handles file removals and binary files are handled transparently.
165142

166143
### 6.4 .gitignore Changes
167144

@@ -196,15 +173,7 @@ The `optional-services/` directory is now committed (it contains configs). Only
196173

197174
### 6.6 Package.json Scripts
198175

199-
**No changes needed.** All four scripts already point to `scripts/setup-optional.sh`:
200-
```json
201-
"setup-dev:optional": "sh scripts/setup-optional.sh",
202-
"optional:stop": "sh scripts/setup-optional.sh --stop",
203-
"optional:status": "sh scripts/setup-optional.sh --status",
204-
"optional:reset": "sh scripts/setup-optional.sh --reset"
205-
```
206-
207-
Same in `create-agents-template/package.json`.
176+
No changes needed — all four scripts already point to `scripts/setup-optional.sh`.
208177

209178
## 7. Surface Area Inventory — Complete Change List
210179

@@ -238,11 +207,11 @@ Every file that references the companion repo, `.optional-services/`, or the clo
238207
| 12 | `agents-docs/_snippets/setup-dev-optional-prereq.mdx` | all | References `pnpm setup-dev` | **No change** — no companion ref |
239208
| 13 | `agents-docs/_snippets/setup-dev-optional-lifecycle.mdx` | all | References lifecycle commands | **No change** — no companion ref |
240209

241-
### 7.4 Contributing / Environment Docs (CHECK)
210+
### 7.4 Contributing / Environment Docs
242211

243212
| # | File | Lines | Current | Change |
244213
|---|------|-------|---------|--------|
245-
| 14 | `agents-docs/content/community/contributing/environment-configuration.mdx` || May reference optional services setup | **Check and update** if references companion repo |
214+
| 14 | `agents-docs/content/community/contributing/environment-configuration.mdx` || May reference optional services setup | **Update** if references companion repo or `.optional-services/` |
246215

247216
### 7.5 Deployment Documentation (UPDATE)
248217

@@ -256,7 +225,7 @@ These 5 files tell self-hosted deployers to `git clone agents-optional-local-dev
256225
| 18 | `agents-docs/content/deployment/(docker)/aws-ec2.mdx` | 39 | Same clone command | **Replace** — same approach |
257226
| 19 | `agents-docs/content/deployment/(docker)/azure-vm.mdx` | 65 | Same clone command | **Replace** — same approach |
258227

259-
**Deployment docs update approach:** Replace companion repo clone with instructions to copy `optional-services/` from the monorepo. For self-hosted users who already have the monorepo cloned, this is `cp -r optional-services/ /path/to/deploy/inkeep-external-services`. For users deploying from scratch, they clone the monorepo and use the `optional-services/` directory.
228+
Replace companion repo clone with instructions to copy `optional-services/` from the monorepo.
260229

261230
### 7.6 AI Tooling / Internal Configs (CHECK)
262231

@@ -267,14 +236,7 @@ These 5 files tell self-hosted deployers to `git clone agents-optional-local-dev
267236

268237
### 7.7 Surfaces Confirmed Clean (no changes needed)
269238

270-
- Runtime code: `agents-api/`, `packages/agents-core/`, `packages/agents-sdk/`, all other packages
271-
- CLI: `agents-cli/`
272-
- UI: `agents-manage-ui/`
273-
- Cookbook: `agents-cookbook/`
274-
- `packages/create-agents/src/utils.ts` — template URL unchanged, content changes transitively
275-
- CI workflows: `.github/workflows/ci.yml`, `cypress.yml`, `release.yml` — no companion references
276-
- `turbo.json`, `pnpm-workspace.yaml` — no companion references
277-
- Core Docker Compose files: `docker-compose.yml`, `docker-compose.dbs.yml` — no companion references
239+
All runtime code (`agents-api/`, `packages/`), CLI, UI, cookbook, CI workflows, `turbo.json`, `pnpm-workspace.yaml`, and core Docker Compose files have no companion repo references.
278240

279241
## 8. Migration Path
280242

@@ -311,8 +273,7 @@ These 5 files tell self-hosted deployers to `git clone agents-optional-local-dev
311273
| D4 | Drop `OPTIONAL_SERVICES_DIR` env var override | PENDING | No longer needed (no clone), but may be useful for custom locations |
312274
| D5 | Drop `--no-update` flag | CONFIRMED | No external repo to update |
313275
| D6 | Archive (not delete) companion repo | CONFIRMED | Preserves history |
314-
| D7 | Update ALL docs including deployment guides | CONFIRMED | User requirement — total archive, no lingering references |
315-
| D8 | This is new work on a fresh branch | CONFIRMED | PRs #2052 and #8 are merged; consolidation builds on current main |
276+
| D7 | Update ALL docs including deployment guides | CONFIRMED | Total archive — no lingering references anywhere |
316277

317278
## 11. Open Questions
318279

@@ -336,15 +297,9 @@ These 5 files tell self-hosted deployers to `git clone agents-optional-local-dev
336297
- Mitigation: Test on both; the usage here is simple (`rsync -a --delete`) which is identical across versions
337298
- Alternative if rsync is problematic: use `cp -R` + manual deletion of stale files
338299

339-
4. **[RESOLVED — PRs merged] Impact on active PRs?**
340-
- PR #2052 and PR #8 are now merged to `main`. The consolidation is new work on a fresh branch.
341-
342-
5. **[Cross-cutting, P1] Deployment docs approach for self-hosted users**
343-
- After archiving the companion repo, self-hosted deployers need a new way to get the optional services configs
344-
- The configs will live in the monorepo under `optional-services/`
345-
- Deployers who clone the monorepo already have them
346-
- Deployers who only want the Docker configs can copy the directory or clone with sparse checkout
347-
- Recommendation: Update deployment docs to reference `optional-services/` in the monorepo, with copy instructions for standalone deployment
300+
4. **[Cross-cutting, P1] Deployment docs approach for self-hosted users**
301+
- After archiving the companion repo, deployment docs need to reference `optional-services/` in the monorepo
302+
- Deployers who clone the monorepo already have the configs; standalone deployers can copy the directory
348303

349304
## 12. Assumptions
350305

@@ -365,11 +320,9 @@ These 5 files tell self-hosted deployers to `git clone agents-optional-local-dev
365320

366321
## 14. Phases
367322

368-
### Phase 1 (This PR — new branch from main)
369-
370-
**Scope:** Full consolidation — move configs, rewrite script, sync template, update ALL docs and surfaces, archive companion repo.
323+
### Phase 1
371324

372-
**Starting point:** Current `main` with merged PRs #2052 and #8.
325+
**Scope:** Full consolidation — move configs, rewrite script, sync template, update all docs and surfaces, archive companion repo.
373326

374327
**Acceptance Criteria:**
375328

0 commit comments

Comments
 (0)