Feature: long-running goals via .copilot/goals.md (per-repo + global)
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
## Summary
Add first-class support for **long-running, cross-session goals** via a declarative `.copilot/goals.md` file (per-repo) and `~/.copilot/goals.md` (global) that the agent reads at session start and updates as work progresses.
Complements (but does not overlap with) #1912 (full session persistence) and #2129 (scheduled/loop tasks). This is the **simplest possible primitive**: a user-owned markdown file the agent treats as durable intent.
## Problem
Today, Copilot CLI sessions are stateless across `/new`, `/clear`, and compaction. Users working on multi-day or multi-session efforts must re-explain objectives every time. The existing `AGENTS.md` / `CLAUDE.md` patterns are great for *instructions*, but not for *goals with state* (in-progress, paused, done).
## Proposed solution
1. On session start, if `.copilot/goals.md` (cwd) or `~/.copilot/goals.md` (home) exists, load them into context and surface active goals to the user.
2. Provide a `/goals` slash command:
- `/goals` — list active goals
- `/goals add ` — append a new active goal (per-repo by default; `--global` for home)
- `/goals done <id>` / `/goals pause <id> <reason>`
- `/goals edit` — open in `$EDITOR`
3. File format is **plain markdown** with a minimal convention (sections `## active` / `## paused` / `## done`, one `### goal: <id>` per entry, key/value lines). Users can edit by hand; the agent reads/writes idempotently.
4. Auto-add `.copilot/goals.md` to `.gitignore` on first write (configurable).
### Example file
```markdown
# Goals
## active
### goal: migrate-to-pnpm
- title: Migrate all repos from npm to pnpm
- created: 2026-05-18
- updated: 2026-05-18
- progress: 3/12 repos
- notes: |
Done: coven-docs, coven-web, coven-cli.
Convention: pnpm@9, workspace protocol for internal deps.
- next: Convert openhands-agent-canvas — has a postinstall script that breaks under pnpm.
```
## Why a file (not a DB)?
- **Survives compaction by construction** — it's on disk.
- **User-owned and grep-able** — no opaque session blobs.
- **Agent-agnostic** — same file works for Copilot CLI, Claude Code, Codex.
- **Zero infra** — no daemon, no migration story.
## Prior art / parallel work
I built this as a portable skill that works today across multiple agents: <https://github.com/BunsDev/copilot-skills/tree/master/long-running-goals>. Installable via `npx skills add BunsDev/copilot-skills@long-running-goals`.
Promoting it to a first-class CLI feature would give:
- Native slash command (no skill-injection round-trip)
- Auto-loading without depending on the skill being installed
- Editor integration (`/goals edit`)
- Consistent path conventions across users
## Out of scope (for this issue)
- Full conversation persistence (tracked in #1912)
- Scheduled/loop execution (tracked in #2129)
- Multi-user shared goals (could come later)
## Related
- #1912 Context Manager for Persistent Sessions Per Folder
- #2129 Loop / Scheduled commands to allow long-running tasks
- #868 `--additional-skills` option
Happy to iterate on the spec or contribute (CLI is closed-source, but I can refine the design and ship the skill as a stopgap).
Guía de contribución
Línea de trabajo
Start by reviewing the existing session-start context loading and slash-command handling, then compare the proposed per-repository and global goals.md format with current CLI behavior. The work is done when goals are loaded, listed, added, edited, paused, and completed across both scopes, with the specified gitignore behavior and tests for the command and file states.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100