project-init 0.3.0__py3-none-any.whl
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.
- project_init/__init__.py +4 -0
- project_init/__main__.py +662 -0
- project_init/mcps.py +57 -0
- project_init/scaffold.py +374 -0
- project_init/templates/base/AGENTS.md.tmpl +50 -0
- project_init/templates/base/CLAUDE.md.tmpl +16 -0
- project_init/templates/base/CONTRIBUTING.md.tmpl +55 -0
- project_init/templates/base/GEMINI.md.tmpl +16 -0
- project_init/templates/base/LICENSE.tmpl +231 -0
- project_init/templates/base/SECURITY.md.tmpl +26 -0
- project_init/templates/base/docs/explanation/index.md +9 -0
- project_init/templates/base/docs/how-to/index.md +7 -0
- project_init/templates/base/docs/index.md.tmpl +20 -0
- project_init/templates/base/docs/reference/index.md +13 -0
- project_init/templates/base/docs/tutorials/index.md +7 -0
- project_init/templates/base/dot_claude/agents/README.md +30 -0
- project_init/templates/base/dot_claude/config.yaml.tmpl +31 -0
- project_init/templates/base/dot_claude/docs/README.md +26 -0
- project_init/templates/base/dot_claude/docs/adr/adr-001-memory-stack.md.tmpl +22 -0
- project_init/templates/base/dot_claude/docs/adr/adr-002-mcp-choices.md.tmpl +32 -0
- project_init/templates/base/dot_claude/docs/adr/adr-template.md +29 -0
- project_init/templates/base/dot_claude/docs/development/conventions.md.tmpl +31 -0
- project_init/templates/base/dot_claude/docs/development/testing.md +25 -0
- project_init/templates/base/dot_claude/docs/guides/developer-onboarding.md +110 -0
- project_init/templates/base/dot_claude/docs/guides/issue-metadata.md +27 -0
- project_init/templates/base/dot_claude/docs/guides/secrets.md +50 -0
- project_init/templates/base/dot_claude/docs/guides/using-memory.md +36 -0
- project_init/templates/base/dot_claude/hooks/README.md +15 -0
- project_init/templates/base/dot_claude/hooks/agent_guard_adapter.py.tmpl +64 -0
- project_init/templates/base/dot_claude/hooks/dag_workflow.py +610 -0
- project_init/templates/base/dot_claude/memory/MEMORY.md.tmpl +11 -0
- project_init/templates/base/dot_claude/memory/README.md +51 -0
- project_init/templates/base/dot_claude/memory/SCHEMA.md +52 -0
- project_init/templates/base/dot_claude/memory/feedback_conventions.md +11 -0
- project_init/templates/base/dot_claude/memory/project_context.md.tmpl +11 -0
- project_init/templates/base/dot_claude/memory/user_role.md +7 -0
- project_init/templates/base/dot_claude/project-init.md.tmpl +174 -0
- project_init/templates/base/dot_claude/rules/go.md +14 -0
- project_init/templates/base/dot_claude/rules/hooks.md +30 -0
- project_init/templates/base/dot_claude/rules/node.md +17 -0
- project_init/templates/base/dot_claude/rules/python.md +25 -0
- project_init/templates/base/dot_claude/scripts/README.md +15 -0
- project_init/templates/base/dot_claude/scripts/create_issue.sh +577 -0
- project_init/templates/base/dot_claude/scripts/create_nojira_pr.sh +3 -0
- project_init/templates/base/dot_claude/scripts/finish_pr.sh +3 -0
- project_init/templates/base/dot_claude/scripts/install_hooks.sh +55 -0
- project_init/templates/base/dot_claude/scripts/monitor_pr.sh +270 -0
- project_init/templates/base/dot_claude/scripts/promote_review.sh +3 -0
- project_init/templates/base/dot_claude/scripts/push_branch.sh +5 -0
- project_init/templates/base/dot_claude/scripts/push_wiki.sh +34 -0
- project_init/templates/base/dot_claude/scripts/setup_github.sh +219 -0
- project_init/templates/base/dot_claude/scripts/start_issue.sh +134 -0
- project_init/templates/base/dot_claude/settings.json.tmpl +83 -0
- project_init/templates/base/dot_claude/skills/README.md +12 -0
- project_init/templates/base/dot_claude/skills/plan/SKILL.md.tmpl +40 -0
- project_init/templates/base/dot_claude/vault/README.md +21 -0
- project_init/templates/base/dot_claude/vault/decisions/README.md +22 -0
- project_init/templates/base/dot_claude/vault/design/README.md +3 -0
- project_init/templates/base/dot_claude/vault/knowledge/README.md +5 -0
- project_init/templates/base/dot_claude/vault/sessions/README.md +5 -0
- project_init/templates/base/dot_devcontainer/devcontainer.json.tmpl +17 -0
- project_init/templates/base/dot_devcontainer/post-create.sh.tmpl +31 -0
- project_init/templates/base/dot_env.example.tmpl +13 -0
- project_init/templates/base/dot_github/CODEOWNERS.tmpl +12 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/bug.yml +98 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/chore.yml +82 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/config.yml +5 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/docs.yml +84 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/feature.yml +87 -0
- project_init/templates/base/dot_github/ISSUE_TEMPLATE/test.yml +90 -0
- project_init/templates/base/dot_github/copilot-instructions.md.tmpl +25 -0
- project_init/templates/base/dot_github/hooks/commit-msg +52 -0
- project_init/templates/base/dot_github/hooks/pre-commit +16 -0
- project_init/templates/base/dot_github/hooks/pre-push +51 -0
- project_init/templates/base/dot_github/pull_request_template.md +22 -0
- project_init/templates/base/dot_github/workflows/board-automation.yml +232 -0
- project_init/templates/base/dot_github/workflows/ci.yml.tmpl +204 -0
- project_init/templates/base/dot_github/workflows/docs.yml.tmpl +98 -0
- project_init/templates/base/dot_github/workflows/issue-validation.yml +72 -0
- project_init/templates/base/dot_github/workflows/review-status.yml +48 -0
- project_init/templates/base/dot_github/workflows/validate-pr.yml +103 -0
- project_init/templates/base/dot_gitignore.tmpl +41 -0
- project_init/templates/base/dot_golangci.yml.tmpl +20 -0
- project_init/templates/base/dot_vscode/extensions.json.tmpl +10 -0
- project_init/templates/base/dot_vscode/settings.json.tmpl +8 -0
- project_init/templates/base/eslint.config.mjs.tmpl +29 -0
- project_init/templates/base/justfile.tmpl +95 -0
- project_init/templates/base/mise.toml.tmpl +20 -0
- project_init/templates/base/mkdocs.yml.tmpl +32 -0
- project_init/templates/base/renovate.json +14 -0
- project_init/templates/base/ruff.toml.tmpl +31 -0
- project_init/templates/base/typedoc.json.tmpl +14 -0
- project_init/templates/codex/dot_agents/skills/add_adr/SKILL.md +33 -0
- project_init/templates/codex/dot_agents/skills/add_command/SKILL.md +63 -0
- project_init/templates/codex/dot_agents/skills/add_hook/SKILL.md +112 -0
- project_init/templates/codex/dot_agents/skills/audit/SKILL.md +146 -0
- project_init/templates/codex/dot_agents/skills/create_issue/SKILL.md +59 -0
- project_init/templates/codex/dot_agents/skills/github_workflow/SKILL.md +80 -0
- project_init/templates/codex/dot_agents/skills/request_review/SKILL.md +19 -0
- project_init/templates/codex/dot_agents/skills/review/SKILL.md +17 -0
- project_init/templates/codex/dot_agents/skills/save_memory/SKILL.md +17 -0
- project_init/templates/codex/dot_agents/skills/session_summary/SKILL.md +35 -0
- project_init/templates/codex/dot_agents/skills/start_task/SKILL.md +48 -0
- project_init/templates/codex/dot_agents/skills/status/SKILL.md +15 -0
- project_init/templates/codex/dot_codex/hooks.json.tmpl +17 -0
- project_init/templates/fallback/dot_claude/hooks/github_command_guard.sh +11 -0
- project_init/templates/fallback/dot_claude/hooks/post_edit_lint.sh +58 -0
- project_init/templates/fallback/dot_claude/hooks/pre_commit_gate.sh +81 -0
- project_init/templates/fallback/dot_claude/hooks/prod_guard.py +140 -0
- project_init/templates/fallback/dot_claude/hooks/session_setup.sh +62 -0
- project_init/templates/fallback/dot_claude/hooks/workflow_state_reminder.sh +72 -0
- project_init/templates/fallback/dot_claude/skills/INDEX.md +28 -0
- project_init/templates/fallback/dot_claude/skills/add_adr/SKILL.md +33 -0
- project_init/templates/fallback/dot_claude/skills/add_command/SKILL.md +63 -0
- project_init/templates/fallback/dot_claude/skills/add_hook/SKILL.md +112 -0
- project_init/templates/fallback/dot_claude/skills/audit/SKILL.md +146 -0
- project_init/templates/fallback/dot_claude/skills/create_issue/SKILL.md +59 -0
- project_init/templates/fallback/dot_claude/skills/github_workflow/SKILL.md +80 -0
- project_init/templates/fallback/dot_claude/skills/request_review/SKILL.md +19 -0
- project_init/templates/fallback/dot_claude/skills/review/SKILL.md +17 -0
- project_init/templates/fallback/dot_claude/skills/save_memory/SKILL.md +17 -0
- project_init/templates/fallback/dot_claude/skills/session_summary/SKILL.md +35 -0
- project_init/templates/fallback/dot_claude/skills/start_task/SKILL.md +48 -0
- project_init/templates/fallback/dot_claude/skills/status/SKILL.md +15 -0
- project_init/templates/gemini/dot_agents/skills/add_adr/SKILL.md +33 -0
- project_init/templates/gemini/dot_agents/skills/add_command/SKILL.md +63 -0
- project_init/templates/gemini/dot_agents/skills/add_hook/SKILL.md +112 -0
- project_init/templates/gemini/dot_agents/skills/audit/SKILL.md +146 -0
- project_init/templates/gemini/dot_agents/skills/create_issue/SKILL.md +59 -0
- project_init/templates/gemini/dot_agents/skills/github_workflow/SKILL.md +80 -0
- project_init/templates/gemini/dot_agents/skills/request_review/SKILL.md +19 -0
- project_init/templates/gemini/dot_agents/skills/review/SKILL.md +17 -0
- project_init/templates/gemini/dot_agents/skills/save_memory/SKILL.md +17 -0
- project_init/templates/gemini/dot_agents/skills/session_summary/SKILL.md +35 -0
- project_init/templates/gemini/dot_agents/skills/start_task/SKILL.md +48 -0
- project_init/templates/gemini/dot_agents/skills/status/SKILL.md +15 -0
- project_init/templates/gemini/dot_claude/scripts/setup_gemini.sh.tmpl +16 -0
- project_init/templates/gemini/dot_gemini-extension/commands/add_adr.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/add_command.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/add_hook.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/audit.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/create_issue.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/github_workflow.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/request_review.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/review.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/save_memory.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/session_summary.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/start_task.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/commands/status.toml +5 -0
- project_init/templates/gemini/dot_gemini-extension/gemini-extension.json.tmpl +6 -0
- project_init/templates/gemini/dot_gemini-extension/hooks/hooks.json.tmpl +18 -0
- project_init/templates/graphify/dot_claude/docs/guides/using-graphify.md +37 -0
- project_init/templates/graphify/dot_claude/rules/graphify.md +18 -0
- project_init/templates/graphify/dot_claude/scripts/setup_graphify.sh +40 -0
- project_init/templates/obsidian/dot_claude/scripts/lint_memory.sh +115 -0
- project_init/templates/obsidian/dot_claude/vault/decisions/adr-000-project-setup.md.tmpl +22 -0
- project_init/templates/obsidian/dot_claude/vault/dot_obsidian/README.md +31 -0
- project_init/templates/obsidian/dot_claude/vault/dot_obsidian/app.json +6 -0
- project_init/templates/obsidian/dot_claude/vault/dot_obsidian/community-plugins.json +1 -0
- project_init/templates/obsidian/dot_claude/vault/dot_obsidian/core-plugins.json +1 -0
- project_init/templates/obsidian/dot_claude/vault/log.md +6 -0
- project_init/templates/obsidian/dot_claude/vault/templates/decision.md +16 -0
- project_init/templates/obsidian/dot_claude/vault/templates/design-note.md +14 -0
- project_init/templates/obsidian/dot_claude/vault/templates/knowledge-note.md +12 -0
- project_init/templates/obsidian/dot_claude/vault/templates/session-note.md +16 -0
- project_init/templates/presets/obsidian-graphify.toml +16 -0
- project_init/templates/presets/obsidian-only.toml +14 -0
- project_init/upgrade.py +569 -0
- project_init-0.3.0.dist-info/METADATA +342 -0
- project_init-0.3.0.dist-info/RECORD +173 -0
- project_init-0.3.0.dist-info/WHEEL +4 -0
- project_init-0.3.0.dist-info/entry_points.txt +2 -0
- project_init-0.3.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session_summary
|
|
3
|
+
description: Summarizes the current session and saves it to the vault. Use at the end of a work session to record completed work, decisions made, and open items for the next session.
|
|
4
|
+
when_to_use: Use when the user says "save the session", "wrap up", "summarize what we did", or at the end of a long work session.
|
|
5
|
+
effort: medium
|
|
6
|
+
allowed-tools: Bash(git *) Read Write Glob Grep
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Summarize this session and save it to the vault:
|
|
10
|
+
|
|
11
|
+
1. **Gather context**:
|
|
12
|
+
- Run `git log --since='2 hours ago' --oneline` for recent commits
|
|
13
|
+
- Run `git diff --stat` for uncommitted changes
|
|
14
|
+
- Review the conversation for key decisions and discoveries
|
|
15
|
+
|
|
16
|
+
2. **Write the summary** to `.claude/vault/sessions/` with today's date:
|
|
17
|
+
```
|
|
18
|
+
# Session YYYY-MM-DD (manual)
|
|
19
|
+
|
|
20
|
+
## What was done
|
|
21
|
+
- (bullet list of completed work)
|
|
22
|
+
|
|
23
|
+
## Decisions made
|
|
24
|
+
- (any architectural or approach decisions, with reasoning)
|
|
25
|
+
|
|
26
|
+
## Open items
|
|
27
|
+
- (anything left unfinished or discovered but not addressed)
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
- (anything else worth remembering)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. **Update memory** if any reusable facts emerged (write to the project memory directory)
|
|
34
|
+
|
|
35
|
+
Keep the summary concise — a future agent should be able to skim it in 30 seconds.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start_task
|
|
3
|
+
description: Creates a GitHub Issue, branch, and draft PR before implementation begins. Use before any non-trivial task to keep work traceable — one issue, one branch, one PR.
|
|
4
|
+
when_to_use: Use when the user says "start work on X", "create a ticket for Y", or "begin a new task". Do not use for trivial one-off changes that don't need tracking.
|
|
5
|
+
argument-hint: "[task title]"
|
|
6
|
+
allowed-tools: Bash(gh *) Bash(git *) Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Before starting any non-trivial task, create a GitHub Issue, a dedicated branch, and a draft PR. This keeps work traceable and every PR maps to exactly one issue.
|
|
10
|
+
|
|
11
|
+
## Mandatory scripts
|
|
12
|
+
|
|
13
|
+
| Action | Script | Never use |
|
|
14
|
+
|--------|--------|-----------|
|
|
15
|
+
| Start issue + branch + draft PR | `.claude/scripts/start_issue.sh <n> <type>` | bare `git checkout -b` + bare `gh pr create` |
|
|
16
|
+
| Push branch | `.claude/scripts/push_branch.sh` | bare `git push` |
|
|
17
|
+
| **Push + promote + merge (all-in-one)** | `.claude/scripts/finish_pr.sh <n>` | `gh pr ready`, bare `gh pr merge`, `gh pr checks --watch` |
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
1. **Clarify scope** — if $ARGUMENTS is empty or vague, ask the user for:
|
|
22
|
+
- Task title (one line, imperative: "Add X", "Fix Y", "Refactor Z")
|
|
23
|
+
- Work type: `feat` / `fix` / `chore` / `docs` / `test`
|
|
24
|
+
|
|
25
|
+
2. **Check for existing issue and PR** — run `gh issue list` and `gh pr list`. If an issue already exists, use its number. If a draft PR already exists for that issue, use it — do **not** create a second PR. Skip to step 5.
|
|
26
|
+
|
|
27
|
+
3. **Create the issue** — load the `create_issue` skill and follow it. It gathers priority, area, size, references, dependencies, and acceptance criteria before running:
|
|
28
|
+
```bash
|
|
29
|
+
ISSUE_NUMBER=$(.claude/scripts/create_issue.sh <type> "<title>" --priority <priority> --area "<area>" --size <size> --acceptance "<criterion>")
|
|
30
|
+
echo "Created issue #$ISSUE_NUMBER"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Start work** — create the branch, push, and open a draft PR:
|
|
34
|
+
```bash
|
|
35
|
+
.claude/scripts/start_issue.sh <issue-number> <type>
|
|
36
|
+
```
|
|
37
|
+
This derives the branch name (`<issue_type>/<project_abbr>-<issue_number>-<slug>`) from the issue title, pushes it, and opens a draft PR with the correct `[PROJECT-123][type]` title and `Closes #n` body.
|
|
38
|
+
|
|
39
|
+
5. **Proceed** — only begin implementation after the scripts have run successfully.
|
|
40
|
+
|
|
41
|
+
6. **When ready to merge** — load the `github_workflow` skill for the
|
|
42
|
+
full push → promote → monitor/merge lifecycle and review-cycle protocol.
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- Every non-trivial task must have a GitHub Issue, a branch, and a draft PR — all before the first line of implementation code.
|
|
47
|
+
- One issue → one branch → one PR.
|
|
48
|
+
- `board-automation.yml` moves the board card to **In Progress** automatically when the PR is opened. No manual board move needed.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: status
|
|
3
|
+
description: Show project status — git state, recent commits, open tasks, and memory summary
|
|
4
|
+
when_to_use: Use when you want a quick snapshot of the project — current branch, uncommitted changes, recent work, active memory, and open TODOs.
|
|
5
|
+
allowed-tools: Bash Read Grep Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Give me a concise project status report:
|
|
9
|
+
|
|
10
|
+
1. **Git state** — current branch, uncommitted changes, commits ahead/behind remote
|
|
11
|
+
2. **Recent work** — last 5 commits (one line each)
|
|
12
|
+
3. **Memory** — read `.claude/memory/MEMORY.md` and list the key facts
|
|
13
|
+
4. **Open items** — scan for TODO/FIXME/HACK in the codebase (top 10)
|
|
14
|
+
|
|
15
|
+
Keep the report under 30 lines. Use markdown formatting.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{{#if gemini}}#!/bin/bash
|
|
2
|
+
# One-time Gemini CLI wiring (scaffolded by project-init; PI-137).
|
|
3
|
+
# Links the project extension so Gemini CLI picks up the workflow
|
|
4
|
+
# /commands and the GitHub command guard. Idempotent.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
if ! command -v gemini >/dev/null 2>&1; then
|
|
9
|
+
echo "ERROR: gemini CLI not found (https://geminicli.com). Install it first." >&2
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
gemini extensions link .gemini-extension
|
|
14
|
+
echo "Linked .gemini-extension — workflow commands and the command guard are active."
|
|
15
|
+
echo "Instructions entry point stays GEMINI.md (redirects to AGENTS.md)."
|
|
16
|
+
{{/if gemini}}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Records an architectural decision as a new ADR in .claude/docs/adr/ using the MADR template. Use when a non-obvious design choice is made so future agents understand why."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/add_adr/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Creates a new slash command (skill) that users can invoke with /name. Use when asked to add a command, automate a repeatable workflow step, or expose a task as a /name shortcut."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/add_command/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Adds a deterministic hook that fires automatically on tool events. Use when asked to enforce a rule on every commit, block a dangerous pattern, validate output, or gate any tool call."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/add_hook/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Full project health audit — scans hooks, skills, scripts, rules, CI config, docs, and GitHub workflow for inconsistencies, broken references, and common mistakes. Creates a GitHub issue with findings and optionally starts fixing them."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/audit/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Creates a GitHub Issue with typed labels and structured planning metadata via create_issue.sh. Sub-skill invoked by start_task — do not call directly; use /start_task instead."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/create_issue/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Guides the agent through the full GitHub PR lifecycle — branch naming, push, review responses, and merge. Loaded automatically before any push, PR creation, review response, or merge action."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/github_workflow/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Summarizes the current session and saves it to the vault. Use at the end of a work session to record completed work, decisions made, and open items for the next session."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/session_summary/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
description = "Creates a GitHub Issue, branch, and draft PR before implementation begins. Use before any non-trivial task to keep work traceable — one issue, one branch, one PR."
|
|
2
|
+
prompt = """
|
|
3
|
+
Read .agents/skills/start_task/SKILL.md and follow its
|
|
4
|
+
instructions exactly for this request: {{args}}
|
|
5
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{{#if gemini}}{
|
|
2
|
+
"name": "{{project_name}}-workflow",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "project-init workflow for {{project_name}}: lifecycle skills as /commands plus the shared GitHub command guard. Link once per clone: gemini extensions link .gemini-extension"
|
|
5
|
+
}
|
|
6
|
+
{{/if gemini}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{{#if gemini}}{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"BeforeTool": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "run_shell_command",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"name": "github-command-guard",
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 .claude/hooks/agent_guard_adapter.py gemini",
|
|
11
|
+
"timeout": 10000
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
{{/if gemini}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Using Graphify memory
|
|
2
|
+
|
|
3
|
+
This project uses the `obsidian-graphify` memory stack (ADR-009 in the
|
|
4
|
+
project-init repo): the Obsidian vault holds human decisions and session
|
|
5
|
+
notes; [Graphify](https://github.com/safishamsi/graphify) holds a queryable
|
|
6
|
+
knowledge graph of the codebase. Graph for "how does the code fit
|
|
7
|
+
together", vault for "why did we do it this way".
|
|
8
|
+
|
|
9
|
+
## One-time setup
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
.claude/scripts/setup_graphify.sh
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This installs the `graphify` CLI (`uv tool install graphifyy`), registers
|
|
16
|
+
the project-scoped `/graphify` skill plus a PreToolUse hook that nudges
|
|
17
|
+
agents toward querying the graph instead of grepping, and adds a
|
|
18
|
+
post-commit hook that incrementally rebuilds the graph (SHA256-cached, only
|
|
19
|
+
changed files). No API keys are needed — IDE usage runs through your
|
|
20
|
+
existing agent session, and AST extraction costs zero LLM tokens.
|
|
21
|
+
|
|
22
|
+
## Daily flow
|
|
23
|
+
|
|
24
|
+
1. Build/refresh: the post-commit hook keeps the graph current; after large
|
|
25
|
+
uncommitted changes run `/graphify .` (or `graphify update .`).
|
|
26
|
+
2. Query: agents read `graphify-out/graph.json` first (see
|
|
27
|
+
`.claude/rules/graphify.md`); the HTML visualization at
|
|
28
|
+
`graphify-out/graph.html` is for humans.
|
|
29
|
+
3. Vault export (optional): `graphify . --obsidian` writes graph notes into
|
|
30
|
+
the vault so wikilinks can connect code structure to decisions.
|
|
31
|
+
|
|
32
|
+
## What is committed
|
|
33
|
+
|
|
34
|
+
`graphify-out/` is a derived artifact: the markdown report
|
|
35
|
+
(`GRAPH_REPORT.md`) is worth committing for reviewers; the JSON/HTML/cache
|
|
36
|
+
are gitignored. Never hand-edit graph output — fix the code or the vault
|
|
37
|
+
note instead.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Graphify memory — query the code knowledge graph before grepping
|
|
3
|
+
globs: ["graphify-out/**", ".claude/scripts/setup_graphify.sh"]
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Graphify memory
|
|
8
|
+
|
|
9
|
+
- Context lookup order: `graphify-out/graph.json` → vault notes → raw code.
|
|
10
|
+
Query the graph before grepping the codebase; it is rebuilt per commit.
|
|
11
|
+
- Rebuild manually after large uncommitted changes: `/graphify .` (skill)
|
|
12
|
+
or `graphify update .` (CLI).
|
|
13
|
+
- Export to the vault: `graphify . --obsidian` writes graph notes
|
|
14
|
+
alongside human notes.
|
|
15
|
+
- Not installed yet? Run `.claude/scripts/setup_graphify.sh` once.
|
|
16
|
+
|
|
17
|
+
The graph is a derived artifact — never hand-edit `graphify-out/`, and keep
|
|
18
|
+
decisions in the vault (`.claude/vault/decisions/`), not in graph notes.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# One-time Graphify setup (scaffolded by project-init; ADR-009).
|
|
3
|
+
# Run this yourself — the scaffolder never installs tools.
|
|
4
|
+
# Idempotent: safe to re-run after Graphify updates.
|
|
5
|
+
#
|
|
6
|
+
# What it does:
|
|
7
|
+
# 1. installs the graphify CLI as a uv tool (PyPI package: graphifyy)
|
|
8
|
+
# 2. registers the project-scoped /graphify skill + PreToolUse hook
|
|
9
|
+
# 3. installs the post-commit hook that incrementally rebuilds the graph
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
if ! command -v uv >/dev/null 2>&1; then
|
|
14
|
+
echo "ERROR: uv is required (https://docs.astral.sh/uv/). Install it first." >&2
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if ! command -v graphify >/dev/null 2>&1; then
|
|
19
|
+
echo "Installing graphify CLI (uv tool install graphifyy)..."
|
|
20
|
+
uv tool install graphifyy
|
|
21
|
+
else
|
|
22
|
+
echo "graphify CLI already installed — skipping"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo "Registering project-scoped skill + hook..."
|
|
26
|
+
# --project writes under the repo (.claude/skills/graphify/) so the skill is
|
|
27
|
+
# committable and teammates get it on clone; default scope is user-global.
|
|
28
|
+
graphify install --project
|
|
29
|
+
|
|
30
|
+
echo "Installing post-commit graph rebuild hook..."
|
|
31
|
+
graphify hook install
|
|
32
|
+
|
|
33
|
+
cat <<'EOM'
|
|
34
|
+
|
|
35
|
+
Done. Next steps:
|
|
36
|
+
/graphify . # build the initial knowledge graph (in your agent)
|
|
37
|
+
graphify . --obsidian # optional: export graph notes into the vault
|
|
38
|
+
|
|
39
|
+
Agents read graphify-out/graph.json before grepping (see .claude/rules/graphify.md).
|
|
40
|
+
EOM
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# lint_memory.sh — validate memory files against SCHEMA.md conventions.
|
|
3
|
+
# Agent-agnostic: any agent or hook can call this directly.
|
|
4
|
+
# Exit 0 on clean, exit 1 with actionable messages.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
9
|
+
MEMORY_DIR="$ROOT/.claude/memory"
|
|
10
|
+
INDEX="$MEMORY_DIR/MEMORY.md"
|
|
11
|
+
|
|
12
|
+
ERRORS=0
|
|
13
|
+
WARNINGS=0
|
|
14
|
+
|
|
15
|
+
error() { echo "ERROR: $1" >&2; ERRORS=$((ERRORS + 1)); }
|
|
16
|
+
warn() { echo "WARN: $1" >&2; WARNINGS=$((WARNINGS + 1)); }
|
|
17
|
+
|
|
18
|
+
SKIP_FILES="MEMORY.md SCHEMA.md README.md"
|
|
19
|
+
|
|
20
|
+
is_skipped() {
|
|
21
|
+
local name="$1"
|
|
22
|
+
for skip in $SKIP_FILES; do
|
|
23
|
+
[ "$name" = "$skip" ] && return 0
|
|
24
|
+
done
|
|
25
|
+
return 1
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# --- Validate memory file frontmatter ---
|
|
29
|
+
|
|
30
|
+
for file in "$MEMORY_DIR"/*.md; do
|
|
31
|
+
[ -f "$file" ] || continue
|
|
32
|
+
name="$(basename "$file")"
|
|
33
|
+
is_skipped "$name" && continue
|
|
34
|
+
|
|
35
|
+
# Extract YAML frontmatter (between --- delimiters)
|
|
36
|
+
if ! head -1 "$file" | grep -q '^---$'; then
|
|
37
|
+
error "$name: missing YAML frontmatter (no opening ---)"
|
|
38
|
+
continue
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Get frontmatter block (between first and second --- delimiters, POSIX-portable)
|
|
42
|
+
frontmatter="$(awk 'NR==1{next} /^---$/{exit} {print}' "$file")"
|
|
43
|
+
|
|
44
|
+
# Check required fields
|
|
45
|
+
for field in name description type; do
|
|
46
|
+
if ! echo "$frontmatter" | grep -q "^${field}:"; then
|
|
47
|
+
error "$name: missing required field '$field'"
|
|
48
|
+
fi
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
# Validate type value
|
|
52
|
+
type_val="$(echo "$frontmatter" | grep '^type:' | sed 's/^type:[[:space:]]*//' | tr -d '[:space:]')"
|
|
53
|
+
if [ -n "$type_val" ]; then
|
|
54
|
+
case "$type_val" in
|
|
55
|
+
user|feedback|project|reference) ;;
|
|
56
|
+
*) error "$name: invalid type '$type_val' (must be user|feedback|project|reference)" ;;
|
|
57
|
+
esac
|
|
58
|
+
fi
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
# --- Check index completeness ---
|
|
62
|
+
|
|
63
|
+
if [ ! -f "$INDEX" ]; then
|
|
64
|
+
error "MEMORY.md index not found"
|
|
65
|
+
else
|
|
66
|
+
# Check every memory file appears in the index
|
|
67
|
+
for file in "$MEMORY_DIR"/*.md; do
|
|
68
|
+
[ -f "$file" ] || continue
|
|
69
|
+
name="$(basename "$file")"
|
|
70
|
+
is_skipped "$name" && continue
|
|
71
|
+
|
|
72
|
+
if ! grep -q "$name" "$INDEX"; then
|
|
73
|
+
error "$name: not listed in MEMORY.md index"
|
|
74
|
+
fi
|
|
75
|
+
done
|
|
76
|
+
|
|
77
|
+
# Check every file referenced in index actually exists
|
|
78
|
+
while read -r ref; do
|
|
79
|
+
if [ ! -f "$MEMORY_DIR/$ref" ]; then
|
|
80
|
+
error "MEMORY.md references '$ref' but file does not exist"
|
|
81
|
+
fi
|
|
82
|
+
done < <(sed -n 's/.*\[[^]]*\](\([^)]*\)).*/\1/p' "$INDEX" 2>/dev/null || true)
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# --- Report orphaned vault notes (warnings only) ---
|
|
86
|
+
|
|
87
|
+
VAULT_DIR="$ROOT/.claude/vault"
|
|
88
|
+
if [ -d "$VAULT_DIR" ]; then
|
|
89
|
+
# Collect all wikilink targets from vault notes
|
|
90
|
+
all_links="$(grep -roh '\[\[[^]]*\]\]' "$VAULT_DIR" 2>/dev/null | sed 's/\[\[//;s/\]\]//' | sort -u || true)"
|
|
91
|
+
|
|
92
|
+
while IFS= read -r -d '' file; do
|
|
93
|
+
name="$(basename "$file" .md)"
|
|
94
|
+
# Check if any other note links to this one
|
|
95
|
+
if [ -n "$all_links" ]; then
|
|
96
|
+
if ! echo "$all_links" | grep -q "$name"; then
|
|
97
|
+
warn "$(basename "$file"): no inbound wikilinks (orphan note)"
|
|
98
|
+
fi
|
|
99
|
+
fi
|
|
100
|
+
done < <(find "$VAULT_DIR" -name '*.md' -not -path '*/.obsidian/*' -not -path '*/templates/*' -not -name 'README.md' -not -name 'log.md' -print0)
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# --- Summary ---
|
|
104
|
+
|
|
105
|
+
if [ "$ERRORS" -gt 0 ]; then
|
|
106
|
+
echo >&2
|
|
107
|
+
echo "lint_memory: $ERRORS error(s), $WARNINGS warning(s)" >&2
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
if [ "$WARNINGS" -gt 0 ]; then
|
|
112
|
+
echo "lint_memory: clean ($WARNINGS warning(s))" >&2
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
exit 0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ADR-000 Project setup
|
|
3
|
+
date: {{created_date}}
|
|
4
|
+
status: accepted
|
|
5
|
+
tags: [setup, scaffolding]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# ADR-000: Project setup with project-init
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
This project was scaffolded using [project-init]({{project_init_url}}).
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
Preset: `{{memory_stack}}`
|
|
17
|
+
|
|
18
|
+
## Consequences
|
|
19
|
+
|
|
20
|
+
- Memory files live in `.claude/memory/` (agent-curated facts)
|
|
21
|
+
- Vault notes live in `.claude/vault/` (human-authored, Obsidian-compatible)
|
|
22
|
+
{{#if graphify}}- Graphify provides a queryable code knowledge graph alongside both layers{{/if graphify}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Obsidian Configuration
|
|
2
|
+
|
|
3
|
+
These config stubs bootstrap a usable Obsidian vault. Open `.claude/vault/` as an Obsidian vault.
|
|
4
|
+
|
|
5
|
+
## Recommended community plugins
|
|
6
|
+
|
|
7
|
+
Install these from Obsidian Settings → Community plugins → Browse:
|
|
8
|
+
|
|
9
|
+
| Plugin | Why | Config notes |
|
|
10
|
+
|--------|-----|-------------|
|
|
11
|
+
| **Templater** | Consistent note structure from `templates/` | Set template folder to `templates/` |
|
|
12
|
+
| **Linter** | Auto-formats YAML frontmatter, enforces heading structure | Enable YAML sort, require title |
|
|
13
|
+
| **Dataview** | Query notes by frontmatter (list accepted ADRs, open decisions) | No config needed |
|
|
14
|
+
|
|
15
|
+
## Optional plugins
|
|
16
|
+
|
|
17
|
+
| Plugin | Why |
|
|
18
|
+
|--------|-----|
|
|
19
|
+
| **Calendar** | Navigate session logs by date — point to `sessions/` |
|
|
20
|
+
| **Git** | Auto-commit vault changes on interval (10-min auto-backup) |
|
|
21
|
+
| **Kanban** | Visual task board from markdown |
|
|
22
|
+
| **Graph Analysis** | Better graph metrics, find disconnected clusters |
|
|
23
|
+
| **Tag Wrangler** | Rename/merge tags across vault |
|
|
24
|
+
|
|
25
|
+
## What's pre-configured
|
|
26
|
+
|
|
27
|
+
- `app.json` — wikilinks enabled, new notes default to `knowledge/`, attachments to `design/`
|
|
28
|
+
- `core-plugins.json` — backlinks, graph view, tag pane, outline, templates, daily notes
|
|
29
|
+
- `community-plugins.json` — Templater, Linter, Dataview (install required, config stubs only)
|
|
30
|
+
|
|
31
|
+
Obsidian workspace state and cache are gitignored (see `.gitignore`).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["templater-obsidian", "obsidian-linter", "dataview"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["backlink", "graph", "tag-pane", "outline", "templates", "daily-notes"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Preset: Obsidian + Graphify memory stack (recommended for code-heavy projects)
|
|
2
|
+
# Obsidian vault for humans; Graphify knowledge graph for agents (ADR-009).
|
|
3
|
+
# Graphify is installed by the user via .claude/scripts/setup_graphify.sh —
|
|
4
|
+
# the scaffolder only renders files.
|
|
5
|
+
|
|
6
|
+
name = "obsidian-graphify"
|
|
7
|
+
description = "Obsidian vault for humans, Graphify code knowledge graph for agents."
|
|
8
|
+
|
|
9
|
+
layers = ["base", "obsidian", "graphify"]
|
|
10
|
+
|
|
11
|
+
[vars]
|
|
12
|
+
memory_stack = "obsidian-graphify"
|
|
13
|
+
|
|
14
|
+
[scaffolded_project_dependencies.python]
|
|
15
|
+
core = []
|
|
16
|
+
dev = ["ruff"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Preset: Obsidian-only memory stack
|
|
2
|
+
# For small projects. Plain markdown vault, no vector/graph indexing.
|
|
3
|
+
|
|
4
|
+
name = "obsidian-only"
|
|
5
|
+
description = "Obsidian vault only — human-authored docs, no AI index."
|
|
6
|
+
|
|
7
|
+
layers = ["base", "obsidian"]
|
|
8
|
+
|
|
9
|
+
[vars]
|
|
10
|
+
memory_stack = "obsidian-only"
|
|
11
|
+
|
|
12
|
+
[scaffolded_project_dependencies.python]
|
|
13
|
+
core = []
|
|
14
|
+
dev = ["ruff"]
|