Skip to content

Commit 3c0babb

Browse files
feat(skills): add issue-creation skill, rewrite branch-pr skill, and create AGENTS.md index
- Add engram-issue-creation skill with full template reference and examples - Rewrite engram-branch-pr skill to reflect enforcement system (v2.0) - Create AGENTS.md as the skill index with trigger-to-path mapping for all 19 skills
1 parent f7c8944 commit 3c0babb

3 files changed

Lines changed: 413 additions & 25 deletions

File tree

AGENTS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Engram — Agent Skills Index
2+
3+
When working on this project, load the relevant skill(s) BEFORE writing any code.
4+
5+
## How to Use
6+
7+
1. Check the trigger column to find skills that match your current task
8+
2. Load the skill by reading the SKILL.md file at the listed path
9+
3. Follow ALL patterns and rules from the loaded skill
10+
4. Multiple skills can apply simultaneously
11+
12+
## Skills
13+
14+
| Skill | Trigger | Path |
15+
|-------|---------|------|
16+
| `engram-architecture-guardrails` | Any change that affects system boundaries, ownership, state flow, or cross-package responsibilities. | [`skills/architecture-guardrails/SKILL.md`](skills/architecture-guardrails/SKILL.md) |
17+
| `engram-branch-pr` | When creating a pull request, opening a PR, or preparing changes for review. | [`skills/branch-pr/SKILL.md`](skills/branch-pr/SKILL.md) |
18+
| `engram-business-rules` | Any change that affects sync behavior, project controls, permissions, or memory semantics. | [`skills/business-rules/SKILL.md`](skills/business-rules/SKILL.md) |
19+
| `engram-commit-hygiene` | Any commit creation, review, or branch cleanup. | [`skills/commit-hygiene/SKILL.md`](skills/commit-hygiene/SKILL.md) |
20+
| `engram-cultural-norms` | Starting substantial work, reviewing changes, or defining team conventions. | [`skills/cultural-norms/SKILL.md`](skills/cultural-norms/SKILL.md) |
21+
| `engram-dashboard-htmx` | Any change to htmx attributes, partial updates, forms, or server-rendered browser UI. | [`skills/dashboard-htmx/SKILL.md`](skills/dashboard-htmx/SKILL.md) |
22+
| `engram-docs-alignment` | Any code or workflow change that affects user or contributor behavior. | [`skills/docs-alignment/SKILL.md`](skills/docs-alignment/SKILL.md) |
23+
| `engram-issue-creation` | When creating a GitHub issue, reporting a bug, or requesting a feature. | [`skills/issue-creation/SKILL.md`](skills/issue-creation/SKILL.md) |
24+
| `engram-memory-protocol` | Decisions, bugfixes, discoveries, preferences, or session closure. | [`skills/memory-protocol/SKILL.md`](skills/memory-protocol/SKILL.md) |
25+
| `engram-plugin-thin` | Changes in plugin scripts/hooks for Claude, OpenCode, Gemini, or Codex. | [`skills/plugin-thin/SKILL.md`](skills/plugin-thin/SKILL.md) |
26+
| `engram-pr-review-deep` | Reviewing any external or internal contribution before merge. | [`skills/pr-review-deep/SKILL.md`](skills/pr-review-deep/SKILL.md) |
27+
| `engram-project-structure` | Creating files, packages, handlers, templates, styles, or tests in this repo. | [`skills/project-structure/SKILL.md`](skills/project-structure/SKILL.md) |
28+
| `engram-sdd-flow` | When user requests SDD or multi-phase implementation planning. | [`skills/sdd-flow/SKILL.md`](skills/sdd-flow/SKILL.md) |
29+
| `engram-server-api` | Any route, handler, payload, or status code modification. | [`skills/server-api/SKILL.md`](skills/server-api/SKILL.md) |
30+
| `engram-testing-coverage` | When implementing behavior changes in any package. | [`skills/testing-coverage/SKILL.md`](skills/testing-coverage/SKILL.md) |
31+
| `engram-tui-quality` | Changes in model, update, view, navigation, or rendering. | [`skills/tui-quality/SKILL.md`](skills/tui-quality/SKILL.md) |
32+
| `engram-ui-elements` | Adding or changing dashboard UI components or connected browsing flows. | [`skills/ui-elements/SKILL.md`](skills/ui-elements/SKILL.md) |
33+
| `engram-visual-language` | Any dashboard styling, typography, spacing, or visual identity change. | [`skills/visual-language/SKILL.md`](skills/visual-language/SKILL.md) |
34+
| `gentleman-bubbletea` | When editing Go files in installer/internal/tui/, working on TUI screens, or adding new UI features. | [`skills/gentleman-bubbletea/SKILL.md`](skills/gentleman-bubbletea/SKILL.md) |

