docs: simplify project identification guidance; trust AI to use local tools

This commit is contained in:
Lukas Parsons 2026-03-23 00:47:51 -04:00
parent 63f41c318a
commit dfb684f319
2 changed files with 14 additions and 13 deletions

View file

@ -75,7 +75,7 @@ EOF
- `add_memory` - `add_memory`
- `create_skill` - `create_skill`
**First session**: The AI will ask you for your project identifier (recommended: your git remote origin URL like `https://github.com/username/repo`). This ensures your project conventions and memories are consistent across machines. If you don't know your git remote, run `git remote get-url origin` in your project directory. If you need to initialize a git repo or set up AI Skills, search for the "Project Setup Guide" skill. **Project identifier**: The AI will use its own shell access to determine the project's git remote (e.g., `git remote get-url origin`). This identifier scopes conventions and memories and ensures consistency across machines. If the directory isn't a git repo, you may need to provide a unique identifier manually.
## Troubleshooting ## Troubleshooting

View file

@ -251,19 +251,20 @@ decisions = resp.json()["entries"]
### Starting a New Session ### Starting a New Session
1. **Define your project identifier** - we recommend using git remote origin for consistency across machines: The AI should determine the project identifier at the start of each session. **Recommended approach:** Use the git remote origin URL as a stable identifier that follows you across machines.
```python
# Option A: Auto-detect (recommended) - agent template does this automatically
project = get_project_identifier() # returns git remote origin if available, else env var, else dir name
# Option B: Explicit project identifier (stable across machines)
PROJECT = "git@github.com:username/repo.git" # or "https://github.com/username/repo"
# Option C: Use environment variable
# export PROJECT="git@github.com:username/repo.git"
```
**Why git remote?** If you work on the same repository from multiple machines (different file paths), using the git remote as the project identifier ensures your conventions and memories follow you. The same repo gets the same context regardless of where you clone it. ```python
# Detecting the git remote (the AI would use its shell tool)
import subprocess
try:
project = subprocess.check_output(["git", "remote", "get-url", "origin"]).decode().strip()
except:
project = "fallback-identifier" # or ask user
```
This ensures that if you work on the same repository from multiple machines (different file paths), the project context remains consistent. The same repo uses the same identifier everywhere.
If the directory isn't a git repository, the AI should ask the user for a unique project identifier or fall back to a configured environment variable.
2. **Load past memories** (optional but helpful): 2. **Load past memories** (optional but helpful):
```python ```python