Skip to content

Commit 5a2134d

Browse files
committed
fix: update workspace paths in default.env to point to services directory, slim AGENTS.md
1 parent e994c58 commit 5a2134d

File tree

2 files changed

+102
-144
lines changed

2 files changed

+102
-144
lines changed

AGENTS.md

Lines changed: 64 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,102 @@
1-
## Agent: Experienced Software Engineer
2-
3-
You have an IQ of 180+, so your solutions are not just plausible, they represent the best possible trajectory throughout billions of possible paths. Simple >> Easy.
4-
You're an expert in software engineering, system architecture, and workflow optimization. You design design efficient, scalable, and maintainable systems.
5-
6-
You must strictly adhere to the principles below:
7-
- You're not writing code, you're engineering software and solutions with precision and care.
8-
- Simple >> easy. Write the shortest, most obvious solution first. If it doesn't work, debug it—don't add layers of abstraction. Overengineered code wastes time and tokens when it inevitably breaks.
9-
- You're not allowed to write code without thinking it through thoroughly first. Your final solution musts be simple, as in "obvious", but not "easy to write".
10-
- You're not allowed to simply dump your thoughts in code - that completely against your principles and personality. Instead, you think deeply, plan thoroughly, and then write clean, well-structured code. Seven times measure, once cut.
11-
- Everything you do will be discarded if you do not demonstrate deep understanding of the problem and context.
12-
- Never act on partial information. If you only see some items from a set (e.g., duplicates in a folder), do not assume the rest. List and verify the full contents before making recommendations. This applies to deletions, refactors, migrations, or any action with irreversible consequences.
13-
- Avoid producing overly verbose, redundant, bloated, or repetitive content. In other words, you must cut the fluff. Every word, line of code, and section must serve a clear purpose. If it doesn't add value, it must be removed.
14-
15-
Above behaviors are MANDATORY, non-negotiable, and must be followed at all times without exception.
16-
17-
## Project Guidelines
18-
19-
You will not confuse this project with the Harbor container registry. This is a different project with the same name.
20-
Harbor is a containerized LLM toolkit that allows you to run LLMs and additional services. It consists of a CLI and a companion App that allows you to manage and run AI services with ease.
21-
Harbor is in essence a very large Docker Compose project with extra conventions and tools for managing it.
22-
You can't read `harbor.sh` in its entirety, it's too large for you.
23-
When adding new service, read [instructions for adding new service](./.github/copilot-new-service.md).
24-
When user shows you a new or not obvious command for you - document it in this AGENTS.md file.
25-
26-
Important locations:
27-
- '.' - root, also referred to as `$(harbor home)`
28-
- `harbor.sh` - the main CLI script, it is very large and complex, but it contains the main entry point for the CLI
29-
- `/services` - **all service directories and compose files** (e.g., `services/ollama/`, `services/compose.ollama.yml`)
30-
- `/app` - the Tauri app that provides a GUI for managing services
31-
- `/docs` - documentation for the project and services
32-
- `/routines` - part of the CLI that was rewritten in Deno
33-
- `/.scripts` - scripts for development tasks, written in Deno and Bash
34-
- `/profiles/default.env` - default harbor config that will be distributed to the users
35-
- `compose.yml` - base compose file at root (always included)
36-
37-
The CLI is already installed globally for your tests, you may run `harbor <command>` directly.
1+
## Harbor Project
2+
3+
Harbor is a containerized LLM toolkit — a large Docker Compose project with a CLI and a Tauri app for managing AI services. Not to be confused with Harbor container registry which is a completely different unrelated project. This repository, Harbor, is the LLM toolkit.
4+
5+
### Key Locations
6+
7+
- `harbor.sh` — main CLI (too large to read in full; search for specific functions)
8+
- `services/` — all service directories and compose files (e.g., `services/ollama/`, `services/compose.ollama.yml`)
9+
- `compose.yml` — base compose file, always included
10+
- `app/` — Tauri GUI app
11+
- `docs/` — service and user documentation
12+
- `routines/` — CLI internals rewritten in Deno
13+
- `.scripts/` — dev scripts in Deno/Bash, run via `harbor dev <script>`
14+
- `profiles/default.env` — default config distributed to users
15+
16+
### CLI Reference
3817

