Skip to content

Commit db89d4f

Browse files
committed
feat: optimize project specs index.json for performance.
1 parent aca0813 commit db89d4f

File tree

4 files changed

+52
-15
lines changed

4 files changed

+52
-15
lines changed

GEMINI.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,31 @@
77
1. **OPEN****[rules/index.rules.md](./rules/index.rules.md)**
88
2. **FOLLOW** → The mandatory onboarding process described within.
99

10-
**FAILURE TO DO SO = CRITICAL VIOLATION**
10+
**FAILURE TO DO SO = CRITICAL VIOLATION**
11+
12+
---
13+
14+
## ⚠️ CRITICAL OVERRIDE: Interactive Input Protocol
15+
16+
**This section overrides the interactive input instructions found in `rules/interactive-input.rules.md`.** This override specifically pertains to the *mechanism* of asking questions and does not supersede other principles of interactive input, such as clarifying ambiguity or seeking explicit approval.
17+
18+
Due to client-side rendering limitations where `run_shell_command` (the `run_command` alternative in GEMINI's environment) causes an `InvalidStreamError` and Markdown tables are not rendered, the following protocol is the **only acceptable way** for the agent to request interactive input from the user:
19+
20+
1. **Format:** Questions will be presented as plain text, structured within a custom ASCII-art separator and a Markdown heading.
21+
2. **Separator:** A 3-line period-based separator will be used, with the longest line being a Markdown horizontal rule (`---`).
22+
* **Opening:**
23+
```
24+
.
25+
..
26+
---
27+
```
28+
* **Closing:**
29+
```
30+
---
31+
..
32+
.
33+
```
34+
3. **Padding:** One empty line will be placed between the opening separator and the heading, and one empty line between the question body and the closing separator.
35+
4. **Heading:** A Markdown H2 heading (`## **Question Title**`) will be used.
36+
5. **Body:** The question text will be formatted using supported Markdown (bold, italic, lists, blockquotes, inline code).
37+
6. **Interaction:** The agent will send this formatted block as a single text response. The user will provide their answer as a plain text chat message.

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ Want just the essentials? Copy these:
5959
- **Windsurf**: Copy `.windsurf/` folder
6060
- **Kiro**: Copy `.kiro/` folder
6161

62+
### Standalone Agent
63+
For those who prefer a single, self-contained set of rules, the `standalone-agent.rules.md` file offers a streamlined setup. Instead of copying multiple folders, you can use this single file.
64+
65+
**Setup Instructions:**
66+
1. Download the `standalone-agent.rules.md` file from this repository.
67+
2. Rename it to match the filename your coding assistant requires.
68+
3. Place the renamed file in your project's root directory.
69+
70+
**Example:**
71+
- If you use **Cursor** or another agent that reads from `AGENTS.md`, you would rename `standalone-agent.rules.md` to `AGENTS.md`.
72+
73+
*This file provides a quick, single-file setup that includes all the necessary rules for persona personalization and interactive coding. However, it does not include the more advanced spec-driven development workflow available in the full rule set.*
74+
6275
### Rule Activation
6376

6477
- **Close and reopen project** (optional but recommended).
@@ -69,7 +82,7 @@ Want just the essentials? Copy these:
6982
- "Hello"
7083
- "Let's make some changes"
7184
- **Explicit Trigger**: If the agent doesn't respond interactively, you can explicitly ask it to read the rules:
72-
- "Please read the project rules first."
85+
- "Read the rules"
7386

7487
*Note: The rules must be triggered for each new chat session for the agent to follow them.*
7588

@@ -130,11 +143,11 @@ The persona system ensures you get exactly the right level of detail and communi
130143
| **Cursor** | IDE | `AGENTS.md` | ✅ Tested |
131144
| **Windsurf** | IDE | `.windsurf > rules > project_rules.md` | ✅ Tested |
132145
| **Kiro (Vibe Mode)** | IDE | `.kiro > steering > rules.md` | ✅ Tested |
146+
| **Gemini** | CLI | `GEMINI.md` | ✅ Tested |
147+
| **Gemini Code Assist (VS Code)** | IDE | `GEMINI.md` | ✅ Tested |
133148
| **Codex** | IDE | `AGENTS.md` | ⏳ Not Tested Yet |
134149
| **Claude Code** | IDE | `AGENTS.md` | ⏳ Not Tested Yet |
135150
| **GitHub Copilot** | IDE | `AGENTS.md` | ❌ Not Working Yet |
136-
| **Gemini** | CLI | `AGENTS.md` | ❌ Not Working Yet |
137-
| **Gemini Code Assist (VS Code)** | IDE | `AGENTS.md` | ❌ Not Working Yet |
138151

139152
## 🔧 Troubleshooting
140153

rules/spec-management.rules.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Before creating any specification file, agents MUST ask these questions to ensur
6464
**SOURCE DOCUMENTATION:**
6565
- "Are there any specific articles, documentation, or resources that influenced your decision?"
6666

67+
### 2.1 Interactive Input Compliance
68+
All questions in this protocol MUST comply with the rules for asking questions and handling user input as defined in `rules/interactive-input.rules.md`.
69+
6770
---
6871

6972
## 3. Specification Workflow
@@ -72,7 +75,7 @@ Before creating any specification file, agents MUST ask these questions to ensur
7275

7376
**MANDATORY: BEFORE CREATING A NEW SPEC, YOU MUST FOLLOW THIS PROTOCOL:**
7477

75-
1. **Search the Spec Index:** Perform a comprehensive keyword search against the `title`, `summary`, and `keywords` fields in `project-specs/index.json` to find all potentially relevant specs.
78+
1. **Search the Spec Index:** Perform a comprehensive keyword search against the `title` and `keywords` fields in `project-specs/index.json` to find all potentially relevant specs.
7679

7780
2. **Select Candidate Specifications:** From the search results, identify the 2-3 specs that most closely match the current requirement.
7881

@@ -98,20 +101,14 @@ Before creating any specification file, agents MUST ask these questions to ensur
98101

99102
### Step 4: Update Index
100103
- **After Approval:** Once a new spec is approved, you **MUST** add a new entry to the `project-specs/index.json` file.
101-
- **Format:** The entry must be a JSON object with `title`, `path`, `summary`, `keywords`, and `affectedFiles` keys.
104+
- **Format:** The entry must be a JSON object with `title`, `path`, and `keywords` keys.
102105
```json
103106
{
104107
"title": "Spec Title",
105108
"path": "project-specs/spec-name.spec.md",
106-
"summary": "A brief, one-sentence description of the decision.",
107-
"keywords": ["keyword1", "keyword2", "technology"],
108-
"affectedFiles": [
109-
"path/to/file-one.js",
110-
"path/to/file-two.ts"
111-
]
109+
"keywords": ["keyword1", "keyword2", "technology"]
112110
}
113111
```
114-
- **Synchronization:** The `affectedFiles` list in this JSON entry **MUST** be identical to the list in the corresponding spec markdown file.
115112

116113
---
117114

rules/templates/spec.template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
Status: [Proposed | Approved | Implemented | Deprecated]
33
Related Specs:
4-
- [link-to-spec-1.spec.md]
5-
- [link-to-spec-2.spec.md]
4+
- link-to-spec-1.spec.md
5+
- link-to-spec-2.spec.md
66
---
77

88
### 1. Problem Statement

0 commit comments

Comments
 (0)