@simpleapps-com/augur-skills 0.0.18 → 0.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-skills",
3
- "version": "0.0.18",
3
+ "version": "0.0.21",
4
4
  "description": "Install curated Claude Code skills",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: augur-packages
3
+ description: Shared npm packages under @simpleapps-com/augur-*. Covers what each package provides, correct import patterns, key usage patterns, and what custom code they replace. Use when writing code for a site that consumes augur packages, during migration, or when deciding whether to write custom code.
4
+ ---
5
+
6
+ # Augur Packages
7
+
8
+ Shared npm packages for Next.js ecommerce sites and React Native apps. Published to npm under `@simpleapps-com`. Source: `simpleapps-com/augur-packages`.
9
+
10
+ Before writing custom code, check whether a package export already solves the problem.
11
+
12
+ ## augur-utils
13
+
14
+ Types, formatters, cache config. Zero framework dependencies. Works everywhere.
15
+
16
+ ```typescript
17
+ import { formatPrice, CACHE_CONFIG } from "@simpleapps-com/augur-utils";
18
+ import type { TCartLine, TProductItem } from "@simpleapps-com/augur-utils";
19
+ import { cn } from "@simpleapps-com/augur-utils/web"; // clsx + tailwind-merge
20
+ ```
21
+
22
+ **Types** cover: cart, category, inventory, product, pricing, attributes, UOM, supplier, filter, customer, menu, order, shipping, search, tax, metadata. Each has a Valibot schema (e.g., `CartLineSchema`).
23
+
24
+ **Cache tiers** for React Query — every hook maps to one of these:
25
+
26
+ | Tier | Use Case |
27
+ |------|----------|
28
+ | `CACHE_CONFIG.STATIC` | Rarely changes (categories, item master) |
29
+ | `CACHE_CONFIG.SEMI_STATIC` | Changes occasionally (pricing, search) |
30
+ | `CACHE_CONFIG.DYNAMIC` | Changes frequently (stock levels) |
31
+ | `CACHE_CONFIG.CART` | User-specific, short-lived |
32
+ | `CACHE_CONFIG.REALTIME` | Always refetch |
33
+
34
+ ## augur-web
35
+
36
+ shadcn/Radix UI components. Per-component entry points — no barrel export, only what you import gets bundled.
37
+
38
+ ```typescript
39
+ import { Button } from "@simpleapps-com/augur-web/button";
40
+ import { Dialog, DialogContent, DialogTitle } from "@simpleapps-com/augur-web/dialog";
41
+ import { Card, CardHeader, CardContent } from "@simpleapps-com/augur-web/card";
42
+ ```
43
+
44
+ **Component conventions:** CVA variants, `React.forwardRef`, `asChild` via Radix Slot, `cn()` for class merging, `"use client"` preserved in build, `displayName` set, icons use `react-icons/lu`.
45
+
46
+ **Tailwind content detection:** Tailwind v4 auto-detects sources. If augur-web classes are missing, add `@source "../node_modules/@simpleapps-com/augur-web/dist";` to your CSS.
47
+
48
+ ## augur-hooks
49
+
50
+ React Query hooks and Zustand stores. Cross-platform (works in Next.js and React Native).
51
+
52
+ ```typescript
53
+ // Cross-platform
54
+ import { useItemPrice, useCartStore, useDebounce, AugurHooksProvider } from "@simpleapps-com/augur-hooks";
55
+ // Web only (DOM-dependent)
56
+ import { useIsMobile, useIsHydrated } from "@simpleapps-com/augur-hooks/web";
57
+ ```
58
+
59
+ **Hook triple pattern** — every query hook exports three things:
60
+ - `use<Name>(params, options?)` — client-side hook (reads SDK from provider context)
61
+ - `get<Name>Options(api, params)` — server-side prefetch (accepts SDK directly)
62
+ - `get<Name>Key(params)` — query key factory for cache invalidation
63
+
64
+ ```typescript
65
+ // Client
66
+ const { data } = useItemPrice(itemId, customerId, 1);
67
+
68
+ // Server prefetch (no React context)
69
+ await queryClient.prefetchQuery(getItemPriceOptions(api, itemId, customerId));
70
+
71
+ // Cache invalidation
72
+ queryClient.invalidateQueries({ queryKey: getItemPriceKey(itemId, customerId) });
73
+ ```
74
+
75
+ **queryFn override** — web consumers can route through cached server actions:
76
+
77
+ ```typescript
78
+ const { data } = useItemPrice(itemId, customerId, 1, {
79
+ queryFn: () => getCachedItemPrice(itemId, customerId, 1),
80
+ });
81
+ ```
82
+
83
+ **Cart hooks** use dependency injection — the package provides React Query orchestration (optimistic updates, invalidation, loading states), consumers inject site-specific mutation callbacks.
84
+
85
+ **Provider required:** All query hooks need `AugurHooksProvider` wrapping the app with an SDK instance.
86
+
87
+ ## augur-server
88
+
89
+ Server-side utilities for Next.js. Redis caching, auth factory, query client, environment detection.
90
+
91
+ ```typescript
92
+ import { cachedSdkCall, getServerQueryClient, isDev, sdkCall } from "@simpleapps-com/augur-server";
93
+ import { createAuthConfig } from "@simpleapps-com/augur-server/auth";
94
+ ```
95
+
96
+ **cachedSdkCall** wraps SDK calls with Redis caching (SHA-256 key hashing, per-method stats, fire-and-forget writes, circuit breaker). Falls through without caching if ioredis is not installed.
97
+
98
+ **createAuthConfig** — NextAuth 5 factory with dependency-injected callbacks:
99
+
100
+ ```typescript
101
+ export const { handlers, signIn, signOut, auth } = NextAuth(
102
+ createAuthConfig({
103
+ callbacks: { getUserProfile, cartHdrLookup }, // site-specific
104
+ defaultCustomerId: process.env.NEXT_PUBLIC_DEFAULT_CUSTOMER_ID,
105
+ }),
106
+ );
107
+ ```
108
+
109
+ **Site action registry** — `createServerSite()` creates a process-global singleton. Self-heals via three-tier fallback (globalThis → module cache → auto-init from env vars).
110
+
111
+ ## augur-tailwind
112
+
113
+ Tailwind v4 CSS theme. No `tailwind.config.ts` needed.
114
+
115
+ ```css
116
+ @import "tailwindcss";
117
+ @import "@simpleapps-com/augur-tailwind/base.css";
118
+ @plugin "tailwindcss-animate";
119
+ ```
120
+
121
+ Override brand with CSS variables: `--primary`, `--secondary`, `--radius`, etc. All HSL components (no wrapper).
122
+
123
+ ## What Stays Site-Specific
124
+
125
+ MUST NOT be replaced by packages:
126
+ - **Server actions** (`"use server"`) — site-specific business logic
127
+ - **Layout components** (Header, Footer, MainMenu) — brand-specific
128
+ - **Domain components** (ProductItem, CartTable, CategoryCard) — compose UI primitives
129
+ - **Auth callbacks** (`getUserProfile`, `cartHdrLookup`) — injected into `createAuthConfig`
130
+ - **Cart mutation callbacks** — depend on site-specific server actions
131
+ - **CSS variable overrides** — brand colors, fonts, radius
132
+ - **next.config** — image domains, redirects, security headers
133
+ - **Site integrations** — GA4, Maps, reCAPTCHA
134
+
135
+ ## Anti-Pattern Catalog
136
+
137
+ Custom code that duplicates package exports. When you see these in a site, replace with the package version.
138
+
139
+ | Custom Code | Replace With |
140
+ |-------------|-------------|
141
+ | `cn()` in `@/lib/utils` | `cn` from `augur-utils/web` |
142
+ | `formatPrice()` helpers | `formatPrice` from `augur-utils` |
143
+ | Local types (`@/types/T*`) | Types from `augur-utils` |
144
+ | Custom `CACHE_CONFIG` / inline TTLs | `CACHE_CONFIG` from `augur-utils` |
145
+ | `@/components/ui/*` imports | `augur-web/<component>` |
146
+ | Custom breadcrumb, quantity, pagination, form inputs | `augur-web/<component>` |
147
+ | Custom `useDebounce` | `useDebounce` from `augur-hooks` |
148
+ | Custom `useIsMobile` / `useIsHydrated` | From `augur-hooks/web` |
149
+ | Custom price/cart hooks or stores | From `augur-hooks` |
150
+ | Custom `cachedSdkCall` / SDK cache | `cachedSdkCall` from `augur-server` |
151
+ | Custom `getServerQueryClient` | From `augur-server` |
152
+ | Custom `isDev` / env detection | From `augur-server` |
153
+ | Manual NextAuth Credentials config | `createAuthConfig` from `augur-server/auth` |
154
+ | `lucide-react` / `@heroicons/react` | `react-icons/lu` |
155
+ | `tailwind.config.ts` (v3) | `augur-tailwind/base.css` CSS-first |
156
+
157
+ ## Platform Standard
158
+
159
+ - **Icons:** `react-icons/lu`
160
+ - **Tailwind:** v4, CSS-first via `augur-tailwind/base.css`
161
+ - **Validation:** Valibot (not Zod, not Yup)
162
+ - **Auth:** NextAuth 5 via `createAuthConfig()`
163
+ - **Reference site:** ampro-online
@@ -1,6 +1,11 @@
1
- # Basecamp 2 Reference
1
+ ---
2
+ name: basecamp
3
+ description: Basecamp 2 integration via MCP. Covers MCP tool reference, URL parsing, authentication, Chrome fallback, attachments, and site-info documents. Use when reading or writing Basecamp data.
4
+ ---
2
5
 
