You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/agent-context/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ Not every Spec Kit user wants Spec Kit to write into the coding agent's context
10
10
11
11
-**Opt out** entirely with `specify extension disable agent-context` — Spec Kit will then never create or modify the agent context file.
12
12
-**Customize the markers** by editing `.specify/extensions/agent-context/agent-context-config.yml` — both the Python layer and the bundled scripts honor the same `context_markers` value.
13
+
-**Synchronize multiple agent anchors** by setting `context_files` when a project intentionally uses more than one coding agent context file, such as `AGENTS.md` and `CLAUDE.md`.
13
14
-**Refresh on demand** with `/speckit.agent-context.update`, or automatically through the hooks declared in `extension.yml` (`after_specify`, `after_plan`).
14
15
15
16
## Commands
@@ -27,13 +28,20 @@ All configuration flows through the extension's own config file at
27
28
# Path to the coding agent context file managed by this extension
28
29
context_file: CLAUDE.md
29
30
31
+
# Optional list of coding agent context files to manage together.
32
+
# When non-empty, this takes precedence over context_file.
33
+
context_files:
34
+
- AGENTS.md
35
+
- CLAUDE.md
36
+
30
37
# Delimiters for the managed Spec Kit section
31
38
context_markers:
32
39
start: "<!-- SPECKIT START -->"
33
40
end: "<!-- SPECKIT END -->"
34
41
```
35
42
36
43
- `context_file` — the project-relative path to the coding agent context file, written by `specify init` and `specify integration install`.
44
+
- `context_files`— optional project-relative paths to multiple coding agent context files. When non-empty, the list takes precedence over `context_file`. Absolute paths, backslash separators, and `..` path segments are rejected.
37
45
- `context_markers.start`/ `.end` — the delimiters around the managed section. Edit these to use custom markers.
When disabled, Spec Kit skips context file creation, updates, and removal (the gates are inside `upsert_context_section()` and `remove_context_section()`).
66
+
Disabled projects also ignore stale `context_files` values during command rendering so disabling the extension remains a complete opt-out.
Copy file name to clipboardExpand all lines: extensions/agent-context/commands/speckit.agent-context.update.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: "Refresh the managed Spec Kit section in the coding agent context file"
2
+
description: "Refresh the managed Spec Kit section in coding agent context file(s)"
3
3
---
4
4
5
5
# Update Coding Agent Context
@@ -12,11 +12,12 @@ The script reads the agent-context extension config at
12
12
`.specify/extensions/agent-context/agent-context-config.yml` to discover:
13
13
14
14
-`context_file` — the path of the coding agent context file to manage.
15
+
-`context_files` — optional project-relative paths for multiple coding agent context files. When non-empty, the script updates each listed file and the list takes precedence over `context_file`.
15
16
-`context_markers.start` / `.end` — the delimiters surrounding the managed section. Defaults to `<!-- SPECKIT START -->` and `<!-- SPECKIT END -->` when the field is missing.
16
17
17
18
It then creates, replaces, or appends the managed block so that the section points at the most recent plan path when one can be discovered (`specs/<feature>/plan.md`).
18
19
19
-
If `context_file` is empty or the file cannot be located, the command reports nothing to do and exits successfully.
20
+
If `context_files` and `context_file` are empty, the command reports nothing to do and exits successfully. Context file paths must stay project-relative; absolute paths, Windows drive paths, backslash separators, and `..` path segments are rejected.
0 commit comments