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
1 change: 0 additions & 1 deletion .github/INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ This file is the exact path inventory for the live GitHub Copilot catalog in thi
- `.github/skills/internal-bash/SKILL.md`
- `.github/skills/internal-changelog-automation/SKILL.md`
- `.github/skills/internal-cloud-policy/SKILL.md`
- `.github/skills/internal-context-handoff/SKILL.md`
- `.github/skills/internal-copilot-audit/SKILL.md`
- `.github/skills/internal-copilot-docs-research/SKILL.md`
- `.github/skills/internal-ddd/SKILL.md`
Expand Down
6 changes: 5 additions & 1 deletion .github/agents/local-sync-install-ai-resources.agent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: local-sync-install-ai-resources
description: Use this agent when planning, auditing, or applying allowlisted home-directory sync of repository-owned AI runtime resources to local Codex, Copilot, or OpenCode targets.
description: Use this agent when planning, auditing, or applying repository-owned AI resources or the portable AGENTS.md baseline to local home runtimes.
tools: ["read", "edit", "search", "execute"]
disable-model-invocation: true
agents: []
Expand All @@ -11,3 +11,7 @@ agents: []
## Core Skill

- `local-agent-sync-install-ai-resources`

When the user names `agents.md`, `agents.md` means `sync --targets agents.md`.
This updates `~/.agents/AGENTS.md` from root `AGENTS.md` without the
`<standards-repository-local-rules>` block.
24 changes: 24 additions & 0 deletions .github/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# graphify-hook: managed delegate
set -Eeuo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ORIGINAL_HOOK="$SCRIPT_DIR/post-checkout.graphify-original"
original_status=0
if [ -f "$ORIGINAL_HOOK" ]; then
set +e
if [ -x "$ORIGINAL_HOOK" ]; then
"$ORIGINAL_HOOK" "$@"
else
bash "$ORIGINAL_HOOK" "$@"
fi
original_status=$?
set -e
fi
set +e
"$SCRIPT_DIR/../scripts/graphify-file-change-hook.sh" post-checkout "$@"
delegate_status=$?
set -e
if [ "$original_status" -ne 0 ]; then
exit "$original_status"
fi
exit "$delegate_status"
24 changes: 24 additions & 0 deletions .github/hooks/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# graphify-hook: managed delegate
set -Eeuo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ORIGINAL_HOOK="$SCRIPT_DIR/post-commit.graphify-original"
original_status=0
if [ -f "$ORIGINAL_HOOK" ]; then
set +e
if [ -x "$ORIGINAL_HOOK" ]; then
"$ORIGINAL_HOOK" "$@"
else
bash "$ORIGINAL_HOOK" "$@"
fi
original_status=$?
set -e
fi
set +e
"$SCRIPT_DIR/../scripts/graphify-file-change-hook.sh" post-commit "$@"
delegate_status=$?
set -e
if [ "$original_status" -ne 0 ]; then
exit "$original_status"
fi
exit "$delegate_status"
24 changes: 24 additions & 0 deletions .github/hooks/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# graphify-hook: managed delegate
set -Eeuo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ORIGINAL_HOOK="$SCRIPT_DIR/post-merge.graphify-original"
original_status=0
if [ -f "$ORIGINAL_HOOK" ]; then
set +e
if [ -x "$ORIGINAL_HOOK" ]; then
"$ORIGINAL_HOOK" "$@"
else
bash "$ORIGINAL_HOOK" "$@"
fi
original_status=$?
set -e
fi
set +e
"$SCRIPT_DIR/../scripts/graphify-file-change-hook.sh" post-merge "$@"
delegate_status=$?
set -e
if [ "$original_status" -ne 0 ]; then
exit "$original_status"
fi
exit "$delegate_status"
64 changes: 64 additions & 0 deletions .github/scripts/install-graphify-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,68 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
cd "$REPO_ROOT"
git config core.hooksPath .github/hooks