3
- IMPORTANT: YOU MUST NOT create, edit, or delete anything in Basecamp without user permission.
6
+ # Basecamp 2
7
+
8
+ IMPORTANT: MUST NOT create, edit, or delete anything in Basecamp without user permission.
4
9
 
5
10
  **Content format**: All write tools SHOULD use plain text with line breaks, NOT HTML. Basecamp returns HTML in responses but prefers plain text for creation.
6
11
 
@@ -14,7 +19,7 @@ uv run basecamp-auth
14
19
 
15
20
  This opens the browser for OAuth, user clicks "Allow", credentials are saved automatically.
16
21
 
17
- ## MCP Tools (Preferred)
22
+ ## MCP Tools
18
23
 
19
24
  The `basecamp` MCP server is bundled with this plugin and starts automatically. API reference: https://github.com/basecamp/bcx-api
20
25
 
@@ -143,7 +148,11 @@ Note: Messages may not be available on all Basecamp plans.
143
148
 
144
149
  **Note**: The BCX API does not have a search endpoint. To find content, use `list_topics(project_id)` to browse, or `list_messages(project_id)` for messages. For cross-project browsing, use `list_topics()` (no project_id) to get recent topics across all projects.
145
150
 
146
- **Extracting IDs from Basecamp URLs**: A URL like `https://basecamp.com/2805226/projects/18932786/todos/514631271` gives you project_id=`18932786` and todo_id=`514631271`.
151
+ ## URL Parsing
152
+
153
+ A URL like `https://basecamp.com/2805226/projects/18932786/todos/514631271` gives you project_id=`18932786` and todo_id=`514631271`.
154
+
155
+ **Base URL**: `https://basecamp.com/2805226`
147
156
 