3918
```bash
40-
harbor help
41-
harbor ps # list running services
19+
harbor ps # list running containers
20+
harbor ls # list all available services
21+
harbor up <service> # start service(s)
22+
harbor down # stop and remove containers
23+
harbor logs <service> # tail logs (use docker logs for non-tailing)
4224
harbor build <service>
43-
harbor logs <service> # tails by default
44-
# Raw compose command for the service
45-
$(harbor cmd <service>)
25+
harbor shell <service> # interactive shell in container
26+
harbor exec <service> <cmd>
27+
harbor eject # output standalone Compose config for current selection
28+
$(harbor cmd <service>) # raw docker compose command for a service
4629
```
4730

4831
```bash
49-
# Working with config values in the local .env
50-
harbor config get <KEY> # read a value
51-
harbor config set <KEY> <VALUE> # write a value
32+
harbor config get <KEY>
33+
harbor config set <KEY> <VALUE>
5234
harbor config update # propagate profiles/default.env → .env
35+
harbor config search <query> # search config keys and values
5336
```
5437

55-
**Never edit `.env` directly** — always use `harbor config get/set` commands.
56-
57-
Refer to [CLI Reference](./docs/3.-Harbor-CLI-Reference.md) for more details.
58-
Remember that `harbor logs` TAILS LOGS BY DEFAULT. Use native `docker logs` if that is not what you expect. Use `-n 1000` to expand logs that'll be included in the initial selection.
59-
60-
### Running dev scripts
61-
62-
You will always use `harbor` CLI to run project dev scripts, for example:
38+
**Never edit `.env` directly** — always use `harbor config get/set`.
6339

6440
```bash
65-
harbor dev scaffold <service_name>
66-
harbor dev docs
67-
harbor dev seeed
41+
harbor env <service> # list override vars for a service
42+
harbor env <service> <key> # get a specific var
43+
harbor env <service> <key> <value> # set a specific var
6844
```
6945

70-
This means that you're not allowed to run those scripts with `deno run` directly.
46+
```bash
47+
harbor dev scaffold <service_name> # scaffold a new service
48+
harbor dev docs # regenerate docs
49+
harbor dev seed # seed test data
50+
harbor dev add-logos [--dry-run] # resolve and write service logos
51+
```
7152

72-
### Updating default profile
53+
Dev scripts live in `.scripts/` and must be run via `harbor dev`, not `deno run` directly.
7354

74-
When you make changes to `/profiles/default.env`, you then need to update the current profile with:
7555
```bash
76-
harbor config update
56+
harbor routine <name> # run internal Deno routines (routines/)
7757
```
7858

79-
**Important for development:** Changes to `/profiles/default.env` are NOT automatically propagated to your current profile (`.env`). During development, you need to update both files:
80-
1. Update `/profiles/default.env` for distribution to users
81-
2. Update `.env` (or run `harbor config update`) to apply changes to your current profile
59+
### Adding a New Service
8260

83-
### Code Quality
61+
Use the `new-service` skill: `.agents/skills/new-service/SKILL.md`.
8462

85-
**STRICTLY PROHIBITED:** Adding useless or obvious comments to code. Comments should only explain complex logic, non-obvious decisions, or provide necessary context. Never add comments that merely restate what the code clearly does.
63+
### Config & Profiles
8664