HOOKS_DIR="$REPO_ROOT/.github/hooks"
HOOK_MARKER="# graphify-hook: managed delegate"
mkdir -p "$HOOKS_DIR"

install_hook() {
local hook_name="$1"
local hook_path="$HOOKS_DIR/$hook_name"
local original_path="$hook_path.graphify-original"
local temporary_path

if [ -L "$hook_path" ]; then
printf 'Preserved foreign symlink hook: %s\n' "$hook_path"
return 0
fi

if [ -f "$hook_path" ] && ! grep -Fq "$HOOK_MARKER" "$hook_path"; then
if [ -e "$original_path" ] || [ -L "$original_path" ]; then
printf 'Preserved foreign hook with existing backup: %s\n' "$hook_path"
return 0
fi
mv "$hook_path" "$original_path"
fi

if [ -f "$hook_path" ] && grep -Fq "$HOOK_MARKER" "$hook_path"; then
return 0
fi

temporary_path="$(mktemp "$HOOKS_DIR/.${hook_name}.XXXXXX")"
{
printf '%s\n' '#!/usr/bin/env bash'
printf '%s\n' "$HOOK_MARKER"
printf '%s\n' 'set -Eeuo pipefail'
printf '%s\n' 'SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"'
printf 'ORIGINAL_HOOK="$SCRIPT_DIR/%s.graphify-original"\n' "$hook_name"
printf '%s\n' 'original_status=0'
printf '%s\n' 'if [ -f "$ORIGINAL_HOOK" ]; then'
printf '%s\n' ' set +e'
printf '%s\n' ' if [ -x "$ORIGINAL_HOOK" ]; then'
printf '%s\n' ' "$ORIGINAL_HOOK" "$@"'
printf '%s\n' ' else'
printf '%s\n' ' bash "$ORIGINAL_HOOK" "$@"'
printf '%s\n' ' fi'
printf '%s\n' ' original_status=$?'
printf '%s\n' ' set -e'
printf '%s\n' 'fi'
printf '%s\n' 'set +e'
printf '%s ' '"$SCRIPT_DIR/../scripts/graphify-file-change-hook.sh"'
printf '%s ' "$hook_name"
printf '%s\n' '"$@"'
printf '%s\n' 'delegate_status=$?'
printf '%s\n' 'set -e'
printf '%s\n' 'if [ "$original_status" -ne 0 ]; then'
printf '%s\n' ' exit "$original_status"'
printf '%s\n' 'fi'
printf '%s\n' 'exit "$delegate_status"'
} >"$temporary_path"
chmod 755 "$temporary_path"
mv "$temporary_path" "$hook_path"
}

for hook_name in post-commit post-checkout post-merge; do
install_hook "$hook_name"
done

printf 'Installed Git hooks path: %s\n' '.github/hooks'
1 change: 0 additions & 1 deletion .github/skills/graphify/.graphify_version

This file was deleted.

42 changes: 0 additions & 42 deletions .github/skills/internal-context-handoff/SKILL.md

This file was deleted.

4 changes: 0 additions & 4 deletions .github/skills/internal-context-handoff/agents/openai.yaml

This file was deleted.

This file was deleted.

48 changes: 39 additions & 9 deletions .github/skills/internal-gateway-idea/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: Use when a repository-owned idea needs brainstorming, assumption ch

- `superpowers-brainstorming`: core idea-to-design workflow.
- `internal-gateway-writing-plans`: retained spec or implementation-plan writing after the user approves the direction.
- `mattpocock-research`: on-demand owner for decision-relevant external research after local evidence is exhausted; this reference does not preload the skill.

## Local references