148
157
  ## Downloading Attachments
149
158
 
@@ -156,6 +165,10 @@ Attachments can be on todos, comments, messages, or uploads. To retrieve them:
156
165
 
157
166
  To browse all attachments in a project, use `list_attachments(project_id)`.
158
167
 
168
+ ## Site Info Documents
169
+
170
+ Each Basecamp project SHOULD have a **site-info** text document in its Documents section. It contains site-specific details like siteId and domain name needed for GitHub issues and development work. Use `list_documents` + `get_document` to find it. If no site-info document exists, ask the user to create one.
171
+
159
172
  ## Chrome Fallback
160
173
 
161
174
  If the MCP server is unavailable (credentials expired, server not running), use Chrome:
@@ -165,8 +178,6 @@ If the MCP server is unavailable (credentials expired, server not running), use
165
178
  3. Navigate to the Basecamp page
166
179
  4. Use `get_page_text` to extract content
167
180
 
168
- **Base URL**: `https://basecamp.com/2805226`
169
-
170
181
  **Top nav**: Projects | Calendar | Everything | Progress | Everyone | **Me**
171
182
 
172
183
  | Page | Path |
@@ -182,14 +193,6 @@ If the MCP server is unavailable (credentials expired, server not running), use
182
193
 
183
194
  **JSON API via Chrome**: Navigate to `/api/v1/projects/<project_id>/todos/<todo_id>.json` then use `get_page_text`. WebFetch will NOT work — Chrome carries session cookies.
184
195
 
