@ryodeushii/ai-product-team-agents 0.0.3 → 0.0.5
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 +12 -0
- package/package.json +1 -1
- package/src/setup/index.ts +30 -7
package/README.md
CHANGED
|
@@ -48,6 +48,18 @@ This creates:
|
|
|
48
48
|
- `.claude/agents/` → symlink to `roles/` (Claude Code)
|
|
49
49
|
- `.opencode/agents/` → symlink to `roles/` (OpenCode)
|
|
50
50
|
|
|
51
|
+
**Update** an existing installation (re-creates all files and symlinks):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bunx @ryodeushii/ai-product-team-agents --update
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Remove** the framework from a project:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bunx @ryodeushii/ai-product-team-agents --uninstall
|
|
61
|
+
```
|
|
62
|
+
|
|
51
63
|
### 2. Configure your project
|
|
52
64
|
|
|
53
65
|
Edit `.agents.yml`:
|
package/package.json
CHANGED
package/src/setup/index.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import {
|
|
6
|
-
copyFile,
|
|
7
6
|
lstat,
|
|
8
7
|
mkdir,
|
|
9
8
|
readFile,
|
|
9
|
+
rm,
|
|
10
10
|
symlink,
|
|
11
11
|
writeFile,
|
|
12
12
|
} from "fs/promises";
|
|
@@ -42,8 +42,9 @@ export async function setupProject(
|
|
|
42
42
|
|
|
43
43
|
const link = async (target: string, linkPath: string) => {
|
|
44
44
|
try {
|
|
45
|
-
await lstat(linkPath);
|
|
46
|
-
|
|
45
|
+
await lstat(linkPath);
|
|
46
|
+
if (!overwrite) return;
|
|
47
|
+
await rm(linkPath, { recursive: true, force: true });
|
|
47
48
|
} catch (err) {
|
|
48
49
|
if ((err as NodeJS.ErrnoException).code !== "ENOENT") throw err;
|
|
49
50
|
}
|
|
@@ -93,12 +94,34 @@ export async function setupProject(
|
|
|
93
94
|
await link(rolesPath, join(projectRoot, ".opencode/agents"));
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
export async function uninstallProject(projectRoot: string): Promise<void> {
|
|
98
|
+
const files = [
|
|
99
|
+
join(projectRoot, "AGENTS.md"),
|
|
100
|
+
join(projectRoot, "CLAUDE.md"),
|
|
101
|
+
join(projectRoot, ".agents.yml"),
|
|
102
|
+
join(projectRoot, ".claude/agents"),
|
|
103
|
+
join(projectRoot, ".opencode/agents"),
|
|
104
|
+
];
|
|
105
|
+
for (const f of files) {
|
|
106
|
+
await rm(f, { recursive: true, force: true });
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
96
110
|
// CLI entrypoint
|
|
97
111
|
if (import.meta.main) {
|
|
98
112
|
const projectRoot = process.cwd();
|
|
99
|
-
const
|
|
100
|
-
|
|
113
|
+
const args = process.argv.slice(2).filter((a) => !a.startsWith("--"));
|
|
114
|
+
const flags = process.argv.slice(2).filter((a) => a.startsWith("--"));
|
|
101
115
|
const frameworkRoot = fileURLToPath(new URL("../../", import.meta.url));
|
|
102
|
-
|
|
103
|
-
|
|
116
|
+
|
|
117
|
+
if (flags.includes("--uninstall")) {
|
|
118
|
+
await uninstallProject(projectRoot);
|
|
119
|
+
console.log(`agents framework removed from ${projectRoot}`);
|
|
120
|
+
} else {
|
|
121
|
+
const projectName = args[0] ?? projectRoot.split("/").pop() ?? "project";
|
|
122
|
+
const overwrite =
|
|
123
|
+
flags.includes("--overwrite") || flags.includes("--update");
|
|
124
|
+
await setupProject(projectRoot, frameworkRoot, { projectName, overwrite });
|
|
125
|
+
console.log(`agents framework set up in ${projectRoot}`);
|
|
126
|
+
}
|
|
104
127
|
}
|