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
44 changes: 44 additions & 0 deletions .specify/ai-kit.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"schema_version": "1.0",
"integration": "copilot",
"version": "1.0.0",
"links": [
{
"source": ".github/agents",
"target": ".github/agents",
"mode": "link_children",
"skip_patterns_unless_paths_exist": [
{
"patterns": [
"speckit.*"
],
"paths": [
".speckit"
]
}
]
},
{
"source": ".github/prompts",
"target": ".github/prompts",
"mode": "link_dir"
},
{
"source": ".github/skills",
"target": ".github/skills",
"mode": "link_dir"
},
{
"source": ".github/hooks",
"target": ".github/hooks",
"mode": "link_dir"
}
],
"copies": [
{
"source": ".github/copilot-instructions.md",
"target": ".github/copilot-instructions.md",
"if_missing": true
}
]
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Used as a git submodule (at `.copilot/`) to provide:

> **Note:** `speckit.*` agents reference `.specify/templates/` which is provided by `speckit-core`.
> When used without `speckit-core`, those agents are automatically skipped at bootstrap time.
>
> When paired with `speckit-core`, this repo now exposes `.specify/ai-kit.manifest.json` so the generic
> linker in `speckit-core` can attach Copilot-owned files without hardcoding `.github/*` logic in every consumer.

## Usage

Expand All @@ -33,6 +36,14 @@ Set `copilot_enabled: true` in your `repos.json` entry — the bootstrap workflo
bash <(curl -fsSL https://raw.githubusercontent.com/jwill824/copilot-kit/main/install.sh)
```

If `.speckit/` is already present, the installer delegates to:

```bash
bash .speckit/.specify/scripts/bash/link-ai-integration.sh copilot .copilot
```

If `speckit-core` is not present, `copilot-kit` falls back to its standalone linking behavior.

## Spec-Kit Workflow

```
Expand Down
49 changes: 49 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,38 @@ success() { echo -e " ${GREEN}✓${RESET} $*"; }
warn() { echo -e " ${YELLOW}⚠${RESET} $*"; }
error() { echo -e " ${RED}✗${RESET} $*" >&2; exit 1; }

write_project_tooling() {
local path=".specify/project-tooling.json"
local tmp
tmp="$(mktemp)"

mkdir -p .specify

if [ -f "$path" ]; then
# Merge: preserve spec_workflow and other keys, update ai_tool + ai_kit_path
python3 - "$path" "$tmp" <<'PY'
import json, sys
data = json.load(open(sys.argv[1]))
data.setdefault("spec_workflow", True)
data["ai_tool"] = "copilot"
data["ai_kit_path"] = ".copilot"
json.dump(data, open(sys.argv[2], "w"), indent=2)
open(sys.argv[2], "a").write("\n")
PY
mv "$tmp" "$path"
success "Updated $path"
else
cat > "$path" <<'JSON'
{
"spec_workflow": true,
"ai_tool": "copilot",
"ai_kit_path": ".copilot"
}
JSON
success "Created $path"
fi
}

echo -e "\n${BOLD}🔧 copilot-kit installer${RESET}\n"

cd "$TARGET_DIR" || error "Cannot cd to $TARGET_DIR"
Expand All @@ -37,6 +69,18 @@ else
fi
success "Submodule ready at .copilot/\n"

if [ -x ".speckit/.specify/scripts/bash/link-ai-integration.sh" ] && [ -f ".copilot/.specify/ai-kit.manifest.json" ]; then
echo -e "${BOLD}Step 2: Generic integration linking${RESET}"
bash ".speckit/.specify/scripts/bash/link-ai-integration.sh" copilot .copilot
# linker writes project-tooling.json automatically
echo ""

echo -e "${BOLD}${GREEN}✅ copilot-kit installed!${RESET}\n"
echo -e " ${BOLD}Next:${RESET} customize ${CYAN}.github/copilot-instructions.md${RESET} for your project"
echo -e " ${BOLD}Update later:${RESET} ${CYAN}git submodule update --remote .copilot${RESET}\n"
exit 0
fi

# ── 2. Agent symlinks (individual files) ──────────────────────────────────────
echo -e "${BOLD}Step 2: Agent symlinks${RESET}"
if [ -L ".github/agents" ]; then
Expand Down Expand Up @@ -117,6 +161,11 @@ STUB
fi
echo ""

# ── Standalone: write project-tooling.json ────────────────────────────────────
echo -e "${BOLD}Step 5: Project tooling declaration${RESET}"
write_project_tooling
echo ""

echo -e "${BOLD}${GREEN}✅ copilot-kit installed!${RESET}\n"
echo -e " ${BOLD}Next:${RESET} customize ${CYAN}.github/copilot-instructions.md${RESET} for your project"
echo -e " ${BOLD}Update later:${RESET} ${CYAN}git submodule update --remote .copilot${RESET}\n"