185
- ## Fyxer Meeting Transcripts
186
-
187
- To post Fyxer meeting recordings as Basecamp Discussions, see the `simpleapps:fyxer` skill. It handles extraction, local caching, duplicate detection, and posting via `create_message`.
188
-
189
- ## Site Info Documents
190
-
191
- Each Basecamp project SHOULD have a **site-info** text document in its Documents section. It contains site-specific details like siteId and domain name needed for GitHub issues and development work. Use `list_documents` + `get_document` to find it. If no site-info document exists, ask the user to create one.
192
-
193
196
  ## Tips
194
197
 
195
198
  - Cache the user's `person_id` on first visit for the session
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: fyxer
3
- description: Fyxer AI meeting recording integration. Covers extraction, local caching, and posting to downstream services. Use when processing Fyxer recordings or meeting transcripts.
3
+ description: Fyxer AI meeting recording integration. Covers extraction, local caching, posting to Basecamp, and Fyxer Index management. Use when processing Fyxer recordings or meeting transcripts.
4
4
  ---
5
5
 
6
6
  # Fyxer
7
7
 
8
- Fyxer AI records and summarizes meetings. This skill covers extracting data from Fyxer and routing it to other services.
8
+ Fyxer AI records and summarizes meetings. This skill covers extracting data from Fyxer, posting to Basecamp, and managing the Fyxer Index.
9
9
 
10
10
  ## Fyxer URLs
11
11
 
@@ -28,7 +28,7 @@ All extracted data is cached at `~/.simpleapps/fyxer/<meeting-uuid>/`:
28
28
  ```
29
29
  summary.txt - raw Fyxer summary (from Summary tab)
30
30
  transcript.txt - raw Fyxer transcript (from Transcript tab)
31
- message.txt - assembled output (generated by downstream processes, e.g. basecamp.md)
31
+ message.txt - assembled output (generated by posting process)
32
32
  ```
33
33
 
34
34
  Cache is populated via Chrome extraction (see below) and reused across processes.
@@ -84,11 +84,125 @@ Then write and verify: `pbpaste > target.txt && wc -c target.txt`
84
84
 
85
85
  MUST clean up `~/Downloads/` after copying downloaded files to the cache directory. Fyxer names downloads like `transcript-SA_USCCO.txt`. Repeated downloads append `(1)`, `(2)`, etc.
86
86
 
87
- ## Processes
87
+ ## Posting to Basecamp
88
88
 
