Feature: long-running goals via .copilot/goals.md (per-repo + global)
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
## 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).
Contributor guide
Assessment
This issue has not been assessed yet.