-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.cursorrules
More file actions
52 lines (35 loc) · 1.71 KB
/
.cursorrules
File metadata and controls
52 lines (35 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Cursor Rules for ContextGit
## This Project Uses contextgit for Requirements Traceability
This repository is managed with contextgit. The AI assistant MUST follow these workflows:
### When Making Changes to Requirements or Documentation
1. **BEFORE editing any file in `docs/`:**
- Run `contextgit relevant-for-file <path>` to understand related requirements
- Run `contextgit extract <ID>` to get precise context for specific requirements
2. **AFTER editing any file in `docs/`:**
- Run `contextgit scan docs/ --recursive` to update the index
- Run `contextgit status --stale` to check for broken links
- If stale links found, update affected downstream items
### When Adding New Requirements
1. Generate a new ID: `contextgit next-id <type>`
- Types: `business`, `system`, `architecture`, `code`, `test`, `decision`
2. Add YAML frontmatter to the Markdown file with the generated ID
3. Run `contextgit scan docs/ --recursive` to register it
### When a Requirement Changes
1. After editing, run `contextgit scan docs/ --recursive`
2. Check for stale downstream items: `contextgit status --stale --format json`
3. Update downstream items if needed
4. Mark as synchronized: `contextgit confirm <ID>`
### JSON Output for Parsing
Always use `--format json` when the output needs to be parsed:
```bash
contextgit show SR-010 --format json
contextgit status --stale --format json
contextgit extract SR-010 --format json
```
### Detection
This is a contextgit project if `.contextgit/config.yaml` exists.
## Project Info
- **Tool**: contextgit v1.0.1
- **Purpose**: Requirements traceability for LLM-assisted development
- **Index file**: `.contextgit/requirements_index.yaml`
- **Config file**: `.contextgit/config.yaml`