89
- - See `basecamp.md` for posting meeting transcripts as Basecamp Discussions
90
- - See `basecamp-index.md` for the Fyxer Index document (duplicate detection, reconciliation)
89
+ Post Fyxer meeting recordings as searchable Discussions in Basecamp projects.
90
+
91
+ **Inputs**: Fyxer recording URL + Basecamp project ID.
92
+
93
+ ### 1. Check for duplicate
94
+
95
+ Extract the meeting UUID from the Fyxer URL. Find the **Fyxer Index** document in the project: `list_documents(project_id)` → scan for title `Fyxer Index`. If found, `get_document(project_id, document_id)` and search content for the meeting UUID. If found, the meeting has already been posted — inform the user and stop.
96
+
97
+ If no Fyxer Index document exists, there are no tracked meetings. Proceed with posting.
98
+
99
+ ### 2. Check local cache
100
+
101
+ If `~/.simpleapps/fyxer/<meeting-uuid>/summary.txt` and `transcript.txt` both exist, skip to step 3. Otherwise, follow the Chrome extraction steps above.
102
+
103
+ ### 3. Build message.txt
104
+
105
+ Parse `summary.txt` for frontmatter fields, extract participants, and combine with the full transcript:
106
+
107
+ ```
108
+ ---
109
+ meeting: SA/ClientName
110
+ date: YYYY-MM-DD
111
+ time: HH:MM-HH:MM
112
+ participants: Person A, Person B, Person C
113
+ topics: Topic One, Topic Two, Topic Three
114
+ fyxer-id: <meeting-uuid>
115
+ ---
116
+
117
+ [contents of transcript.txt]
118
+ ```
119
+
120
+ | Field | Source |
121
+ |-------|--------|
122
+ | meeting | Meeting title from the page header |
123
+ | date | Recording date |
124
+ | time | Recording time range |
125
+ | participants | Participant dropdown (click to reveal names) |
126
+ | topics | Section headings from the Summary |
127
+ | fyxer-id | Meeting UUID from the URL (before the colon) |
128
+
129
+ Save as `~/.simpleapps/fyxer/<meeting-uuid>/message.txt`.
130
+
131
+ ### 4. Post to Basecamp
132
+
133
+ Use `create_message(project_id, subject, content)`:
134
+
135
+ - **Subject**: `Fyxer: YYYY-MM-DD`
136
+ - **Content**: contents of `message.txt`
137
+
138
+ Capture the **message_id** from the response.
139
+
140
+ ### 5. Update Fyxer Index
141
+
142
+ After a successful post, update the Fyxer Index document:
143
+
144
+ 1. If no Fyxer Index document exists, create one: `create_document(project_id, "Fyxer Index", "")`
145
+ 2. Read current content: `get_document(project_id, document_id)`
146
+ 3. Prepend a new line (newest first): `<meeting-uuid> | <date> | <message-id> | <subject>`
147
+ 4. Update: `update_document(project_id, document_id, title="Fyxer Index", content=updated_content)`
148
+
149
+ If the index update fails after a successful post, warn the user. The message is posted but the index is stale. Run reconciliation later.
150
+
151
+ ### Format rules
152
+
153
+ - **Plain text only** — Basecamp prefers plain text over HTML
154
+ - **YAML frontmatter** — machine-parseable so other Claude Code instances can search and parse meeting context
155
+ - **Transcript only in body** — summary and action items belong on relevant Basecamp todos, not in this message
156
+ - **Consistent title** — `Fyxer: YYYY-MM-DD` keeps messages uniform and sortable
157
+
158
+ ## Fyxer Index
159
+
160
+ Each Basecamp project that receives Fyxer meeting transcripts MUST have a **Fyxer Index** document for duplicate detection and meeting history.
161
+
162
+ ### Index format
163
+
164
+ - **Title**: `Fyxer Index`
165
+ - **Location**: Documents section of each Basecamp project
166
+ - **Content**: One line per posted meeting, newest first
167
+
168
+ ```
169
+ <meeting-uuid> | <date> | <message-id> | <subject>
170
+ ```
171
+
172
+ Example:
173
+
174
+ ```
175
+ 52f0cf2b-fdb8-4e95-8b01-2afb6d367c69 | 2026-01-19 | 514789012 | Fyxer: 2026-01-19
176
+ a1b2c3d4-e5f6-7890-abcd-ef1234567890 | 2026-02-10 | 514801234 | Fyxer: 2026-02-10
177
+ ```
178
+
179
+ ### Finding posted transcripts
180
+
181
+ - Check the index: `list_documents(project_id)` → find `Fyxer Index` → `get_document`
182
+ - View a specific transcript: `get_message(project_id, message_id)` using the message_id from the index
183
+ - Browse all messages: `list_messages(project_id)` — Fyxer posts use the title format `Fyxer: YYYY-MM-DD`
184
+
185
+ ### Reconciliation — missing entries
186
+
187
+ The index MAY fall out of sync. To reconcile:
188
+
189
+ 1. `list_messages(project_id)` → filter for `Fyxer:` titles
190
+ 2. For each, `get_message` and extract `fyxer-id` from YAML frontmatter
191
+ 3. Compare against the index — add any missing entries
192
+ 4. Update the index document
193
+
194
+ Run reconciliation when the index is first created in a project with existing Fyxer messages, or when the user suspects the index is incomplete.
195
+
196
+ ### Reconciliation — orphaned entries
197
+
198
+ If an index entry references a deleted message:
199
+
200
+ 1. `get_message(project_id, message_id)` → if 404, remove entry from index
201
+ 2. Update the index document
202
+
203
+ Only run orphan cleanup when explicitly requested by the user.
91
204
 
92
205
  ## Dependencies
93
206
 
207
+ - `simpleapps:basecamp` skill — MCP tools for posting and index management
94
208
  - Chrome browser automation (for extraction when cache is empty)
@@ -1,46 +1,89 @@
1
1
  ---
2
2
  name: github
3
- description: GitHub conventions for SimpleApps. Covers org structure, local project layout, wiki-as-docs workflow, issue creation, PR workflows, and gh CLI usage. Use when creating issues, PRs, setting up repos, or working with GitHub wikis.
3
+ description: GitHub conventions for SimpleApps. Covers org structure, git safety, issue creation, PR workflows, and gh CLI usage. Use when creating issues, PRs, or working with GitHub repos.
4
+ allowed-tools: Skill(project-defaults)
4
5
  ---
5
6
 
7
+ First, use Skill("project-defaults") to load the project layout.
8
+
6
9
  # GitHub
