@p_tipso/agentive 1.0.2 → 1.0.3
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/README.md +10 -5
- package/package.json +4 -3
- package/src/commands/init.js +3 -1
- package/src/templates/base/AGENTS.md +5 -0
- package/src/templates/base/aiignore +48 -0
- package/src/utils/fileSystem.js +7 -0
package/README.md
CHANGED
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
Stop maintaining separate rule files for every AI tool. **agentive** scaffolds a universal `.agents/` directory
|
|
23
|
+
Stop maintaining separate rule files for every AI tool. **agentive** scaffolds a universal `.agents/` directory, an `AGENTS.md` file, and an `.aiignore` file in your project — providing a **single source of truth** for all your agent commands, skills, and rules, while significantly saving token usage.
|
|
24
24
|
|
|
25
25
|
## ✨ Why Agentive?
|
|
26
26
|
|
|
27
27
|
| Feature | Description |
|
|
28
28
|
| :---------------------------- | :------------------------------------------------------------------- |
|
|
29
|
-
| 🚀 **
|
|
29
|
+
| 🚀 **Interactive Setup** | Select your environment (General, Expo, React Native) to get tailored rules. |
|
|
30
30
|
| 🌍 **Universal** | Framework-agnostic setup. Works with React, Python, Go, you name it. |
|
|
31
31
|
| 🧠 **Single Source of Truth** | Centralize skills and rules for _all_ your AI agents in one place. |
|
|
32
|
-
| ⚡ **
|
|
32
|
+
| ⚡ **Dynamic Layering** | Scaffolds base rules and safely merges framework-specific guardrails. |
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -60,11 +60,12 @@ agentive
|
|
|
60
60
|
|
|
61
61
|
## 🏗 What Happens Under the Hood?
|
|
62
62
|
|
|
63
|
-
When you run `agentive`, it
|
|
63
|
+
When you run `agentive`, it launches an interactive wizard asking about your project environment (e.g., General, Mobile > Expo, React Native). It then intelligently scaffolds a tailored workspace:
|
|
64
64
|
|
|
65
65
|
```text
|
|
66
66
|
your-project/
|
|
67
67
|
├── AGENTS.md ← Root agent instructions
|
|
68
|
+
├── .aiignore ← Hides irrelevant files from AI to save tokens
|
|
68
69
|
├── .agents/
|
|
69
70
|
│ ├── settings.json ← Project config
|
|
70
71
|
│ ├── settings.local.json ← Local machine overrides (auto-gitignored)
|
|
@@ -78,12 +79,16 @@ your-project/
|
|
|
78
79
|
│ └── README.md ← Guide: how to add rules
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
### 📂 Folder Guide
|
|
82
|
+
### 📂 File & Folder Guide
|
|
82
83
|
|
|
84
|
+
- **`.aiignore`**: Prevents context pollution and saves tokens by hiding files (like `node_modules` or build outputs) from your AI agents.
|
|
83
85
|
- **`commands/`**: Reusable prompt instructions that agents can execute on demand (e.g. `review.md`).
|
|
84
86
|
- **`skills/`**: Skill definitions that teach agents how to behave in specific roles.
|
|
85
87
|
- **`rules/`**: Project-wide rules that all agents must follow strictly.
|
|
86
88
|
|
|
89
|
+
### 🌟 Framework-Specific Guardrails
|
|
90
|
+
By selecting a specific framework (like **Expo** or **React Native**), `agentive` overlays expertly crafted rules into your `.agents/` folder. This ensures your AI understands nuances like *Expo Router*, *Native Modules*, or *Unitless Pixels* right out of the box—preventing common hallucinations.
|
|
91
|
+
|
|
87
92
|
---
|
|
88
93
|
|
|
89
94
|
## 🤝 Contributing
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@p_tipso/agentive",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A universal, framework-agnostic AI agent repository setup CLI. Scaffold a .
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "A universal, framework-agnostic AI agent repository setup CLI. Scaffold a .agents/ workspace, AGENTS.md, and .aiignore to sync and optimize context for Cursor, Claude, and Windsurf.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Pakawat Tipso",
|
|
7
7
|
"type": "commonjs",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"scaffold",
|
|
28
28
|
"init",
|
|
29
29
|
"rules",
|
|
30
|
-
"context"
|
|
30
|
+
"context",
|
|
31
|
+
"aiignore"
|
|
31
32
|
],
|
|
32
33
|
"repository": {
|
|
33
34
|
"type": "git",
|
package/src/commands/init.js
CHANGED
|
@@ -57,7 +57,7 @@ async function runInit() {
|
|
|
57
57
|
name: 'framework',
|
|
58
58
|
message: 'Which framework are you using?',
|
|
59
59
|
choices: [
|
|
60
|
-
{ title: 'Expo', value: 'expo' },
|
|
60
|
+
{ title: 'Expo (Recommended)', value: 'expo' },
|
|
61
61
|
{ title: 'React Native', value: 'react-native' },
|
|
62
62
|
],
|
|
63
63
|
initial: 0,
|
|
@@ -88,6 +88,7 @@ async function runInit() {
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
console.log(chalk.green(' ✔ ') + chalk.white('Created ') + chalk.cyan('AGENTS.md'));
|
|
91
|
+
console.log(chalk.green(' ✔ ') + chalk.white('Created ') + chalk.cyan('.aiignore'));
|
|
91
92
|
console.log(chalk.green(' ✔ ') + chalk.white('Scaffolded ') + chalk.cyan('.agents/') + chalk.white(' workspace'));
|
|
92
93
|
|
|
93
94
|
// --- Done ---
|
|
@@ -97,6 +98,7 @@ async function runInit() {
|
|
|
97
98
|
console.log(chalk.white(' Your AI workspace is ready:'));
|
|
98
99
|
console.log('');
|
|
99
100
|
console.log(chalk.gray(' AGENTS.md ← root agent instructions'));
|
|
101
|
+
console.log(chalk.gray(' .aiignore ← hides files from AI to save tokens'));
|
|
100
102
|
console.log(chalk.gray(' .agents/'));
|
|
101
103
|
console.log(chalk.gray(' ├── settings.json ← project config'));
|
|
102
104
|
console.log(chalk.gray(' ├── settings.local.json ← local overrides (gitignored)'));
|
|
@@ -19,6 +19,11 @@ All agent configuration lives inside the `.agents/` directory:
|
|
|
19
19
|
| `.agents/skills/` | Skill definitions that teach agents how to behave |
|
|
20
20
|
| `.agents/rules/` | Project-wide rules all agents must follow |
|
|
21
21
|
|
|
22
|
+
## Context Management
|
|
23
|
+
|
|
24
|
+
When exploring, reading, or searching this repository, you **MUST** respect the exclusion rules defined in `.aiignore`.
|
|
25
|
+
Additionally, you must also read and respect any rules defined in `.gitignore`, `.cursorignore`, or `.aiexclude` if they exist in the repository to prevent context pollution and save token usage.
|
|
26
|
+
|
|
22
27
|
## Getting Started
|
|
23
28
|
|
|
24
29
|
1. Edit the markdown files inside `.agents/` to customise agent behaviour
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Standard AI Ignore file - prevents context pollution & saves tokens
|
|
2
|
+
# Learn more: https://github.com/TiPS0/agentive
|
|
3
|
+
|
|
4
|
+
# Dependencies
|
|
5
|
+
node_modules/
|
|
6
|
+
.pnp
|
|
7
|
+
.pnp.js
|
|
8
|
+
vendor/
|
|
9
|
+
|
|
10
|
+
# Environment variables
|
|
11
|
+
.env
|
|
12
|
+
.env.local
|
|
13
|
+
.env.development.local
|
|
14
|
+
.env.test.local
|
|
15
|
+
.env.production.local
|
|
16
|
+
|
|
17
|
+
# Build outputs & generated files
|
|
18
|
+
dist/
|
|
19
|
+
build/
|
|
20
|
+
out/
|
|
21
|
+
coverage/
|
|
22
|
+
.next/
|
|
23
|
+
.nuxt/
|
|
24
|
+
.vuepress/
|
|
25
|
+
.cache/
|
|
26
|
+
|
|
27
|
+
# Logs
|
|
28
|
+
logs
|
|
29
|
+
*.log
|
|
30
|
+
npm-debug.log*
|
|
31
|
+
yarn-debug.log*
|
|
32
|
+
yarn-error.log*
|
|
33
|
+
pnpm-debug.log*
|
|
34
|
+
lerna-debug.log*
|
|
35
|
+
|
|
36
|
+
# Version control & OS files
|
|
37
|
+
.git/
|
|
38
|
+
.DS_Store
|
|
39
|
+
*.pem
|
|
40
|
+
|
|
41
|
+
# Editor directories and files
|
|
42
|
+
.idea/
|
|
43
|
+
.vscode/
|
|
44
|
+
*.suo
|
|
45
|
+
*.ntvs*
|
|
46
|
+
*.njsproj
|
|
47
|
+
*.sln
|
|
48
|
+
*.sw?
|
package/src/utils/fileSystem.js
CHANGED
|
@@ -136,6 +136,13 @@ async function copyTemplates(templatesDir, agentsDir, projectName, projectType =
|
|
|
136
136
|
await fs.writeFile(path.join(cwd, 'AGENTS.md'), content, 'utf-8');
|
|
137
137
|
} catch { /* template may not exist */ }
|
|
138
138
|
|
|
139
|
+
// 1.5 Copy aiignore from base to project root as .aiignore
|
|
140
|
+
const aiignoreSrc = path.join(templatesDir, 'base', 'aiignore');
|
|
141
|
+
try {
|
|
142
|
+
let content = await fs.readFile(aiignoreSrc, 'utf-8');
|
|
143
|
+
await fs.writeFile(path.join(cwd, '.aiignore'), content, 'utf-8');
|
|
144
|
+
} catch { /* template may not exist */ }
|
|
145
|
+
|
|
139
146
|
const foldersToInclude = ['commands', 'skills', 'rules'];
|
|
140
147
|
|
|
141
148
|
// Helper to copy a specific template layer
|