@jetrabbits/agentic 0.0.5 → 0.1.0
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/AGENTS.md +7 -0
- package/README.md +3 -0
- package/agentic +307 -22
- package/docs/agentic-lifecycle.md +11 -0
- package/docs/agentic-token-minimization/README.md +2 -0
- package/docs/agentic-usage.md +14 -2
- package/docs/opencode_setup.md +3 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -76,6 +76,13 @@ Cross-cutting practices that apply to every project regardless of area.
|
|
|
76
76
|
- Resolve the library or framework identity first, then request focused docs for the exact task and version when version matters.
|
|
77
77
|
- If Context7 is unavailable, state that explicitly and fall back to local docs or official project documentation.
|
|
78
78
|
|
|
79
|
+
### MemPalace + Context Strategy
|
|
80
|
+
|
|
81
|
+
- If MemPalace MCP is enabled and available, load project business/domain context from MemPalace first.
|
|
82
|
+
- If Context7 MCP is enabled and available, use it specifically for framework/library/API documentation.
|
|
83
|
+
- If both are available, combine them: MemPalace for project/business knowledge, Context7 for framework-level references.
|
|
84
|
+
- If MCP providers are unavailable, continue with standard local-repo discovery and context-building as fallback.
|
|
85
|
+
|
|
79
86
|
### Code Style
|
|
80
87
|
|
|
81
88
|
- Write self-documenting code with meaningful names — comments explain why, not what.
|
package/README.md
CHANGED
|
@@ -164,6 +164,9 @@ Each agent has a `vibe` (one-line personality), `Identity`, `Communication Style
|
|
|
164
164
|
|
|
165
165
|
Running `agentic` in a target project installs shared guidance into the project's `.agent/` directory and copies any
|
|
166
166
|
selected platform extensions into tool-specific directories such as `.claude/`, `.opencode/`, and `.codex/`.
|
|
167
|
+
Generated operating guidance is written to `AGENTS.md` at the project root for most agents. OpenCode receives the same
|
|
168
|
+
generated guidance at `.opencode/AGENTS.md`; multi-target installs that include OpenCode and another agent write both
|
|
169
|
+
files.
|
|
167
170
|
|
|
168
171
|
```text
|
|
169
172
|
project/.agent/
|
package/agentic
CHANGED
|
@@ -731,11 +731,6 @@ elif suffix == ".json":
|
|
|
731
731
|
data = json.loads(text)
|
|
732
732
|
if not isinstance(data, dict):
|
|
733
733
|
raise SystemExit(f"Cannot add agentic metadata to non-object JSON: {dest}")
|
|
734
|
-
data["_agentic"] = {
|
|
735
|
-
"generated_by": "agentic",
|
|
736
|
-
"source": source_ref,
|
|
737
|
-
"repository": repo,
|
|
738
|
-
}
|
|
739
734
|
output = json.dumps(data, indent=2, ensure_ascii=False) + "\n"
|
|
740
735
|
elif suffix in {".ts", ".tsx", ".js", ".jsx", ".css"}:
|
|
741
736
|
output = commented(text, "//")
|
|
@@ -1071,11 +1066,6 @@ def add_marker(file_path: Path, target: Path, source_ref: str) -> str:
|
|
|
1071
1066
|
data = json.loads(text)
|
|
1072
1067
|
if not isinstance(data, dict):
|
|
1073
1068
|
raise SystemExit(f"Cannot add agentic metadata to non-object JSON: {target}")
|
|
1074
|
-
data["_agentic"] = {
|
|
1075
|
-
"generated_by": "agentic",
|
|
1076
|
-
"source": source_ref,
|
|
1077
|
-
"repository": repo,
|
|
1078
|
-
}
|
|
1079
1069
|
return json.dumps(data, indent=2, ensure_ascii=False) + "\n"
|
|
1080
1070
|
if suffix in {".ts", ".tsx", ".js", ".jsx", ".css"}:
|
|
1081
1071
|
return commented(text, "//", source_ref)
|
|
@@ -1182,11 +1172,6 @@ namespace = {
|
|
|
1182
1172
|
}
|
|
1183
1173
|
exec(body, namespace)
|
|
1184
1174
|
data = namespace["data"]
|
|
1185
|
-
data["_agentic"] = {
|
|
1186
|
-
"generated_by": "agentic",
|
|
1187
|
-
"source": source_ref,
|
|
1188
|
-
"repository": repo,
|
|
1189
|
-
}
|
|
1190
1175
|
path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
|
1191
1176
|
PY
|
|
1192
1177
|
register_managed_file "$dest" "$source_ref" "internal"
|
|
@@ -1314,6 +1299,37 @@ mcp_servers["context7"] = context7
|
|
|
1314
1299
|
write_json_config_file "$dest" "generated:context7-cursor-config" "$body"
|
|
1315
1300
|
}
|
|
1316
1301
|
|
|
1302
|
+
|
|
1303
|
+
write_context7_kilocode_config() {
|
|
1304
|
+
local dest="$PROJECT_DIR/.kilocode/mcp.json"
|
|
1305
|
+
local body
|
|
1306
|
+
body='
|
|
1307
|
+
mcp_servers = data.setdefault("mcpServers", {})
|
|
1308
|
+
context7 = {
|
|
1309
|
+
"url": "https://mcp.context7.com/mcp",
|
|
1310
|
+
}
|
|
1311
|
+
if context7_api_key:
|
|
1312
|
+
context7["headers"] = {"CONTEXT7_API_KEY": context7_api_key}
|
|
1313
|
+
mcp_servers["context7"] = context7
|
|
1314
|
+
'
|
|
1315
|
+
write_json_config_file "$dest" "generated:context7-kilocode-config" "$body"
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
write_context7_antigravity_config() {
|
|
1319
|
+
local dest="$HOME/.gemini/antigravity/mcp_config.json"
|
|
1320
|
+
local body
|
|
1321
|
+
body='
|
|
1322
|
+
mcp_servers = data.setdefault("mcpServers", {})
|
|
1323
|
+
context7 = {
|
|
1324
|
+
"url": "https://mcp.context7.com/mcp",
|
|
1325
|
+
}
|
|
1326
|
+
if context7_api_key:
|
|
1327
|
+
context7["headers"] = {"CONTEXT7_API_KEY": context7_api_key}
|
|
1328
|
+
mcp_servers["context7"] = context7
|
|
1329
|
+
'
|
|
1330
|
+
write_json_config_file "$dest" "generated:context7-antigravity-config" "$body"
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1317
1333
|
write_context7_gemini_config() {
|
|
1318
1334
|
local dest="$PROJECT_DIR/.gemini/settings.json"
|
|
1319
1335
|
local body
|
|
@@ -1329,12 +1345,176 @@ mcp_servers["context7"] = context7
|
|
|
1329
1345
|
write_json_config_file "$dest" "generated:context7-gemini-config" "$body"
|
|
1330
1346
|
}
|
|
1331
1347
|
|
|
1348
|
+
write_mempalace_opencode_config() {
|
|
1349
|
+
local dest="$1"
|
|
1350
|
+
local body
|
|
1351
|
+
body='
|
|
1352
|
+
mcp = data.setdefault("mcp", {})
|
|
1353
|
+
mcp["mempalace"] = {"type": "local", "command": ["mempalace-mcp", "--palace", ".mempalace"]}
|
|
1354
|
+
'
|
|
1355
|
+
write_json_config_file "$dest" "generated:mempalace-opencode-config" "$body"
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
write_mempalace_codex_config() {
|
|
1359
|
+
local dest="$PROJECT_DIR/.codex/config.toml"
|
|
1360
|
+
local body
|
|
1361
|
+
body="$(python3 - "$dest" <<'PYCODE'
|
|
1362
|
+
import pathlib, sys
|
|
1363
|
+
path = pathlib.Path(sys.argv[1])
|
|
1364
|
+
text = path.read_text(encoding='utf-8') if path.exists() else ''
|
|
1365
|
+
block = "[mcp_servers.mempalace]\ncommand = \"mempalace-mcp\"\nargs = [\"--palace\", \".mempalace\"]\n"
|
|
1366
|
+
if block not in text:
|
|
1367
|
+
if text and not text.endswith("\n"):
|
|
1368
|
+
text += "\n"
|
|
1369
|
+
text += block
|
|
1370
|
+
print(text, end="")
|
|
1371
|
+
PYCODE
|
|
1372
|
+
)"
|
|
1373
|
+
write_generated_text_file "$dest" "generated:mempalace-codex-config" "$body"
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
write_mempalace_generic_json_config() {
|
|
1377
|
+
local dest="$1"
|
|
1378
|
+
local marker="$2"
|
|
1379
|
+
local body
|
|
1380
|
+
body='
|
|
1381
|
+
servers = data.setdefault("mcpServers", {})
|
|
1382
|
+
servers["mempalace"] = {"command": "mempalace-mcp", "args": ["--palace", ".mempalace"]}
|
|
1383
|
+
'
|
|
1384
|
+
write_json_config_file "$dest" "$marker" "$body"
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
print_mempalace_project_setup_instructions() {
|
|
1388
|
+
log "MemPalace setup instructions for target project: $PROJECT_DIR"
|
|
1389
|
+
cat <<EOF
|
|
1390
|
+
1) Ensure Python is installed and available in PATH.
|
|
1391
|
+
2) Install MemPalace:
|
|
1392
|
+
pip install mempalace
|
|
1393
|
+
3) Initialize project-local MemPalace cache:
|
|
1394
|
+
mkdir -p "$PROJECT_DIR/.mempalace"
|
|
1395
|
+
mempalace init "$PROJECT_DIR/.mempalace" --yes --auto-mine
|
|
1396
|
+
4) Index existing project memory:
|
|
1397
|
+
# optional if --auto-mine was skipped
|
|
1398
|
+
mempalace mine "$PROJECT_DIR/.mempalace"
|
|
1399
|
+
5) Verify in your IDE/agent that MemPalace MCP tools are connected.
|
|
1400
|
+
Note: Ollama at localhost:11434 is optional; MemPalace can run heuristics-only without it.
|
|
1401
|
+
EOF
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
setup_mempalace_for_agentic_opencode() {
|
|
1405
|
+
local step_prefix="MemPalace setup"
|
|
1406
|
+
|
|
1407
|
+
log "$step_prefix [1/4] Checking Python availability"
|
|
1408
|
+
if ! command -v python3 >/dev/null 2>&1 && ! command -v python >/dev/null 2>&1; then
|
|
1409
|
+
warn "Python is not installed. Install Python 3 first, then run: pip install mempalace"
|
|
1410
|
+
warn "Install help: https://www.python.org/downloads/"
|
|
1411
|
+
return 1
|
|
1412
|
+
fi
|
|
1413
|
+
log "$step_prefix [1/4] Python check passed"
|
|
1414
|
+
|
|
1415
|
+
log "$step_prefix [2/4] Checking pip availability"
|
|
1416
|
+
if ! command -v pip >/dev/null 2>&1 && ! command -v pip3 >/dev/null 2>&1; then
|
|
1417
|
+
warn "pip is not available. Install pip for Python 3, then run: pip install mempalace"
|
|
1418
|
+
return 1
|
|
1419
|
+
fi
|
|
1420
|
+
log "$step_prefix [2/4] pip check passed"
|
|
1421
|
+
|
|
1422
|
+
log "$step_prefix [3/4] Installing mempalace package"
|
|
1423
|
+
if pip install mempalace >/dev/null 2>&1; then
|
|
1424
|
+
log "MemPalace package installed via 'pip install mempalace'"
|
|
1425
|
+
else
|
|
1426
|
+
warn "Unable to auto-install mempalace via pip; continuing with manual setup instructions"
|
|
1427
|
+
print_mempalace_project_setup_instructions
|
|
1428
|
+
return 1
|
|
1429
|
+
fi
|
|
1430
|
+
|
|
1431
|
+
log "$step_prefix [4/4] Initializing project memory at $PROJECT_DIR/.mempalace"
|
|
1432
|
+
if command -v mempalace >/dev/null 2>&1; then
|
|
1433
|
+
mkdir -p "$PROJECT_DIR/.mempalace" || warn "Failed: mkdir -p \"$PROJECT_DIR/.mempalace\""
|
|
1434
|
+
if mempalace init "$PROJECT_DIR/.mempalace" --yes --auto-mine >/dev/null 2>&1; then
|
|
1435
|
+
log "MemPalace init completed"
|
|
1436
|
+
else
|
|
1437
|
+
warn "Failed: mempalace init \"$PROJECT_DIR/.mempalace\" --yes --auto-mine"
|
|
1438
|
+
fi
|
|
1439
|
+
if mempalace mine "$PROJECT_DIR/.mempalace" >/dev/null 2>&1; then
|
|
1440
|
+
log "MemPalace mine completed"
|
|
1441
|
+
else
|
|
1442
|
+
warn "Failed: mempalace mine \"$PROJECT_DIR/.mempalace\""
|
|
1443
|
+
fi
|
|
1444
|
+
log "$step_prefix [4/4] Initialization step finished"
|
|
1445
|
+
else
|
|
1446
|
+
warn "mempalace command is unavailable after install; please run setup manually"
|
|
1447
|
+
print_mempalace_project_setup_instructions
|
|
1448
|
+
return 1
|
|
1449
|
+
fi
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
configure_mempalace_if_needed() {
|
|
1453
|
+
if ! selected_agent_os_contains "opencode" \
|
|
1454
|
+
&& ! selected_agent_os_contains "codex" \
|
|
1455
|
+
&& ! selected_agent_os_contains "claude" \
|
|
1456
|
+
&& ! selected_agent_os_contains "cursor" \
|
|
1457
|
+
&& ! selected_agent_os_contains "gemini" \
|
|
1458
|
+
&& ! selected_agent_os_contains "antigravity"; then
|
|
1459
|
+
return
|
|
1460
|
+
fi
|
|
1461
|
+
|
|
1462
|
+
local enable_mempalace="N"
|
|
1463
|
+
if [[ -n "${AGENTIC_ENABLE_MEMPALACE:-}" ]]; then
|
|
1464
|
+
enable_mempalace="$(trim "${AGENTIC_ENABLE_MEMPALACE}")"
|
|
1465
|
+
elif is_interactive_terminal && [[ -z "${AGENTIC_TEST_SOURCE_AGENTIC:-}" ]]; then
|
|
1466
|
+
read -r -p "Enable MemPalace MCP memory integration? [y/N]: " enable_mempalace
|
|
1467
|
+
enable_mempalace="$(trim "${enable_mempalace:-y}")"
|
|
1468
|
+
if [[ -z "$enable_mempalace" ]]; then enable_mempalace="y"; fi
|
|
1469
|
+
fi
|
|
1470
|
+
if [[ "$enable_mempalace" =~ ^[Nn]$ ]]; then
|
|
1471
|
+
log "Skipped MemPalace MCP configuration"
|
|
1472
|
+
return
|
|
1473
|
+
fi
|
|
1474
|
+
|
|
1475
|
+
if selected_agent_os_contains "opencode"; then
|
|
1476
|
+
setup_mempalace_for_agentic_opencode || true
|
|
1477
|
+
else
|
|
1478
|
+
print_mempalace_project_setup_instructions
|
|
1479
|
+
fi
|
|
1480
|
+
|
|
1481
|
+
if command -v mempalace-mcp >/dev/null 2>&1; then
|
|
1482
|
+
if mempalace-mcp --help >/dev/null 2>&1; then
|
|
1483
|
+
log "MemPalace MCP runtime check succeeded via 'mempalace-mcp'"
|
|
1484
|
+
else
|
|
1485
|
+
warn "MemPalace MCP runtime check failed; continuing without runtime validation"
|
|
1486
|
+
fi
|
|
1487
|
+
else
|
|
1488
|
+
warn "mempalace-mcp is unavailable; install/repair MemPalace and re-run setup"
|
|
1489
|
+
fi
|
|
1490
|
+
|
|
1491
|
+
if selected_agent_os_contains "opencode"; then
|
|
1492
|
+
write_mempalace_opencode_config "$PROJECT_DIR/opencode.json"
|
|
1493
|
+
write_mempalace_opencode_config "$PROJECT_DIR/.opencode/opencode.json"
|
|
1494
|
+
fi
|
|
1495
|
+
if selected_agent_os_contains "codex"; then write_mempalace_codex_config; fi
|
|
1496
|
+
if selected_agent_os_contains "claude"; then
|
|
1497
|
+
write_mempalace_generic_json_config "$PROJECT_DIR/.mcp.json" "generated:mempalace-claude-config"
|
|
1498
|
+
fi
|
|
1499
|
+
if selected_agent_os_contains "cursor"; then
|
|
1500
|
+
write_mempalace_generic_json_config "$PROJECT_DIR/.cursor/mcp.json" "generated:mempalace-cursor-config"
|
|
1501
|
+
fi
|
|
1502
|
+
if selected_agent_os_contains "gemini"; then
|
|
1503
|
+
write_mempalace_generic_json_config "$PROJECT_DIR/.gemini/settings.json" "generated:mempalace-gemini-config"
|
|
1504
|
+
fi
|
|
1505
|
+
if selected_agent_os_contains "antigravity"; then
|
|
1506
|
+
write_mempalace_generic_json_config "$HOME/.gemini/antigravity/mcp_config.json" "generated:mempalace-antigravity-config"
|
|
1507
|
+
fi
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1332
1510
|
configure_context7_if_needed() {
|
|
1333
1511
|
if ! selected_agent_os_contains "opencode" \
|
|
1334
1512
|
&& ! selected_agent_os_contains "codex" \
|
|
1335
1513
|
&& ! selected_agent_os_contains "claude" \
|
|
1336
1514
|
&& ! selected_agent_os_contains "cursor" \
|
|
1337
|
-
&& ! selected_agent_os_contains "gemini"
|
|
1515
|
+
&& ! selected_agent_os_contains "gemini" \
|
|
1516
|
+
&& ! selected_agent_os_contains "kilocode" \
|
|
1517
|
+
&& ! selected_agent_os_contains "antigravity"; then
|
|
1338
1518
|
return
|
|
1339
1519
|
fi
|
|
1340
1520
|
|
|
@@ -1376,6 +1556,14 @@ configure_context7_if_needed() {
|
|
|
1376
1556
|
if selected_agent_os_contains "gemini"; then
|
|
1377
1557
|
write_context7_gemini_config
|
|
1378
1558
|
fi
|
|
1559
|
+
|
|
1560
|
+
if selected_agent_os_contains "kilocode"; then
|
|
1561
|
+
write_context7_kilocode_config
|
|
1562
|
+
fi
|
|
1563
|
+
|
|
1564
|
+
if selected_agent_os_contains "antigravity"; then
|
|
1565
|
+
write_context7_antigravity_config
|
|
1566
|
+
fi
|
|
1379
1567
|
}
|
|
1380
1568
|
|
|
1381
1569
|
write_default_opencode_plugin_config() {
|
|
@@ -1610,11 +1798,31 @@ append_root_agents_template() {
|
|
|
1610
1798
|
|
|
1611
1799
|
generate_agents_md() {
|
|
1612
1800
|
local project_dir="$1"
|
|
1613
|
-
local
|
|
1801
|
+
local outputs=()
|
|
1802
|
+
local needs_root=false
|
|
1803
|
+
local agent_os
|
|
1804
|
+
|
|
1805
|
+
if selected_agent_os_contains "opencode"; then
|
|
1806
|
+
unique_append "$project_dir/.opencode/AGENTS.md" outputs
|
|
1807
|
+
fi
|
|
1808
|
+
|
|
1809
|
+
for agent_os in "${SELECTED_AGENT_OS[@]}"; do
|
|
1810
|
+
if [[ "$agent_os" != "opencode" ]]; then
|
|
1811
|
+
needs_root=true
|
|
1812
|
+
break
|
|
1813
|
+
fi
|
|
1814
|
+
done
|
|
1815
|
+
|
|
1816
|
+
if [[ "$needs_root" == true ]] || ! selected_agent_os_contains "opencode"; then
|
|
1817
|
+
unique_append "$project_dir/AGENTS.md" outputs
|
|
1818
|
+
fi
|
|
1614
1819
|
|
|
1615
1820
|
if [[ "$DRY_RUN" == true ]]; then
|
|
1616
|
-
|
|
1617
|
-
|
|
1821
|
+
local dry_run_out
|
|
1822
|
+
for dry_run_out in "${outputs[@]}"; do
|
|
1823
|
+
log "DRY-RUN generate $dry_run_out"
|
|
1824
|
+
unique_append "$dry_run_out" COPIED_PATHS
|
|
1825
|
+
done
|
|
1618
1826
|
return
|
|
1619
1827
|
fi
|
|
1620
1828
|
|
|
@@ -1629,7 +1837,10 @@ generate_agents_md() {
|
|
|
1629
1837
|
append_specialization_template "$tmp" "$spec_key"
|
|
1630
1838
|
done
|
|
1631
1839
|
|
|
1632
|
-
|
|
1840
|
+
local out
|
|
1841
|
+
for out in "${outputs[@]}"; do
|
|
1842
|
+
write_file_with_agentic_marker "$tmp" "$out" "generated:AGENTS.md"
|
|
1843
|
+
done
|
|
1633
1844
|
rm -f "$tmp"
|
|
1634
1845
|
}
|
|
1635
1846
|
|
|
@@ -1734,6 +1945,70 @@ print_report() {
|
|
|
1734
1945
|
fi
|
|
1735
1946
|
}
|
|
1736
1947
|
|
|
1948
|
+
detect_runtime_platform_label() {
|
|
1949
|
+
local platform
|
|
1950
|
+
platform="$(detect_platform)"
|
|
1951
|
+
if [[ "$platform" == "linux" ]] && grep -qiE "(microsoft|wsl)" /proc/version 2>/dev/null; then
|
|
1952
|
+
echo "wsl"
|
|
1953
|
+
return
|
|
1954
|
+
fi
|
|
1955
|
+
echo "$platform"
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
get_agent_binary_name() {
|
|
1959
|
+
local agent_os="$1"
|
|
1960
|
+
case "$agent_os" in
|
|
1961
|
+
codex) echo "codex" ;;
|
|
1962
|
+
claude) echo "claude" ;;
|
|
1963
|
+
opencode) echo "opencode" ;;
|
|
1964
|
+
cursor) echo "cursor-agent" ;;
|
|
1965
|
+
gemini) echo "gemini" ;;
|
|
1966
|
+
antigravity) echo "antigravity" ;;
|
|
1967
|
+
*) echo "" ;;
|
|
1968
|
+
esac
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
print_missing_agent_binary_guides() {
|
|
1972
|
+
local platform_label
|
|
1973
|
+
platform_label="$(detect_runtime_platform_label)"
|
|
1974
|
+
local missing_lines=()
|
|
1975
|
+
local agent_os
|
|
1976
|
+
|
|
1977
|
+
for agent_os in "${SELECTED_AGENT_OS[@]}"; do
|
|
1978
|
+
local binary_name
|
|
1979
|
+
binary_name="$(get_agent_binary_name "$agent_os")"
|
|
1980
|
+
if [[ -z "$binary_name" ]]; then
|
|
1981
|
+
continue
|
|
1982
|
+
fi
|
|
1983
|
+
if command -v "$binary_name" >/dev/null 2>&1; then
|
|
1984
|
+
continue
|
|
1985
|
+
fi
|
|
1986
|
+
|
|
1987
|
+
local install_link=""
|
|
1988
|
+
case "$agent_os" in
|
|
1989
|
+
codex) install_link="https://github.com/openai/codex" ;;
|
|
1990
|
+
claude) install_link="https://docs.anthropic.com/en/docs/claude-code/quickstart" ;;
|
|
1991
|
+
opencode) install_link="https://opencode.ai/docs" ;;
|
|
1992
|
+
cursor) install_link="https://docs.cursor.com/get-started/installation" ;;
|
|
1993
|
+
gemini) install_link="https://github.com/google-gemini/gemini-cli" ;;
|
|
1994
|
+
antigravity) install_link="https://github.com/getantigravity/antigravity" ;;
|
|
1995
|
+
esac
|
|
1996
|
+
|
|
1997
|
+
missing_lines+=("- $agent_os: binary '$binary_name' is not installed on $platform_label.")
|
|
1998
|
+
if [[ -n "$install_link" ]]; then
|
|
1999
|
+
missing_lines+=(" Install guide: $install_link")
|
|
2000
|
+
fi
|
|
2001
|
+
done
|
|
2002
|
+
|
|
2003
|
+
if [[ "${#missing_lines[@]}" -eq 0 ]]; then
|
|
2004
|
+
return
|
|
2005
|
+
fi
|
|
2006
|
+
|
|
2007
|
+
echo
|
|
2008
|
+
echo "${COLOR_HEADER}=== Agent binary setup recommendations ===${COLOR_RESET}"
|
|
2009
|
+
printf '%s\n' "${missing_lines[@]}"
|
|
2010
|
+
}
|
|
2011
|
+
|
|
1737
2012
|
run_install() {
|
|
1738
2013
|
ensure_repo_layout
|
|
1739
2014
|
ensure_python_available
|
|
@@ -1746,8 +2021,10 @@ run_install() {
|
|
|
1746
2021
|
copy_specialization_assets "$PROJECT_DIR"
|
|
1747
2022
|
generate_agents_md "$PROJECT_DIR"
|
|
1748
2023
|
configure_context7_if_needed
|
|
2024
|
+
configure_mempalace_if_needed
|
|
1749
2025
|
write_agentic_manifest "$PROJECT_DIR"
|
|
1750
2026
|
print_report
|
|
2027
|
+
print_missing_agent_binary_guides
|
|
1751
2028
|
}
|
|
1752
2029
|
|
|
1753
2030
|
ascii_banner() {
|
|
@@ -2274,8 +2551,13 @@ update_installed_binary_from_repo() {
|
|
|
2274
2551
|
return
|
|
2275
2552
|
fi
|
|
2276
2553
|
|
|
2277
|
-
|
|
2278
|
-
|
|
2554
|
+
local target_dir target_tmp
|
|
2555
|
+
target_dir="$(dirname "$target")"
|
|
2556
|
+
target_tmp="$(mktemp "$target_dir/.agentic-update.XXXXXX")"
|
|
2557
|
+
|
|
2558
|
+
cp "$source_path" "$target_tmp"
|
|
2559
|
+
chmod +x "$target_tmp"
|
|
2560
|
+
mv -f "$target_tmp" "$target"
|
|
2279
2561
|
log "Updated installed binary: $target"
|
|
2280
2562
|
}
|
|
2281
2563
|
|
|
@@ -2396,6 +2678,9 @@ case "$COMMAND" in
|
|
|
2396
2678
|
shift 2
|
|
2397
2679
|
;;
|
|
2398
2680
|
--agent-os)
|
|
2681
|
+
if [[ "${#SELECTED_AGENT_OS[@]}" -eq 1 && "${SELECTED_AGENT_OS[0]}" == "$DEFAULT_AGENT_OS" ]]; then
|
|
2682
|
+
SELECTED_AGENT_OS=()
|
|
2683
|
+
fi
|
|
2399
2684
|
split_csv "$2" SELECTED_AGENT_OS
|
|
2400
2685
|
shift 2
|
|
2401
2686
|
;;
|
|
@@ -101,3 +101,14 @@ When `.agentic.json` exists in the target project, `agentic install` treats the
|
|
|
101
101
|
- skipped paths are recorded in `.agentic.json`.
|
|
102
102
|
|
|
103
103
|
Every copied or generated file carries an internal marker. Markdown uses YAML front matter, comment-capable formats use comments, and JSON uses an `_agentic` object.
|
|
104
|
+
|
|
105
|
+
## MemPalace install and validation logs
|
|
106
|
+
|
|
107
|
+
When MemPalace MCP is enabled during interactive install, `agentic` now reports setup progress in explicit steps so users can see what succeeded or failed:
|
|
108
|
+
|
|
109
|
+
1. Python availability check
|
|
110
|
+
2. pip availability check
|
|
111
|
+
3. `pip install mempalace`
|
|
112
|
+
4. Project initialization (`mempalace init` and `mempalace mine`)
|
|
113
|
+
|
|
114
|
+
After setup, runtime validation uses `mempalace-mcp --help` (the MCP entrypoint) instead of validating only the Python module import path. This avoids false warnings where the package is installed successfully but a pre-install runtime probe ran too early.
|
|
@@ -51,6 +51,8 @@ OPENCODE_TELEGRAM_CHAT_ID
|
|
|
51
51
|
- `.mcp.json` for Claude Code project-scoped MCP servers
|
|
52
52
|
- `.cursor/mcp.json`
|
|
53
53
|
- `.gemini/settings.json`
|
|
54
|
+
- `.kilocode/mcp.json` for `kilocode`
|
|
55
|
+
- `~/.gemini/antigravity/mcp_config.json` for `antigravity` (global user config)
|
|
54
56
|
|
|
55
57
|
Interactive installs ask whether to enable Context7. If enabled, the Context7 API key is optional. Empty keys keep the install usable with default Context7 limits or rule-only fallback behavior. Non-interactive installs enable Context7 only when `CONTEXT7_API_KEY` is already set. Generated guidance requires agents to use Context7 for framework, SDK, library, and API documentation before relying on model memory when the project config is present.
|
|
56
58
|
|
package/docs/agentic-usage.md
CHANGED
|
@@ -73,7 +73,7 @@ agentic install \
|
|
|
73
73
|
--specializations software.general,software.backend
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
After install, `agentic` writes `.agentic.json` in the target project. It records copied/generated files and their hashes. A later install rerun updates only manifest-managed files and skips files changed by the user.
|
|
76
|
+
After install, `agentic` writes `.agentic.json` in the target project. It records copied/generated files and their hashes. A later install rerun updates only manifest-managed files and skips files changed by the user. Generated guidance is written to root `AGENTS.md` for most agents and to `.opencode/AGENTS.md` when OpenCode is selected; multi-target installs that include OpenCode and another agent write both files.
|
|
77
77
|
|
|
78
78
|
List available options:
|
|
79
79
|
|
|
@@ -136,10 +136,22 @@ Non-interactive installs create a disabled config when no config exists. Telegra
|
|
|
136
136
|
|
|
137
137
|
## Context7
|
|
138
138
|
|
|
139
|
-
For `opencode` and `
|
|
139
|
+
For `opencode`, `codex`, `claude`, `cursor`, `gemini`, `kilocode`, and `antigravity`, interactive installs ask whether to add Context7 MCP configuration. If enabled, the Context7 API key prompt is optional; leave it empty to configure Context7 without a key. Most targets use project-level files, while `antigravity` is written to the global user path `~/.gemini/antigravity/mcp_config.json`.
|
|
140
140
|
|
|
141
141
|
Non-interactive installs skip Context7 unless `CONTEXT7_API_KEY` is set in the environment. Agents are instructed to use Context7 for framework, library, SDK, API, and setup documentation when the project config is present.
|
|
142
142
|
|
|
143
|
+
## MemPalace
|
|
144
|
+
|
|
145
|
+
For `opencode`, `codex`, `claude`, `cursor`, `gemini`, and `antigravity`, MemPalace MCP is configured as a local Python module instead of a hosted MCP URL. Install it first:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pip install mempalace
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Generated configs run `mempalace-mcp --palace .mempalace` (or equivalent `command`/`args` format per IDE) so each project uses its local `.mempalace` directory.
|
|
152
|
+
|
|
153
|
+
During install, if MemPalace is enabled, `agentic` also runs a runtime check using `python3 -m mempalace --help`. For OpenCode installs, `agentic` creates `<project>/.mempalace` and runs `mempalace init "<project>/.mempalace" --yes --auto-mine`. If checks fail (for example, package not installed yet), install continues and agents fall back to standard context discovery.
|
|
154
|
+
|
|
143
155
|
## Deprecated wrapper
|
|
144
156
|
|
|
145
157
|
`agentos-install.sh` remains for backward compatibility and forwards to `agentic`. Prefer `agentic` in new usage and documentation.
|
package/docs/opencode_setup.md
CHANGED
|
@@ -43,3 +43,6 @@ OPENCODE_TELEGRAM_CHAT_ID
|
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Non-interactive `agentic install` defaults optional plugins to disabled when no config exists.
|
|
46
|
+
|
|
47
|
+
For OpenCode targets, `agentic` writes generated operating guidance to `.opencode/AGENTS.md`. If OpenCode is installed
|
|
48
|
+
alongside another agent target, root `AGENTS.md` is generated as well for the non-OpenCode target.
|