@b0tts/template-dev-installer 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/cli.mjs +129 -0
- package/files/.agents/skills/_explain-it-v1-disabled/SKILL.md +86 -0
- package/files/.agents/skills/close/SKILL.md +112 -0
- package/files/.agents/skills/closev2/REFERENCE.md +194 -0
- package/files/.agents/skills/closev2/SKILL.md +84 -0
- package/files/.agents/skills/create-nav-guide/SKILL.md +39 -0
- package/files/.agents/skills/docs-mcp/SKILL.md +91 -0
- package/files/.agents/skills/explain-it-v2/REFERENCE.md +213 -0
- package/files/.agents/skills/explain-it-v2/SKILL.md +133 -0
- package/files/.agents/skills/grill-me/SKILL.md +10 -0
- package/files/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/files/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +63 -0
- package/files/.agents/skills/grill-with-docs/SKILL.md +88 -0
- package/files/.agents/skills/handoff/SKILL.md +34 -0
- package/files/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/files/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/files/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
- package/files/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/files/.agents/skills/improve-codebase-architecture/SKILL.md +81 -0
- package/files/.agents/skills/karpathy-guidelines/SKILL.md +0 -0
- package/files/.agents/skills/regenerate-minecraft-world/SKILL.md +46 -0
- package/files/.agents/skills/to-prd/SKILL.md +76 -0
- package/files/.agents/skills/tutorial/SKILL.md +43 -0
- package/files/.agents/skills/write-a-skill/SKILL.md +117 -0
- package/files/.agents/skills/zoom-out/SKILL.md +7 -0
- package/files/AGENTS.md +40 -0
- package/files/README.md +245 -0
- package/files/opencode/opencode.json +178 -0
- package/files/opencode/plugins/Notifications.js +66 -0
- package/files/opencode/settings.json +1 -0
- package/files/pi/extensions/context-tiers.ts +250 -0
- package/files/pi/mcp.json +12 -0
- package/files/pi/settings.json +13 -0
- package/package.json +23 -0
package/cli.mjs
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// ── template-dev-installer ──────────────────────────────────────────
|
|
4
|
+
// Interactive installer that copies selected template categories into
|
|
5
|
+
// the current working directory.
|
|
6
|
+
//
|
|
7
|
+
// Categories:
|
|
8
|
+
// 1. Skills — AGENTS.md, README.md, .agents/
|
|
9
|
+
// 2. OpenCode — .opencode/plugins/, opencode.json, settings.json
|
|
10
|
+
// 3. Pi — .pi/agent/settings.json, extensions/, mcp.json
|
|
11
|
+
// 4. All — everything above
|
|
12
|
+
// ────────────────────────────────────────────────────────────────────
|
|
13
|
+
|
|
14
|
+
import { select, confirm } from "@inquirer/prompts";
|
|
15
|
+
import { cpSync, existsSync } from "node:fs";
|
|
16
|
+
import { resolve, dirname } from "node:path";
|
|
17
|
+
import { fileURLToPath } from "node:url";
|
|
18
|
+
|
|
19
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const FILES = resolve(__dirname, "files");
|
|
21
|
+
const CWD = process.cwd();
|
|
22
|
+
|
|
23
|
+
// ── Category definitions ────────────────────────────────────────────
|
|
24
|
+
// Each category maps to source dirs/files relative to ./files/ and
|
|
25
|
+
// their destination relative to the user's CWD.
|
|
26
|
+
|
|
27
|
+
const CATEGORIES = {
|
|
28
|
+
skills: {
|
|
29
|
+
label: "Skills (AGENTS.md, README.md, .agents/)",
|
|
30
|
+
items: [
|
|
31
|
+
{ src: "AGENTS.md", dest: "AGENTS.md" },
|
|
32
|
+
{ src: "README.md", dest: "README.md" },
|
|
33
|
+
{ src: ".agents", dest: ".agents" },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
opencode: {
|
|
37
|
+
label: "OpenCode (.opencode/plugins, opencode.json, settings.json)",
|
|
38
|
+
items: [
|
|
39
|
+
{ src: "opencode/plugins", dest: ".opencode/plugins" },
|
|
40
|
+
{ src: "opencode/opencode.json", dest: ".opencode/opencode.json" },
|
|
41
|
+
{ src: "opencode/settings.json", dest: ".opencode/settings.json" },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
pi: {
|
|
45
|
+
label: "Pi (.pi/agent/settings.json, extensions/, mcp.json)",
|
|
46
|
+
items: [
|
|
47
|
+
{ src: "pi/settings.json", dest: ".pi/agent/settings.json" },
|
|
48
|
+
{ src: "pi/extensions", dest: ".pi/agent/extensions" },
|
|
49
|
+
{ src: "pi/mcp.json", dest: ".pi/agent/mcp.json" },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// ── Helpers ─────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
function warnIfExists(destPath) {
|
|
57
|
+
if (existsSync(destPath)) {
|
|
58
|
+
console.log(` ⚠ ${destPath} already exists — will be overwritten.`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function copyItem(item) {
|
|
63
|
+
const src = resolve(FILES, item.src);
|
|
64
|
+
const dest = resolve(CWD, item.dest);
|
|
65
|
+
if (!existsSync(src)) {
|
|
66
|
+
console.log(` ✘ Source not found: ${item.src} (skipping)`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
warnIfExists(dest);
|
|
70
|
+
cpSync(src, dest, { recursive: true, force: true });
|
|
71
|
+
console.log(` ✓ ${item.dest}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function installCategory(name) {
|
|
75
|
+
const cat = CATEGORIES[name];
|
|
76
|
+
console.log(`\n── Installing ${cat.label.split(" (")[0]} ──`);
|
|
77
|
+
for (const item of cat.items) {
|
|
78
|
+
copyItem(item);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ── Main ────────────────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
async function main() {
|
|
85
|
+
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
86
|
+
console.log(" Development Template Installer");
|
|
87
|
+
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");
|
|
88
|
+
|
|
89
|
+
const choice = await select({
|
|
90
|
+
message: "Which template category do you want to install?",
|
|
91
|
+
choices: [
|
|
92
|
+
{ name: "Skills", value: "skills" },
|
|
93
|
+
{ name: "OpenCode", value: "opencode" },
|
|
94
|
+
{ name: "Pi", value: "pi" },
|
|
95
|
+
{ name: "All", value: "all" },
|
|
96
|
+
],
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (choice === "all") {
|
|
100
|
+
const ok = await confirm({
|
|
101
|
+
message: `Install everything into ${CWD}? Existing files will be overwritten.`,
|
|
102
|
+
default: true,
|
|
103
|
+
});
|
|
104
|
+
if (!ok) {
|
|
105
|
+
console.log("Aborted.");
|
|
106
|
+
process.exit(0);
|
|
107
|
+
}
|
|
108
|
+
for (const name of Object.keys(CATEGORIES)) {
|
|
109
|
+
installCategory(name);
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
const ok = await confirm({
|
|
113
|
+
message: `Install "${CATEGORIES[choice].label}" into ${CWD}?`,
|
|
114
|
+
default: true,
|
|
115
|
+
});
|
|
116
|
+
if (!ok) {
|
|
117
|
+
console.log("Aborted.");
|
|
118
|
+
process.exit(0);
|
|
119
|
+
}
|
|
120
|
+
installCategory(choice);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
console.log("\n✔ Done.\n");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
main().catch((err) => {
|
|
127
|
+
console.error("Error:", err.message);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explain-it
|
|
3
|
+
description: Beginner-friendly walkthrough of a file, code snippet, or error message — calibrated to the user's level via quick grilling. Use when user says "explain this", "walk me through", "what does this do", "teach me this", "break this down", or pastes an error and asks "what happened".
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Explain It
|
|
8
|
+
|
|
9
|
+
Walk the user through a file, code snippet, or error message section by section, calibrated to their actual understanding.
|
|
10
|
+
|
|
11
|
+
## Phase 1: Gather
|
|
12
|
+
|
|
13
|
+
Determine what's being explained:
|
|
14
|
+
|
|
15
|
+
- **File in project** → read it in full
|
|
16
|
+
- **Code in chat** → work from the conversation directly
|
|
17
|
+
- **Error message** → work from the pasted text
|
|
18
|
+
|
|
19
|
+
If the file references other files (imports, configs, schemas), read those too — but only if they're short and directly relevant.
|
|
20
|
+
|
|
21
|
+
## Phase 2: Calibrate
|
|
22
|
+
|
|
23
|
+
### Quick check (always)
|
|
24
|
+
|
|
25
|
+
Ask 2-3 rapid-fire questions to gauge the user's level with the technologies in the file. One question at a time.
|
|
26
|
+
|
|
27
|
+
**Style:** casual, low-pressure. Frame it as "help me calibrate" not "let me test you."
|
|
28
|
+
|
|
29
|
+
Example calibration questions:
|
|
30
|
+
- "Have you worked with [technology] before, or is this new?"
|
|
31
|
+
- "Quick gut check — what do you think [concept] does? Even a wrong guess helps me calibrate."
|
|
32
|
+
- "On a scale of 'never seen it' to 'use it daily', where are you with [thing]?"
|
|
33
|
+
|
|
34
|
+
If a question can be answered from the codebase or conversation history (e.g., they've been working with SQL all session), figure it out yourself instead of asking.
|
|
35
|
+
|
|
36
|
+
### Grill session (optional)
|
|
37
|
+
|
|
38
|
+
After the quick check, offer a deeper calibration:
|
|
39
|
+
|
|
40
|
+
> "Want to do a quick grill session? I'll ask a few more targeted questions to dial in exactly where you're at — takes about a minute and means I won't over-explain stuff you already know."
|
|
41
|
+
|
|
42
|
+
If yes: interview one question at a time. Probe specific concepts that appear in the file. For each concept, determine if the user genuinely understands it, sort of gets it, or has no clue. Move on once you have a clear picture. Don't pad with unnecessary questions.
|
|
43
|
+
|
|
44
|
+
If no: proceed with what you know from the quick check.
|
|
45
|
+
|
|
46
|
+
### Build the level map
|
|
47
|
+
|
|
48
|
+
Based on all answers, tag each concept/technology in the file:
|
|
49
|
+
- ✅ **Knows it** → correct terminology, skip basics, focus on project-specific usage
|
|
50
|
+
- 🟡 **Sort of knows it** → brief refresh, then connect to the new context
|
|
51
|
+
- ❌ **No idea** → plain English, analogies, tables, build from scratch
|
|
52
|
+
|
|
53
|
+
If the user says "just explain it" or "skip the questions" → default to beginner and go.
|
|
54
|
+
|
|
55
|
+
## Phase 3: Explain
|
|
56
|
+
|
|
57
|
+
Walk through section by section.
|
|
58
|
+
|
|
59
|
+
### For each section:
|
|
60
|
+
|
|
61
|
+
1. **Name it** — what this section does, in one plain sentence
|
|
62
|
+
2. **Show the code** — reference the actual lines
|
|
63
|
+
3. **Break it down** using:
|
|
64
|
+
- **Tables** for structured comparisons (column meanings, permissions, options)
|
|
65
|
+
- **Analogies** for abstract concepts (badges, whiteboards, snapshots)
|
|
66
|
+
- **Plain English translations** of technical syntax
|
|
67
|
+
4. **Why it matters** — one line on why this section exists
|
|
68
|
+
|
|
69
|
+
### For error messages:
|
|
70
|
+
|
|
71
|
+
1. **TL;DR** — what went wrong in plain English
|
|
72
|
+
2. **The fix** — what to do about it
|
|
73
|
+
3. **Why it happened** — the underlying cause
|
|
74
|
+
4. **Prevention** — what to watch for next time
|
|
75
|
+
|
|
76
|
+
### After all sections:
|
|
77
|
+
|
|
78
|
+
End with a **connection diagram** — ASCII art showing how all the pieces relate. This is the "how it all comes together" moment.
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
|
|
82
|
+
- **One section at a time** for large files (>50 lines). Smaller files can be explained in one pass.
|
|
83
|
+
- **Match the user's level** — don't explain what `SELECT` means if they said they know SQL.
|
|
84
|
+
- **Use their project's context** — reference their actual names, data, and use cases.
|
|
85
|
+
- **Pause for questions** — after every 2-3 sections, check in: "Questions on that, or keep going?"
|
|
86
|
+
- **No setup overhead** — conversational only. Don't create tracking files or lesson plans unless asked.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: close
|
|
3
|
+
description: Close out a coding session by reviewing chat memory and proposing memory-file updates, new skills, skill improvements, helpful tips, and a session log. Use when the user says '/close', 'close this session', 'wrap up', 'end session', or wants to close out the current conversation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /close
|
|
7
|
+
|
|
8
|
+
## Quick start
|
|
9
|
+
|
|
10
|
+
When the user invokes `/close`:
|
|
11
|
+
|
|
12
|
+
1. Present a multi-select menu of the 5 closing steps.
|
|
13
|
+
2. Run selected steps in fixed order: Memory → Skills → Improvements → Tips → Log.
|
|
14
|
+
3. For proposal branches (1–4), use the ranked proposal loop.
|
|
15
|
+
4. Write the session log last if selected.
|
|
16
|
+
|
|
17
|
+
## Menu
|
|
18
|
+
|
|
19
|
+
Present this multi-select menu:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
What do you want to close with? (multi-select)
|
|
23
|
+
[ ] 1. Update memory files — propose AGENTS.md edits from this session
|
|
24
|
+
[ ] 2. Propose new skills — spot reusable work worth a skill
|
|
25
|
+
[ ] 3. Improve skills used — QoL fixes for skills touched this session
|
|
26
|
+
[ ] 4. Helpful Tips — suggest time-saving systems and QoL ideas
|
|
27
|
+
[ ] 5. Write session log — log to b0ttsagent/sessionlogs/
|
|
28
|
+
[ ] 6. All
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If nothing selected, exit with "Nothing selected, closing."
|
|
32
|
+
|
|
33
|
+
## Branch 1: Update memory files
|
|
34
|
+
|
|
35
|
+
- Read the session for memory-worthy items: corrections, additions, deprecations, decisions.
|
|
36
|
+
- Threshold: durable + actionable + not already captured elsewhere.
|
|
37
|
+
- Ranking: corrections > high-impact additions > elegance/insight > deprecations > decisions.
|
|
38
|
+
- Target files:
|
|
39
|
+
- Default: `./AGENTS.md`, `~/.pi/agent/AGENTS.md`
|
|
40
|
+
- Auto-discover: `CONTEXT.md`, `CLAUDE.md`, `.planning/*.md`, `References/NavGuides/*.md`, `docs/adr/*.md`, root `README.md`
|
|
41
|
+
- Use the proposal loop.
|
|
42
|
+
- On approval, apply the edit directly to the target file.
|
|
43
|
+
|
|
44
|
+
## Branch 2: Propose new skills
|
|
45
|
+
|
|
46
|
+
- Identify reusable workflows or QoL improvements from the session.
|
|
47
|
+
- Ranking: reusability + QoL (highest), clear trigger, scope focus, creative/novel.
|
|
48
|
+
- Check existing skill front matter to avoid exact duplicates. Similar skills are allowed with a quick context note.
|
|
49
|
+
- Use the proposal loop.
|
|
50
|
+
- On approval, write a complete `SKILL.md` to `~/.pi/agent/skills/<name>/SKILL.md`.
|
|
51
|
+
- If the name collides with an existing skill, block and propose an alternative.
|
|
52
|
+
|
|
53
|
+
## Branch 3: Improve skills used
|
|
54
|
+
|
|
55
|
+
- Scope: skills actually invoked during this session. Exclude `/close` itself.
|
|
56
|
+
- Ranking: observed painpoint ≈ QoL improvement > outdated info > clarification.
|
|
57
|
+
- Use the proposal loop.
|
|
58
|
+
- On approval, apply the edit directly to the target skill file.
|
|
59
|
+
|
|
60
|
+
## Branch 4: Helpful Tips
|
|
61
|
+
|
|
62
|
+
- Identify session-derived ideas for time-saving systems, automation, organization, tooling, or workflow improvements.
|
|
63
|
+
- Ranking: quick win (high time/money savings, low effort) > repeated manual work > error reduction / cognitive load > organization / discoverability > nice-to-have. Within each tier, prefer ideas with long-term viability.
|
|
64
|
+
- Let the model decide what qualifies; avoid hard-coded heuristics.
|
|
65
|
+
- Tips may overlap conceptually with branches 1–3. Deduplicate against items already proposed in this run so the user doesn't see the same suggestion twice.
|
|
66
|
+
- Use the proposal loop.
|
|
67
|
+
- Present each tip with: category tag, title, observation from the session, recommendation, and estimated impact.
|
|
68
|
+
- On approval, acknowledge the tip and continue. Do not generate implementation code; the user can ask for that separately after closing.
|
|
69
|
+
|
|
70
|
+
## Proposal loop (branches 1–4)
|
|
71
|
+
|
|
72
|
+
1. Present the top 3 items with full detail (target, rationale, proposed change).
|
|
73
|
+
2. User multi-selects which to approve. Apply approved edits immediately (for branches 1–3); for Helpful Tips, acknowledge and continue.
|
|
74
|
+
3. Present the next 3 items as one-line summaries.
|
|
75
|
+
4. User can expand some, skip the batch, or exit the loop.
|
|
76
|
+
5. Loop ends on explicit exit.
|
|
77
|
+
6. When the pool is empty, acknowledge it and ask an open prompt: "No more items in this pool. Anything I missed, or shall we move on?"
|
|
78
|
+
7. Declined/unselected items are gone forever.
|
|
79
|
+
|
|
80
|
+
## Branch 5: Write session log
|
|
81
|
+
|
|
82
|
+
- Run last.
|
|
83
|
+
- Generate 3 filename ideas in lowercase kebab-case; recommend one.
|
|
84
|
+
- **Pause for user confirmation** — user may choose a different name, adjust the recommended name, or skip entirely.
|
|
85
|
+
- Once confirmed, write to `b0ttsagent/sessionlogs/<MM-DD-YYYY>/<HHMM>_<name>.md`
|
|
86
|
+
- Use this template:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
# <selected_name>
|
|
90
|
+
|
|
91
|
+
**Date:** MM-DD-YYYY
|
|
92
|
+
**Time:** HH:MM
|
|
93
|
+
|
|
94
|
+
## What happened
|
|
95
|
+
- ...
|
|
96
|
+
|
|
97
|
+
## Skills used
|
|
98
|
+
- ...
|
|
99
|
+
|
|
100
|
+
## Closing outcomes
|
|
101
|
+
- ...
|
|
102
|
+
|
|
103
|
+
## Open / next
|
|
104
|
+
- ...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Edge cases
|
|
108
|
+
|
|
109
|
+
- **Empty branch**: ask the user whether to skip or write a minimal log.
|
|
110
|
+
- **New skill name collision**: block and propose an alternative name.
|
|
111
|
+
- **Missing target file**: ask the user whether to recreate the file with the proposed content.
|
|
112
|
+
- **Mid-run abort**: no special handling; immediate apply preserves already-approved work.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# closev2 — Reference
|
|
2
|
+
|
|
3
|
+
## Scratchpad file format
|
|
4
|
+
|
|
5
|
+
Every scratchpad file uses this structure:
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Scratchpad — Branch <N>: <branch-name>
|
|
9
|
+
**Session:** <session-name>
|
|
10
|
+
**Date:** MM-DD-YYYY HH:MM
|
|
11
|
+
|
|
12
|
+
## Categories identified
|
|
13
|
+
- <category-1>
|
|
14
|
+
- <category-2>
|
|
15
|
+
- ...
|
|
16
|
+
|
|
17
|
+
## Extraction
|
|
18
|
+
|
|
19
|
+
### <category-1>
|
|
20
|
+
- <item>
|
|
21
|
+
- <item>
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
### <category-2>
|
|
25
|
+
- (none identified)
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
## Gleaning Pass
|
|
29
|
+
|
|
30
|
+
### <category-1>
|
|
31
|
+
- *Re-checked <range>: <result>* — either new items found or justification for none
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
### <category-2>
|
|
35
|
+
- *Re-checked <range>: no additional items qualify because <reason>*
|
|
36
|
+
...
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Each item under a category uses a bullet with this structure:
|
|
40
|
+
```
|
|
41
|
+
- Brief, specific description of the item. Context: what happened in the session. Reason: why it matters.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Empty categories are **never deleted** — they stay as `(none identified)` with a gleaning entry explaining why.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Self-taxonomy instructions
|
|
49
|
+
|
|
50
|
+
Before extracting, the model identifies 3–7 categories that fit the branch and the session. Categories should be:
|
|
51
|
+
|
|
52
|
+
- **Specific** — not "misc" or "things"
|
|
53
|
+
- **Session-aware** — named after what actually happened, not generic placeholders
|
|
54
|
+
- **Actionable** — each category should produce items the branch can use
|
|
55
|
+
|
|
56
|
+
### By branch
|
|
57
|
+
|
|
58
|
+
**Branch 1 — Memory files:** Look for changes the session made to the project's understanding. Good categories: architectural-decisions, tooling-choices, path-conventions, deprecations, new-facts, corrections, project-state-changes. The scan covers: what was decided, what was learned, what changed, what's now outdated.
|
|
59
|
+
|
|
60
|
+
**Target files (where edits apply):** Default — `./AGENTS.md`, `~/.pi/agent/AGENTS.md`. Auto-discover — `CONTEXT.md`, `CLAUDE.md`, `.planning/*.md`, `References/NavGuides/*.md`, `docs/adr/*.md`, root `README.md`.
|
|
61
|
+
|
|
62
|
+
**Branch 2 — New skills:** Look for workflows the model executed that follow a reusable shape. Good categories: repeated-patterns, multi-step-workflows, automation-worthy, config-templates. The scan covers: tasks done more than once, tasks with a clear trigger and output, things a future session would benefit from having templated.
|
|
63
|
+
|
|
64
|
+
**Branch 3 — Improve skills:** Look at skills actually invoked this session (excluding `/close` and `/closev2`). Good categories: missing-coverage, friction-points, outdated-references, poor-triggering, missing-edge-cases. The scan covers: times the model struggled with a skill, times the skill didn't cover a case, times the skill's instructions were wrong or incomplete.
|
|
65
|
+
|
|
66
|
+
**Branch 4 — Tips:** Look for meta-level improvements to workflow, tooling, or organization. Good categories: repeated-manual-work, automation-opportunity, organizational-gap, tooling-idea, cognitive-load-reduction. The scan covers: inefficiencies, things the user did manually, things that could be faster or clearer.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Priority ranking rules
|
|
71
|
+
|
|
72
|
+
The model maps its self-defined categories onto these fixed tiers for each branch, then ranks items accordingly.
|
|
73
|
+
|
|
74
|
+
### Branch 1 — Memory files
|
|
75
|
+
1. **Corrections** — things that were wrong and got fixed
|
|
76
|
+
2. **High-impact additions** — new information that would cause friction if forgotten
|
|
77
|
+
3. **Deprecations** — things now outdated that should be removed
|
|
78
|
+
4. **Decisions** — choices made with reasoning
|
|
79
|
+
5. **Elegance/insight** — quality-of-life improvements, clarity
|
|
80
|
+
|
|
81
|
+
### Branch 2 — New skills
|
|
82
|
+
1. **Reusability + QoL** — most frequently reusable, highest time savings
|
|
83
|
+
2. **Clear trigger** — well-defined "when to invoke"
|
|
84
|
+
3. **Scope focus** — narrow enough to be reliable
|
|
85
|
+
4. **Creative/novel** — interesting but less tested
|
|
86
|
+
|
|
87
|
+
### Branch 3 — Improve skills
|
|
88
|
+
1. **Observed painpoint ≈ QoL improvement** — things that caused friction this session
|
|
89
|
+
2. **Outdated information** — references that are wrong
|
|
90
|
+
3. **Clarification** — ambiguous instructions that slowed the model down
|
|
91
|
+
|
|
92
|
+
### Branch 4 — Tips
|
|
93
|
+
1. **Quick win** — high time/money savings, low effort
|
|
94
|
+
2. **Repeated manual work** — things done by hand that could be automated
|
|
95
|
+
3. **Error reduction / cognitive load** — things that reduce mistakes or mental overhead
|
|
96
|
+
4. **Organization / discoverability** — things that make info easier to find
|
|
97
|
+
5. **Nice-to-have** — long-term ideas, lower urgency
|
|
98
|
+
|
|
99
|
+
Within each tier, prefer items with long-term viability.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Gleaning pass — per-category forcing question
|
|
104
|
+
|
|
105
|
+
The `## Gleaning Pass` section must have one entry per category from `## Categories identified`. For each category, the model re-reads the conversation and answers:
|
|
106
|
+
|
|
107
|
+
> **Is there an item in the conversation that fits this category but is NOT in the extraction above?**
|
|
108
|
+
> - If yes: add it to the extraction section and note it in the gleaning entry.
|
|
109
|
+
> - If no: briefly state where in the conversation you looked (message range or topic) and why nothing qualified. Blanket "re-checked, nothing found" is insufficient.
|
|
110
|
+
|
|
111
|
+
Example gleaning entry:
|
|
112
|
+
```
|
|
113
|
+
### architectural-decisions
|
|
114
|
+
- Re-checked messages 1-45 (the full skill redesign discussion): no additional architectural decisions missed. The extraction covers per-branch scratchpad, self-taxonomy, file layout, and ranking approach.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Example with missed items:
|
|
118
|
+
```
|
|
119
|
+
### friction-points
|
|
120
|
+
- Re-checked the skill invocation at message 12: missed a friction point. The model had to ask clarifying questions about the skill's scope because the trigger description was too broad. Added to extraction above.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Triple-check protocol
|
|
126
|
+
|
|
127
|
+
This ONLY activates when every self-defined category in the Gleaning Pass section has no new items found.
|
|
128
|
+
|
|
129
|
+
1. Re-read the ENTIRE conversation from the first message to the last.
|
|
130
|
+
2. Ignore your categories entirely.
|
|
131
|
+
3. List EVERY factual claim, action taken, file edited, tool used, and question asked in the session.
|
|
132
|
+
4. For each item in that list, ask: does this belong in the current branch? If yes, add it to the extraction and the gleaning pass. If no, state why not.
|
|
133
|
+
5. If after this pass the extraction is still empty: write a paragraph explaining why this specific conversation genuinely had nothing relevant to this branch, referencing specific conversation events.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Proposal loop — full flow
|
|
138
|
+
|
|
139
|
+
The proposal loop runs after all scratchpads are written and verified. It is the SAME loop for all branches (1–4). Every batch of 3 items is presented with full detail — no condensed one-line summaries, no expand step.
|
|
140
|
+
|
|
141
|
+
### Per-batch format
|
|
142
|
+
|
|
143
|
+
Begin each batch with a **batch preview** line listing each item's target and tags:
|
|
144
|
+
|
|
145
|
+
> `AGENTS.md rule (high-impact / low-effort) · docs/adr/ index (medium-impact / medium-effort) · workflow idea (medium-impact / low-effort)`
|
|
146
|
+
|
|
147
|
+
Tags show impact and effort: `high-impact`, `medium-impact`, `low-impact`; `high-effort`, `medium-effort`, `low-effort`. If effort is irrelevant (e.g., a mindset shift), omit the effort tag.
|
|
148
|
+
|
|
149
|
+
Present 3 items at a time. Each item format:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
**<N>. <target-or-domain>: <one-line-action-summary>** `<category-tag>`
|
|
153
|
+
Impact: <one-line statement of what changes if applied — consequences of doing vs not doing>
|
|
154
|
+
How: <mechanism — file path, exact content, target location, how it works>
|
|
155
|
+
Why: <what happened in the session that surfaced this, and why it matters now>
|
|
156
|
+
Risk: <edge case or watch-out, if any; omit if none>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Fields in order: Headline → Impact → How → Why → Risk (optional).
|
|
160
|
+
|
|
161
|
+
**File-based proposals:** target is the primary file path, secondary files go in How. **Non-file proposals (Tips):** target is a domain label (e.g., `Workflow`, `Tooling`, `Organization`, `Mindset`), and the third field is `How to act on this:` instead of `How:`.
|
|
162
|
+
|
|
163
|
+
After presenting the items, end with a line listing the user's available actions:
|
|
164
|
+
|
|
165
|
+
> *"Select numbers to approve (numbers, range, or 'all'), or say 'skip' / 'none' to skip this batch, or 'exit' / 'done' to end the loop."*
|
|
166
|
+
|
|
167
|
+
Apply approved edits immediately for Branches 1–3; for Branch 4 (Tips), just acknowledge.
|
|
168
|
+
|
|
169
|
+
Mention the scratchpad path after the first batch only: *"Full extraction at `<path>`."*
|
|
170
|
+
|
|
171
|
+
### Loop end
|
|
172
|
+
|
|
173
|
+
Loop ends when the user explicitly exits or the pool is exhausted. When the pool is exhausted, ask: *"No more items in this pool. Anything I missed, or shall we move on?"* If user suggests something, add it to the pool and resume the loop. Otherwise, move to the next branch.
|
|
174
|
+
|
|
175
|
+
Declined or skipped items are gone forever — do not re-propose them.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## File layout
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
b0ttsagent/
|
|
183
|
+
├── scratchpads/
|
|
184
|
+
│ └── <MM-DD-YYYY>/
|
|
185
|
+
│ ├── <HHMM>_<session-name>_scratchpad-memory.md
|
|
186
|
+
│ ├── <HHMM>_<session-name>_scratchpad-skills.md
|
|
187
|
+
│ ├── <HHMM>_<session-name>_scratchpad-improvements.md
|
|
188
|
+
│ └── <HHMM>_<session-name>_scratchpad-tips.md
|
|
189
|
+
└── sessionlogs/
|
|
190
|
+
└── <MM-DD-YYYY>/
|
|
191
|
+
└── <HHMM>_<session-name>.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`<HHMM>` is the time the close session started, in 24-hour format. All scratchpad files and the session log share the same timestamp and session name.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: closev2
|
|
3
|
+
description: Close out a coding session with deep context extraction, memory-file updates, skill proposals, skill improvements, tips, and a session log. Use when user says '/close', 'close this session', 'wrap up', 'end session', or wants to close out the current conversation. Forces exhaustive reflection via per-branch scratchpads before any proposals are made.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /closev2
|
|
7
|
+
|
|
8
|
+
## Quick start
|
|
9
|
+
|
|
10
|
+
1. Present menu → user selects branches
|
|
11
|
+
2. Propose 3 session names → user picks one
|
|
12
|
+
3. Write all selected branch scratchpads upfront, verify them, then run each proposal loop in branch order (Memory → Skills → Improvements → Tips)
|
|
13
|
+
4. Run Branch 5 (session log) last
|
|
14
|
+
5. If nothing selected, exit with "Nothing selected, closing."
|
|
15
|
+
|
|
16
|
+
## Step 1 — Menu
|
|
17
|
+
|
|
18
|
+
Present this menu, exactly as shown:
|
|
19
|
+
|
|
20
|
+
What do you want to close with? (multi-select)
|
|
21
|
+
[ ] 1. Update memory files — propose AGENTS.md edits from this session
|
|
22
|
+
[ ] 2. Propose new skills — spot reusable work worth a skill
|
|
23
|
+
[ ] 3. Improve skills used — QoL fixes for skills touched this session
|
|
24
|
+
[ ] 4. Helpful Tips — suggest time-saving systems and QoL ideas
|
|
25
|
+
[ ] 5. Write session log — log to b0ttsagent/sessionlogs/
|
|
26
|
+
[ ] 6. All
|
|
27
|
+
|
|
28
|
+
I'll do a deep scan of our conversation before proposing anything.
|
|
29
|
+
|
|
30
|
+
## Step 2 — Session name
|
|
31
|
+
|
|
32
|
+
Propose 3 filename ideas in lowercase kebab-case. Recommend one. Wait for user confirmation — they may choose a different name, adjust the recommended one, or skip (use a timestamp-only name). This name is used for all scratchpad files and the session log.
|
|
33
|
+
|
|
34
|
+
## Step 3 — Branch processing
|
|
35
|
+
|
|
36
|
+
Run selected branches in fixed order: Memory → Skills → Improvements → Tips.
|
|
37
|
+
|
|
38
|
+
### 3a — Write all scratchpads
|
|
39
|
+
|
|
40
|
+
Write all selected branch scratchpads upfront, in branch order. For each: use the scratchpad format and self-taxonomy instructions in [REFERENCE.md](REFERENCE.md). Write to `b0ttsagent/scratchpads/<MM-DD-YYYY>/<HHMM>_<session-name>_scratchpad-<branch>.md`.
|
|
41
|
+
|
|
42
|
+
Each file MUST include a `## Gleaning Pass` section at the bottom. See REFERENCE.md for the per-category forcing question.
|
|
43
|
+
|
|
44
|
+
**Triple-check:** if every self-defined category in the Gleaning Pass has no new items, run the triple-check protocol in REFERENCE.md.
|
|
45
|
+
|
|
46
|
+
### 3b — Verify all scratchpads
|
|
47
|
+
|
|
48
|
+
1. Read each scratchpad file you just wrote.
|
|
49
|
+
2. Confirm: each file exists and has a `## Gleaning Pass` section.
|
|
50
|
+
3. For any that fail: re-write that scratchpad. If it fails a second time: offer the user (i) retry with a different path, (ii) inline extraction into a visible message, or (iii) skip this branch. Do not skip silently.
|
|
51
|
+
|
|
52
|
+
### 3c — Proposal loops
|
|
53
|
+
|
|
54
|
+
For each selected branch, in order: read the branch's scratchpad, rank items using the fixed priority rules (see REFERENCE.md), then run the proposal loop:
|
|
55
|
+
|
|
56
|
+
1. Present a batch preview line, then 3 items with full detail: headline (target + action), Impact, How, Why, and optional Risk. Format is defined in REFERENCE.md.
|
|
57
|
+
2. Mention where the full extraction lives: *"Full extraction at `<scratchpad-path>`."* (once, after the first batch).
|
|
58
|
+
3. User multi-selects which to approve.
|
|
59
|
+
4. For Branches 1–3: apply approved edits immediately. For Branch 4 (Tips): acknowledge and continue.
|
|
60
|
+
5. Present next 3 items with the same full-detail format. Every batch gets full detail — no one-line summaries.
|
|
61
|
+
6. User can approve (multi-select), skip the batch, or exit.
|
|
62
|
+
7. Loop ends on explicit exit.
|
|
63
|
+
8. If pool is empty: *"No more items. Anything I missed, or shall we move on?"*
|
|
64
|
+
9. Declined/unselected items are gone forever.
|
|
65
|
+
|
|
66
|
+
### 3d — Tips dedup
|
|
67
|
+
|
|
68
|
+
Branch 4 (Tips) only: before presenting, check whether an item was already proposed in any earlier branch (accepted or declined). If yes, skip it.
|
|
69
|
+
|
|
70
|
+
## Step 4 — Session log
|
|
71
|
+
|
|
72
|
+
Run last, even if Branches 1–4 were not selected.
|
|
73
|
+
|
|
74
|
+
Use the session name from Step 2. Write to `b0ttsagent/sessionlogs/<MM-DD-YYYY>/<HHMM>_<session-name>.md` with:
|
|
75
|
+
- `# <session-name>` header, Date, Time
|
|
76
|
+
- `## What happened`, `## Skills used`, `## Closing outcomes`, `## Open / next`
|
|
77
|
+
|
|
78
|
+
## Edge cases
|
|
79
|
+
|
|
80
|
+
- **Empty branch**: ask to skip or write minimal log.
|
|
81
|
+
- **Skill name collision**: block, propose alternative.
|
|
82
|
+
- **Missing target file**: ask to recreate with proposed content.
|
|
83
|
+
- **Mid-run abort**: no special handling; approved work is preserved.
|
|
84
|
+
- **File write failure**: follow Step 3b soft escape — retry once, offer alternatives, never skip silently.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-nav-guide
|
|
3
|
+
description: Generate a reference document (nav guide) from the current conversation. Use when user says "doc this", "write this up", "make a reference", "create a nav guide", "document what we just did", or similar.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Nav Guide
|
|
7
|
+
|
|
8
|
+
## What this skill does
|
|
9
|
+
|
|
10
|
+
Reads the current conversation and produces a markdown nav guide in `b0ttsagent/NavGuides/`. The guide is written for two audiences: the user as a personal reference, and future AI assistants who need to understand the setup before suggesting changes or additions.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. **Extract** key information from the conversation — only what's actually present, don't invent.
|
|
15
|
+
2. **Generate front matter** — produce `name`, `topics`, and `description` from the conversation content. Use the naming convention matching the filename (e.g. `MinecraftModsGuide`).
|
|
16
|
+
3. **Write overview table** — key properties as a markdown table. Adapt fields to the domain (ports, locations, credentials, versions, config values — whatever is relevant). Don't force Docker-specific fields onto non-Docker setups.
|
|
17
|
+
4. **Write key systems** — one section per major subsystem that has its own commands or configuration. For each: what it does, how to operate it, current state.
|
|
18
|
+
5. **Write gotchas** — brief blockquotes (`>`) for anything non-obvious that caused problems during setup.
|
|
19
|
+
6. **Avoid duplication** — scan related nav guides in `b0ttsagent/NavGuides/` for overlapping topics. Don't repeat information already covered there. Reference them if needed.
|
|
20
|
+
7. **Present** — show the generated guide to the user for confirmation before writing the file.
|
|
21
|
+
|
|
22
|
+
## What to leave out
|
|
23
|
+
|
|
24
|
+
- Step-by-step setup instructions — current state only
|
|
25
|
+
- Speculative future features
|
|
26
|
+
- Things that worked without incident
|
|
27
|
+
|
|
28
|
+
## Format rules
|
|
29
|
+
|
|
30
|
+
- Markdown only, with YAML front matter
|
|
31
|
+
- Tables for config values and key properties
|
|
32
|
+
- Bash code blocks for all commands
|
|
33
|
+
- Gotchas as `>` blockquotes inline with the relevant section
|
|
34
|
+
- No preamble, no closing remarks
|
|
35
|
+
- Section headers should match the actual systems — don't use generic headers like "Configuration" if a more specific name fits (e.g. "Backups", "Chunky", "RCON")
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
Write to `b0ttsagent/NavGuides/<name>.md` after user confirms.
|