skills/branch-pr/SKILL.md

Lines changed: 149 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,172 @@
11
---
22
name: engram-branch-pr
33
description: >
4-
Branch and PR workflow for Engram contributors.
5-
Trigger: When starting any change that will be proposed through GitHub.
4+
PR creation workflow for Engram following the issue-first enforcement system.
5+
Trigger: When creating a pull request, opening a PR, or preparing changes for review.
66
license: Apache-2.0
77
metadata:
88
author: gentleman-programming
9-
version: "1.0"
9+
version: "2.0"
1010
---
1111

1212
## When to Use
1313

1414
Use this skill when:
15-
- Starting a new feature, fix, or refactor
16-
- Splitting work into multiple PRs
17-
- Preparing a PR for review and merge
15+
- Creating a pull request for any change
16+
- Preparing a branch for submission
17+
- Helping a contributor open a PR
1818

1919
---
2020

21-
## Core Rules
21+
## Critical Rules
2222

23-
1. Create a focused branch (`feat/*`, `fix/*`, `chore/*`).
24-
2. Keep one logical scope per branch.
25-
3. Push early and often to avoid large risky diffs.
26-
4. Open PRs with intent, risk, and validation evidence.
27-
5. Do not mix unrelated changes in the same PR.
23+
1. **Every PR MUST link an approved issue** — no exceptions
24+
2. **Every PR MUST have exactly one `type:*` label**
25+
3. **5 automated checks must pass** before merge is possible
26+
4. **Blank PRs without issue linkage will be blocked** by GitHub Actions
2827

2928
---
3029

31-
## PR Structure
30+
## Workflow
3231

33-
Include:
34-
- Problem statement (why this change exists)
35-
- Solution summary (what changed)
36-
- Risk notes (what could break)
37-
- Validation (tests/commands executed)
38-
- Follow-ups (what is intentionally out of scope)
32+
```
33+
1. Verify issue has `status:approved` label
34+
2. Create branch: feat/*, fix/*, docs/*, refactor/*, chore/*
35+
3. Implement changes
36+
4. Run tests locally (unit + e2e)
37+
5. Open PR using the template
38+
6. Add exactly one type:* label
39+
7. Wait for 5 automated checks to pass
40+
```
3941

4042
---
4143

42-
## Merge Checklist
44+
## Branch Naming
4345

