aas-setup 1.0.1 → 1.1.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/bin/aas-setup.mjs +4 -1
- package/configs/opencode/AGENTS.md +49 -0
- package/package.json +1 -1
- package/src/agents/opencode.mjs +1 -1
package/bin/aas-setup.mjs
CHANGED
|
@@ -9,14 +9,17 @@
|
|
|
9
9
|
// aas-setup pi opencode explicit subset
|
|
10
10
|
// Flags: --dry-run, --backup, --help, --version.
|
|
11
11
|
|
|
12
|
+
import { createRequire } from "node:module";
|
|
12
13
|
import { program } from "commander";
|
|
13
14
|
import { AGENTS, initialize } from "../src/commands/init.mjs";
|
|
14
15
|
import { selectAgents } from "../src/commands/select.mjs";
|
|
15
16
|
|
|
17
|
+
const { version } = createRequire(import.meta.url)("../package.json");
|
|
18
|
+
|
|
16
19
|
program
|
|
17
20
|
.name("aas-setup")
|
|
18
21
|
.description("Initialize Pi and OpenCode agent environments from a curated snapshot")
|
|
19
|
-
.version(
|
|
22
|
+
.version(version)
|
|
20
23
|
.argument("[agents...]", "agent ids to configure (pi, opencode); omit for interactive/all")
|
|
21
24
|
.option("--dry-run", "print planned actions, execute nothing")
|
|
22
25
|
.option("--backup", "back up existing agent homes before overwriting")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 🤖 OpenCode Agent Guidelines
|
|
2
|
+
|
|
3
|
+
## language
|
|
4
|
+
must reponse in chinese
|
|
5
|
+
|
|
6
|
+
## network
|
|
7
|
+
|
|
8
|
+
If facing a network problem,use proxy 127.0.0.1:7890(first) or 192.168.1.254:7890
|
|
9
|
+
|
|
10
|
+
## Session Management with tmux
|
|
11
|
+
|
|
12
|
+
Run dev servers, tests, and interactive CLIs inside tmux with the **current directory name as the session name** for easy debugging:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
SESSION=$(basename "$PWD")
|
|
16
|
+
tmux new -d -s "$SESSION" 2>/dev/null || true
|
|
17
|
+
|
|
18
|
+
# Run dev server with portless if available, otherwise fallback to npm
|
|
19
|
+
if command -v portless &>/dev/null; then
|
|
20
|
+
tmux send-keys -t "$SESSION" 'portless run npm run dev' Enter
|
|
21
|
+
else
|
|
22
|
+
tmux send-keys -t "$SESSION" 'npm run dev' Enter
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
tmux capture-pane -p -t "$SESSION" -S -20 # check output
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
See @~/.config/opencode/aas-setup/best-practices.md for full details.
|
|
29
|
+
|
|
30
|
+
## 🔧 AI Tool Guidelines
|
|
31
|
+
|
|
32
|
+
- Use the fff MCP tools for all file search operations instead of default tools.
|
|
33
|
+
- Use the sem MCP tools for semantic version control and git operations.
|
|
34
|
+
- When using bash commands for file/content search, prefer `fd` (fdfind) and `rg` (ripgrep) over standard `find` and `grep` for better performance and git-awareness.
|
|
35
|
+
|
|
36
|
+
## 📋 General Practices
|
|
37
|
+
|
|
38
|
+
- Follow my software development practice @~/.config/opencode/aas-setup/best-practices.md
|
|
39
|
+
- Read @~/.config/opencode/aas-setup/MEMORY.md first — qmd (durable) vs agentmemory (session); follow the decision rule there
|
|
40
|
+
- Read @~/.config/opencode/aas-setup/agent-memory.md — auto-capture learnings, persist bug fixes, keep memories concise.
|
|
41
|
+
- Follow git safety guidelines @~/.config/opencode/aas-setup/git-guidelines.md
|
|
42
|
+
- Keep responses concise and actionable.
|
|
43
|
+
- Never run destructive commands.
|
|
44
|
+
- Use our conventions for file names, tests, and commands.
|
|
45
|
+
- Keep your code clean and organized. Do not over-engineer solutions or overcomplicate things unnecessarily.
|
|
46
|
+
- Write clear and concise code. Avoid unnecessary complexity and redundancy.
|
|
47
|
+
- Use meaningful variable and function names.
|
|
48
|
+
- Prefer self-documenting code. Write comments and documentation where necessary.
|
|
49
|
+
- Keep your code modular and reusable. Avoid tight coupling and excessive dependencies.
|
package/package.json
CHANGED
package/src/agents/opencode.mjs
CHANGED