Expand All @@ -33,14 +34,14 @@ Lightweight repository-owned wrapper for idea shaping. Use `superpowers-brainsto

## Core contract

- Follow the mandatory gate sequence: `Specialization Checkpoint: gated`, `Idea Gate 0`, `Assumption Challenge Gate`, `Alternative discovery`, `Critical Challenge Gate`, `Spec vs plan decision`, `Stop before implementation execution`.
- Follow the mandatory gate sequence: `Specialization Checkpoint: gated`, `Idea Gate 0`, `External Research Checkpoint`, `Assumption Challenge Gate`, `Alternative discovery`, `Critical Challenge Gate`, `Spec vs plan decision`, `Stop before implementation execution`.
- Load `superpowers-brainstorming` as the core workflow.
- Read `references/workflow.md` before presenting the final design direction.
- Keep the `superpowers-brainstorming` hard gate: no implementation action before the user approves the design or direct-plan recommendation.
- Treat approval as gate-local. `procedi`, `ok`, `go`, or similar approval advances only the active visible gate.
- If approval wording is ambiguous, ask whether it means critical review, retained spec or plan writing, or implementation execution.
- After the bounded evidence pass, run `Idea Gate 0` as a visible numbered question block with `Question`, `Recommendation`, `Why`, and `Default if accepted`; evidence cannot replace Idea Gate 0.
- Do not proceed to assumption challenge, alternative discovery, design direction, critical challenge, or spec-vs-plan decision until `Idea Gate 0` is accepted or the user explicitly overrides its defaults.
- Do not proceed to `External Research Checkpoint`, assumption challenge, alternative discovery, design direction, critical challenge, or spec-vs-plan decision until `Idea Gate 0` is accepted or the user explicitly overrides its defaults.
- Run `Critical Challenge Gate` as its own visible gate after the user approves the design direction and before the spec-vs-plan decision; an embedded critique does not satisfy Critical Challenge Gate.
- If any mandatory gate was skipped, stop, name the missed gate, mark any downstream artifact as draft-only, and resume at the first skipped mandatory gate.
- Use this skill only to add repository-owned idea gates, not to fork the core brainstorming process.
Expand All @@ -65,13 +66,14 @@ Follow `references/workflow.md` in this order:
1. `Bounded evidence pass`
2. `Specialization Checkpoint: gated` when the incoming ask is execution-shaped.
3. `Idea Gate 0`
4. `Assumption Challenge Gate`
5. `Alternative discovery`
6. `Present design direction`
7. `Critical Challenge Gate`
8. `Spec vs plan decision`
9. `Approved writing handoff`
10. `Stop before implementation execution`
4. `External Research Checkpoint`
5. `Assumption Challenge Gate`
6. `Alternative discovery`
7. `Present design direction`
8. `Critical Challenge Gate`
9. `Spec vs plan decision`
10. `Approved writing handoff`
11. `Stop before implementation execution`

If a later step happened before an earlier mandatory gate, use `Skipped-gate
recovery`: stop the current lane, identify the first skipped mandatory gate,
Expand Down Expand Up @@ -99,6 +101,34 @@ answer: intent, accepted defaults, constraints, success criteria, validation
path, and anti-scope. A bounded evidence pass may prepare recommended defaults,
but evidence cannot replace Idea Gate 0.

## External Research Checkpoint

Run this checkpoint after `Idea Gate 0` is accepted and before `Assumption
Challenge Gate`. Local evidence remains the default.

Skip external research unless all of these are true:

- the unresolved question is owned by an external primary source;
- local evidence is insufficient;
- the answer could change feasibility, approach, constraints, or risk.

When all conditions hold:

1. Define one bounded research question.
2. load `mattpocock-research` on-demand and write one Markdown report under
`tmp/research/YYYY-MM-DD-<slug>.md`.
3. Bring only the report path and decision-relevant conclusions back into the
brainstorming flow.
4. Continue to `Assumption Challenge Gate`, or return to `Idea Gate 0` when the
evidence changes an accepted constraint or default.

`internal-gateway-idea` owns when research is warranted.
`mattpocock-research` owns how the research is performed. Do not copy its
research procedure here, and do not start a second research pass automatically.

Validation must keep this checkpoint on-demand, bounded to one question and one
report, preceded by local evidence, and routed to `tmp/research/`.

## Assumption Challenge Gate

Run this gate before finalizing the design direction.
Expand Down
Loading