Skip to content

Commit 6af6e0c

Browse files
authored
Merge pull request #62 from Fission-AI/codex/implement-update-agent-file-name-change
feat: rename agent instructions file to AGENTS.md
2 parents 4a0ae49 + 50e6660 commit 6af6e0c

File tree

14 files changed

+73
-51
lines changed

14 files changed

+73
-51
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# OpenSpec
2121

22-
**Supported AI Tools:** ✅ Claude Code | 🔜 Cursor (coming soon) | 🔜 AGENTS.md support (coming soon)
22+
**Supported AI Tools:** ✅ Claude Code | 🔜 Cursor (coming soon) | AGENTS.md instructions
2323

2424
Create **alignment** between humans and AI coding assistants through spec-driven development. **No API keys required.**
2525

@@ -92,7 +92,7 @@ openspec init
9292
# openspec/
9393
# ├── specs/ # Current specifications (truth)
9494
# ├── changes/ # Proposed changes
95-
# └── README.md # AI instructions for your tool
95+
# └── AGENTS.md # AI instructions for your tool
9696
```
9797

9898
### 2. Create Your First Change
File renamed without changes.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Update Agent Instruction File Name - Tasks
22

33
## 1. Rename Instruction File
4-
- [ ] Rename `openspec/README.md` to `openspec/AGENTS.md`
5-
- [ ] Update root references to new path
4+
- [x] Rename `openspec/README.md` to `openspec/AGENTS.md`
5+
- [x] Update root references to new path
66

77
## 2. Update Templates
8-
- [ ] Rename `src/core/templates/readme-template.ts` to `agents-template.ts`
9-
- [ ] Update exported constant from `readmeTemplate` to `agentsTemplate`
8+
- [x] Rename `src/core/templates/readme-template.ts` to `agents-template.ts`
9+
- [x] Update exported constant from `readmeTemplate` to `agentsTemplate`
1010

1111
## 3. Adjust CLI Commands
12-
- [ ] Modify `openspec init` to generate `AGENTS.md`
13-
- [ ] Update `openspec update` to refresh `AGENTS.md`
14-
- [ ] Ensure CLAUDE.md markers link to `@openspec/AGENTS.md`
12+
- [x] Modify `openspec init` to generate `AGENTS.md`
13+
- [x] Update `openspec update` to refresh `AGENTS.md`
14+
- [x] Ensure CLAUDE.md markers link to `@openspec/AGENTS.md`
1515

1616
## 4. Update Specifications
17-
- [ ] Modify `cli-init` spec to reference `AGENTS.md`
18-
- [ ] Modify `cli-update` spec to reference `AGENTS.md`
19-
- [ ] Modify `openspec-conventions` spec to include `AGENTS.md` in project structure
17+
- [x] Modify `cli-init` spec to reference `AGENTS.md`
18+
- [x] Modify `cli-update` spec to reference `AGENTS.md`
19+
- [x] Modify `openspec-conventions` spec to include `AGENTS.md` in project structure
2020

2121
## 5. Validation
22-
- [ ] `pnpm test`
22+
- [x] `pnpm test`

openspec/specs/cli-init/spec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The command SHALL create the complete OpenSpec directory structure with all requ
3131
```
3232
openspec/
3333
├── project.md
34-
├── README.md
34+
├── AGENTS.md
3535
├── specs/
3636
└── changes/
3737
└── archive/
@@ -44,7 +44,7 @@ The command SHALL generate required template files with appropriate content for
4444
#### Scenario: Generating template files
4545

4646
- **WHEN** initializing OpenSpec
47-
- **THEN** generate `README.md` containing complete OpenSpec instructions for AI assistants
47+
- **THEN** generate `AGENTS.md` containing complete OpenSpec instructions for AI assistants
4848
- **AND** generate `project.md` with project context template
4949

5050
### Requirement: AI Tool Configuration
@@ -80,7 +80,7 @@ This document provides instructions for AI coding assistants on how to use OpenS
8080

8181
This project uses OpenSpec for spec-driven development. Specifications are the source of truth.
8282

83-
See @openspec/README.md for detailed conventions and guidelines.
83+
See @openspec/AGENTS.md for detailed conventions and guidelines.
8484
<!-- OPENSPEC:END -->
8585
```
8686

@@ -164,7 +164,7 @@ Next steps - Copy these prompts to Claude:
164164
OpenSpec change proposal for this feature"
165165
166166
3. Learn the OpenSpec workflow:
167-
"Please explain the OpenSpec workflow from openspec/README.md
167+
"Please explain the OpenSpec workflow from openspec/AGENTS.md
168168
and how I should work with you on this project"
169169
────────────────────────────────────────────────────────────
170170
```