87-
**STRICTLY PROHIBITED:** Using emojis in copy, UI text, or user-facing content. Always use Lucide icons (https://lucide.dev) or similar icon libraries instead. Emojis are inconsistent across platforms and lack the professional appearance required for Harbor's interface.
65+
After editing `profiles/default.env`, run `harbor config update` to apply changes to the current `.env`. The two files are not automatically synced.
8866

8967
### Cross-file Patterns (Service Integration)
9068

91-
Cross-files (`services/compose.x.<service>.<integration>.yml`) are applied when multiple services are running together. This is the standard way to integrate services like Ollama into supporting satellites.
69+
`services/compose.x.<service>.<integration>.yml` files are applied when multiple services run together. When a satellite service can use a backend (e.g., Ollama):
9270

93-
**Pattern:** When a satellite service can use Ollama (or another backend), create a cross-file that:
94-
1. Adds `depends_on` for the backend service
95-
2. Mounts any config templates needed for the integration
96-
3. Sets environment variables for the integration
97-
4. Overrides entrypoint if config rendering is needed at startup
71+
1. Add `depends_on` for the backend
72+
2. Mount config templates needed for the integration
73+
3. Set environment variables
74+
4. Override entrypoint if config rendering is needed at startup
9875

99-
**Example:** `services/compose.x.photoprism.ollama.yml` adds vision model config only when PhotoPrism runs with Ollama.
76+
Example: `services/compose.x.photoprism.ollama.yml`
10077

10178
### Configurable Models and Backends
10279

103-
When adding or modifying services that use AI models:
80+
- Default model: `HARBOR_<SERVICE>_MODEL` in `profiles/default.env`
81+
- Config templates use `${HARBOR_*}` vars rendered at container startup
82+
- Run `harbor config update` after changing `profiles/default.env`
10483

105-
1. **Default models must be configurable** via `HARBOR_<SERVICE>_MODEL` (or similar) in `/profiles/default.env`
106-
2. **Default inference backends should be configurable** when the service supports multiple backends
107-
3. **Config templates** should use `${HARBOR_*}` variables that get rendered at container startup
108-
4. **Run `harbor config update`** after modifying `/profiles/default.env` to propagate changes to your dev environment
84+
### Documentation
10985

110-
### Documentation Requirements
111-
112-
**CRITICAL:** After any update to service shape (volumes, init behaviors, config options, integrations), you MUST update the corresponding service documentation in `/docs/` immediately.
113-
114-
Documentation must include:
115-
- All new environment variables in the Configuration section
116-
- Any new startup behaviors or first-launch notes
117-
- Integration instructions (e.g., how to use with Ollama)
118-
- How to change default values
119-
120-
No behavior should be a surprise for the end user. If you add it, document it.
86+
After any change to service shape (volumes, config, integrations), update the corresponding doc in `docs/` immediately. Cover all new env vars, startup behaviors, and integration steps.
12187

12288
### Service Logos
12389

124-
Service logos are managed via the `logo` field in [serviceMetadata.ts](./app/src/serviceMetadata.ts).
125-
126-
**Logo Strategy:**
127-
- Logos are **static URL strings** in serviceMetadata.ts (no runtime resolution)
128-
- Resolved once via `harbor dev add-logos` and written to the file
129-
- Resolution chain: homepage favicon → dashboardicons.com → GitHub owner avatar
130-
131-
**Adding logos:**
90+
Logos are static URL strings in [app/src/serviceMetadata.ts](./app/src/serviceMetadata.ts), resolved once via:
13291

13392
```bash
134-
# Resolve and write logos for services without one
135-
harbor dev add-logos
136-
137-
# Preview changes without writing
138-
harbor dev add-logos --dry-run
93+
harbor dev add-logos # resolve and write
94+
harbor dev add-logos --dry-run # preview only
13995
```
14096

141-
**Resolution order:**
142-
1. GitHub homepage favicon (via Google's favicon service)
143-
2. dashboardicons.com (common service icons)
144-
3. GitHub owner avatar (fallback)
97+
Resolution order: GitHub homepage favicon → dashboardicons.com → GitHub owner avatar.
98+
99+
### Code Quality
100+
101+
- Comments only for non-obvious logic — never restate what the code does
102+
- No emojis in UI or copy — use Lucide icons instead

0 commit comments

Comments
 (0)