Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .claude/hooks/submodule.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# The shared skills in .claude/skills are symlinks into the .claude/shared
# submodule. git leaves that unpopulated in a new worktree, and a dangling
# symlink is silently skipped. A checkout on the wrong commit stays stale too.

set -eu

# Require an explicit project dir so we never touch a stray checkout.
[ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0
cd "$CLAUDE_PROJECT_DIR" || exit 0

# '-' is uninitialized. '+' is populated at a commit other than the gitlink.
# A matching checkout has no prefix.
case "$(git submodule status .claude/shared 2>/dev/null)" in
-* | +*) ;;
*) exit 0 ;;
Comment on lines +14 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the submodule when its pinned revision changes

When a later pull changes the superproject's pinned submodule revision, git submodule status prefixes the existing stale checkout with +, not -. This case therefore exits without running git submodule update, leaving every shared-skill symlink on the old revision indefinitely for existing checkouts; handle the + state by updating to the pinned commit as well.

Useful? React with 👍 / 👎.

Comment on lines +14 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Surface submodule status failures

If git submodule status fails, such as with malformed submodule metadata or an incomplete conflicted checkout, the discarded stderr and wildcard branch turn that failure into a successful exit. Claude then continues with dangling or stale skills instead of reporting why initialization failed; preserve and check the command's exit status before treating the checkout as current. (Written by GPT-5.6 Sol)

AGENTS.md reference: AGENTS.md:L17-L17

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push only adds the spaces shfmt requires. A failed git submodule status already falls through to the branch that exits 0, and set -e does not fire on the case word. I am not changing that here. A status failure should not fail every Claude session start.

(Written by Grok 4.7)

esac

echo "submodule hook: updating .claude/shared to the pinned skills." >&2
git submodule update --init .claude/shared >&2
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
4 changes: 4 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/submodule.sh"
},
Comment on lines +8 to +10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Initialize the shared skills for Codex sessions

In a fresh checkout or new worktree that did not recurse submodules, .claude/shared is empty, leaving all newly symlinked shared skills, including merge and close, dangling. This hook is registered only in Claude settings, while .codex/hooks.json still runs only the direnv hook, and submodule.sh exits without CLAUDE_PROJECT_DIR; consequently Codex silently skips these skills. Register equivalent initialization for Codex or otherwise populate the submodule before skill discovery.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this Claude-only. The PR already says the hook fills .claude/shared for Claude sessions, and a dangling symlink is skipped. Codex has its own SessionStart hook for direnv; adding submodule init there is a follow-up, not this change. A checkout can run git submodule update --init .claude/shared.

The + status, a checkout on the wrong commit, is a real miss in the same hook. Fixing that.

(Written by Grok 4.7)

{
"type": "command",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/direnv.sh"
Expand Down
1 change: 1 addition & 0 deletions .claude/shared
Submodule shared added at 763fb4
1 change: 1 addition & 0 deletions .claude/skills/bump
1 change: 1 addition & 0 deletions .claude/skills/clean
1 change: 1 addition & 0 deletions .claude/skills/close
15 changes: 0 additions & 15 deletions .claude/skills/close/SKILL.md

This file was deleted.

4 changes: 0 additions & 4 deletions .claude/skills/close/agents/openai.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .claude/skills/grill
1 change: 1 addition & 0 deletions .claude/skills/merge
18 changes: 0 additions & 18 deletions .claude/skills/merge/SKILL.md

This file was deleted.

4 changes: 0 additions & 4 deletions .claude/skills/merge/agents/openai.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .claude/skills/peer-review
3 changes: 2 additions & 1 deletion .claude/skills/plan-quests/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ When the work changes what a user sees (a wire, an API, a flag, a dashboard), as
When the frontier disagrees with a settled quest/plan, challenge the user and resolve the conflict.

Begin the interview by scoping the goal: the observable outcome, why it matters, and its important boundaries and non-goals.
Do not move on to implementation decisions until the goal is settled.
Restate the goal in one sentence and get it confirmed before moving on to implementation decisions.
If the goal contains independently completable outcomes, split them before planning.
Map the implementation plan as a design tree: every material decision branches into the decisions that hang off it.

The session is done when the frontier is empty.
The result may be one quest or multiple quests and questlines, split based on what can be completed independently.
Prefix each quest title with `[XS]`, `[S]`, `[M]`, `[L]`, or `[XL]`, including implementation, verification, and landing work.
Once complete, create, update, or delete the relevant quests and questlines.
Record each settled decision and its reason in the quest's Plan, so later sessions don't ask it again.
New work joins the milestone matching its priority, at its rank; a questline groups only quests that ship together, and its README holds the work no child owns (the end-to-end test, the docs page).

When done, commit and create a draft PR following `CONTRIBUTING.md`.
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/recommended
1 change: 1 addition & 0 deletions .claude/skills/spawn-merge
28 changes: 0 additions & 28 deletions .claude/skills/spawn-merge/SKILL.md

This file was deleted.

4 changes: 0 additions & 4 deletions .claude/skills/spawn-merge/agents/openai.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .claude/skills/spawn-quests/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ Judge readiness from each line branch's own quest directory, and treat a quest d
Inspect any blocked quests, and determine if they can be unblocked.
A line whose `Quests` list has emptied is a ready quest too: finishing it marks the line's PR ready.

One at a time, for each each quest, interactively prompt the user if we should /start-quest, /plan-quests, skip, or delete.
Include a short summary and your recommendation.
Recommend an action for each quest: /start-quest, /plan-quests, skip, or delete.
Start the quests you'd start with no open question right away.
Interactively prompt the user about the rest, a few per prompt, each with a short summary and your recommendation.

Spawn a background sub-agent for each /start-quest.
Create a fresh worktree on the base `quest branch` prints, creating that line branch first if it is missing.
Agents share no writable files: each keeps its scratch files in its own worktree's `.scratch/`, and anything you hand every agent goes in its prompt, not a shared file.
Each agent blocks on its own checks and reports back only when done or blocked.
Limit the concurrency to at most N agents in parallel, where N is half the number of physical CPU cores.
Other sessions share this machine: hold new agents while the load average exceeds the core count.

Monitor the sub-agents and report their final status, but do not monitor their PRs.
Report each sub-agent's final status, staying silent on interim notifications, but do not monitor their PRs.
Prompt the user if they want to /plan-quests for any suggested follow-ups.

Run /plan-quests for any selected quests in the foreground.
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/takeover
16 changes: 0 additions & 16 deletions .claude/skills/takeover/SKILL.md

This file was deleted.

4 changes: 0 additions & 4 deletions .claude/skills/takeover/agents/openai.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".claude/shared"]
path = .claude/shared
url = https://github.com/kixelated/skills
7 changes: 7 additions & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ doc/draft/

# Quests use a constrained Markdown dialect checked by the quest validator.
quest/

# Skills are symlinks into the kixelated/skills submodule, which formats its
# own files; remark would follow them (and .agents, Codex's link to the same
# directory) and rewrite the pinned checkout.
.claude/shared/
.claude/skills/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep repository-local skills in the Markdown checks

Ignoring the entire .claude/skills/ tree also excludes the regular, repository-owned plan-issues, plan-quests, spawn-quests, and start-quest Markdown files, not just the new symlinks. Consequently, just _markdown check and just fix no longer validate or format those skills, including the two edited in this commit; narrow the ignore entries to the symlinked shared skills so local skills remain covered.

Useful? React with 👍 / 👎.

.agents/
Loading