ai-necessities 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md-template.md +89 -0
- package/README.md +63 -2
- package/bin/init.js +45 -0
- package/package.json +17 -4
- package/template.agents/agents/backend-architect.md +14 -0
- package/template.agents/agents/designer.md +15 -0
- package/template.agents/agents/researcher.md +10 -0
- package/template.agents/agents/reviewer.md +8 -0
- package/template.agents/agents/security-auditor.md +15 -0
- package/template.agents/agents/tester.md +13 -0
- package/template.agents/commands/init.md +18 -0
- package/template.agents/commands/pm.md +33 -0
- package/template.agents/commands/review.md +24 -0
- package/template.agents/commands/security-audit.md +17 -0
- package/template.agents/commands/test.md +24 -0
- package/template.agents/hooks/post-commit.md +7 -0
- package/template.agents/hooks/pre-edit.md +8 -0
- package/template.agents/overlays/react-express/README.md +18 -0
- package/template.agents/overlays/react-native-expo-supabase/README.md +19 -0
- package/template.agents/overlays/react-next/README.md +18 -0
- package/template.agents/settings/agent-config.md +18 -0
- package/template.agents/skills/skill-discovery/SKILL.md +22 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
|
|
2
|
+
# AGENTS.md
|
|
3
|
+
|
|
4
|
+
## How to plug into a new project
|
|
5
|
+
|
|
6
|
+
1. Copy this `AI-Necessities/template.agents/` folder into the target project as `.agents/`.
|
|
7
|
+
2. Run `/setup` once. It crawls the project, generates/updates this root `AGENTS.md`, and proposes project-fit skills, commands, and agents.
|
|
8
|
+
3. Approve the proposal before anything is created.
|
|
9
|
+
4. Optional: drop in a stack overlay from `template.agents/overlays/` (react-express, react-next, react-native-expo-supabase) before running `/setup`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Set up Commands
|
|
14
|
+
|
|
15
|
+
- `/setup` — one-time project bootstrap: scan, analyze, generate `/pm`, propose project-fit skills/commands/agents, dedupe. Run once per project.
|
|
16
|
+
- `/init` — crawls the project and generates/updates the root `AGENTS.md` with discovered facts only (stack, architecture, conventions, build/test/lint commands). Stack-agnostic; assumes nothing.
|
|
17
|
+
- `/pm <task>` — analyze task against the project profile, plan ordered steps, diagram with Mermaid + ASCII flow, confidence levels per step, then stop for approval before implementing.
|
|
18
|
+
- `/review` — targeted code-review entry point.
|
|
19
|
+
- `/test` — generate/run tests for changed files.
|
|
20
|
+
- `/security-audit` — scan for security issues in changed or new code.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Code Style
|
|
25
|
+
|
|
26
|
+
- Generate concise, short solutions for new modules or code.
|
|
27
|
+
- Watch for over-engineering and oversized files needing refactor.
|
|
28
|
+
- Watch for weird syntax/style mismatching the rest of the codebase.
|
|
29
|
+
- Watch for obvious bugs and blast radius of errors.
|
|
30
|
+
- No emojis or special characters in comments.
|
|
31
|
+
- Write activity-log.md in /docs to refer back if confused.
|
|
32
|
+
- Markdown files use kebab naming (e.g. `some-description-changes.md`).
|
|
33
|
+
- Comments: one-liner, one sentence.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## General Principles
|
|
38
|
+
|
|
39
|
+
- Right data structures and algorithms for the problem.
|
|
40
|
+
- Don't expose data needlessly (least privilege).
|
|
41
|
+
- No external libraries unless absolutely necessary.
|
|
42
|
+
- Use project dependency file for correct versions.
|
|
43
|
+
- Avoid redundancy unless it improves usability.
|
|
44
|
+
- Run major changes by the user first; do not execute blindly.
|
|
45
|
+
- Review existing files before refactor or change.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Version Control
|
|
50
|
+
|
|
51
|
+
- Commit after significant changes, clear messages.
|
|
52
|
+
- Keep commits focused and atomic.
|
|
53
|
+
- No auto-push any branch.
|
|
54
|
+
- Don't auto-commit activity logs and docs.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## AI Restrictions
|
|
59
|
+
|
|
60
|
+
- Always check npm/yarn/pub/download safety before installing external libraries.
|
|
61
|
+
- No auto-push any branch.
|
|
62
|
+
- Run major changes by the user first; do not execute blindly.
|
|
63
|
+
- Review existing files before any edit.
|
|
64
|
+
- No em dashes in any writing. Zero tolerance.
|
|
65
|
+
- Keep responses concise and direct unless detail is requested.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Agent Routing (workflow)
|
|
70
|
+
|
|
71
|
+
When a task arrives:
|
|
72
|
+
|
|
73
|
+
1. **Analyze** what areas it touches (UI, database, API, security, tests).
|
|
74
|
+
2. **Route** to the respective agent per area:
|
|
75
|
+
- **designer** — front-end UI/UX, screen redesigns, component layout, styling.
|
|
76
|
+
- **backend-architect** — database tables, schemas, API structure, server logic.
|
|
77
|
+
- **reviewer** — code review: style, quality, blast radius, security, conventions.
|
|
78
|
+
- **tester** — test generation and execution.
|
|
79
|
+
- **security-auditor** — security scan and audit.
|
|
80
|
+
3. **If multiple areas** (e.g. creating tables AND redesigning the main screen), delegate to each respective agent so they co-work in parallel on their slice.
|
|
81
|
+
4. **Tester follows up** — after all agents finish their slice, the tester generates and runs tests for everything that changed.
|
|
82
|
+
5. **Reviewer checks** — the reviewer reviews the combined output against AGENTS.md.
|
|
83
|
+
6. **Approval gate** — stop before implementing. Present the plan and wait for explicit approval. No auto-execute, no auto-push.
|
|
84
|
+
|
|
85
|
+
## Agent handoffs
|
|
86
|
+
|
|
87
|
+
- designer ↔ backend-architect: co-work when a task spans UI + backend/database; hand off to tester after.
|
|
88
|
+
- security-auditor → tester: if audit findings require code changes, tester re-runs tests after fixes.
|
|
89
|
+
- reviewer → approval: reviewer signs off before anything is committed or pushed.
|
package/README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ai-necessities
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Work in progress.** This template is continuously getting improved. Expect changes, additions, and refinements as it evolves.
|
|
4
|
+
|
|
5
|
+
A plug-and-play AI agent template for coding projects. Copy `.agents/` into any project and you get a full agent setup: `/setup`, `/pm`, `/review`, `/test`, and `/security-audit`. Stack-agnostic — works with React, Next.js, Node/Express, Flutter, or anything else.
|
|
6
|
+
|
|
7
|
+
## What's inside
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
.ai-necessities/
|
|
11
|
+
├── AGENTS.md-template.md # Root agent instructions (copy into your project)
|
|
12
|
+
├── template.agents/ # The actual .agents/ folder to drop into projects
|
|
13
|
+
│ ├── commands/ # /setup, /init, /pm, /review, /test, /security-audit
|
|
14
|
+
│ ├── agents/ # designer, backend-architect, reviewer, tester, security-auditor, researcher
|
|
15
|
+
│ ├── hooks/ # pre-edit, post-commit safety hooks
|
|
16
|
+
│ ├── skills/ # skill-discovery (finds and installs relevant skills)
|
|
17
|
+
│ ├── settings/ # agent-config (writing style, safety, model rules)
|
|
18
|
+
│ └── overlays/ # react-express, react-next, react-native-expo-supabase
|
|
19
|
+
├── bin/init.js # npm installable: copies .agents/ into your project
|
|
20
|
+
├── package.json
|
|
21
|
+
└── .gitignore
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
### Option 1: Manual copy (no install)
|
|
27
|
+
|
|
28
|
+
1. Copy `template.agents/` into your project as `.agents/`.
|
|
29
|
+
2. Run `/setup` once. It scans your project, generates `AGENTS.md`, and proposes project-fit agents/commands/skills.
|
|
30
|
+
3. Approve the proposal before anything is created.
|
|
31
|
+
|
|
32
|
+
### Option 2: npm install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install ai-necessities
|
|
36
|
+
npx ai-necessities # installs .agents/ into your project
|
|
37
|
+
# Then run /setup
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
When a task arrives:
|
|
43
|
+
|
|
44
|
+
1. **Analyze** what areas it touches (UI, database, API, security, tests).
|
|
45
|
+
2. **Route** to the right agent — designer, backend-architect, tester, security-auditor, or reviewer.
|
|
46
|
+
3. **If multiple areas** (e.g. creating tables AND redesigning the main screen), agents co-work in parallel on their slice.
|
|
47
|
+
4. **Tester follows up** — generates and runs tests for everything that changed.
|
|
48
|
+
5. **Reviewer checks** — reviews the combined output against AGENTS.md.
|
|
49
|
+
6. **Approval gate** — stop before implementing. Present the plan and wait for explicit approval. No auto-execute, no auto-push.
|
|
50
|
+
|
|
51
|
+
## Stack overlays
|
|
52
|
+
|
|
53
|
+
Drop these into `template.agents/overlays/` before running `/setup`:
|
|
54
|
+
- `react-express`
|
|
55
|
+
- `react-next`
|
|
56
|
+
- `react-native-expo-supabase`
|
|
57
|
+
|
|
58
|
+
## Status
|
|
59
|
+
|
|
60
|
+
**Work in progress.** Continuously getting improved. Commands, agents, and overlays will be added and refined over time.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
package/bin/init.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const TEMPLATE_DIR = path.join(__dirname, '..', 'template.agents');
|
|
7
|
+
const TARGET_DIR = path.join(process.cwd(), '.agents');
|
|
8
|
+
|
|
9
|
+
function copyDir(src, dest) {
|
|
10
|
+
if (!fs.existsSync(dest)) {
|
|
11
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
12
|
+
}
|
|
13
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const srcPath = path.join(src, entry.name);
|
|
16
|
+
const destPath = path.join(dest, entry.name);
|
|
17
|
+
if (entry.isDirectory()) {
|
|
18
|
+
copyDir(srcPath, destPath);
|
|
19
|
+
} else {
|
|
20
|
+
fs.copyFileSync(srcPath, destPath);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function main() {
|
|
26
|
+
if (!fs.existsSync(TEMPLATE_DIR)) {
|
|
27
|
+
console.error('Error: template.agents/ not found in package.');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (fs.existsSync(TARGET_DIR)) {
|
|
32
|
+
console.log('.agents/ already exists in this project. Skipping copy.');
|
|
33
|
+
console.log('Run /setup to initialize agents, or delete .agents/ and re-run to overwrite.');
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
copyDir(TEMPLATE_DIR, TARGET_DIR);
|
|
38
|
+
console.log('.agents/ installed into this project.');
|
|
39
|
+
console.log('');
|
|
40
|
+
console.log('Next steps:');
|
|
41
|
+
console.log(' 1. Review the files under .agents/');
|
|
42
|
+
console.log(' 2. Run /setup to initialize agents for this project.');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-necessities",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Plug-and-play AI agent template for coding projects. Copies .agents/ into your project so you can run /setup, /pm, /review, /test, and /security-audit.",
|
|
5
|
+
"main": "bin/init.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ai-necessities": "bin/init.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"template.agents/",
|
|
11
|
+
"AGENTS.md-template.md",
|
|
12
|
+
"bin/"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"init": "node bin/init.js"
|
|
16
|
+
},
|
|
17
|
+
"keywords": ["ai", "agents", "template", "coding", "automation"],
|
|
18
|
+
"license": "MIT"
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Agent: backend-architect
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
- Database tables and schemas
|
|
5
|
+
- API structure and endpoints
|
|
6
|
+
- Server logic and backend modules
|
|
7
|
+
- Data layer and service logic
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
- Follow AGENTS.md — Code Style, General Principles, Version Control, and AI Restrictions apply in full.
|
|
11
|
+
- Run major backend changes by the user first; do not execute blindly.
|
|
12
|
+
|
|
13
|
+
## Handoff
|
|
14
|
+
- When a task touches both backend and UI, co-work with designer, then hand off to tester for follow-up.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Agent: designer (front-end)
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
- Front-end UI/UX
|
|
5
|
+
- Screen redesigns
|
|
6
|
+
- Component layout and styling
|
|
7
|
+
- User-facing interactions
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
- Follow AGENTS.md — Code Style, General Principles, Version Control, and AI Restrictions apply in full.
|
|
11
|
+
- Match existing component patterns; do not introduce new design systems unless approved.
|
|
12
|
+
- Run major UI changes by the user first; do not execute blindly.
|
|
13
|
+
|
|
14
|
+
## Handoff
|
|
15
|
+
- When a task touches both UI and backend/database, co-work with backend-architect, then hand off to tester for follow-up.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Agent: researcher (placeholder)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Handles code-review purpose lookups and best-practice research on demand.
|
|
5
|
+
|
|
6
|
+
## Status
|
|
7
|
+
Deferred. The user wants to discuss code-review purpose and setup later. When summoned, this subagent will:
|
|
8
|
+
1. Research what code review is for in this project's context.
|
|
9
|
+
2. Return a short, concise, direct summary: purpose, right setup, best practices.
|
|
10
|
+
3. Not write code or change files until approved.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Agent: reviewer
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
- Code review: style, quality, blast radius, security, conventions
|
|
5
|
+
- Review existing files before refactor or change
|
|
6
|
+
|
|
7
|
+
## Handoff
|
|
8
|
+
- Reviews are triggered by /review or as a follow-up step after designer/backend-architect/tester complete work.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Agent: security-auditor
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
- Security scan and audit of new or changed code
|
|
5
|
+
- Dependency safety check (npm/yarn/pub/download)
|
|
6
|
+
- Auth, input validation, and data exposure review
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
- Follow AGENTS.md — Code Style, General Principles, Version Control, and AI Restrictions apply in full.
|
|
10
|
+
- Check for injection points, unsafe defaults, and hardcoded secrets.
|
|
11
|
+
- Report findings; do not auto-push or auto-fix without user approval.
|
|
12
|
+
|
|
13
|
+
## Handoff
|
|
14
|
+
- Triggered by /security-audit or as a follow-up step after designer/backend-architect complete work.
|
|
15
|
+
- Hand off to tester if code changes are needed based on findings.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Agent: tester
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
- Test generation for new or changed code
|
|
5
|
+
- Test execution and reporting
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
- Follow AGENTS.md — Code Style, General Principles, Version Control, and AI Restrictions apply in full.
|
|
9
|
+
- Use project test runner and dependency file for correct versions.
|
|
10
|
+
|
|
11
|
+
## Handoff
|
|
12
|
+
- Receives hand-off from designer, backend-architect, or security-auditor after their work is done.
|
|
13
|
+
- Runs test suite for affected files and reports results.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /init
|
|
2
|
+
|
|
3
|
+
Run this once per project. It crawls the project and generates or updates the root `AGENTS.md` — the only source of discovery for stack, architecture, conventions, and commands.
|
|
4
|
+
|
|
5
|
+
This command is stack-agnostic. It assumes nothing about language, framework, or architecture. All stack-specific detail comes from what it observes in the codebase.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. **Crawl the project** — list top-level folders, config files, dependency files, scripts, and entry points.
|
|
10
|
+
2. **Detect the stack** — from dependency files and imports (e.g. package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml).
|
|
11
|
+
3. **Detect the architecture/layer pattern** — from folder layout (e.g. client/server split, feature modules, src/pages + src/components, app/api).
|
|
12
|
+
4. **Extract conventions** — naming style, comment style, test file placement, lint/format config.
|
|
13
|
+
5. **Extract build/test/lint commands** — from package.json scripts, Makefile, or similar.
|
|
14
|
+
6. **Write or update root `AGENTS.md`** — populate only the observed facts. Do not hand-write architecture facts before this runs.
|
|
15
|
+
|
|
16
|
+
## Output
|
|
17
|
+
|
|
18
|
+
The resulting `AGENTS.md` becomes the project profile that `/setup` Phase 1 reads from. Every later phase reasons from this profile, never re-derives it from scratch.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# /pm <task>
|
|
2
|
+
|
|
3
|
+
Plan, diagram, and get approval before implementing any task.
|
|
4
|
+
|
|
5
|
+
## Contract
|
|
6
|
+
|
|
7
|
+
On every `/pm <task>` invocation:
|
|
8
|
+
|
|
9
|
+
1. **Analyze** the task against the Phase 1 project profile from root `AGENTS.md` (stack, architecture, conventions, build/test/lint commands).
|
|
10
|
+
2. **Plan** — ordered implementation steps.
|
|
11
|
+
3. **Diagram** — a Mermaid diagram scoped to what this task touches, plus the same flow re-rendered as plain-text ASCII box/arrow diagram directly in the response.
|
|
12
|
+
4. **Flow diagram** — adapt node content to the layer the task touches (UI taps/screens for client code, requests/handlers/DB calls for backend code, or both if it spans the boundary).
|
|
13
|
+
- Use `╔══╗` / `╚══╝` double-border boxes for user-initiated or external-caller-initiated actions (entry/exit points).
|
|
14
|
+
- Use `┌──┐` / `└──┘` single-border boxes for system steps (UI state changes, middleware, handlers, DB calls, service logic).
|
|
15
|
+
- Use `┌───┐` / `└───┘` with a question inside for decision nodes (e.g. `Auth valid?`, `Cache hit?`, `Form valid?`).
|
|
16
|
+
- Branch with `Yes` / `No` labels on fork lines.
|
|
17
|
+
- Cover the happy path plus key edge branches visible to the caller (error states, validation failures, empty states).
|
|
18
|
+
- Keep it concise: 4–12 nodes maximum.
|
|
19
|
+
5. **Confidence level** — a percentage (0-100%) per plan step, with a one-line reason. Any step below 90% must come with the specific clarifying question that resolves the unclear area.
|
|
20
|
+
6. **Approval gate** — stop here. Do not implement, edit files, or delegate to any other command until the person explicitly approves the plan.
|
|
21
|
+
|
|
22
|
+
## Agent routing
|
|
23
|
+
|
|
24
|
+
When a task spans multiple areas, delegate to each respective agent so they co-work, then hand off to tester for follow-up:
|
|
25
|
+
- **designer** — front-end UI/UX, screen redesigns, component layout, styling.
|
|
26
|
+
- **backend-architect** — database tables, schemas, API structure, server logic.
|
|
27
|
+
- **reviewer** — code review: style, quality, blast radius, security, conventions.
|
|
28
|
+
- **tester** — test generation and execution.
|
|
29
|
+
- **security-auditor** — security scan and audit.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
Present the plan, diagrams, and confidence levels. End with: "Approve this plan before I implement anything."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# /review
|
|
2
|
+
|
|
3
|
+
Targeted code-review entry point. Reviews existing files before refactor or change, and checks agent-generated code like a junior's PR.
|
|
4
|
+
|
|
5
|
+
## Contract
|
|
6
|
+
|
|
7
|
+
On every `/review` invocation:
|
|
8
|
+
|
|
9
|
+
1. **Identify** the files under review (changed, new, or agent-generated files).
|
|
10
|
+
2. **Read** each file in full — never review blindly.
|
|
11
|
+
3. **Check against AGENTS.md** — Code Style, General Principles, Version Control, AI Restrictions.
|
|
12
|
+
- Concise, short solutions; no over-engineering or oversized files needing refactor.
|
|
13
|
+
- No syntax/style mismatching the rest of the codebase.
|
|
14
|
+
- No obvious bugs; check blast radius of errors.
|
|
15
|
+
- No emojis or special characters in comments; comments are one-liner, one sentence.
|
|
16
|
+
- Markdown files use kebab naming.
|
|
17
|
+
4. **Check security** — no hardcoded secrets, no unsanitized input, no missing auth on routes, least-privilege data exposure.
|
|
18
|
+
5. **Run automated checks** — ESLint, TypeScript type check, tests — so the review focuses on logic, not style.
|
|
19
|
+
6. **Report findings** — file, line, issue, severity, recommended fix. Approve when good; request changes when not.
|
|
20
|
+
7. **No auto-push any branch.**
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
A short list of review findings, or "Approved" with no comments if everything passes.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# /security-audit
|
|
2
|
+
|
|
3
|
+
Scan new or changed code for security issues.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Identify changed or new files from the task scope.
|
|
8
|
+
2. Check for hardcoded secrets, credentials, or API keys.
|
|
9
|
+
3. Check for injection points (SQL, command, script) in user-facing input.
|
|
10
|
+
4. Check data exposure — least privilege: is more data returned than needed?
|
|
11
|
+
5. Check dependency safety — run the download safety check from AGENTS.md AI Restrictions.
|
|
12
|
+
6. Report findings with severity and recommended fix.
|
|
13
|
+
7. Do not auto-fix or auto-push; stop for user approval before any changes.
|
|
14
|
+
|
|
15
|
+
## Output
|
|
16
|
+
|
|
17
|
+
A short list of findings: file, line, issue, severity, fix. If none, report "No security issues found."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# /test
|
|
2
|
+
|
|
3
|
+
Generate and run tests for new or changed code.
|
|
4
|
+
|
|
5
|
+
## Contract
|
|
6
|
+
|
|
7
|
+
On every `/test` invocation:
|
|
8
|
+
|
|
9
|
+
1. **Identify** changed or new files from the task scope.
|
|
10
|
+
2. **Generate** tests for those files if they don't exist, matching the project's test framework and patterns.
|
|
11
|
+
3. **Run** the project's test suite for affected files using the commands from root `AGENTS.md` (e.g. `npm test`, per-folder test scripts).
|
|
12
|
+
4. **Report** results — pass/fail per test file, failures with details.
|
|
13
|
+
5. **No auto-commit activity logs and docs.** Do not auto-push any branch.
|
|
14
|
+
6. **Hand off back to reviewer or the originating agent** if failures need fixing.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Follow AGENTS.md Code Style and General Principles.
|
|
19
|
+
- Use the project's test runner and dependency file for correct versions.
|
|
20
|
+
- Report failures; do not auto-push.
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
Test results: which files passed, which failed, and failure details. If no tests exist yet, report "No tests found for <files>."
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Hook: pre-edit
|
|
2
|
+
|
|
3
|
+
Runs before any file edit.
|
|
4
|
+
|
|
5
|
+
1. Read the existing file(s) first — never edit blindly.
|
|
6
|
+
2. Confirm with the user if the change is major (new module, API surface change, database change, or >50 lines).
|
|
7
|
+
3. Check AGENTS.md for code style and conventions before writing.
|
|
8
|
+
4. No auto-commit activity logs and docs.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Stack overlay: react-express
|
|
2
|
+
|
|
3
|
+
## Detected stack
|
|
4
|
+
React front-end + Express back-end (split or monorepo).
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
- Client: `client/` or `frontend/` folder; React components in kebab-case files.
|
|
8
|
+
- Server: `server/` or `backend/` folder; Express routes and controllers.
|
|
9
|
+
- Shared types: `shared/` or `types/` folder if present.
|
|
10
|
+
- Build: `npm run build` (client), `npm start` or `node server/index.js` (server).
|
|
11
|
+
- Test: `npm test` per folder; Jest or Vitest.
|
|
12
|
+
- Lint: `npm run lint`; ESLint config at root or per folder.
|
|
13
|
+
|
|
14
|
+
## Overlay rules
|
|
15
|
+
- No external libraries unless absolutely necessary.
|
|
16
|
+
- Check download safety before installing.
|
|
17
|
+
- Run major changes by the user first.
|
|
18
|
+
- No auto-push any branch.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Stack overlay: react-native-expo-supabase
|
|
2
|
+
|
|
3
|
+
## Detected stack
|
|
4
|
+
React Native (Expo) + Supabase backend.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
- App: Expo router or navigation folder; components in kebab-case.
|
|
8
|
+
- Supabase: `supabase/` folder with migrations and client config.
|
|
9
|
+
- State: check for existing state management (Zustand, Context, etc.).
|
|
10
|
+
- Build: `npx expo build` or `npx expo prebuild`.
|
|
11
|
+
- Test: `npm test`; Jest with Expo preset.
|
|
12
|
+
- Lint: `npm run lint`; ESLint config at root.
|
|
13
|
+
|
|
14
|
+
## Overlay rules
|
|
15
|
+
- No external libraries unless absolutely necessary.
|
|
16
|
+
- Check download safety before installing (Expo SDK + Supabase packages).
|
|
17
|
+
- Run major changes by the user first.
|
|
18
|
+
- No auto-push any branch.
|
|
19
|
+
- Supabase migrations: review before applying; no auto-migrate.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Stack overlay: react-next
|
|
2
|
+
|
|
3
|
+
## Detected stack
|
|
4
|
+
Next.js (React) full-stack or front-end only.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
- App router: `app/` folder with route handlers and page components.
|
|
8
|
+
- Components: `components/` folder; kebab-case file names.
|
|
9
|
+
- Styling: Tailwind CSS; check `tailwind.config.ts` for existing conventions.
|
|
10
|
+
- Build: `npm run build`; dev: `npm run dev`.
|
|
11
|
+
- Test: `npm test`; Jest or Vitest.
|
|
12
|
+
- Lint: `npm run lint`; ESLint config at root.
|
|
13
|
+
|
|
14
|
+
## Overlay rules
|
|
15
|
+
- No external libraries unless absolutely necessary.
|
|
16
|
+
- Check download safety before installing.
|
|
17
|
+
- Run major changes by the user first.
|
|
18
|
+
- No auto-push any branch.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Agent Settings
|
|
2
|
+
|
|
3
|
+
## Writing style
|
|
4
|
+
- No em dashes in any writing. Zero tolerance.
|
|
5
|
+
- Concise, short, direct answers unless detail is requested.
|
|
6
|
+
- Plain language by default; avoid jargon unless asked for technical depth.
|
|
7
|
+
|
|
8
|
+
## Markdown
|
|
9
|
+
- Kebab-case naming for markdown files (e.g. `some-description-changes.md`).
|
|
10
|
+
- Comments: one-liner, one sentence.
|
|
11
|
+
- No emojis or special characters in comments.
|
|
12
|
+
|
|
13
|
+
## Model & context
|
|
14
|
+
- Default model: match project complexity; prefer faster/cheaper models for routine edits, larger models for architecture and review.
|
|
15
|
+
- Context limit: summarize before approaching limits; keep conversation focused on the current task.
|
|
16
|
+
|
|
17
|
+
## Safety
|
|
18
|
+
- Follow AGENTS.md Version Control and AI Restrictions (no auto-push, run major changes by user first, check download safety, no external libraries unless necessary).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Skill: skill-discovery
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Find skills relevant to the current project and propose them for user confirmation before installing. Never installs speculative infrastructure the user hasn't confirmed.
|
|
6
|
+
|
|
7
|
+
## Flow
|
|
8
|
+
|
|
9
|
+
1. Read the project profile from root `AGENTS.md` (stack, architecture, conventions).
|
|
10
|
+
2. Scan `.agents/skills/` for existing skills.
|
|
11
|
+
3. Compare project needs against available skill templates:
|
|
12
|
+
- UI-fidelity checklist → for client apps with UI work
|
|
13
|
+
- API-contract checklist → for backend services with API changes
|
|
14
|
+
- Release checklist → for projects with deploy/release steps
|
|
15
|
+
- Any other skill matching the detected stack or workflow
|
|
16
|
+
4. Propose the list with a one-line rationale per item.
|
|
17
|
+
5. Stop for user confirmation before installing any skill.
|
|
18
|
+
6. Install only confirmed skills into `.agents/skills/`.
|
|
19
|
+
|
|
20
|
+
## Rule
|
|
21
|
+
|
|
22
|
+
Do not default to any skill set. The project profile determines what's proposed. A project with no clear layer split shouldn't get skills just because that pattern exists elsewhere.
|