scaffy-collab 1.8.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ColonelPanicX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.4
2
+ Name: scaffy-collab
3
+ Version: 1.8.0
4
+ Summary: Bootstrap a .collab/ multi-agent collaboration workspace for any project
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/ColonelPanicX/scaffy
7
+ Project-URL: Bug Tracker, https://github.com/ColonelPanicX/scaffy/issues
8
+ Project-URL: Changelog, https://github.com/ColonelPanicX/scaffy/releases
9
+ Keywords: scaffold,collab,ai,agents,llm,project-management
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Provides-Extra: windows
25
+ Requires-Dist: tzdata; extra == "windows"
26
+ Dynamic: license-file
27
+
28
+ # scaffy
29
+
30
+ Initialize a project with a standard `.collab/` workspace scaffold for multi-agent collaboration.
31
+
32
+ ## Quickstart
33
+
34
+ ### Windows — GUI (exe)
35
+
36
+ 1. Download `scaffy.exe` from the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest)
37
+ 2. Double-click to run — no install needed
38
+ 3. Fill in **Project Name** and **Target Path**, adjust options, click **Build!**
39
+ 4. When the build completes, a popup shows the initial prompt — copy it and paste into your AI agent to start your first session
40
+
41
+ <img width="642" height="750" alt="image" src="https://github.com/user-attachments/assets/ebaf4f61-7a5d-45de-8e01-378a531e9da3" />
42
+
43
+
44
+ ---
45
+
46
+ ### Python — CLI (Mac / Linux / Windows)
47
+
48
+ Requires Python 3.9+. No dependencies to install.
49
+
50
+ 1. Download `scaffy.py` from the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest)
51
+ 2. Run it — scaffy will walk you through the rest:
52
+
53
+ ```bash
54
+ python3 scaffy.py
55
+ ```
56
+
57
+ 3. Follow the prompts — at any step, type `b` to go back or `q` to quit
58
+ 4. When scaffolding completes, the terminal prints the initial prompt — copy it and paste into your AI agent to start your first session
59
+
60
+ To skip the prompts entirely:
61
+
62
+ ```bash
63
+ python3 scaffy.py --name my-project --path /path/to/base \
64
+ --governance standard \
65
+ --platform github
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Purpose
71
+
72
+ `scaffy.py` creates a collaboration scaffold with:
73
+
74
+ - `.collab/collab-contract.md` — Rules, guardrails, and session protocols (OPEN/CLOSE SESSION)
75
+ - `.collab/kanban-board.md` — Task tracking board
76
+ - `.collab/context.md` — Stable project facts: tech stack, key files, conventions
77
+ - `.collab/project.yaml` — Machine-readable project metadata
78
+ - `.collab/prompts/initial-prompt.md` — First-session onboarding prompt (paste on first launch)
79
+ - `.collab/prompts/agent-profile.md` — Fill-in questionnaire for generating agent instructions (CLAUDE.md, AGENTS.md, etc.)
80
+ - `.collab/brainstorm/` — Thinking space for pre-ticket concepts and proposals
81
+ - `.collab/session-summaries/` — Session summary directory with template
82
+ - `.collab/audit/` — Analysis reports and planning documents
83
+ - `.collab/supporting-artifacts/` — Diagrams, specs, research, and other project-adjacent materials
84
+ - `.collab/prompts/` — Reusable agent prompts, including the agent instructions generator
85
+ - `.collab/playbooks/` — Reference playbooks; includes a generic coding standards playbook
86
+ - `.collab/git-management/` — Git governance templates
87
+ - `.gitignore` — Sane defaults (`.collab/` and agent dirs excluded from version control)
88
+
89
+ ## Usage
90
+
91
+ ```bash
92
+ # Interactive
93
+ python3 scaffy.py
94
+
95
+ # Fully scripted (non-interactive)
96
+ python3 scaffy.py --name my-project --path /path/to/base
97
+
98
+ # With flags
99
+ python3 scaffy.py --name my-project --path /path/to/base \
100
+ --governance strict \
101
+ --platform github \
102
+ --description "Automates AWS resource exports to Excel" \
103
+ --init-git
104
+
105
+ # Preview without writing
106
+ python3 scaffy.py --dry-run
107
+ ```
108
+
109
+ ## Flags
110
+
111
+ | Flag | Description | Default |
112
+ |---|---|---|
113
+ | `--name NAME` | Project name | interactive |
114
+ | `--path PATH` | Base directory for scaffold installation | interactive |
115
+ | `--force` | Overwrite existing files | off |
116
+ | `--dry-run` | Show planned actions without writing | off |
117
+ | `--governance MODE` | `lightweight`, `standard`, or `strict` | interactive (`standard`) |
118
+ | `--platform PLATFORM` | `github`, `gitlab`, or `none` — writes platform-native issue and PR/MR templates | interactive (`none`) |
119
+ | `--license LICENSE` | `mit`, `apache-2.0`, `gpl-3.0`, `agpl-3.0`, `bsd-2-clause`, `bsd-3-clause`, `mpl-2.0`, `unlicense`, or `none` — writes a `LICENSE` file | interactive (`none`) |
120
+ | `--init-git` | Run `git init` in the project root after scaffolding | off |
121
+ | `--description TEXT` | Short description injected into `context.md` | interactive (optional) |
122
+ | `--cli CLI` | Agent CLI for `--save-chat` / `--list-chats`: `claude`, `codex`, `gemini` | auto-detect |
123
+
124
+ ## Governance Modes
125
+
126
+ | Mode | Use when |
127
+ |---|---|
128
+ | `lightweight` | Prototypes, solo work, fast iteration |
129
+ | `standard` | Most active projects (recommended default) |
130
+ | `strict` | Compliance, regulated, or high-risk work |
131
+
132
+ ## First Session
133
+
134
+ After scaffolding, the terminal prints the full onboarding prompt between separator lines — copy it and paste it directly into your agent on first launch. The same prompt is saved to `.collab/prompts/initial-prompt.md` as a backup.
135
+
136
+ The prompt orients the agent to the `.collab/` structure, initializes its memory with stable project facts, and installs the OPEN/CLOSE SESSION protocols for all future sessions.
137
+
138
+ ## Session Protocols
139
+
140
+ The scaffold installs four trigger phrases into the agent contract and initial prompt:
141
+
142
+ - **`OPEN SESSION`** — Agent reads the latest session summary, kanban board, and context,
143
+ then delivers a concise resume of where things stand. Use at the start of every session.
144
+ - **`SAVE SESSION`** — Mid-session checkpoint. Agent writes a summary and updates the kanban,
145
+ then continues working. Use any time you want to preserve progress without closing.
146
+ - **`CLOSE SESSION`** — Agent writes a session summary and updates the kanban board.
147
+ Use at the end of every session.
148
+ - **`SAVE CHAT`** — Exports the full session transcript to `.collab/chat-logs/` as a markdown
149
+ file. Session UUID preserved in the header for traceability. Supported for Claude Code,
150
+ Gemini CLI, and Codex CLI. scaffy auto-detects the running agent when invoked from inside
151
+ a chat session. If run from a plain terminal after the session ends, auto-detection is not
152
+ possible and scaffy will prompt you to select the agent (1/2/3). Use
153
+ `scaffy --save-chat --cli <agent>` to skip the prompt.
154
+
155
+ ## Brainstorm Workflow
156
+
157
+ The `.collab/brainstorm/` directory is a persistent thinking space for ideas that aren't ready to
158
+ become formal tickets yet. It bridges the gap between "I had a thought" and "I opened an issue."
159
+
160
+ **How it works:**
161
+
162
+ 1. Create a file for your idea: `.collab/brainstorm/my-idea-name.md`
163
+ 2. Use `.collab/brainstorm/brainstorm-template.md` as a starting point
164
+ 3. Brain dump freely — no rules, no required format in the idea body
165
+ 4. When ready, point your agent at the file: *"Hey, look at this idea — does it have legs?"*
166
+ 5. The agent will engage honestly, then append a dated summary to the **Discussion Log** section
167
+ 6. Ideas evolve over time. Status tracks the lifecycle: `drafting` → `workshopping` → `parked` or `graduated`
168
+ 7. When an idea becomes a ticket, note the issue number at the bottom and leave the file in place
169
+
170
+ **Key property:** nothing in `brainstorm/` is required to go anywhere. Ideas can sit, evolve slowly,
171
+ or be parked indefinitely. The point is keeping them on paper so they aren't lost when a session closes.
172
+
173
+ When scaffolding into an **existing project**, scaffy will print a reminder to migrate any ideas
174
+ you already have written down or in your head into the new directory.
175
+
176
+ ## Additional Enhancements
177
+
178
+ The scaffold includes two optional tools in `.collab/prompts/` to help you get more out of your agent setup:
179
+
180
+ ### Agent Instructions Generator
181
+
182
+ `.collab/prompts/agent-profile.md` is a fill-in questionnaire that captures your project's
183
+ tech stack, key commands, conventions, and guardrails — the things an agent needs to collaborate
184
+ well with you. Once filled out, paste `.collab/prompts/agent-md-prompt.md` into your agent
185
+ and it will generate a tailored `CLAUDE.md`, `AGENTS.md`, or equivalent instructions file
186
+ for the project root.
187
+
188
+ ### Coding Playbook
189
+
190
+ `.collab/playbooks/coding-playbook.md` is a pre-populated reference covering general software
191
+ development best practices — code quality, testing, security, documentation, and more.
192
+ It's a starting point: edit it down to what matters for your project, or leave it as a
193
+ general reference for your agent to consult.
194
+
195
+ ### Agent Skills
196
+
197
+ The [`skills/`](skills/) directory contains installable slash commands for Claude Code and Gemini CLI, and a passive skill for Codex CLI. Once installed, your agent knows how to run scaffy without you explaining it.
198
+
199
+ | Agent | File | Type |
200
+ |---|---|---|
201
+ | Claude Code | `skills/claude/scaffy.md` | `/scaffy` slash command |
202
+ | Gemini CLI | `skills/gemini/scaffy.toml` | `/scaffy` slash command |
203
+ | Codex CLI | `skills/codex/scaffy/` | AI-activated (no slash command) |
204
+
205
+ **Install (global):**
206
+
207
+ ```bash
208
+ # Claude Code
209
+ cp skills/claude/scaffy.md ~/.claude/commands/scaffy.md
210
+
211
+ # Gemini CLI
212
+ cp skills/gemini/scaffy.toml ~/.gemini/commands/scaffy.toml
213
+
214
+ # Codex CLI
215
+ cp -r skills/codex/scaffy ~/.codex/skills/scaffy
216
+ ```
217
+
218
+ **Claude & Gemini:** type `/scaffy` to bootstrap a project — the agent gathers inputs and runs scaffy for you. Pass a project name or path as arguments to skip the prompts.
219
+
220
+ The Claude skill also handles session protocols. If you use scaffy's session conventions in your projects, you can invoke them via the skill as a more reliable alternative to the plain-text trigger:
221
+
222
+ ```
223
+ /scaffy open session
224
+ /scaffy save session
225
+ /scaffy close session
226
+ /scaffy save chat
227
+ ```
228
+
229
+ **Codex:** no slash command — Codex pulls the skill in automatically when it detects a scaffolding need.
230
+
231
+ ---
232
+
233
+ ## scafrag — Optional Companion Tool
234
+
235
+ `scafrag.py` is a completely optional companion script that lives alongside `scaffy.py`. Nothing
236
+ in scaffy requires it, and you won't miss anything by skipping it. But if you end up using
237
+ scaffy across multiple projects, it becomes useful.
238
+
239
+ **What it does:** indexes the `.collab/` workspaces across all your projects and lets you query
240
+ them — searching for past decisions, checking cross-project status, or dumping full context for
241
+ a project in one command.
242
+
243
+ ```bash
244
+ # Build the index (point it at your projects root)
245
+ python3 scafrag.py index --root ~/code
246
+
247
+ # Search across all projects
248
+ python3 scafrag.py query "authentication middleware"
249
+
250
+ # Full context dump for one project
251
+ python3 scafrag.py context my-project
252
+
253
+ # Portfolio view — all projects with kanban lane counts
254
+ python3 scafrag.py status
255
+
256
+ # List all indexed projects
257
+ python3 scafrag.py projects
258
+ ```
259
+
260
+ All commands support `--format text` (default), `--format json`, and `--format markdown`.
261
+ Output goes to stdout — pipe it wherever you want, including directly into an AI agent.
262
+
263
+ **Requirements:** Python 3.9+. No external dependencies — same as `scaffy.py`.
264
+
265
+ Windows users: `scafrag.exe` is available in the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest) — no Python required. Run it from Command Prompt or PowerShell.
266
+
267
+ ---
268
+
269
+ ## Behavior
270
+
271
+ - If `--name` and `--path` are both provided, runs non-interactively.
272
+ - Otherwise launches an interactive wizard: at any prompt, type `b` to go back one step or `q` to quit.
273
+ - Existing `.gitignore` is not overwritten — template is written to `.collab/.gitignore.template` instead.
274
+ - Uses `America/New_York` and `MM.DD.YYYY` date formatting in generated templates.
275
+
276
+ ## Make `scaffy` Available Everywhere
277
+
278
+ ```bash
279
+ mkdir -p ~/.local/bin
280
+ chmod +x path/to/scaffy/scaffy.py
281
+ ln -sf path/to/scaffy/scaffy.py ~/.local/bin/scaffy
282
+ ```
283
+
284
+ Ensure `~/.local/bin` is on your `PATH` (Bash):
285
+
286
+ ```bash
287
+ grep -q 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc \
288
+ || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
289
+ source ~/.bashrc
290
+ ```
291
+
292
+ Verify:
293
+
294
+ ```bash
295
+ which scaffy
296
+ scaffy --help
297
+ ```
298
+
299
+ If you move the script later, update the symlink:
300
+
301
+ ```bash
302
+ ln -sf /new/path/to/scaffy.py ~/.local/bin/scaffy
303
+ ```
304
+
305
+ ---
306
+
307
+ ## See Also
308
+
309
+ Tools and resources that pair well with the structured approach scaffy promotes. None are required.
310
+
311
+ - **[GSD](https://github.com/gsd-build/gsd-2)** — Spec-driven development system for autonomous multi-phase agent work: research, planning, execution, and git management in a single pipeline.
312
+ - **[MemPalace](https://github.com/MemPalace/mempalace/tree/main)** — Local-first AI memory with semantic search. Complements scaffy's session summaries with queryable, persistent long-term recall.
313
+ - **[Caveman](https://github.com/JuliusBrussee/caveman)** — Claude Code skill that compresses agent output by ~75% using terse, technical language. Same accuracy, far fewer tokens.
314
+ - **[Karpathy's LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)** — Pattern for building a personal knowledge base where an LLM incrementally maintains a persistent wiki synthesized from source documents.
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "scaffy-collab"
7
+ version = "1.8.0"
8
+ description = "Bootstrap a .collab/ multi-agent collaboration workspace for any project"
9
+ readme = "readme.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ keywords = ["scaffold", "collab", "ai", "agents", "llm", "project-management"]
13
+ classifiers = [
14
+ "Development Status :: 5 - Production/Stable",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Software Development",
24
+ "Topic :: Utilities",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/ColonelPanicX/scaffy"
29
+ "Bug Tracker" = "https://github.com/ColonelPanicX/scaffy/issues"
30
+ Changelog = "https://github.com/ColonelPanicX/scaffy/releases"
31
+
32
+ [project.scripts]
33
+ scaffy = "scaffy:main"
34
+
35
+ [project.optional-dependencies]
36
+ windows = ["tzdata"]
37
+
38
+ [tool.setuptools]
39
+ py-modules = ["scaffy"]
@@ -0,0 +1,287 @@
1
+ # scaffy
2
+
3
+ Initialize a project with a standard `.collab/` workspace scaffold for multi-agent collaboration.
4
+
5
+ ## Quickstart
6
+
7
+ ### Windows — GUI (exe)
8
+
9
+ 1. Download `scaffy.exe` from the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest)
10
+ 2. Double-click to run — no install needed
11
+ 3. Fill in **Project Name** and **Target Path**, adjust options, click **Build!**
12
+ 4. When the build completes, a popup shows the initial prompt — copy it and paste into your AI agent to start your first session
13
+
14
+ <img width="642" height="750" alt="image" src="https://github.com/user-attachments/assets/ebaf4f61-7a5d-45de-8e01-378a531e9da3" />
15
+
16
+
17
+ ---
18
+
19
+ ### Python — CLI (Mac / Linux / Windows)
20
+
21
+ Requires Python 3.9+. No dependencies to install.
22
+
23
+ 1. Download `scaffy.py` from the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest)
24
+ 2. Run it — scaffy will walk you through the rest:
25
+
26
+ ```bash
27
+ python3 scaffy.py
28
+ ```
29
+
30
+ 3. Follow the prompts — at any step, type `b` to go back or `q` to quit
31
+ 4. When scaffolding completes, the terminal prints the initial prompt — copy it and paste into your AI agent to start your first session
32
+
33
+ To skip the prompts entirely:
34
+
35
+ ```bash
36
+ python3 scaffy.py --name my-project --path /path/to/base \
37
+ --governance standard \
38
+ --platform github
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Purpose
44
+
45
+ `scaffy.py` creates a collaboration scaffold with:
46
+
47
+ - `.collab/collab-contract.md` — Rules, guardrails, and session protocols (OPEN/CLOSE SESSION)
48
+ - `.collab/kanban-board.md` — Task tracking board
49
+ - `.collab/context.md` — Stable project facts: tech stack, key files, conventions
50
+ - `.collab/project.yaml` — Machine-readable project metadata
51
+ - `.collab/prompts/initial-prompt.md` — First-session onboarding prompt (paste on first launch)
52
+ - `.collab/prompts/agent-profile.md` — Fill-in questionnaire for generating agent instructions (CLAUDE.md, AGENTS.md, etc.)
53
+ - `.collab/brainstorm/` — Thinking space for pre-ticket concepts and proposals
54
+ - `.collab/session-summaries/` — Session summary directory with template
55
+ - `.collab/audit/` — Analysis reports and planning documents
56
+ - `.collab/supporting-artifacts/` — Diagrams, specs, research, and other project-adjacent materials
57
+ - `.collab/prompts/` — Reusable agent prompts, including the agent instructions generator
58
+ - `.collab/playbooks/` — Reference playbooks; includes a generic coding standards playbook
59
+ - `.collab/git-management/` — Git governance templates
60
+ - `.gitignore` — Sane defaults (`.collab/` and agent dirs excluded from version control)
61
+
62
+ ## Usage
63
+
64
+ ```bash
65
+ # Interactive
66
+ python3 scaffy.py
67
+
68
+ # Fully scripted (non-interactive)
69
+ python3 scaffy.py --name my-project --path /path/to/base
70
+
71
+ # With flags
72
+ python3 scaffy.py --name my-project --path /path/to/base \
73
+ --governance strict \
74
+ --platform github \
75
+ --description "Automates AWS resource exports to Excel" \
76
+ --init-git
77
+
78
+ # Preview without writing
79
+ python3 scaffy.py --dry-run
80
+ ```
81
+
82
+ ## Flags
83
+
84
+ | Flag | Description | Default |
85
+ |---|---|---|
86
+ | `--name NAME` | Project name | interactive |
87
+ | `--path PATH` | Base directory for scaffold installation | interactive |
88
+ | `--force` | Overwrite existing files | off |
89
+ | `--dry-run` | Show planned actions without writing | off |
90
+ | `--governance MODE` | `lightweight`, `standard`, or `strict` | interactive (`standard`) |
91
+ | `--platform PLATFORM` | `github`, `gitlab`, or `none` — writes platform-native issue and PR/MR templates | interactive (`none`) |
92
+ | `--license LICENSE` | `mit`, `apache-2.0`, `gpl-3.0`, `agpl-3.0`, `bsd-2-clause`, `bsd-3-clause`, `mpl-2.0`, `unlicense`, or `none` — writes a `LICENSE` file | interactive (`none`) |
93
+ | `--init-git` | Run `git init` in the project root after scaffolding | off |
94
+ | `--description TEXT` | Short description injected into `context.md` | interactive (optional) |
95
+ | `--cli CLI` | Agent CLI for `--save-chat` / `--list-chats`: `claude`, `codex`, `gemini` | auto-detect |
96
+
97
+ ## Governance Modes
98
+
99
+ | Mode | Use when |
100
+ |---|---|
101
+ | `lightweight` | Prototypes, solo work, fast iteration |
102
+ | `standard` | Most active projects (recommended default) |
103
+ | `strict` | Compliance, regulated, or high-risk work |
104
+
105
+ ## First Session
106
+
107
+ After scaffolding, the terminal prints the full onboarding prompt between separator lines — copy it and paste it directly into your agent on first launch. The same prompt is saved to `.collab/prompts/initial-prompt.md` as a backup.
108
+
109
+ The prompt orients the agent to the `.collab/` structure, initializes its memory with stable project facts, and installs the OPEN/CLOSE SESSION protocols for all future sessions.
110
+
111
+ ## Session Protocols
112
+
113
+ The scaffold installs four trigger phrases into the agent contract and initial prompt:
114
+
115
+ - **`OPEN SESSION`** — Agent reads the latest session summary, kanban board, and context,
116
+ then delivers a concise resume of where things stand. Use at the start of every session.
117
+ - **`SAVE SESSION`** — Mid-session checkpoint. Agent writes a summary and updates the kanban,
118
+ then continues working. Use any time you want to preserve progress without closing.
119
+ - **`CLOSE SESSION`** — Agent writes a session summary and updates the kanban board.
120
+ Use at the end of every session.
121
+ - **`SAVE CHAT`** — Exports the full session transcript to `.collab/chat-logs/` as a markdown
122
+ file. Session UUID preserved in the header for traceability. Supported for Claude Code,
123
+ Gemini CLI, and Codex CLI. scaffy auto-detects the running agent when invoked from inside
124
+ a chat session. If run from a plain terminal after the session ends, auto-detection is not
125
+ possible and scaffy will prompt you to select the agent (1/2/3). Use
126
+ `scaffy --save-chat --cli <agent>` to skip the prompt.
127
+
128
+ ## Brainstorm Workflow
129
+
130
+ The `.collab/brainstorm/` directory is a persistent thinking space for ideas that aren't ready to
131
+ become formal tickets yet. It bridges the gap between "I had a thought" and "I opened an issue."
132
+
133
+ **How it works:**
134
+
135
+ 1. Create a file for your idea: `.collab/brainstorm/my-idea-name.md`
136
+ 2. Use `.collab/brainstorm/brainstorm-template.md` as a starting point
137
+ 3. Brain dump freely — no rules, no required format in the idea body
138
+ 4. When ready, point your agent at the file: *"Hey, look at this idea — does it have legs?"*
139
+ 5. The agent will engage honestly, then append a dated summary to the **Discussion Log** section
140
+ 6. Ideas evolve over time. Status tracks the lifecycle: `drafting` → `workshopping` → `parked` or `graduated`
141
+ 7. When an idea becomes a ticket, note the issue number at the bottom and leave the file in place
142
+
143
+ **Key property:** nothing in `brainstorm/` is required to go anywhere. Ideas can sit, evolve slowly,
144
+ or be parked indefinitely. The point is keeping them on paper so they aren't lost when a session closes.
145
+
146
+ When scaffolding into an **existing project**, scaffy will print a reminder to migrate any ideas
147
+ you already have written down or in your head into the new directory.
148
+
149
+ ## Additional Enhancements
150
+
151
+ The scaffold includes two optional tools in `.collab/prompts/` to help you get more out of your agent setup:
152
+
153
+ ### Agent Instructions Generator
154
+
155
+ `.collab/prompts/agent-profile.md` is a fill-in questionnaire that captures your project's
156
+ tech stack, key commands, conventions, and guardrails — the things an agent needs to collaborate
157
+ well with you. Once filled out, paste `.collab/prompts/agent-md-prompt.md` into your agent
158
+ and it will generate a tailored `CLAUDE.md`, `AGENTS.md`, or equivalent instructions file
159
+ for the project root.
160
+
161
+ ### Coding Playbook
162
+
163
+ `.collab/playbooks/coding-playbook.md` is a pre-populated reference covering general software
164
+ development best practices — code quality, testing, security, documentation, and more.
165
+ It's a starting point: edit it down to what matters for your project, or leave it as a
166
+ general reference for your agent to consult.
167
+
168
+ ### Agent Skills
169
+
170
+ The [`skills/`](skills/) directory contains installable slash commands for Claude Code and Gemini CLI, and a passive skill for Codex CLI. Once installed, your agent knows how to run scaffy without you explaining it.
171
+
172
+ | Agent | File | Type |
173
+ |---|---|---|
174
+ | Claude Code | `skills/claude/scaffy.md` | `/scaffy` slash command |
175
+ | Gemini CLI | `skills/gemini/scaffy.toml` | `/scaffy` slash command |
176
+ | Codex CLI | `skills/codex/scaffy/` | AI-activated (no slash command) |
177
+
178
+ **Install (global):**
179
+
180
+ ```bash
181
+ # Claude Code
182
+ cp skills/claude/scaffy.md ~/.claude/commands/scaffy.md
183
+
184
+ # Gemini CLI
185
+ cp skills/gemini/scaffy.toml ~/.gemini/commands/scaffy.toml
186
+
187
+ # Codex CLI
188
+ cp -r skills/codex/scaffy ~/.codex/skills/scaffy
189
+ ```
190
+
191
+ **Claude & Gemini:** type `/scaffy` to bootstrap a project — the agent gathers inputs and runs scaffy for you. Pass a project name or path as arguments to skip the prompts.
192
+
193
+ The Claude skill also handles session protocols. If you use scaffy's session conventions in your projects, you can invoke them via the skill as a more reliable alternative to the plain-text trigger:
194
+
195
+ ```
196
+ /scaffy open session
197
+ /scaffy save session
198
+ /scaffy close session
199
+ /scaffy save chat
200
+ ```
201
+
202
+ **Codex:** no slash command — Codex pulls the skill in automatically when it detects a scaffolding need.
203
+
204
+ ---
205
+
206
+ ## scafrag — Optional Companion Tool
207
+
208
+ `scafrag.py` is a completely optional companion script that lives alongside `scaffy.py`. Nothing
209
+ in scaffy requires it, and you won't miss anything by skipping it. But if you end up using
210
+ scaffy across multiple projects, it becomes useful.
211
+
212
+ **What it does:** indexes the `.collab/` workspaces across all your projects and lets you query
213
+ them — searching for past decisions, checking cross-project status, or dumping full context for
214
+ a project in one command.
215
+
216
+ ```bash
217
+ # Build the index (point it at your projects root)
218
+ python3 scafrag.py index --root ~/code
219
+
220
+ # Search across all projects
221
+ python3 scafrag.py query "authentication middleware"
222
+
223
+ # Full context dump for one project
224
+ python3 scafrag.py context my-project
225
+
226
+ # Portfolio view — all projects with kanban lane counts
227
+ python3 scafrag.py status
228
+
229
+ # List all indexed projects
230
+ python3 scafrag.py projects
231
+ ```
232
+
233
+ All commands support `--format text` (default), `--format json`, and `--format markdown`.
234
+ Output goes to stdout — pipe it wherever you want, including directly into an AI agent.
235
+
236
+ **Requirements:** Python 3.9+. No external dependencies — same as `scaffy.py`.
237
+
238
+ Windows users: `scafrag.exe` is available in the [latest release](https://github.com/ColonelPanicX/scaffy/releases/latest) — no Python required. Run it from Command Prompt or PowerShell.
239
+
240
+ ---
241
+
242
+ ## Behavior
243
+
244
+ - If `--name` and `--path` are both provided, runs non-interactively.
245
+ - Otherwise launches an interactive wizard: at any prompt, type `b` to go back one step or `q` to quit.
246
+ - Existing `.gitignore` is not overwritten — template is written to `.collab/.gitignore.template` instead.
247
+ - Uses `America/New_York` and `MM.DD.YYYY` date formatting in generated templates.
248
+
249
+ ## Make `scaffy` Available Everywhere
250
+
251
+ ```bash
252
+ mkdir -p ~/.local/bin
253
+ chmod +x path/to/scaffy/scaffy.py
254
+ ln -sf path/to/scaffy/scaffy.py ~/.local/bin/scaffy
255
+ ```
256
+
257
+ Ensure `~/.local/bin` is on your `PATH` (Bash):
258
+
259
+ ```bash
260
+ grep -q 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc \
261
+ || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
262
+ source ~/.bashrc
263
+ ```
264
+
265
+ Verify:
266
+
267
+ ```bash
268
+ which scaffy
269
+ scaffy --help
270
+ ```
271
+
272
+ If you move the script later, update the symlink:
273
+
274
+ ```bash
275
+ ln -sf /new/path/to/scaffy.py ~/.local/bin/scaffy
276
+ ```
277
+
278
+ ---
279
+
280
+ ## See Also
281
+
282
+ Tools and resources that pair well with the structured approach scaffy promotes. None are required.
283
+
284
+ - **[GSD](https://github.com/gsd-build/gsd-2)** — Spec-driven development system for autonomous multi-phase agent work: research, planning, execution, and git management in a single pipeline.
285
+ - **[MemPalace](https://github.com/MemPalace/mempalace/tree/main)** — Local-first AI memory with semantic search. Complements scaffy's session summaries with queryable, persistent long-term recall.
286
+ - **[Caveman](https://github.com/JuliusBrussee/caveman)** — Claude Code skill that compresses agent output by ~75% using terse, technical language. Same accuracy, far fewer tokens.
287
+ - **[Karpathy's LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)** — Pattern for building a personal knowledge base where an LLM incrementally maintains a persistent wiki synthesized from source documents.