7
10
 
8
11
  ## Organization
9
12
 
10
- All SimpleApps repos live under the **`simpleapps-com`** GitHub org.
11
-
12
- Repository pattern: `simpleapps-com/<repo-name>`
13
+ All SimpleApps repos live under **`simpleapps-com`**. Pattern: `simpleapps-com/<repo-name>`
13
14
 
14
15
  ## Authentication
15
16
 
16
- Use the `gh` CLI for all GitHub operations:
17
-
18
17
  ```bash
19
- gh auth status # Check auth status
20
- gh auth setup-git # Configure gh as git credential helper
18
+ gh auth status # Check auth
19
+ gh auth setup-git # Fix git credential helper (run if push fails 401/403)
21
20
  ```
22
21
 
23
- If `git push` fails with 401/403, run `gh auth setup-git` to fix credentials.
22
+ ## Project Layout
24
23
 
25
- ## Key Topics
24
+ See `simpleapps:project-defaults` for the full directory layout, symlink setup, and permission defaults. Key point: the git repo is always at `repo/`. Use `git -C repo` for git operations from the project root.
26
25
 
27
- - **Wiki as context** — See `wiki-as-context.md` for why the wiki is the source of truth and how to write for both humans and AI agents.
28
- - **Wiki maintenance** — See `wiki-maintenance.md` for how to verify, update, and maintain wiki content correctly.
29
- - **Project structure** — See `project-structure.md` for the `{project}/[repo|wiki]` layout, what goes where, and wiki conventions.
30
- - **Issues & pull requests** — See `issues-prs.md` for issue templates, PR commands, and cross-linking with Basecamp.
26
+ ## Wiki
31
27
 
32
- ## Quick Reference
28
+ See `simpleapps:wiki` for wiki conventions, token budget, and maintenance rules.
33
29
 
34
- ```bash
35
- # Pushing
36
- gh auth setup-git && git push origin <branch>
37
- git push origin <tag>
30
+ ## Git Safety
31
+
32
+ MUST NOT commit, push, create PRs, or merge unless the user explicitly asks. After making changes, report what was done and stop. Do not offer or suggest the next git action wait for instructions.
33
+
34
+ - **Commits**: Do not commit until the user says "commit" or equivalent
35
+ - **Pushes**: Do not push until the user explicitly asks
36
+ - **PRs**: Do not create or offer to create a PR — report the work, stop
37
+ - **Merges**: Do not merge unless the user explicitly asks
38
+
39
+ The pattern is always: **do the work → report results → wait**.
40
+
41
+ ## Issues
42
+
43
+ MUST use `--repo simpleapps-com/<repo>` on every `gh` call. MUST ask the user which repo — never assume.
44
+
45
+ ### Title
46
+
47
+ Conventional commit style: `fix: description`, `feat: description`, `chore: description`. Under 70 characters.
48
+
49
+ ### Body
50
+
51
+ ```markdown
52
+ ## Problem
53
+ What is broken, missing, or needed?
38
54
 
39
- # Issues
55
+ ## Expected Behavior
56
+ What SHOULD happen instead?
57
+
58
+ ## Acceptance Criteria
59
+ - [ ] Concrete, testable criteria
60
+
61
+ ## Context
62
+ Related issues, affected files, workarounds, reproduction steps.
63
+ ```
64
+
65
+ Bug reports also include **Steps to Reproduce** and **Current Behavior** with error messages.
66
+
67
+ ### Commands
68
+
69
+ ```bash
40
70
  gh issue create --repo simpleapps-com/<repo> --title "type: desc" --body "..."
41
71
  gh issue list --repo simpleapps-com/<repo>
72
+ gh issue view <number> --repo simpleapps-com/<repo>
73
+ gh issue close <number> --repo simpleapps-com/<repo> --comment "message"
74
+ ```
75
+
76
+ Include `Closes #N` in commit body to auto-close issues.
77
+
78
+ ## Pull Requests
42
79
 
43
- # PRs
80
+ ```bash
44
81
  gh pr create --repo simpleapps-com/<repo> --title "title" --body "..."
45
82
  gh pr list --repo simpleapps-com/<repo>
83
+ gh pr view <number> --repo simpleapps-com/<repo>
84
+ gh pr merge <number> --repo simpleapps-com/<repo>
46
85
  ```
