repo-nexus 0.7.6 → 0.7.7
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.
- package/docs/plugins/copilot.md +47 -0
- package/lib/ai.sh +24 -5
- package/lib/commands/init.sh +6 -1
- package/lib/yaml.sh +5 -5
- package/package.json +1 -1
- package/toolkit/plugins/copilot/README.md +31 -0
- package/toolkit/plugins/copilot/instructions/rnex-copilot-integration.md +24 -0
- package/toolkit/plugins/copilot/plugin.yaml +7 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: GitHub Copilot Plugin
|
|
3
|
+
description: GitHub Copilot workspace routing instructions and user skill integration for Repo Nexus.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitHub Copilot Plugin (`copilot`)
|
|
7
|
+
|
|
8
|
+
The `copilot` plugin integrates GitHub Copilot with Repo Nexus by projecting workspace routing instructions into `.github/copilot-instructions.md` and user skills into `.github/skills/`.
|
|
9
|
+
|
|
10
|
+
## Architecture & Integration
|
|
11
|
+
|
|
12
|
+
GitHub Copilot operates natively within VS Code, Visual Studio, JetBrains, and GitHub.com:
|
|
13
|
+
- **Universal Routing (`AGENTS.md`)**: GitHub Copilot natively reads `AGENTS.md` at the workspace root.
|
|
14
|
+
- **Custom Instructions (`.github/copilot-instructions.md`)**: When `instructions: true`, Repo Nexus injects its non-destructive routing block inside `<!-- REPO-NEXUS:START -->` and `<!-- REPO-NEXUS:END -->`. Custom developer rules outside these markers are strictly preserved.
|
|
15
|
+
- **User Skills (`.github/skills/`)**: When `skills: true`, zero-logic User Skill pointers (`rnex-<name>.md`) redirect Copilot Chat to the underlying agentic skills under `.rnex/skills/` and active plugins.
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
Enable in `rnex.yaml`:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
plugins:
|
|
23
|
+
copilot:
|
|
24
|
+
instructions: true # Maintain routing in .github/copilot-instructions.md
|
|
25
|
+
skills: true # Generate user skills in .github/skills/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
To disable locally without altering team configuration, add to `.local.rnex.yaml`:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
plugins:
|
|
32
|
+
copilot:
|
|
33
|
+
enabled: false
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## CLI Management
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Enable Copilot plugin across workspace
|
|
40
|
+
rnex plugin enable copilot
|
|
41
|
+
|
|
42
|
+
# Inspect Copilot plugin status
|
|
43
|
+
rnex plugin info copilot
|
|
44
|
+
|
|
45
|
+
# Disable Copilot plugin
|
|
46
|
+
rnex plugin disable copilot
|
|
47
|
+
```
|
package/lib/ai.sh
CHANGED
|
@@ -359,6 +359,7 @@ export RNEX_ROOT="${RNEX_ROOT:-$(cd "$(dirname "$0")/../.." 2>/dev/null && pwd -
|
|
|
359
359
|
|
|
360
360
|
if [ -z "$RNEX_PROVIDER_SKILL_DIRS" ]; then
|
|
361
361
|
_dirs=""
|
|
362
|
+
[ -d "$RNEX_ROOT/.github/skills" ] && _dirs="${_dirs:+$_dirs }.github/skills"
|
|
362
363
|
[ -d "$RNEX_ROOT/.cursor" ] && _dirs="${_dirs:+$_dirs }.cursor/rules"
|
|
363
364
|
[ -d "$RNEX_ROOT/.claude" ] && _dirs="${_dirs:+$_dirs }.claude/skills"
|
|
364
365
|
[ -d "$RNEX_ROOT/.windsurf" ] && _dirs="${_dirs:+$_dirs }.windsurf/rules"
|
|
@@ -392,6 +393,9 @@ ENV_EOF
|
|
|
392
393
|
|
|
393
394
|
get_active_provider_skill_dirs() {
|
|
394
395
|
_dirs=""
|
|
396
|
+
if provider_option_enabled "copilot" "skills" 2>/dev/null; then
|
|
397
|
+
_dirs="${_dirs:+$_dirs }.github/skills"
|
|
398
|
+
fi
|
|
395
399
|
if provider_option_enabled "cursor" "skills" 2>/dev/null; then
|
|
396
400
|
_dirs="${_dirs:+$_dirs }.cursor/rules"
|
|
397
401
|
fi
|
|
@@ -671,13 +675,28 @@ sync_windsurf() {
|
|
|
671
675
|
rmdir "$NEXUS_DIR/.windsurf" 2>/dev/null || true
|
|
672
676
|
}
|
|
673
677
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
678
|
+
sync_copilot() {
|
|
679
|
+
if copilot_plugin_enabled; then
|
|
680
|
+
if copilot_instructions_enabled; then
|
|
681
|
+
mkdir -p "$NEXUS_DIR/.github"
|
|
682
|
+
merge_rnex_instructions "$NEXUS_DIR/.github/copilot-instructions.md"
|
|
683
|
+
else
|
|
684
|
+
clean_rnex_instructions "$NEXUS_DIR/.github/copilot-instructions.md"
|
|
685
|
+
fi
|
|
686
|
+
if ! copilot_skills_enabled; then
|
|
687
|
+
clean_provider_user_skills "$NEXUS_DIR/.github/skills"
|
|
688
|
+
fi
|
|
689
|
+
else
|
|
690
|
+
clean_rnex_instructions "$NEXUS_DIR/.github/copilot-instructions.md"
|
|
691
|
+
clean_provider_user_skills "$NEXUS_DIR/.github/skills"
|
|
692
|
+
fi
|
|
679
693
|
clean_provider_agents "$NEXUS_DIR/.github/agents" ".agent.md"
|
|
694
|
+
rm -rf "$NEXUS_DIR/.github/prompts" 2>/dev/null || true
|
|
695
|
+
rmdir "$NEXUS_DIR/.github" 2>/dev/null || true
|
|
696
|
+
}
|
|
680
697
|
|
|
698
|
+
sync_ai_providers() {
|
|
699
|
+
sync_copilot
|
|
681
700
|
sync_claude
|
|
682
701
|
sync_gemini
|
|
683
702
|
sync_cursor
|
package/lib/commands/init.sh
CHANGED
|
@@ -21,7 +21,8 @@ cmd_init() {
|
|
|
21
21
|
-y|--yes) _non_interactive=1 ;;
|
|
22
22
|
--hooks) _cli_hooks="true" ;;
|
|
23
23
|
--no-hooks) _cli_no_hooks=1; _cli_hooks="false" ;;
|
|
24
|
-
--copilot
|
|
24
|
+
--copilot) _cli_copilot="true" ;;
|
|
25
|
+
--no-copilot) _cli_copilot="false" ;;
|
|
25
26
|
--claude) _cli_claude="true" ;;
|
|
26
27
|
--no-claude) _cli_claude="false" ;;
|
|
27
28
|
--gemini) _cli_gemini="true" ;;
|
|
@@ -102,6 +103,9 @@ cmd_init() {
|
|
|
102
103
|
log_dim " rnex sync"
|
|
103
104
|
else
|
|
104
105
|
_init_plugins=""
|
|
106
|
+
if [ "$_cli_copilot" = "true" ]; then
|
|
107
|
+
_init_plugins="${_init_plugins} copilot:\n instructions: true\n skills: true\n"
|
|
108
|
+
fi
|
|
105
109
|
if [ "$_cli_claude" = "true" ]; then
|
|
106
110
|
_init_plugins="${_init_plugins} claude:\n instructions: true\n skills: true\n"
|
|
107
111
|
fi
|
|
@@ -149,6 +153,7 @@ YAML_EOF
|
|
|
149
153
|
[ -f "$_init_dir/GEMINI.md" ] && merge_rnex_instructions "$_init_dir/GEMINI.md"
|
|
150
154
|
[ -f "$_init_dir/.cursorrules" ] && merge_rnex_instructions "$_init_dir/.cursorrules"
|
|
151
155
|
[ -f "$_init_dir/.windsurfrules" ] && merge_rnex_instructions "$_init_dir/.windsurfrules"
|
|
156
|
+
[ -f "$_init_dir/.github/copilot-instructions.md" ] && merge_rnex_instructions "$_init_dir/.github/copilot-instructions.md"
|
|
152
157
|
|
|
153
158
|
# ---- 3. Create repos directory with .gitkeep -----------------------------
|
|
154
159
|
_repos_dir="$_init_dir/repos"
|
package/lib/yaml.sh
CHANGED
|
@@ -117,9 +117,9 @@ provider_option_enabled() {
|
|
|
117
117
|
esac
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
copilot_plugin_enabled() {
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
copilot_plugin_enabled() { provider_plugin_enabled "copilot"; }
|
|
121
|
+
copilot_instructions_enabled() { provider_option_enabled "copilot" "instructions"; }
|
|
122
|
+
copilot_skills_enabled() { provider_option_enabled "copilot" "skills"; }
|
|
123
123
|
copilot_agents_enabled() { return 1; }
|
|
124
124
|
|
|
125
125
|
claude_plugin_enabled() { provider_plugin_enabled "claude"; }
|
|
@@ -143,7 +143,7 @@ windsurf_skills_enabled() { provider_option_enabled "windsurf" "skills"; }
|
|
|
143
143
|
windsurf_agents_enabled() { return 1; }
|
|
144
144
|
|
|
145
145
|
has_ai_provider_plugin_enabled() {
|
|
146
|
-
for _ap in claude gemini cursor windsurf; do
|
|
146
|
+
for _ap in copilot claude gemini cursor windsurf; do
|
|
147
147
|
if provider_plugin_enabled "$_ap"; then
|
|
148
148
|
return 0
|
|
149
149
|
fi
|
|
@@ -261,7 +261,7 @@ yaml_enable_plugin() {
|
|
|
261
261
|
if ! _yaml_list_plugins_from_file "$_target_file" | grep -qx "$_name" 2>/dev/null; then
|
|
262
262
|
_tmp="$(mktemp)"
|
|
263
263
|
case "$_name" in
|
|
264
|
-
claude|gemini|cursor|windsurf)
|
|
264
|
+
copilot|claude|gemini|cursor|windsurf)
|
|
265
265
|
awk -v name="$_name" '
|
|
266
266
|
/^plugins:[ ]*$/ || /^plugins:[ ]*#/ {
|
|
267
267
|
print
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# GitHub Copilot Plugin for Repo Nexus
|
|
2
|
+
|
|
3
|
+
A built-in Repo Nexus plugin providing instructions and skill integration for GitHub Copilot.
|
|
4
|
+
|
|
5
|
+
## Capabilities
|
|
6
|
+
|
|
7
|
+
1. **Instructions Integration**: Generates and maintains `.github/copilot-instructions.md` with Repo Nexus routing instructions while preserving custom instructions outside delimiters.
|
|
8
|
+
2. **User Skills Generation**: Standardized Repo Nexus core skills and active plugins' skills are mirrored as zero-logic User Skill pointers (`rnex-<name>.md`) in `.github/skills/`.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Enable the plugin across the workspace:
|
|
13
|
+
```bash
|
|
14
|
+
rnex plugin enable copilot
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or configure options in `rnex.yaml` or `.local.rnex.yaml`:
|
|
18
|
+
```yaml
|
|
19
|
+
plugins:
|
|
20
|
+
copilot:
|
|
21
|
+
instructions: true
|
|
22
|
+
skills: true
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Options
|
|
26
|
+
|
|
27
|
+
| Option | Type | Default | Description |
|
|
28
|
+
|--------|------|---------|-------------|
|
|
29
|
+
| `instructions` | boolean | `true` | Maintain routing in `.github/copilot-instructions.md` |
|
|
30
|
+
| `skills` | boolean | `true` | Generate user skills in `.github/skills/` |
|
|
31
|
+
| `enabled` | boolean | `true` | Set to `false` in `.local.rnex.yaml` to override team config |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# GitHub Copilot Integration for Repo Nexus
|
|
2
|
+
|
|
3
|
+
This workspace has the Repo Nexus `copilot` plugin enabled.
|
|
4
|
+
|
|
5
|
+
## Operating Principles
|
|
6
|
+
- **Instructions Integration**: GitHub Copilot natively reads `.github/copilot-instructions.md` and root `AGENTS.md` for workspace routing and active plugin guidelines between `<!-- REPO-NEXUS:START -->` and `<!-- REPO-NEXUS:END -->`. Custom instructions outside these markers are strictly preserved.
|
|
7
|
+
- **User Skills**: Standardized Repo Nexus core skills and active plugin skills can be accessed via `.github/skills/rnex-*.md` when `skills: true`.
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
Configure plugin options in `rnex.yaml` or override them per developer in `.local.rnex.yaml`:
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
plugins:
|
|
14
|
+
copilot:
|
|
15
|
+
instructions: true # Maintain routing in .github/copilot-instructions.md (default: true)
|
|
16
|
+
skills: true # Generate user skills in .github/skills/ (default: true)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
To disable locally without altering team configuration, add to `.local.rnex.yaml`:
|
|
20
|
+
```yaml
|
|
21
|
+
plugins:
|
|
22
|
+
copilot:
|
|
23
|
+
enabled: false
|
|
24
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
name: copilot
|
|
2
|
+
version: 0.5.1
|
|
3
|
+
description: GitHub Copilot integration (maintains .github/copilot-instructions.md and user skills in .github/skills/)
|
|
4
|
+
author: unoxen
|
|
5
|
+
homepage: https://github.com/unoxen/repo-nexus
|
|
6
|
+
instructions:
|
|
7
|
+
- instructions/rnex-copilot-integration.md: .rnex/plugins/copilot/instructions/rnex-copilot-integration.md
|