mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-07-21 18:33:22 -07:00
v1.10.0
This commit is contained in:
@@ -24,6 +24,42 @@ Check if `AGENTS.md` exists in project root.
|
||||
- Main sections (bullets)
|
||||
- Current line count
|
||||
|
||||
Check for `.agents-docs/` directory:
|
||||
|
||||
**If `.agents-docs/` exists:**
|
||||
```
|
||||
Structure: Progressive discovery (index + N section files)
|
||||
Section files:
|
||||
- .agents-docs/AGENTS-architecture.md
|
||||
- .agents-docs/AGENTS-development.md
|
||||
[etc.]
|
||||
```
|
||||
|
||||
**If `.agents-docs/` does not exist:** Note: `Structure: Single-file (no .agents-docs/ directory)`
|
||||
|
||||
**IMPORTANT — you MUST offer restructuring.** Stop and ask:
|
||||
> "Your AGENTS.md uses a single-file format. Want to restructure for progressive discovery? This splits detailed sections into `.agents-docs/` files and converts AGENTS.md to a lightweight index with summaries and links."
|
||||
|
||||
Wait for user response before continuing. If user accepts, restructure existing content: create `.agents-docs/` directory with section files, convert AGENTS.md to index with summaries and links. Always-inline sections (Project Overview, Git Commit Messages, How to Use This File) stay in AGENTS.md. If user declines, continue with single-file editing.
|
||||
|
||||
### Git Commit Messages Audit
|
||||
|
||||
Check AGENTS.md for a `## Git Commit Messages` section describing this format:
|
||||
```
|
||||
<description>
|
||||
|
||||
<JIRA-Ticket-ID>
|
||||
AI Assisted
|
||||
```
|
||||
Required rules:
|
||||
1. **JIRA ticket ID from branch** — derive from branch name format `<prefix>/<TICKET-ID>-description` (uppercase project key + hyphen + integer, e.g., `PCWEB-10968`)
|
||||
2. **AI Assisted footer** — always the last line, on its own line directly after the ticket ID
|
||||
|
||||
If the section is missing or either rule is absent, flag it:
|
||||
> "Your Git Commit Messages section is missing [missing items]. Want me to add them?"
|
||||
|
||||
If user confirms, add/update the section before proceeding. If user declines, continue.
|
||||
|
||||
Proceed to Step 2.
|
||||
|
||||
---
|
||||
@@ -94,7 +130,12 @@ Present the user with update options:
|
||||
|
||||
## Step 5: Confirm & Apply
|
||||
|
||||
Before changes:
|
||||
Before changes, route edits to the correct file when `.agents-docs/` exists:
|
||||
- Always-inline sections (Project Overview, Git Commit Messages, How to Use This File) → edit AGENTS.md directly
|
||||
- All other sections → edit the corresponding `.agents-docs/AGENTS-<section-name>.md` file
|
||||
|
||||
Preview format:
|
||||
> **File:** `.agents-docs/AGENTS-architecture.md` (or `AGENTS.md` for inline sections)
|
||||
> **Section:** [name]
|
||||
> **Change:** [description]
|
||||
> ```
|
||||
@@ -105,6 +146,13 @@ Before changes:
|
||||
- "adjust" -> ask what to change, repeat
|
||||
- "yes" -> apply edit, insert in appropriate section (create if needed), preserve structure
|
||||
|
||||
### Section File Lifecycle (when `.agents-docs/` exists)
|
||||
|
||||
- **New section (>~10 lines):** Create `.agents-docs/AGENTS-<section-name>.md` with breadcrumb header, add summary + link in AGENTS.md
|
||||
- **New section (<~10 lines):** Keep inline in AGENTS.md
|
||||
- **Delete section:** Remove the `.agents-docs/` file and its summary + link from AGENTS.md
|
||||
- **Orphan cleanup:** After all edits, check for `.agents-docs/` files with no corresponding AGENTS.md section — offer to remove them
|
||||
|
||||
---
|
||||
|
||||
## Step 6: Summary & Next
|
||||
@@ -112,8 +160,14 @@ Before changes:
|
||||
After applying:
|
||||
> "Done! Changed:"
|
||||
> - [Summary]
|
||||
> - Line count: X/500
|
||||
>
|
||||
|
||||
If `.agents-docs/` exists:
|
||||
> Structure: AGENTS.md (index) + N section files in .agents-docs/
|
||||
> Index line count: X/500
|
||||
|
||||
Otherwise:
|
||||
> Line count: X/500
|
||||
|
||||
> "Add anything else?"
|
||||
|
||||
If yes, return to Step 3. If done, proceed to Step 7.
|
||||
@@ -172,6 +226,7 @@ See [AGENTS.md](./AGENTS.md) for complete project documentation including:
|
||||
- Environment variables
|
||||
- Testing patterns
|
||||
- Deployment guides
|
||||
- Section details in .agents-docs/
|
||||
```
|
||||
|
||||
**For directory configs** (`.cursor/rules/`, `.windsurf/rules/`): Delete existing `.md` files, create single `reference.md`.
|
||||
@@ -188,6 +243,7 @@ See [AGENTS.md](./AGENTS.md) for complete project documentation including:
|
||||
6. **No duplication** - Check for similar content first
|
||||
7. **Group logically** - Place near related content
|
||||
8. **Be specific** - Include exact commands, paths, names
|
||||
9. **Route edits to correct file** - Inline sections edit AGENTS.md directly, detailed sections edit the corresponding .agents-docs/ file
|
||||
|
||||
---
|
||||
|
||||
@@ -199,6 +255,14 @@ Agent: Found AGENTS.md covering:
|
||||
- Project structure
|
||||
- API conventions
|
||||
Line count: 127
|
||||
Structure: Single-file (no .agents-docs/ directory)
|
||||
|
||||
Your AGENTS.md uses a single-file format. Want to
|
||||
restructure for progressive discovery?
|
||||
|
||||
User: No thanks, just update it.
|
||||
|
||||
Agent: OK, keeping single-file format.
|
||||
|
||||
Recent work on auth flow. Worth documenting:
|
||||
- JWT refresh token must validate before access token
|
||||
|
||||
Reference in New Issue
Block a user