initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
---
name: dictionary
description: "Project dictionary lookup and maintenance. Reads ai-docs/dictionary.md to understand project-specific terms, file mappings, and domain definitions before responding. Updates the dictionary with new discoveries after each session and commits/pushes the change. Capabilities: term lookup, definition enrichment, file mapping, domain context. Actions: read dictionary, update dictionary, commit dictionary. Keywords: dictionary, definition, term, glossary, meaning, what is, where is. Use when: starting any task (proactively load context), user references unfamiliar terms, user asks about project-specific concepts, after discovering new mappings or definitions worth saving."
---
# Dictionary Skill
## Purpose
Maintain and consult a living project dictionary at `ai-docs/dictionary.md` that accumulates domain knowledge, term definitions, and file mappings across sessions.
## Lifecycle — run in this order every session
### 1. Bootstrap (always first)
Check if `ai-docs/dictionary.md` exists. If not, create it:
```markdown
# Project Dictionary
A living reference of project-specific terms, file mappings, and domain definitions.
## Terms & Definitions
<!-- Add entries below -->
## File Mappings
<!-- Format: term → file path + description -->
```
### 2. Read & Apply
Read `ai-docs/dictionary.md` in full. Extract:
- **Term definitions** → use to interpret ambiguous words in the user's request
- **File mappings** → know which files to look at for a given concept
- **Domain context** → understand project conventions before making decisions
If the dictionary contains relevant entries, apply them silently (no need to narrate the lookup unless it resolves an ambiguity).
### 3. Update (after helping the user)
Add entries discovered during the session:
- New domain terms with clear definitions
- File paths tied to specific concepts or features
- Naming conventions or patterns observed
- Acronyms or shorthand used in the codebase
**Only add entries that are non-obvious and reusable across future sessions.** Do not add ephemeral task details.
#### Entry format
```markdown
## Terms & Definitions
### <Term>
<Definition>. Context: <where/how it's used in this project>.
## File Mappings
- **<concept>** → `<file path>`<brief description>
```
### 4. Commit & Push
After updating the dictionary, commit and push **only** `ai-docs/dictionary.md`:
```bash
git add ai-docs/dictionary.md
git commit -m "<summary of what was added to the dictionary>"
git push
```
The commit message should describe the dictionary changes, e.g.:
- `"dictionary: add POS offline sync terms and file mappings"`
- `"dictionary: define BukidBounty transaction states"`
## Rules
- Always read the dictionary before answering, even if the request seems simple.
- Never commit other files alongside `ai-docs/dictionary.md`.
- Skip the commit step if nothing new was learned.
- Keep entries concise — one definition paragraph max per term.

View File

@@ -0,0 +1,68 @@
---
name: gemini-ship-it
description: "Delegate ship-it (stage, commit, push) to Gemini CLI and report only SUCCESS or ERROR. Use when the user types /gemini-ship-it or says 'gemini ship it'. Manual-only — never auto-invoke."
allowed-tools:
- Bash
---
# gemini-ship-it
Runs the ship-it workflow via Gemini CLI with suppressed output — reports only a single SUCCESS or ERROR line.
## Trigger
Only activate when the user explicitly types `/gemini-ship-it` or says "gemini ship it". Never auto-invoke.
## Workflow
### 1. Build the ship-it prompt
Construct a one-shot prompt that instructs Gemini to:
- Run `git status --short` to see what's dirty
- Stage all modified/untracked files by explicit path (no `git add -A`)
- Write a single-line commit message (imperative mood, ≤72 chars, no AI attribution)
- Push to every remote via `git remote`
### 2. Execute via Gemini CLI
```bash
RESULT=$(gemini --yolo -m gemini-2.5-flash -o json "
You are running in the BukidBountyApp git repo at $(pwd).
Task: commit and push all currently changed files.
Steps:
1. Run: git status --short
2. Stage each modified file by explicit path (never use git add -A or git add .)
3. Commit with a single imperative-mood subject line (≤72 chars). No body, no trailers, no AI attribution.
4. Run: for remote in \$(git remote); do git push \"\$remote\" \$(git branch --show-current) || git push -u \"\$remote\" \$(git branch --show-current); done
Do this immediately without asking for confirmation.
" 2>&1)
EXIT=$?
```
### 3. Report only SUCCESS or ERROR
Parse the exit code and Gemini JSON output:
```bash
if [ $EXIT -eq 0 ]; then
# Extract commit SHA from output if possible
SHA=$(echo "$RESULT" | grep -oP '[0-9a-f]{7,40}' | head -1)
echo "SUCCESS${SHA:+ — $SHA}"
else
# Extract first error line
ERR=$(echo "$RESULT" | grep -i "error\|fatal\|rejected" | head -1)
echo "ERROR${ERR:+ — $ERR}"
fi
```
Output **nothing else** — no file lists, no diff stats, no Gemini planning text, no explanations.
## Rules
1. Output is exactly one line: `SUCCESS` (optionally `SUCCESS — <sha>`) or `ERROR` (optionally `ERROR — <reason>`).
2. Never print Gemini's raw output or intermediate steps.
3. Never force-push, never skip hooks (`--no-verify`), never touch unrelated files.
4. No AI attribution in the commit message.
5. If Gemini is not installed or not authenticated, output: `ERROR — gemini CLI not available`.