86
+
87
+ ## Cross-Linking with Basecamp
88
+
89
+ For client tasks originating in Basecamp, see `simpleapps:workflow` for the full cross-linking process.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: project-defaults
3
+ description: SimpleApps project conventions. Covers directory layout, symlink setup for .claude integration, permission defaults (deny cd, kill), and per-project baseline settings. Use when setting up projects, checking structure, or configuring Claude Code defaults.
4
+ ---
5
+
6
+ # Project Defaults
7
+
8
+ ## Directory Layout
9
+
10
+ Every project MUST use this layout:
11
+
12
+ ```
13
+ {project}/
14
+ ├── .claude/ # Claude Code config (symlinks to repo/.claude/)
15
+ │ ├── rules/ # → repo/.claude/rules/
16
+ │ └── commands/ # → repo/.claude/commands/
17
+ ├── repo/ # Git repo (simpleapps-com/<name>.git)
18
+ ├── wiki/ # Wiki repo (simpleapps-com/<name>.wiki.git)
19
+ ├── wip/ # Work-in-progress files (not in git)
20
+ ├── tmp/ # Temporary files (not in git)
21
+ └── .simpleapps/ # Credentials (not in git)
22
+ ```
23
+
24
+ The parent `{project}/` is NOT a git repo — it keeps code and wiki side-by-side. The git repo is always at `repo/`. Use `git -C repo` for git operations from the project root.
25
+
26
+ | Content | Location | Examples |
27
+ |---------|----------|---------|
28
+ | Product code | `repo/` | Source, tests, configs, SKILL.md files |
29
+ | Dev documentation | `wiki/` | Architecture, guides, specs, conventions |
30
+ | Repo `.claude/rules/` | `repo/` | Minimal summaries referencing wiki |
31
+ | Repo `.claude/CLAUDE.md` | `repo/` | Quick reference + wiki links |
32
+ | Active task context | `wip/` | `{issue-number}-{short-desc}.md` files |
33
+ | Temporary files | `tmp/` | Throwaway files, scratch space, build artifacts |
34
+ | Project secrets | `{project}/.simpleapps/` | Site-specific credentials |
35
+ | Global secrets | `~/.simpleapps/` | Shared credentials across all projects |
36
+
37
+ **WIP**: Research, plans, decisions, test results. MUST NOT contain secrets, final docs, or code.
38
+
39
+ **Credentials**: Project-level (`.simpleapps/`) overrides user-level (`~/.simpleapps/`). MUST NOT be committed.
40
+
41
+ ## Symlink Setup
42
+
43
+ The repo contains `.claude/rules/` and `.claude/commands/` with project-specific rules and commands. To make these active from the project root (without starting Claude Code inside `repo/`), symlink them into the project-level `.claude/` folder:
44
+
45
+ ```bash
46
+ mkdir -p {project}/.claude
47
+ ln -sf ../repo/.claude/rules {project}/.claude/rules
48
+ ln -sf ../repo/.claude/commands {project}/.claude/commands
49
+ ```
50
+
51
+ This lets you run Claude Code from `{project}/` and still get the repo's rules and commands loaded automatically.
52
+
53
+ ## Permission Defaults
54
+
55
+ Every project SHOULD configure `.claude/settings.local.json` with these deny rules:
56
+
57
+ ```json
58
+ {
59
+ "permissions": {
60
+ "deny": [
61
+ "Bash(cd:*)",
62
+ "Bash(cat:*)",
63
+ "Bash(sed:*)",
64
+ "Bash(grep:*)",
65
+ "Bash(sleep:*)",
66
+ "Bash(kill:*)",
67
+ "Bash(pkill:*)"
68
+ ]
69
+ }
70
+ }
71
+ ```
72
+
73
+ Why each is denied:
74
+
75
+ - **`cd`** — Use `git -C` or tool-specific flags (`--repo`, `-C`) instead. `cd` loses working directory context.
76
+ - **`cat`** — Use the Read tool instead.
77
+ - **`sed`** — Use the Edit tool instead.
78
+ - **`grep`** — Use the Grep tool instead.
79
+ - **`sleep`** — Unnecessary; use proper sequencing or background tasks.
80
+ - **`kill`/`pkill`** — Use `TaskStop` to manage background processes. For internal tasks running in the background (dev servers, watchers, etc.), always use `TaskStop` instead of shell kill commands. `TaskStop` cleanly shuts down the task and updates Claude Code's internal tracking.
81
+
82
+ ## New Project Setup
83
+
84
+ ```bash
85
+ mkdir {project} && cd {project}
86
+ git clone https://github.com/simpleapps-com/<name>.git repo
87
+ git clone https://github.com/simpleapps-com/<name>.wiki.git wiki
88
+ mkdir -p wip tmp .simpleapps .claude
89
+ ln -sf ../repo/.claude/rules .claude/rules
90
+ ln -sf ../repo/.claude/commands .claude/commands
91
+ ```
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: wiki
3
+ description: Wiki conventions for SimpleApps projects. Covers token budget, writing for three audiences, page conventions, maintenance rules, and git workflow. Use when reading, writing, or auditing wiki content.
4
+ ---
5
+
6
+ # Wiki
7
+
8
+ The wiki is the **single source of truth** for how a project works. The wiki is the spec; the repo is the implementation.
9
+
10
+ ## Token Budget
11
+
12
+ A wiki MUST NOT exceed **20K tokens** (~15K words, ~60KB). This is 10% of the AI agent's 200K context window — enough for the agent to load the entire wiki at session start while leaving 90% for working context.
13
+
14
+ Check size: `wc -w wiki/*.md` (multiply by ~1.3 for token estimate)
15
+
16
+ ## Core Principle
17
+
18
+ Repo files (`.claude/CLAUDE.md`, `.claude/rules/`, `README.md`) MUST be minimal — orient then point to wiki. AI agents read wiki pages as local files via `Read wiki/<page>.md`. No network requests needed.
19
+
20
+ ```
21
+ Wiki defines → Code implements → Learnings update wiki → Repeat
22
+ ```
23
+
24
+ When code reveals the wiki is wrong or incomplete, update immediately. The wiki MUST reflect reality, not aspirations.
25
+
26
+ ## Three Audiences
27
+
28
+ Every page serves junior devs (explanations, examples), senior devs (quick reference, decisions), and AI agents (unambiguous specs, MUST/SHOULD/MAY). Write for all three:
29
+
30
+ - Lead with a summary — seniors and agents get it fast, juniors get orientation
31
+ - Explain *why* before *how*
32
+ - Use tables for reference, code blocks for copy-paste, RFC 2119 keywords for requirements
33
+ - Each page SHOULD be self-contained
34
+ - Follow `simpleapps:writing-style` — token-efficient, action verbs first, no filler
35
+
36
+ ## Content Rules
37
+
38
+ - Wiki pages SHOULD NOT contain raw code. Describe patterns and principles instead.
39
+ - If implementation details are needed, link to the source file in `repo/` rather than duplicating code in the wiki.
40
+ - The wiki documents *what* and *why*. The repo is the source of truth for *how*.
41
+
42
+ ## Conventions
43
+
44
+ - Page naming: **PascalCase** with hyphens (`Getting-Started.md`)
45
+ - Every wiki MUST have `_Sidebar.md` for navigation
46
+ - Links: `[[Page-Name]]` or `[[Display Text|Page-Name]]`
47
+ - Anchor links MUST target specific sections (`[[Versioning#version-bump-procedure]]`), not just pages
48
+ - Repo references: use relative paths (`../../../wiki/Versioning.md`)
49
+ - Default branch: `master` (not `main`)
50
+
51
+ ## Keep It Lean
52
+
53
+ - Document patterns and principles, not exhaustive lists
54
+ - No hardcoded counts, no pinned versions, no full export inventories
55
+ - Describe the pattern, give 1-2 examples, point to source for current list
56
+ - Merge overlapping pages, archive obsolete ones
57
+
58
+ ## Maintenance
59
+
60
+ Cross-check wiki against code before updating. Staleness-prone: versions, file counts, CI workflows, TODO markers, API surfaces. **Never echo what the wiki says — read the code, then write.**
61
+
62
+ When adding/removing pages, MUST update: `Home.md`, `_Sidebar.md`, `llms.txt` (if present).
63
+
64
+ **Lead-site wikis** (e.g., ampro-online) serve as platform reference. Tag sections **(platform pattern)** vs **(site-specific)** so agents on other sites know what to replicate vs customize.
65
+
66
+ ## Git Workflow
67
+
68
+ The wiki is a separate git repo at `wiki/`. No branch protection, no PRs.
69
+
70
+ ```bash
71
+ git -C wiki add -A
72
+ git -C wiki commit -m "docs: describe the change"
73
+ git -C wiki push
74
+ ```