omniconductor 0.5.0 → 1.0.1
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/CHANGELOG.md +68 -0
- package/README.md +59 -19
- package/VISION.md +2 -2
- package/adapters/README.md +8 -8
- package/adapters/claude/README.md +3 -6
- package/adapters/claude/SUPPORTED-FEATURES.md +4 -4
- package/adapters/claude/metadata.json +39 -0
- package/adapters/claude/transform-spec.md +1 -1
- package/adapters/claude/transform.sh +208 -38
- package/adapters/codex/README.md +23 -27
- package/adapters/codex/metadata.json +35 -0
- package/adapters/codex/transform-spec.md +5 -6
- package/adapters/codex/transform.sh +284 -37
- package/adapters/copilot/README.md +26 -29
- package/adapters/copilot/metadata.json +36 -0
- package/adapters/copilot/transform.sh +126 -35
- package/adapters/cursor/README.md +31 -30
- package/adapters/cursor/metadata.json +35 -0
- package/adapters/cursor/transform.sh +117 -28
- package/adapters/gemini/README.md +14 -15
- package/adapters/gemini/metadata.json +36 -0
- package/adapters/gemini/transform.sh +312 -36
- package/adapters/windsurf/README.md +20 -19
- package/adapters/windsurf/metadata.json +36 -0
- package/adapters/windsurf/transform.sh +139 -55
- package/bin/doctor.js +257 -0
- package/bin/omniconductor.js +15 -2
- package/core/anti-patterns/frequent-rule-file-edit.md +1 -1
- package/core/anti-patterns/single-monolithic-rule-file.md +1 -1
- package/core/hooks/README.md +1 -0
- package/core/hooks/pretool-loop-guard.sh.template +177 -0
- package/core/recipes/README.md +6 -4
- package/core/recipes/loop-engineering.md +73 -0
- package/core/universal-rules/README.md +4 -4
- package/core/universal-rules/meta-discipline.md +4 -4
- package/core/universal-rules/spec-as-you-go.md +1 -1
- package/docs/ADAPTER-LIVE-VERIFICATION.md +73 -0
- package/docs/COMPARISON.md +133 -0
- package/docs/COMPATIBILITY-MATRIX.md +126 -0
- package/docs/DESIGN-DECISIONS.md +1268 -0
- package/docs/MANUAL-INSTALL.md +15 -15
- package/docs/PUBLICATION-POLICY.md +46 -0
- package/docs/PUBLISH-GUIDE.md +141 -0
- package/package.json +7 -1
- package/tools/check-adapter-metadata.sh +211 -0
- package/tools/check-stale-tokens.sh +130 -0
- package/tools/generate-adapter-docs.js +123 -0
- package/tools/live-verify.sh +195 -0
- package/tools/manifest-safety.sh +118 -0
- package/tools/stale-tokens.txt +32 -0
- package/tools/test-install-modes.sh +277 -0
- package/tools/validate-adapter-output.sh +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Single source for enumerable adapter facts (ADR-040). CI asserts transform.sh / validator / matrix agree with this file. Update HERE first; docs follow.",
|
|
3
|
+
"tool": "copilot",
|
|
4
|
+
"display_name": "Copilot",
|
|
5
|
+
"tier": "T2",
|
|
6
|
+
"outputs": [
|
|
7
|
+
{ "path": ".github/copilot-instructions.md", "kind": "always_loaded", "validated": true },
|
|
8
|
+
{ "path": ".github/instructions", "kind": "rules", "validated": true },
|
|
9
|
+
{ "path": "docs/CURRENT_WORK.md", "kind": "docs", "validated": false }
|
|
10
|
+
],
|
|
11
|
+
"reflector_outputs": [
|
|
12
|
+
{ "path": ".github/hooks/conductor-reflect.json", "note": "session-end trajectory hook config (recipe-gated)" },
|
|
13
|
+
{ "path": ".conductor/reflect", "note": "runner + brief + scheduling (recipe-gated)" }
|
|
14
|
+
],
|
|
15
|
+
"install": { "ala_carte": "per-file" },
|
|
16
|
+
"legacy_paths": [],
|
|
17
|
+
"capabilities": {
|
|
18
|
+
"tool_native": {
|
|
19
|
+
"hooks": "yes",
|
|
20
|
+
"sub_agents": "yes",
|
|
21
|
+
"model_routing": "yes",
|
|
22
|
+
"commands": "yes",
|
|
23
|
+
"glob_scoping": "yes",
|
|
24
|
+
"scheduler": "cloud-only"
|
|
25
|
+
},
|
|
26
|
+
"conductor_emitted": {
|
|
27
|
+
"rules": "full",
|
|
28
|
+
"guard_hooks": "none",
|
|
29
|
+
"reflector_loop": "recipe",
|
|
30
|
+
"role_agents": "none",
|
|
31
|
+
"model_routing": "none"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"live_verification": { "status": "pending", "date": null, "cli": null, "note": "per-IDE — see docs/IDE-SMOKE-TESTING.md" },
|
|
35
|
+
"headless_cli": { "command": "copilot", "invocation": "copilot -p" }
|
|
36
|
+
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
# core/recipes/<r>.md (selected) → <target>/.github/instructions/<r>.instructions.md (applyTo: from paths)
|
|
31
31
|
# core/docs-templates/*.md → <target>/docs/*.md
|
|
32
32
|
# core/hooks/* → SKIP (Reflector hook emitted via --recipes=self-improvement, ADR-032; other guards Claude-only, ADR-034)
|
|
33
|
-
# core/roles/* → SKIP (Copilot
|
|
33
|
+
# core/roles/* → SKIP (role emission is Claude-only today; Copilot supports sub-agents natively — ADR-031)
|
|
34
34
|
#
|
|
35
35
|
# Layer 2 transformation (--per-rule alternative):
|
|
36
36
|
# core/universal-rules/<r>.md → <target>/.github/instructions/<r>.instructions.md (applyTo: '**')
|
|
@@ -56,6 +56,7 @@ set -eu
|
|
|
56
56
|
|
|
57
57
|
TARGET=""
|
|
58
58
|
RECIPES=""
|
|
59
|
+
MODE="full"
|
|
59
60
|
DRY_RUN="false"
|
|
60
61
|
NO_PROMPT="false"
|
|
61
62
|
PER_RULE="false"
|
|
@@ -67,6 +68,7 @@ WIZARD_APPLY_RULES="true"
|
|
|
67
68
|
while [ $# -gt 0 ]; do
|
|
68
69
|
case "$1" in
|
|
69
70
|
--recipes=*) RECIPES="${1#--recipes=}" ;;
|
|
71
|
+
--mode=*) MODE="${1#--mode=}" ;;
|
|
70
72
|
--dry-run) DRY_RUN="true" ;;
|
|
71
73
|
--no-prompt) NO_PROMPT="true" ;;
|
|
72
74
|
--per-rule) PER_RULE="true" ;;
|
|
@@ -78,6 +80,11 @@ Usage: bash adapters/copilot/transform.sh <target-project> [options]
|
|
|
78
80
|
|
|
79
81
|
Options:
|
|
80
82
|
--recipes=A,B,C Comma-separated list of recipes to install
|
|
83
|
+
--mode=<m> Install preset (ADR-044): full (default) | minimal (rules text +
|
|
84
|
+
docs only; no Reflector runtime) | strict (abort if
|
|
85
|
+
.github/copilot-instructions.md exists) | recipes-only (ONLY the
|
|
86
|
+
selected recipe .instructions.md files; requires --recipes=) |
|
|
87
|
+
reflector-only (self-improvement loop standalone)
|
|
81
88
|
--dry-run Preview only — no files written
|
|
82
89
|
--no-prompt Skip interactive prompts; apply defaults (CI-safe)
|
|
83
90
|
--per-rule Split 5 universal rules into per-file .instructions.md
|
|
@@ -87,16 +94,16 @@ Options:
|
|
|
87
94
|
Conductor-emitted files when none.
|
|
88
95
|
--force Bypass uninstall safety checks (active worktrees, missing manifest)
|
|
89
96
|
|
|
90
|
-
Recipes available: web-mobile-parity, i18n, monorepo, branch-strategy, auto-mock-data, coding-conventions, tdd, debugging, database-discipline, design-system, self-improvement, git-hygiene
|
|
97
|
+
Recipes available: web-mobile-parity, i18n, monorepo, branch-strategy, auto-mock-data, coding-conventions, tdd, debugging, database-discipline, design-system, self-improvement, git-hygiene, loop-engineering
|
|
91
98
|
|
|
92
99
|
Output (default):
|
|
93
100
|
<target>/.github/copilot-instructions.md (5 universal rules merged)
|
|
94
101
|
<target>/.github/instructions/<recipe>.instructions.md (per recipe, applyTo: from paths)
|
|
95
102
|
<target>/docs/{CURRENT_WORK,REMAINING_TASKS,PLANS,TASKS,INDEX}.md
|
|
96
103
|
|
|
97
|
-
Skipped (not
|
|
98
|
-
Sub-agent dispatch (roles) —
|
|
99
|
-
PreToolUse / Stop hooks —
|
|
104
|
+
Skipped (not yet emitted for Copilot — the tool supports these natively, ADR-031):
|
|
105
|
+
Sub-agent dispatch (roles) — full agent emission is Phase 2
|
|
106
|
+
PreToolUse / Stop hooks — full hook emission is Phase 2 (Reflector hook ships via --recipes=self-improvement)
|
|
100
107
|
|
|
101
108
|
IDE coverage: VS Code, Cursor (Copilot ext), Windsurf (Copilot adapter), JetBrains
|
|
102
109
|
(Copilot plugin), Neovim (copilot.vim) all read .github/instructions/.
|
|
@@ -121,10 +128,30 @@ if [ -z "$TARGET" ]; then
|
|
|
121
128
|
exit 1
|
|
122
129
|
fi
|
|
123
130
|
|
|
131
|
+
case "$MODE" in
|
|
132
|
+
full|minimal|strict|recipes-only|reflector-only) : ;;
|
|
133
|
+
*) echo "Error: unknown --mode '$MODE' (one of: full, minimal, strict, recipes-only, reflector-only)" >&2; exit 1 ;;
|
|
134
|
+
esac
|
|
135
|
+
if [ "$MODE" = "reflector-only" ]; then
|
|
136
|
+
if [ -n "$RECIPES" ] && [ "$RECIPES" != "self-improvement" ]; then
|
|
137
|
+
echo "NOTE: --mode=reflector-only ignores --recipes (installs self-improvement only)" >&2
|
|
138
|
+
fi
|
|
139
|
+
RECIPES="self-improvement"
|
|
140
|
+
fi
|
|
141
|
+
if [ "$MODE" = "recipes-only" ] && [ -z "$RECIPES" ] && [ "$UNINSTALL" != "true" ]; then
|
|
142
|
+
echo "Error: --mode=recipes-only requires --recipes=A,B,..." >&2
|
|
143
|
+
exit 1
|
|
144
|
+
fi
|
|
145
|
+
|
|
124
146
|
CONDUCTOR_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
125
147
|
CORE_ROOT="$CONDUCTOR_ROOT/core"
|
|
126
148
|
[ -d "$CORE_ROOT" ] || { echo "Error: core/ not found at $CORE_ROOT" >&2; exit 1; }
|
|
127
149
|
|
|
150
|
+
# CONDUCTOR package version for the manifest — parsed at runtime from package.json
|
|
151
|
+
# so releases never drift the manifest (falls back to "unknown" on any error).
|
|
152
|
+
CONDUCTOR_VERSION="$(/usr/bin/sed -n -E 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' "$CONDUCTOR_ROOT/package.json" 2>/dev/null | /usr/bin/head -n 1)"
|
|
153
|
+
[ -n "$CONDUCTOR_VERSION" ] || CONDUCTOR_VERSION="unknown"
|
|
154
|
+
|
|
128
155
|
if [ "$DRY_RUN" = "true" ]; then
|
|
129
156
|
mkdir -p "$TARGET"
|
|
130
157
|
fi
|
|
@@ -246,20 +273,7 @@ EOF
|
|
|
246
273
|
|
|
247
274
|
# backup_if_exists <dest>
|
|
248
275
|
backup_if_exists() {
|
|
249
|
-
|
|
250
|
-
MANIFEST_LAST_BACKUP=""
|
|
251
|
-
if [ -f "$dest" ]; then
|
|
252
|
-
if [ "$DRY_RUN" = "true" ]; then
|
|
253
|
-
log "would back up existing $dest -> $dest.conductor-backup-<ts>"
|
|
254
|
-
else
|
|
255
|
-
local ts
|
|
256
|
-
ts="$(/bin/date +%Y%m%d-%H%M%S)"
|
|
257
|
-
local backup="${dest}.conductor-backup-${ts}"
|
|
258
|
-
/bin/cp "$dest" "$backup"
|
|
259
|
-
log " backed up existing $dest -> $backup"
|
|
260
|
-
MANIFEST_LAST_BACKUP="${backup#$TARGET_ABS/}"
|
|
261
|
-
fi
|
|
262
|
-
fi
|
|
276
|
+
conductor_manifest_backup_and_remember "$1"
|
|
263
277
|
}
|
|
264
278
|
|
|
265
279
|
# ----- manifest tracking (mirrors claude adapter ADR-020) ----------------
|
|
@@ -269,6 +283,9 @@ MANIFEST_STAGE_PATH=""
|
|
|
269
283
|
MANIFEST_TS=""
|
|
270
284
|
MANIFEST_LAST_BACKUP=""
|
|
271
285
|
|
|
286
|
+
# shellcheck source=../../tools/manifest-safety.sh
|
|
287
|
+
. "$CONDUCTOR_ROOT/tools/manifest-safety.sh"
|
|
288
|
+
|
|
272
289
|
init_manifest() {
|
|
273
290
|
if [ "$DRY_RUN" = "true" ]; then
|
|
274
291
|
log "would init manifest staging at $MANIFEST_PATH.staging"
|
|
@@ -287,12 +304,13 @@ record_emit() {
|
|
|
287
304
|
local relpath="$1" src="$2" backup="${3:-}"
|
|
288
305
|
local had_backup="false"
|
|
289
306
|
[ -n "$backup" ] && had_backup="true"
|
|
290
|
-
local esc_path esc_src esc_backup
|
|
307
|
+
local esc_path esc_src esc_backup emitted_sha
|
|
291
308
|
esc_path="$(printf '%s' "$relpath" | /usr/bin/sed 's/\\/\\\\/g; s/"/\\"/g')"
|
|
292
309
|
esc_src="$(printf '%s' "$src" | /usr/bin/sed 's/\\/\\\\/g; s/"/\\"/g')"
|
|
293
310
|
esc_backup="$(printf '%s' "$backup" | /usr/bin/sed 's/\\/\\\\/g; s/"/\\"/g')"
|
|
294
|
-
|
|
295
|
-
"
|
|
311
|
+
emitted_sha="$(conductor_sha256_file "$TARGET_ABS/$relpath")"
|
|
312
|
+
printf ' {"path": "%s", "source": "%s", "had_backup": %s, "backup_path": "%s", "sha256": "%s"},\n' \
|
|
313
|
+
"$esc_path" "$esc_src" "$had_backup" "$esc_backup" "$emitted_sha" >> "$MANIFEST_STAGE_PATH"
|
|
296
314
|
}
|
|
297
315
|
|
|
298
316
|
finalize_manifest() {
|
|
@@ -336,8 +354,9 @@ finalize_manifest() {
|
|
|
336
354
|
|
|
337
355
|
/bin/cat > "$MANIFEST_PATH" <<EOF
|
|
338
356
|
{
|
|
339
|
-
"version": "
|
|
357
|
+
"version": "v$CONDUCTOR_VERSION",
|
|
340
358
|
"adapter": "copilot",
|
|
359
|
+
"mode": "$MODE",
|
|
341
360
|
"install_timestamp": "$MANIFEST_TS",
|
|
342
361
|
"conductor_root": "$CONDUCTOR_ROOT",
|
|
343
362
|
"per_rule_mode": $PER_RULE,
|
|
@@ -351,6 +370,19 @@ EOF
|
|
|
351
370
|
log " wrote manifest $MANIFEST_PATH"
|
|
352
371
|
}
|
|
353
372
|
|
|
373
|
+
# ----- framework detection (ADR-044 — suggest, NEVER auto-switch) ----------
|
|
374
|
+
|
|
375
|
+
detect_coexisting_frameworks() {
|
|
376
|
+
local found=""
|
|
377
|
+
[ -d "$TARGET_ABS/.specify" ] && found="$found Spec-Kit"
|
|
378
|
+
{ [ -d "$TARGET_ABS/_bmad" ] || [ -d "$TARGET_ABS/.bmad-core" ]; } && found="$found BMAD"
|
|
379
|
+
if [ -n "$found" ] && [ "$MODE" = "full" ]; then
|
|
380
|
+
log "NOTE: detected coexisting framework(s):$found"
|
|
381
|
+
log " Consider --mode=recipes-only or --mode=reflector-only to coexist without"
|
|
382
|
+
log " overlapping workflow rules (suggestion only — nothing was changed)."
|
|
383
|
+
fi
|
|
384
|
+
}
|
|
385
|
+
|
|
354
386
|
# ----- uninstall flow ----------------------------------------------------
|
|
355
387
|
|
|
356
388
|
do_uninstall() {
|
|
@@ -383,6 +415,7 @@ do_uninstall() {
|
|
|
383
415
|
local restored=0
|
|
384
416
|
local deleted=0
|
|
385
417
|
local missing=0
|
|
418
|
+
local preserved=0
|
|
386
419
|
|
|
387
420
|
while IFS= read -r line; do
|
|
388
421
|
case "$line" in
|
|
@@ -390,15 +423,26 @@ do_uninstall() {
|
|
|
390
423
|
*) continue ;;
|
|
391
424
|
esac
|
|
392
425
|
entries_count=$((entries_count + 1))
|
|
393
|
-
local rel_path had_backup backup_path
|
|
426
|
+
local rel_path had_backup backup_path expected_sha
|
|
394
427
|
rel_path="$(printf '%s' "$line" | /usr/bin/sed -E 's/.*"path": *"([^"]*)".*/\1/')"
|
|
395
428
|
had_backup="$(printf '%s' "$line" | /usr/bin/sed -E 's/.*"had_backup": *(true|false).*/\1/')"
|
|
396
429
|
backup_path="$(printf '%s' "$line" | /usr/bin/sed -E 's/.*"backup_path": *"([^"]*)".*/\1/')"
|
|
430
|
+
expected_sha="$(conductor_manifest_field "$line" sha256 2>/dev/null || true)"
|
|
397
431
|
|
|
398
432
|
local abs_dest="$TARGET_ABS/$rel_path"
|
|
399
433
|
local abs_backup=""
|
|
400
434
|
[ -n "$backup_path" ] && abs_backup="$TARGET_ABS/$backup_path"
|
|
401
435
|
|
|
436
|
+
if [ -f "$abs_dest" ] && ! conductor_manifest_file_matches "$abs_dest" "$expected_sha"; then
|
|
437
|
+
if [ -z "$expected_sha" ]; then
|
|
438
|
+
log " WARNING: preserving $rel_path (legacy manifest has no checksum)"
|
|
439
|
+
else
|
|
440
|
+
log " WARNING: preserving user-modified $rel_path"
|
|
441
|
+
fi
|
|
442
|
+
preserved=$((preserved + 1))
|
|
443
|
+
continue
|
|
444
|
+
fi
|
|
445
|
+
|
|
402
446
|
if [ "$had_backup" = "true" ] && [ -n "$abs_backup" ]; then
|
|
403
447
|
if [ -f "$abs_backup" ]; then
|
|
404
448
|
if [ "$DRY_RUN" = "true" ]; then
|
|
@@ -470,6 +514,7 @@ do_uninstall() {
|
|
|
470
514
|
echo " Backups restored: $restored"
|
|
471
515
|
echo " Files deleted: $deleted"
|
|
472
516
|
echo " Backup-missing deletes: $missing"
|
|
517
|
+
[ "$preserved" -gt 0 ] && echo " User-modified files preserved: $preserved"
|
|
473
518
|
echo "========================================================"
|
|
474
519
|
}
|
|
475
520
|
|
|
@@ -503,6 +548,26 @@ if [ -f "$TARGET_ABS/.github/copilot-instructions.md" ] || [ -d "$TARGET_ABS/.gi
|
|
|
503
548
|
IS_ADOPTER_CASE="true"
|
|
504
549
|
fi
|
|
505
550
|
|
|
551
|
+
detect_coexisting_frameworks
|
|
552
|
+
|
|
553
|
+
# --mode=strict: never overwrite an existing baseline, even with a backup (ADR-044).
|
|
554
|
+
if [ "$MODE" = "strict" ]; then
|
|
555
|
+
if [ -f "$TARGET_ABS/.github/copilot-instructions.md" ]; then
|
|
556
|
+
echo "Error (--mode=strict): $TARGET_ABS/.github/copilot-instructions.md already exists — strict mode aborts instead of overwriting a baseline." >&2
|
|
557
|
+
echo " Use --mode=full (timestamped backup + manifest-based restore), or move the file first." >&2
|
|
558
|
+
exit 3
|
|
559
|
+
fi
|
|
560
|
+
if [ -d "$TARGET_ABS/.github/instructions" ] && [ -n "$(/bin/ls -A "$TARGET_ABS/.github/instructions" 2>/dev/null)" ]; then
|
|
561
|
+
echo "Error (--mode=strict): $TARGET_ABS/.github/instructions/ already has files — strict mode never writes next to an existing rules surface." >&2
|
|
562
|
+
exit 3
|
|
563
|
+
fi
|
|
564
|
+
fi
|
|
565
|
+
|
|
566
|
+
# À-la-carte modes are non-interactive by design.
|
|
567
|
+
if [ "$MODE" != "full" ] && [ "$MODE" != "strict" ]; then
|
|
568
|
+
NO_PROMPT="true"
|
|
569
|
+
fi
|
|
570
|
+
|
|
506
571
|
if [ "$IS_ADOPTER_CASE" = "true" ] && [ "$NO_PROMPT" = "false" ] && [ "$DRY_RUN" = "false" ]; then
|
|
507
572
|
echo ""
|
|
508
573
|
echo "========================================================"
|
|
@@ -523,7 +588,7 @@ if [ "$IS_ADOPTER_CASE" = "true" ] && [ "$NO_PROMPT" = "false" ] && [ "$DRY_RUN"
|
|
|
523
588
|
|
|
524
589
|
echo ""
|
|
525
590
|
echo "Available recipes:"
|
|
526
|
-
echo " web-mobile-parity, i18n, monorepo, branch-strategy, auto-mock-data, coding-conventions, tdd, debugging, database-discipline, design-system, self-improvement, git-hygiene"
|
|
591
|
+
echo " web-mobile-parity, i18n, monorepo, branch-strategy, auto-mock-data, coding-conventions, tdd, debugging, database-discipline, design-system, self-improvement, git-hygiene, loop-engineering"
|
|
527
592
|
printf "Select recipes (comma-separated, blank for none): "
|
|
528
593
|
read -r _recipe_answer
|
|
529
594
|
if [ -n "$_recipe_answer" ]; then
|
|
@@ -547,7 +612,9 @@ fi
|
|
|
547
612
|
|
|
548
613
|
init_manifest
|
|
549
614
|
|
|
550
|
-
if [ "$
|
|
615
|
+
if [ "$MODE" = "recipes-only" ] || [ "$MODE" = "reflector-only" ]; then
|
|
616
|
+
log "Step 1/4: universal-rules — skipped (--mode=$MODE is à la carte)"
|
|
617
|
+
elif [ "$WIZARD_APPLY_RULES" = "true" ]; then
|
|
551
618
|
if [ "$PER_RULE" = "true" ]; then
|
|
552
619
|
log "Step 1/4: universal-rules → .github/instructions/*.instructions.md (per-rule mode)"
|
|
553
620
|
mkdir_if_real "$TARGET_ABS/.github/instructions"
|
|
@@ -580,10 +647,12 @@ if [ "$WIZARD_APPLY_RULES" = "true" ]; then
|
|
|
580
647
|
|
|
581
648
|
## Topology note (Copilot)
|
|
582
649
|
|
|
583
|
-
GitHub Copilot
|
|
584
|
-
|
|
650
|
+
GitHub Copilot supports sub-agent dispatch and hooks natively (ADR-031), but
|
|
651
|
+
CONDUCTOR's Copilot adapter currently emits rule text (plus the Reflector loop)
|
|
652
|
+
only — full hook/agent emission is Phase 2. The 5
|
|
653
|
+
universal rules below are therefore self-policed: the human (and Copilot Chat) must follow
|
|
585
654
|
the same Plan → Architecture → Tasks → Implementation → Review → Spec workflow
|
|
586
|
-
that Claude Code enforces with hooks. Two-stage code review degrades to the
|
|
655
|
+
that Claude Code enforces with CONDUCTOR-emitted hooks. Two-stage code review degrades to the
|
|
587
656
|
Copilot PR review feature for Stage B (configure separately at the repo level).
|
|
588
657
|
|
|
589
658
|
---
|
|
@@ -613,6 +682,7 @@ fi
|
|
|
613
682
|
# ----- step 2: recipes → .github/instructions/<r>.instructions.md --------
|
|
614
683
|
|
|
615
684
|
log "Step 2/4: recipes (opt-in) → .github/instructions/"
|
|
685
|
+
INSTALLED_RECIPES=""
|
|
616
686
|
if [ -n "$RECIPES" ]; then
|
|
617
687
|
mkdir_if_real "$TARGET_ABS/.github/instructions"
|
|
618
688
|
IFS=',' read -ra RECIPE_LIST <<< "$RECIPES"
|
|
@@ -631,13 +701,26 @@ if [ -n "$RECIPES" ]; then
|
|
|
631
701
|
write_copilot_per_file "$src" "$dest" "$applyto"
|
|
632
702
|
log " recipe $r → applyTo: '$applyto'"
|
|
633
703
|
record_emit ".github/instructions/$r.instructions.md" "core/recipes/$r.md" "$MANIFEST_LAST_BACKUP"
|
|
704
|
+
INSTALLED_RECIPES="$INSTALLED_RECIPES $r"
|
|
634
705
|
done
|
|
635
706
|
else
|
|
636
707
|
log " (no recipes selected — pass --recipes=name1,name2 to install)"
|
|
637
708
|
fi
|
|
638
709
|
|
|
639
710
|
# ---- Step 2.6: self-improvement runtime (only with --recipes=self-improvement) ----
|
|
640
|
-
|
|
711
|
+
if [ "$MODE" = "recipes-only" ] && [ -z "${INSTALLED_RECIPES// /}" ] && [ "$DRY_RUN" != "true" ]; then
|
|
712
|
+
echo "Error: --mode=recipes-only resolved ZERO valid recipes from '--recipes=$RECIPES' — nothing to install (check the names)." >&2
|
|
713
|
+
/bin/rm -f "$MANIFEST_STAGE_PATH"
|
|
714
|
+
exit 1
|
|
715
|
+
fi
|
|
716
|
+
|
|
717
|
+
if [ "$MODE" = "minimal" ]; then
|
|
718
|
+
RECIPES_FOR_RUNTIME=""
|
|
719
|
+
log "Step 2.6/4: self-improvement runtime — skipped (--mode=minimal ships text only)"
|
|
720
|
+
else
|
|
721
|
+
RECIPES_FOR_RUNTIME="$RECIPES"
|
|
722
|
+
fi
|
|
723
|
+
case ",$RECIPES_FOR_RUNTIME," in
|
|
641
724
|
*",self-improvement,"*)
|
|
642
725
|
log "Step 2.6/4: self-improvement (Reflector) → hooks/prompt/agent"
|
|
643
726
|
if [ "$DRY_RUN" != "true" ]; then
|
|
@@ -684,6 +767,9 @@ esac
|
|
|
684
767
|
|
|
685
768
|
# ----- step 3: docs templates --------------------------------------------
|
|
686
769
|
|
|
770
|
+
if [ "$MODE" = "recipes-only" ] || [ "$MODE" = "reflector-only" ]; then
|
|
771
|
+
log "Step 3/4: docs templates — skipped (--mode=$MODE is à la carte; docs ship with full/minimal)"
|
|
772
|
+
else
|
|
687
773
|
log "Step 3/4: docs templates → docs/"
|
|
688
774
|
mkdir_if_real "$TARGET_ABS/docs"
|
|
689
775
|
mkdir_if_real "$TARGET_ABS/docs/specs"
|
|
@@ -719,11 +805,13 @@ fi
|
|
|
719
805
|
|
|
720
806
|
# ----- step 4: skip notice -----------------------------------------------
|
|
721
807
|
|
|
722
|
-
log "Step 4/4: skipped layers (Copilot
|
|
723
|
-
log " - core/roles/ → SKIP (
|
|
808
|
+
log "Step 4/4: skipped layers (not yet emitted for Copilot — tool supports them natively, ADR-031)"
|
|
809
|
+
log " - core/roles/ → SKIP (agent emission is Phase 2; Copilot supports sub-agents natively — ADR-031)"
|
|
724
810
|
log " - core/hooks/ → SKIP except Reflector hook (--recipes=self-improvement, ADR-032; other guards Claude-only, ADR-034)"
|
|
725
811
|
log " - hookify-templates/ → SKIP (Claude Code plugin only)"
|
|
726
812
|
|
|
813
|
+
fi
|
|
814
|
+
|
|
727
815
|
finalize_manifest
|
|
728
816
|
|
|
729
817
|
# ----- summary -----------------------------------------------------------
|
|
@@ -732,13 +820,16 @@ echo ""
|
|
|
732
820
|
echo "========================================================"
|
|
733
821
|
echo " Done."
|
|
734
822
|
echo " Target: $TARGET_ABS"
|
|
735
|
-
if [ "$
|
|
823
|
+
if [ "$MODE" = "recipes-only" ] || [ "$MODE" = "reflector-only" ]; then
|
|
824
|
+
echo " Universal rules: 0 (à la carte)"
|
|
825
|
+
elif [ "$PER_RULE" = "true" ]; then
|
|
736
826
|
echo " Universal rules: 5 → .github/instructions/*.instructions.md (per-rule mode)"
|
|
737
827
|
else
|
|
738
828
|
echo " Universal rules: 5 → .github/copilot-instructions.md (single-file mode)"
|
|
739
829
|
fi
|
|
740
830
|
echo " Recipes installed: ${RECIPES:-(none)}"
|
|
741
|
-
echo "
|
|
831
|
+
echo " Mode: $MODE"
|
|
832
|
+
echo " Not emitted (Phase 2 — Copilot supports these natively, ADR-031/034): roles, guard hooks, hookify"
|
|
742
833
|
echo ""
|
|
743
834
|
echo " Activation:"
|
|
744
835
|
echo " GitHub Copilot reads .github/copilot-instructions.md and .github/instructions/"
|
|
@@ -752,6 +843,6 @@ echo "========================================================"
|
|
|
752
843
|
echo ""
|
|
753
844
|
echo "Next steps for the project:"
|
|
754
845
|
echo " 1. Open the project in any IDE with Copilot enabled."
|
|
755
|
-
echo " 2. Edit docs/CURRENT_WORK.md with the project's current state."
|
|
846
|
+
[ -d "$TARGET_ABS/docs" ] && echo " 2. Edit docs/CURRENT_WORK.md with the project's current state."
|
|
756
847
|
echo " 3. Configure Copilot PR review at the repo level (Stage B analog)."
|
|
757
848
|
echo " 4. Verify: cat $TARGET_ABS/.github/copilot-instructions.md | head -30"
|
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
# Adapter — Cursor (T1
|
|
1
|
+
# Adapter — Cursor (T1)
|
|
2
2
|
|
|
3
3
|
Cursor is a strong CONDUCTOR target because:
|
|
4
4
|
|
|
5
5
|
- It supports per-pattern rule scoping via `.cursor/rules/*.mdc` `globs:` front-matter — close to Claude's lazy rule loading.
|
|
6
|
-
-
|
|
7
|
-
- Its `.cursor/commands
|
|
6
|
+
- Universal rules install as `alwaysApply: true` `.mdc` files (the modern always-loaded mechanism; the legacy `.cursorrules` single file is opt-in via `--legacy-cursorrules`).
|
|
7
|
+
- Its Skills surface (`.cursor/skills/` — the 2.4+ successor to project commands) gives a native `/reflect` entry point: CONDUCTOR emits `.cursor/skills/reflect/SKILL.md` with `--recipes=self-improvement`.
|
|
8
8
|
- Its rule UI surfaces which rules loaded for the current file, useful for debugging.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Tool capability vs CONDUCTOR emission (ADR-031):** as of 2026 Cursor ships hooks, sub-agent dispatch, custom named agents, per-task model routing, and commands natively. What is limited today is what CONDUCTOR **emits** for it — rule text + docs + the opt-in Reflector loop; the enforcement guard hooks, role agents, and model-routing config are Phase-2 emission (ADR-034). That is a CONDUCTOR gap, not a Cursor limitation.
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
- ❌ No built-in memory directory — DIY at `.memory/`.
|
|
12
|
+
**Tier**: T1 (see `docs/COMPATIBILITY-MATRIX.md` — glob rule-scoping + hooks incl. session/stop events + sub-agents + per-task model all present; richest non-Claude target for Phase-2 emission).
|
|
13
|
+
|
|
14
|
+
> Enumerable facts about this adapter (output paths / tier / capabilities / live verification / headless CLI) are machine-readable in [`metadata.json`](./metadata.json) and CI-checked against `transform.sh` + the validator (ADR-040).
|
|
16
15
|
|
|
17
|
-
**Tier**: T1 — Full support for what Cursor itself supports; partial vs Claude's reference implementation due to missing sub-agents/hooks.
|
|
18
16
|
|
|
19
17
|
## Installation path
|
|
20
18
|
|
|
21
19
|
```bash
|
|
22
|
-
#
|
|
23
|
-
|
|
20
|
+
# Recommended (npm, no clone):
|
|
21
|
+
npx omniconductor init --target=cursor <target-dir>
|
|
24
22
|
|
|
25
|
-
#
|
|
26
|
-
|
|
23
|
+
# Or from a local clone:
|
|
24
|
+
bash /path/to/conductor/adapters/cursor/transform.sh /path/to/target [--dry-run] [--legacy-cursorrules]
|
|
27
25
|
```
|
|
28
26
|
|
|
29
27
|
## What gets installed
|
|
30
28
|
|
|
31
29
|
```
|
|
32
30
|
<target>/
|
|
33
|
-
├── .cursorrules # Always-loaded baseline
|
|
34
31
|
├── .cursor/
|
|
35
32
|
│ └── rules/
|
|
36
|
-
│ ├──
|
|
37
|
-
│ ├──
|
|
38
|
-
│ ├──
|
|
39
|
-
│ ├──
|
|
40
|
-
│
|
|
33
|
+
│ ├── workflow.mdc # alwaysApply: true
|
|
34
|
+
│ ├── spec-as-you-go.mdc # alwaysApply: true
|
|
35
|
+
│ ├── quality-gates.mdc # alwaysApply: true
|
|
36
|
+
│ ├── operations.mdc # alwaysApply: true
|
|
37
|
+
│ ├── meta-discipline.mdc # alwaysApply: true
|
|
38
|
+
│ └── <recipe>.mdc # per --recipes=, path-scoped via globs:
|
|
41
39
|
└── docs/
|
|
42
40
|
├── CURRENT_WORK.md # (universal templates, identical to other adapters)
|
|
43
41
|
├── REMAINING_TASKS.md
|
|
@@ -47,29 +45,32 @@ bash /path/to/conductor/adapters/cursor/transform.sh /path/to/target [--dry-run]
|
|
|
47
45
|
└── specs/_example.md
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
- `--legacy-cursorrules` additionally bundles everything into a flat `.cursorrules` (Cursor < 0.45).
|
|
49
|
+
- `--recipes=self-improvement` additionally emits the Reflector loop: session-end trajectory hook config (`.cursor/hooks.json`), the `/reflect` Skill (`.cursor/skills/reflect/SKILL.md`), a reflector agent (`.cursor/agents/`), prune script, and the `.conductor/reflect/` weekly runner (ADR-032/033).
|
|
50
|
+
|
|
51
|
+
## Native features supported (emitted today)
|
|
51
52
|
|
|
52
|
-
- ✅ Always-loaded
|
|
53
|
-
- ✅ Per-pattern rule scoping (`globs:` on `.mdc`).
|
|
53
|
+
- ✅ Always-loaded universal rules (`.mdc`, `alwaysApply: true`).
|
|
54
|
+
- ✅ Per-pattern rule scoping (`globs:` on recipe `.mdc`).
|
|
54
55
|
- ✅ All universal rule TEXT.
|
|
55
56
|
- ✅ All doc templates.
|
|
56
|
-
-
|
|
57
|
+
- ✅ Reflector loop (opt-in recipe) — hook config + `/reflect` Skill + agent.
|
|
57
58
|
|
|
58
|
-
##
|
|
59
|
+
## Not emitted yet (Phase 2 — Cursor supports these natively, ADR-031/034)
|
|
59
60
|
|
|
60
|
-
| Feature |
|
|
61
|
+
| Feature | Interim workaround |
|
|
61
62
|
|---|---|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
| Per-call model
|
|
65
|
-
|
|
|
63
|
+
| Enforcement guard hooks (Stop / PreToolUse set) | Self-police, or pair with a project-level pre-commit git hook. Only the Reflector session-end hook is emitted today. |
|
|
64
|
+
| The 6 role agents (sub-agent dispatch) | Cursor has native sub-agents; CONDUCTOR doesn't emit its role definitions for Cursor yet. Use the orchestrator-manual rule text as the prompt template. |
|
|
65
|
+
| Per-call model-routing config | Pick the model in Cursor's UI per task (Cursor supports per-task model selection). |
|
|
66
|
+
| 4-type memory pattern | Self-managed at `<target>/.memory/` (gitignored); Cursor's native Memories feature is separate. |
|
|
66
67
|
| Specialized review agents (Stage A / Stage B) | Run review prompts manually in Cursor chat. |
|
|
67
68
|
|
|
68
69
|
## After install — first steps
|
|
69
70
|
|
|
70
71
|
1. Open the target project in Cursor.
|
|
71
72
|
2. Open the rule indicator (Cursor UI shows which rules loaded for the current file). Verify the universal rules appear.
|
|
72
|
-
3.
|
|
73
|
+
3. Skim the emitted `.cursor/rules/*.mdc` and adjust recipe `globs:` to your repo layout if needed.
|
|
73
74
|
4. Rename `docs/specs/_example.md` → `docs/specs/<your-area>.md` and start a real spec.
|
|
74
75
|
5. Add `.memory/` to `.gitignore`. Create your first memory entry.
|
|
75
76
|
6. Add your first entry to `docs/CURRENT_WORK.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Single source for enumerable adapter facts (ADR-040). CI asserts transform.sh / validator / matrix agree with this file. Update HERE first; docs follow.",
|
|
3
|
+
"tool": "cursor",
|
|
4
|
+
"display_name": "Cursor",
|
|
5
|
+
"tier": "T1",
|
|
6
|
+
"outputs": [
|
|
7
|
+
{ "path": ".cursor/rules", "kind": "rules", "validated": true },
|
|
8
|
+
{ "path": "docs/CURRENT_WORK.md", "kind": "docs", "validated": false }
|
|
9
|
+
],
|
|
10
|
+
"reflector_outputs": [
|
|
11
|
+
{ "path": ".cursor/hooks.json", "note": "session-end trajectory hook config (recipe-gated)" },
|
|
12
|
+
{ "path": ".conductor/reflect", "note": "runner + brief + scheduling (recipe-gated)" }
|
|
13
|
+
],
|
|
14
|
+
"install": { "ala_carte": "per-file" },
|
|
15
|
+
"legacy_paths": [".cursorrules"],
|
|
16
|
+
"capabilities": {
|
|
17
|
+
"tool_native": {
|
|
18
|
+
"hooks": "yes",
|
|
19
|
+
"sub_agents": "yes",
|
|
20
|
+
"model_routing": "yes",
|
|
21
|
+
"commands": "yes",
|
|
22
|
+
"glob_scoping": "yes",
|
|
23
|
+
"scheduler": "cloud-only"
|
|
24
|
+
},
|
|
25
|
+
"conductor_emitted": {
|
|
26
|
+
"rules": "full",
|
|
27
|
+
"guard_hooks": "none",
|
|
28
|
+
"reflector_loop": "recipe",
|
|
29
|
+
"role_agents": "none",
|
|
30
|
+
"model_routing": "none"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"live_verification": { "status": "pending", "date": null, "cli": null, "note": "not yet run" },
|
|
34
|
+
"headless_cli": { "command": "cursor-agent", "invocation": "cursor-agent -p" }
|
|
35
|
+
}
|