44-
- [ ] Branch name matches scope
45-
- [ ] Diff is focused and reviewable
46-
- [ ] Tests relevant to the change pass
47-
- [ ] No temporary files or local artifacts included
48-
- [ ] PR description explains why, not only what
46+
| Type | Branch pattern | Example |
47+
|------|---------------|---------|
48+
| Bug fix | `fix/<short-description>` | `fix/duplicate-observation-insert` |
49+
| Feature | `feat/<short-description>` | `feat/json-export-command` |
50+
| Docs | `docs/<short-description>` | `docs/api-reference-update` |
51+
| Refactor | `refactor/<short-description>` | `refactor/extract-query-sanitizer` |
52+
| Chore | `chore/<short-description>` | `chore/bump-bubbletea-v0.26` |
53+
54+
---
55+
56+
## PR Body Format
57+
58+
The PR template is at `.github/PULL_REQUEST_TEMPLATE.md`. Every PR body MUST contain:
59+
60+
### 1. Linked Issue (REQUIRED)
61+
62+
```markdown
63+
Closes #<issue-number>
64+
```
65+
66+
Valid keywords: `Closes #N`, `Fixes #N`, `Resolves #N` (case insensitive).
67+
The linked issue MUST have the `status:approved` label.
68+
69+
### 2. PR Type (REQUIRED)
70+
71+
Check exactly ONE in the template and add the matching label:
72+
73+
| Checkbox | Label to add |
74+
|----------|-------------|
75+
| Bug fix | `type:bug` |
76+
| New feature | `type:feature` |
77+
| Documentation only | `type:docs` |
78+
| Code refactoring | `type:refactor` |
79+
| Maintenance/tooling | `type:chore` |
80+
| Breaking change | `type:breaking-change` |
81+
82+
### 3. Summary
83+
84+
1-3 bullet points of what the PR does.
85+
86+
### 4. Changes Table
87+
88+
```markdown
89+
| File | Change |
90+
|------|--------|
91+
| `path/to/file` | What changed |
92+
```
93+
94+
### 5. Test Plan
95+
96+
```markdown
97+
- [x] Unit tests pass locally: `go test ./...`
98+
- [x] E2E tests pass locally: `go test -tags e2e ./internal/server/...`
99+
- [x] Manually tested the affected functionality
100+
```
101+
102+
### 6. Contributor Checklist
103+
104+
All boxes must be checked:
105+
- Linked an approved issue
106+
- Added exactly one `type:*` label
107+
- Ran unit tests locally
108+
- Ran e2e tests locally
109+
- Docs updated if behavior changed
110+
- Conventional commit format
111+
- No `Co-Authored-By` trailers
112+
113+
---
114+
115+
## Automated Checks (all 5 must pass)
116+
117+
| Check | Job name | What it verifies |
118+
|-------|----------|-----------------|
119+
| PR Validation | `Check Issue Reference` | Body contains `Closes/Fixes/Resolves #N` |
120+
| PR Validation | `Check Issue Has status:approved` | Linked issue has `status:approved` |
121+
| PR Validation | `Check PR Has type:* Label` | PR has exactly one `type:*` label |
122+
| CI | `Unit Tests` | `go test ./...` passes |
123+
| CI | `E2E Tests` | `go test -tags e2e ./internal/server/...` passes |
124+
125+
---
126+
127+
## Conventional Commits
128+
129+
```
130+
<type>(<scope>): <short description>
131+
```
132+
133+
Type-to-label mapping:
134+
135+
| Commit type | PR label |
136+
|-------------|----------|
137+
| `feat` | `type:feature` |
138+
| `fix` | `type:bug` |
139+
| `docs` | `type:docs` |
140+
| `refactor` | `type:refactor` |
141+
| `chore` | `type:chore` |
142+
| `feat!` / `fix!` | `type:breaking-change` |
143+
144+
Examples:
145+
```
146+
feat(cli): add --json flag to session list command
147+
fix(store): prevent duplicate observation insert on retry
148+
docs(contributing): update workflow documentation
149+
refactor(internal): extract search query sanitizer
150+
chore(deps): bump github.com/charmbracelet/bubbletea to v0.26
151+
fix!: change session ID format
152+
```
153+
154+
---
155+
156+
## Commands
157+
158+
```bash
159+
# Create branch
160+
git checkout -b feat/my-feature main
161+
162+
# Run tests before pushing
163+
go test ./... # unit tests
164+
go test -tags e2e ./internal/server/... # e2e tests
165+
166+
# Push and create PR
167+
git push -u origin feat/my-feature
168+
gh pr create --title "feat(scope): description" --body "Closes #N"
169+
170+
# Add type label to PR
171+
gh pr edit <pr-number> --add-label "type:feature"
172+
```

0 commit comments

Comments
 (0)