openspec/specs/cli-update/spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The update command SHALL update OpenSpec instruction files to the latest templat
1313
- **WHEN** a user runs `openspec update`
1414
- **THEN** the command SHALL:
1515
- Check if the `openspec` directory exists
16-
- Replace `openspec/README.md` with the latest template (complete replacement)
16+
- Replace `openspec/AGENTS.md` with the latest template (complete replacement)
1717
- Update **only existing** AI tool configuration files (e.g., CLAUDE.md)
1818
- Check each registered AI tool configurator
1919
- For each configurator, check if its file exists
@@ -40,7 +40,7 @@ The update command SHALL handle file updates in a predictable and safe manner.
4040
#### Scenario: Updating files
4141

4242
- **WHEN** updating files
43-
- **THEN** completely replace `openspec/README.md` with the latest template
43+
- **THEN** completely replace `openspec/AGENTS.md` with the latest template
4444
- **AND** update only the OpenSpec-managed blocks in **existing** AI tool files using markers
4545
- **AND** use the default directory name `openspec`
4646
- **AND** be idempotent (repeated runs have no additional effect)
@@ -64,7 +64,7 @@ The update command SHALL always update the core OpenSpec files and display an AS
6464
#### Scenario: Successful update
6565

6666
- **WHEN** the update completes successfully
67-
- **THEN** replace `openspec/README.md` with the latest template
67+
- **THEN** replace `openspec/AGENTS.md` with the latest template
6868
- **AND** update existing AI tool configuration files within markers
6969
- **AND** display the message: "Updated OpenSpec instructions"
7070

openspec/specs/openspec-conventions/spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ An OpenSpec project SHALL maintain a consistent directory structure for specific
2424
```
2525
openspec/
2626
├── project.md # Project-specific context
27-
├── README.md # AI assistant instructions
27+
├── AGENTS.md # AI assistant instructions
2828
├── specs/ # Current deployed capabilities
2929
│ └── [capability]/ # Single, focused capability
3030
│ ├── spec.md # WHAT and WHY
@@ -245,7 +245,7 @@ An OpenSpec project SHALL maintain a consistent directory structure for specific
245245
```
246246
openspec/
247247
├── project.md # Project-specific context
248-
├── README.md # AI assistant instructions
248+
├── AGENTS.md # AI assistant instructions
249249
├── specs/ # Current deployed capabilities
250250
│ └── [capability]/ # Single, focused capability
251251
│ ├── spec.md # WHAT and WHY

src/core/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class InitCommand {
132132
console.log(' "I want to add [YOUR FEATURE HERE]. Please create an');
133133
console.log(' OpenSpec change proposal for this feature"\n');
134134
console.log('3. Learn the OpenSpec workflow:');
135-
console.log(' "Please explain the OpenSpec workflow from openspec/README.md');
135+
console.log(' "Please explain the OpenSpec workflow from openspec/AGENTS.md');
136136
console.log(' and how I should work with you on this project"');
137137
console.log('────────────────────────────────────────────────────────────\n');
138138
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const readmeTemplate = `# OpenSpec Instructions
1+
export const agentsTemplate = `# OpenSpec Instructions
22
33
Instructions for AI coding assistants using OpenSpec for spec-driven development.
44

src/core/templates/claude-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const claudeTemplate = `# OpenSpec Project
22
33
This project uses OpenSpec for spec-driven development. Specifications are the source of truth.
44
5-
See @openspec/README.md for detailed conventions and guidelines.
5+
See @openspec/AGENTS.md for detailed conventions and guidelines.
66
77
## Three-Stage Workflow
88

src/core/templates/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readmeTemplate } from './readme-template.js';
1+
import { agentsTemplate } from './agents-template.js';
22
import { projectTemplate, ProjectContext } from './project-template.js';
33
import { claudeTemplate } from './claude-template.js';
44
import { getSlashCommandBody, SlashCommandId } from './slash-command-templates.js';
@@ -12,8 +12,8 @@ export class TemplateManager {
1212
static getTemplates(context: ProjectContext = {}): Template[] {
1313
return [
1414
{
15-
path: 'README.md',
16-
content: readmeTemplate
15+
path: 'AGENTS.md',
16+
content: agentsTemplate
1717
},
1818
{
1919
path: 'project.md',

0 commit comments

Comments
 (0)