@jeger-ai/opengantry 2.2.3 → 2.2.4
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/README.md +96 -78
- package/dist/cli/commands/arch.js +4 -4
- package/dist/cli/commands/check-imports.js +1 -1
- package/dist/cli/commands/onboarding.js +5 -5
- package/dist/cli/commands/perimeter.js +2 -2
- package/dist/cli/commands/runtime.js +1 -1
- package/dist/cli/commands/scan.js +2 -2
- package/dist/cli/commands/teacher.js +1 -1
- package/dist/cli/commands/verify.js +3 -3
- package/dist/cli/lib/architecture-credential.js +1 -1
- package/dist/cli/lib/architecture-pointer.js +1 -1
- package/dist/cli/lib/ast-discovery.js +1 -1
- package/dist/cli/lib/audience-output.js +7 -7
- package/dist/cli/lib/cli-io.js +1 -1
- package/dist/cli/lib/config-namespace.d.ts +18 -0
- package/dist/cli/lib/config-namespace.d.ts.map +1 -0
- package/dist/cli/lib/config-namespace.js +39 -0
- package/dist/cli/lib/config-namespace.js.map +1 -0
- package/dist/cli/lib/constants.d.ts +6 -5
- package/dist/cli/lib/constants.d.ts.map +1 -1
- package/dist/cli/lib/constants.js +6 -5
- package/dist/cli/lib/constants.js.map +1 -1
- package/dist/cli/lib/context-feed-store.d.ts +1 -1
- package/dist/cli/lib/context-feed-store.js +1 -1
- package/dist/cli/lib/dirty-missions.js +1 -1
- package/dist/cli/lib/doctor-core.d.ts.map +1 -1
- package/dist/cli/lib/doctor-core.js +8 -7
- package/dist/cli/lib/doctor-core.js.map +1 -1
- package/dist/cli/lib/doctor-integration.js +1 -1
- package/dist/cli/lib/doctor-substrate.js +4 -4
- package/dist/cli/lib/errors.d.ts.map +1 -1
- package/dist/cli/lib/errors.js +2 -1
- package/dist/cli/lib/errors.js.map +1 -1
- package/dist/cli/lib/file-merge-gxt.js +2 -2
- package/dist/cli/lib/fix-hints.js +9 -9
- package/dist/cli/lib/git-metrics.js +1 -1
- package/dist/cli/lib/git-proof.d.ts +1 -1
- package/dist/cli/lib/git-proof.d.ts.map +1 -1
- package/dist/cli/lib/git-proof.js +3 -2
- package/dist/cli/lib/git-proof.js.map +1 -1
- package/dist/cli/lib/init-interactive.js +2 -2
- package/dist/cli/lib/init-plan.js +6 -6
- package/dist/cli/lib/init-tutorial.js +10 -10
- package/dist/cli/lib/kpi-engine.js +3 -3
- package/dist/cli/lib/kpi-scan.js +3 -3
- package/dist/cli/lib/legislate.d.ts.map +1 -1
- package/dist/cli/lib/legislate.js +11 -5
- package/dist/cli/lib/legislate.js.map +1 -1
- package/dist/cli/lib/manifest.js +2 -2
- package/dist/cli/lib/manifest.js.map +1 -1
- package/dist/cli/lib/mcp-governance.d.ts.map +1 -1
- package/dist/cli/lib/mcp-governance.js +4 -3
- package/dist/cli/lib/mcp-governance.js.map +1 -1
- package/dist/cli/lib/mcp-tools-register.js +4 -4
- package/dist/cli/lib/missions/formatter.js +1 -1
- package/dist/cli/lib/missions/parser.d.ts.map +1 -1
- package/dist/cli/lib/missions/parser.js +7 -5
- package/dist/cli/lib/missions/parser.js.map +1 -1
- package/dist/cli/lib/missions/validator.js +1 -1
- package/dist/cli/lib/msn-allocate.js +2 -2
- package/dist/cli/lib/onboarding-flow.js +5 -5
- package/dist/cli/lib/perimeter.js +1 -1
- package/dist/cli/lib/register-proposals.js +1 -1
- package/dist/cli/lib/runtime-env.d.ts.map +1 -1
- package/dist/cli/lib/runtime-env.js +7 -4
- package/dist/cli/lib/runtime-env.js.map +1 -1
- package/dist/cli/lib/skill-key.d.ts +12 -0
- package/dist/cli/lib/skill-key.d.ts.map +1 -0
- package/dist/cli/lib/skill-key.js +28 -0
- package/dist/cli/lib/skill-key.js.map +1 -0
- package/dist/cli/lib/staged-tmvc-guard.js +1 -1
- package/dist/cli/lib/start-orchestration.js +5 -5
- package/dist/cli/lib/status-report.js +3 -3
- package/dist/cli/lib/substrate-version.js +2 -2
- package/dist/cli/lib/surgeons/typescript-workspace.d.ts +1 -1
- package/dist/cli/lib/surgeons/typescript-workspace.js +3 -3
- package/dist/cli/lib/teacher-identity.d.ts +1 -2
- package/dist/cli/lib/teacher-identity.d.ts.map +1 -1
- package/dist/cli/lib/teacher-identity.js +11 -15
- package/dist/cli/lib/teacher-identity.js.map +1 -1
- package/dist/cli/lib/tmvc-path.d.ts.map +1 -1
- package/dist/cli/lib/tmvc-path.js +5 -2
- package/dist/cli/lib/tmvc-path.js.map +1 -1
- package/dist/cli/lib/types.d.ts +1 -1
- package/dist/cli/lib/upgrade-apply.js +5 -5
- package/dist/cli/lib/upgrade-plan.d.ts +1 -1
- package/dist/cli/lib/upgrade-plan.js +4 -4
- package/dist/cli/lib/verify-failure-normalize.js +1 -1
- package/dist/cli/lib/verify-hints.js +9 -9
- package/dist/cli/lib/verify-run.d.ts.map +1 -1
- package/dist/cli/lib/verify-run.js +3 -2
- package/dist/cli/lib/verify-run.js.map +1 -1
- package/dist/cli/lib/version.gen.d.ts +1 -1
- package/dist/cli/lib/version.gen.js +1 -1
- package/dist/cli/program-core.js +2 -2
- package/package.json +9 -4
- package/templates/.cursor/hooks/gxt-before-shell.sh +2 -2
- package/templates/.cursor/hooks/gxt-session-start.sh +5 -5
- package/templates/.cursor/mcp.json +1 -1
- package/templates/.cursor/rules/opengantry-gxt-substrate.mdc +4 -4
- package/templates/.gitagent/foreman/MANIFEST.json +2 -2
- package/templates/.gitagent/foreman/SUBSTRATE.version.json +1 -1
- package/templates/.gitagent/foreman/TEACHER.allowlist.example +1 -1
- package/templates/.gitagent/missions/README.md +3 -3
- package/templates/.gitagent/teacher/ARCHITECTURE-ACCESS.md +8 -8
- package/templates/.gitagent/teacher/KPI-REPORT.schema.yaml +1 -1
- package/templates/.gitagent/teacher/MISSION-ARCHITECT.md +5 -5
- package/templates/.gitagent/teacher/MISSION.schema.yaml +2 -2
- package/templates/.gitagent/teacher/RULES.md +2 -2
- package/templates/.githooks/pre-commit +4 -4
- package/templates/.githooks/pre-push +6 -6
- package/templates/.github/workflows/gxt-validate.yml +7 -7
- package/templates/AGENTS.md +1 -1
- package/templates/integrations/asset-catalog.json +1 -1
- package/templates/integrations/compatibility.json +1 -1
- package/templates/integrations/recipes/_footer.md +6 -6
- package/templates/integrations/recipes/_preamble.md +9 -9
- package/templates/integrations/recipes/aider.md +1 -1
- package/templates/integrations/recipes/antigravity.md +1 -1
- package/templates/integrations/recipes/claude-code.md +1 -1
- package/templates/integrations/recipes/codex-cli.md +2 -2
- package/templates/integrations/recipes/cursor.md +3 -3
- package/templates/scripts/dev-validate.sh +1 -1
- package/templates/scripts/gxt-resolve-mission.sh +2 -2
- package/templates/scripts/gxt-runtime-env.sh +4 -4
- package/templates/scripts/validate-gxt.sh +1 -1
- package/templates/scripts/verify-pr-missions.sh +6 -6
- package/templates/skills/{gapman.md → gantry.md} +2 -2
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeger-ai/opengantry",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.2.4",
|
|
4
|
+
"description": "Open Source Gantry — vendor-neutral GXT substrate and Gantry CLI for local git-native agent governance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
+
"gantry": "dist/cli/index.js",
|
|
7
8
|
"gapman": "dist/cli/index.js"
|
|
8
9
|
},
|
|
9
10
|
"files": [
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
"prepublishOnly": "npm run build && npm test",
|
|
26
27
|
"pack:check": "./scripts/npm-pack-check.sh",
|
|
27
28
|
"test": "npm run build && node --test dist/cli/tests/*.test.js",
|
|
28
|
-
"examples:benchmark": "node examples/benchmark-agent/run-benchmark.mjs"
|
|
29
|
+
"examples:benchmark": "node examples/benchmark-agent/run-benchmark.mjs",
|
|
30
|
+
"gantry": "node dist/cli/index.js"
|
|
29
31
|
},
|
|
30
32
|
"publishConfig": {
|
|
31
33
|
"access": "public",
|
|
@@ -33,7 +35,10 @@
|
|
|
33
35
|
},
|
|
34
36
|
"keywords": [
|
|
35
37
|
"gxt",
|
|
36
|
-
"
|
|
38
|
+
"gantry",
|
|
39
|
+
"gantry-cli",
|
|
40
|
+
"open-source-gantry",
|
|
41
|
+
"git-hooks",
|
|
37
42
|
"ai-agents",
|
|
38
43
|
"governance",
|
|
39
44
|
"devtools"
|
|
@@ -52,9 +52,9 @@ if printf '%s' "$command" | grep -qE '\.gitagent/foreman/|\.gitagent/teacher/RUL
|
|
|
52
52
|
fi
|
|
53
53
|
|
|
54
54
|
# Fallback guard when agents bypass MCP and run legislate via raw shell.
|
|
55
|
-
if printf '%s' "$command" | grep -qE '(^|[[:space:]/])
|
|
55
|
+
if printf '%s' "$command" | grep -qE '(^|[[:space:]/])gantry[[:space:]]+legislate\b'; then
|
|
56
56
|
ask \
|
|
57
|
-
"Shell command runs
|
|
57
|
+
"Shell command runs gantry legislate directly. Confirm you intend to write mission law outside the MCP draft/execute gate." \
|
|
58
58
|
"Prefer MCP: gxt_draft_legislation (preview) → human chat approval → gxt_execute_legislation. Shell legislate is a fallback path only."
|
|
59
59
|
exit 0
|
|
60
60
|
fi
|
|
@@ -14,15 +14,15 @@ if MISSION="$(scripts/gxt-resolve-mission.sh 2>/dev/null)"; then
|
|
|
14
14
|
else
|
|
15
15
|
node -e '
|
|
16
16
|
process.stdout.write(JSON.stringify({
|
|
17
|
-
additional_context: "No active mission pinned. Ask me to run the Mission Architect protocol (MCP: gxt_draft_legislation) or
|
|
17
|
+
additional_context: "No active mission pinned. Ask me to run the Mission Architect protocol (MCP: gxt_draft_legislation) or gantry legislate.",
|
|
18
18
|
}));
|
|
19
19
|
'
|
|
20
20
|
exit 0
|
|
21
21
|
fi
|
|
22
22
|
|
|
23
23
|
RUNTIME_JSON=""
|
|
24
|
-
if command -v
|
|
25
|
-
RUNTIME_JSON="$(
|
|
24
|
+
if command -v gantry >/dev/null 2>&1; then
|
|
25
|
+
RUNTIME_JSON="$(gantry runtime env --mission "$MISSION" --json 2>/dev/null || true)"
|
|
26
26
|
elif [ -f "dist/cli/index.js" ]; then
|
|
27
27
|
RUNTIME_JSON="$(node dist/cli/index.js runtime env --mission "$MISSION" --json 2>/dev/null || true)"
|
|
28
28
|
fi
|
|
@@ -30,7 +30,7 @@ fi
|
|
|
30
30
|
if [ -z "$RUNTIME_JSON" ]; then
|
|
31
31
|
node -e '
|
|
32
32
|
process.stdout.write(JSON.stringify({
|
|
33
|
-
additional_context: "GXT:
|
|
33
|
+
additional_context: "GXT: gantry not built — run npm ci && npm run build, then scripts/gxt-pin-mission.sh <mission>",
|
|
34
34
|
}));
|
|
35
35
|
'
|
|
36
36
|
exit 0
|
|
@@ -58,7 +58,7 @@ process.stdout.write(JSON.stringify({
|
|
|
58
58
|
`- Forbidden: ${forbidden.join(", ") || "(none)"}`,
|
|
59
59
|
`- Trace sink: ${payload.GXT_WORKER_LOG || "WORKER_LOG.md"}`,
|
|
60
60
|
"",
|
|
61
|
-
"Worker loop: edit within TMVC → append PASS quotes to WORKER_LOG.md →
|
|
61
|
+
"Worker loop: edit within TMVC → append PASS quotes to WORKER_LOG.md → gantry verify --mission … → npm run validate",
|
|
62
62
|
"MCP tools: gxt_draft_legislation, gxt_execute_legislation, gxt_check_signature, gxt_pin_mission, gxt_runtime_env, gxt_verify (see .cursor/mcp.json).",
|
|
63
63
|
"IDE Agent edits are advisory TMVC; shell substrate writes are hook-guarded. Full loop: docs/DEVELOPMENT.md",
|
|
64
64
|
].join("\n"),
|
|
@@ -11,7 +11,7 @@ Whenever the user starts a prompt with `/gantry`:
|
|
|
11
11
|
|
|
12
12
|
1. Immediately switch to Mission Architect behavior.
|
|
13
13
|
2. Run the protocol in `.gitagent/teacher/MISSION-ARCHITECT.md`.
|
|
14
|
-
3. Hand off via MCP tools (`gxt_draft_legislation` → chat approval → `gxt_execute_legislation`) or CLI `
|
|
14
|
+
3. Hand off via MCP tools (`gxt_draft_legislation` → chat approval → `gxt_execute_legislation`) or CLI `gantry legislate` fallback.
|
|
15
15
|
|
|
16
16
|
Do not use `/plan` — Cursor reserves it for native Plan Mode.
|
|
17
17
|
|
|
@@ -28,13 +28,13 @@ Treat these as the **law + routing contract** for agent work. For orientation an
|
|
|
28
28
|
|
|
29
29
|
- **Do NOT** trigger for questions, explanations, or code discovery.
|
|
30
30
|
- **MCP handoff:** two-step draft/execute with semantic chat approval before any mission file write.
|
|
31
|
-
- **CLI fallback:** one copy-paste `
|
|
31
|
+
- **CLI fallback:** one copy-paste `gantry legislate …` command only (no raw YAML blocks).
|
|
32
32
|
|
|
33
33
|
## Cursor wiring
|
|
34
34
|
|
|
35
35
|
- **Rules:** this file (`alwaysApply: true`) + root `AGENTS.md`.
|
|
36
|
-
- **MCP:** `.cursor/mcp.json` — `gxt_*` tools via `
|
|
37
|
-
- **Hooks:** `.cursor/hooks.json` (installed by `
|
|
36
|
+
- **MCP:** `.cursor/mcp.json` — `gxt_*` tools via `gantry mcp serve`.
|
|
37
|
+
- **Hooks:** `.cursor/hooks.json` (installed by `gantry init`) — `sessionStart` mission scope + shell guard for GXT law/manifest paths (fallback for non-MCP shell paths).
|
|
38
38
|
- **Pin mission:** `scripts/gxt-pin-mission.sh .gitagent/missions/<file>.yaml` before Agent work.
|
|
39
39
|
- **Terminal bootstrap:** `source scripts/gxt-runtime-env.sh` (uses pinned mission or explicit path).
|
|
40
40
|
- **Code architecture:** `.gitagent/ARCHITECTURE.pointer.json` — if `kind=unset` or stub, read `.gitagent/teacher/ARCHITECTURE-DISCOVERY.md` and ask user before coding.
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"tmvc_roots": ["src/lib/", "src/utils/"],
|
|
14
14
|
"forbidden_zones": [".gitagent/", "src/auth/", "src/core/", "src/db/schema/"]
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
"desc": "
|
|
16
|
+
"gantry": {
|
|
17
|
+
"desc": "gantry CLI delivery, lib layers, and unit tests (OpenGantry specimen).",
|
|
18
18
|
"trust_threshold": "Tier-2",
|
|
19
19
|
"tmvc_roots": ["src/cli/"],
|
|
20
20
|
"forbidden_zones": [".gitagent/foreman/", ".gitagent/teacher/RULES.md"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# One Git author email per line (case-insensitive). Committed team allowlist.
|
|
2
2
|
# Personal override (gitignored): .gitagent/foreman/TEACHER.allowlist.local
|
|
3
|
-
# Or: git config
|
|
3
|
+
# Or: git config gantry.teacherEmails "you@example.com"
|
|
4
4
|
teacher@example.com
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Missions
|
|
2
2
|
|
|
3
|
-
Store mission files here (`.md` or `.yaml`) for `
|
|
3
|
+
Store mission files here (`.md` or `.yaml`) for `gantry verify`.
|
|
4
4
|
|
|
5
5
|
Quick start:
|
|
6
6
|
|
|
7
7
|
1. Configure `.gitagent/foreman/MANIFEST.json` skill keys and roots.
|
|
8
|
-
2. Set `
|
|
8
|
+
2. Set `GANTRY_TEACHER_EMAILS`.
|
|
9
9
|
3. Legislate with explicit id:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
gantry legislate "<intent>" --msn MSN-0001 --skill-key <manifest-key> [--gate-command "<cmd>"]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Duplicate `msn_id` values fail closed by default; use `--allow-duplicate` only for intentional migration flows. New stubs emit `status: PENDING` trace rows until worker execution.
|
|
@@ -22,7 +22,7 @@ Check in order:
|
|
|
22
22
|
|
|
23
23
|
1. **MCP / IDE integrations** — list configured MCP servers and tools; match `access.detect` and `access.tool`.
|
|
24
24
|
2. **Environment** — env vars suggested by `access.detect` or `auth_hint` (never print values).
|
|
25
|
-
3. **Stored credentials** — run `
|
|
25
|
+
3. **Stored credentials** — run `gantry arch cred status` (or `--slot <credential_slot>`). Status shows slot + kind only, never secrets.
|
|
26
26
|
4. **User docs** — project README / human INTEGRATIONS doc for team setup (not duplicated here).
|
|
27
27
|
|
|
28
28
|
If a path already works, record in `WORKER_LOG.md` which method you used (not the secret) and fetch architecture docs.
|
|
@@ -33,28 +33,28 @@ Ask **one focused question at a time**:
|
|
|
33
33
|
|
|
34
34
|
- Which system hosts architecture docs? (confirm or override `access.tool`)
|
|
35
35
|
- How does your team authenticate? (PAT, API key, OAuth device flow, MCP already configured, …)
|
|
36
|
-
- Whether you may store a credential locally via `
|
|
36
|
+
- Whether you may store a credential locally via `gantry arch cred set` (git-ignored, mode 600)
|
|
37
37
|
|
|
38
38
|
**Never** ask the user to paste tokens into chat, commits, or `WORKER_LOG.md`.
|
|
39
39
|
|
|
40
40
|
## 4. Store credentials securely
|
|
41
41
|
|
|
42
|
-
Use **`
|
|
42
|
+
Use **`gantry arch cred set`** — secrets on **stdin only**, never argv:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
# Bearer / PAT
|
|
46
|
-
printf '%s' 'YOUR_TOKEN' |
|
|
46
|
+
printf '%s' 'YOUR_TOKEN' | gantry arch cred set --slot architecture/confluence --kind bearer
|
|
47
47
|
|
|
48
48
|
# API key
|
|
49
|
-
printf '%s' 'YOUR_KEY' |
|
|
49
|
+
printf '%s' 'YOUR_KEY' | gantry arch cred set --slot architecture/notion --kind api_key
|
|
50
50
|
|
|
51
51
|
# Basic auth (JSON on stdin)
|
|
52
|
-
printf '%s' '{"username":"you@corp.com","password":"…"}' |
|
|
52
|
+
printf '%s' '{"username":"you@corp.com","password":"…"}' | gantry arch cred set --slot architecture/wiki --kind basic
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Files live under **`.gitagent/history/credentials/`** (git-ignored). Verify with `
|
|
55
|
+
Files live under **`.gitagent/history/credentials/`** (git-ignored). Verify with `gantry arch cred status`.
|
|
56
56
|
|
|
57
|
-
To remove: `
|
|
57
|
+
To remove: `gantry arch cred unset --slot <name>`.
|
|
58
58
|
|
|
59
59
|
## 5. Context request (GXT)
|
|
60
60
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# KPI-REPORT.schema — JSON Schema for committed LLM/scan evidence reports
|
|
2
|
-
# Consumed by
|
|
2
|
+
# Consumed by gantry verify kpi phase (Ajv). Version label for docs only.
|
|
3
3
|
$schema: https://json-schema.org/draft/2020-12/schema
|
|
4
4
|
$id: https://opengantry.local/schemas/kpi-report.v2_0.json
|
|
5
5
|
title: OpenGantryKpiReport
|
|
@@ -26,7 +26,7 @@ Before proposing legislation, read (do not lecture the user):
|
|
|
26
26
|
- `.gitagent/ARCHITECTURE.pointer.json` — code layout (if `kind=unset`, follow ARCHITECTURE-DISCOVERY.md and ask)
|
|
27
27
|
- Optional: `.gitagent/out-of-scope/` ADRs when scope is ambiguous
|
|
28
28
|
|
|
29
|
-
**Do not** run `
|
|
29
|
+
**Do not** run `gantry triage` in chat. Reason from manifest + architecture directly.
|
|
30
30
|
|
|
31
31
|
## Fast-path vs full interview
|
|
32
32
|
|
|
@@ -70,7 +70,7 @@ This two-step draft/execute gate prevents silent legislation even when Cursor ru
|
|
|
70
70
|
One bash command the user copies into their terminal:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
|
|
73
|
+
gantry legislate "<intent summary>" --msn MSN-NNNN --skill-key <key> \
|
|
74
74
|
--gate-command "<deterministic gate shell command>" \
|
|
75
75
|
--gate-success-substring "<optional substring>"
|
|
76
76
|
```
|
|
@@ -82,12 +82,12 @@ gapman legislate "<intent summary>" --msn MSN-NNNN --skill-key <key> \
|
|
|
82
82
|
|
|
83
83
|
## Teacher loop (human)
|
|
84
84
|
|
|
85
|
-
1. Approve draft (MCP) or paste and run `
|
|
85
|
+
1. Approve draft (MCP) or paste and run `gantry legislate` (CLI).
|
|
86
86
|
2. Optionally review/edit the generated YAML.
|
|
87
|
-
3. `git commit -m "[MSN-NNNN] legislate …"` including the mission file (Teacher email in `
|
|
87
|
+
3. `git commit -m "[MSN-NNNN] legislate …"` including the mission file (Teacher email in `GANTRY_TEACHER_EMAILS`).
|
|
88
88
|
4. Pin mission (`gxt_pin_mission` MCP tool or `scripts/gxt-pin-mission.sh`).
|
|
89
89
|
5. Worker phase begins.
|
|
90
90
|
|
|
91
91
|
## Worker phase (after pin)
|
|
92
92
|
|
|
93
|
-
Edit within TMVC → append PASS quotes to `WORKER_LOG.md` → `
|
|
93
|
+
Edit within TMVC → append PASS quotes to `WORKER_LOG.md` → `gantry verify --mission …` (or `gxt_verify`) → pin stays until mission complete.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# MISSION.schema — JSON Schema (YAML encoding) for structured missions
|
|
2
|
-
# Consumed by
|
|
2
|
+
# Consumed by gantry (Ajv). Version label for docs only.
|
|
3
3
|
$schema: https://json-schema.org/draft/2020-12/schema
|
|
4
4
|
$id: https://opengantry.local/schemas/mission.v1_1.json
|
|
5
5
|
title: OpenGantryMission
|
|
@@ -31,7 +31,7 @@ properties:
|
|
|
31
31
|
type: boolean
|
|
32
32
|
default: false
|
|
33
33
|
description: >-
|
|
34
|
-
When true,
|
|
34
|
+
When true, gantry verify captures gate stdout/stderr under
|
|
35
35
|
.gitagent/virtual/<flight-id>/ (gitignored) and purges on success.
|
|
36
36
|
upgrade_payload:
|
|
37
37
|
type: object
|
|
@@ -27,10 +27,10 @@ Normative keywords **MUST**, **MUST NOT**, and **SHOULD** follow RFC 2119.
|
|
|
27
27
|
## 5. Mission commit indexing
|
|
28
28
|
|
|
29
29
|
- Mission-related commits MUST begin with `[MSN-XXXX]` in the subject line.
|
|
30
|
-
- Keep mission files for `
|
|
30
|
+
- Keep mission files for `gantry verify` under `.gitagent/missions/`.
|
|
31
31
|
|
|
32
32
|
## 6. Break-glass (v0.8.0)
|
|
33
33
|
|
|
34
34
|
- Set `GXT_BYPASS_SECRET` to match `.gitagent/foreman/BYPASS.sha256` (SHA-256 hex of the team secret).
|
|
35
|
-
- Use `
|
|
35
|
+
- Use `gantry verify --break-glass --reason "..."` only in emergencies; push `refs/notes/gxt-bypass` with the branch.
|
|
36
36
|
- Forbidden-zone runtime policy is never bypassed.
|
|
@@ -6,10 +6,10 @@ cd "$(git rev-parse --show-toplevel)"
|
|
|
6
6
|
|
|
7
7
|
if [[ -f dist/cli/index.js ]]; then
|
|
8
8
|
GAPMAN=(node dist/cli/index.js)
|
|
9
|
-
elif command -v
|
|
10
|
-
GAPMAN=(
|
|
9
|
+
elif command -v gantry >/dev/null 2>&1; then
|
|
10
|
+
GAPMAN=(gantry)
|
|
11
11
|
else
|
|
12
|
-
echo "pre-commit:
|
|
12
|
+
echo "pre-commit: gantry not found — run: npm run build" >&2
|
|
13
13
|
exit 1
|
|
14
14
|
fi
|
|
15
15
|
|
|
@@ -21,6 +21,6 @@ else
|
|
|
21
21
|
exit 0
|
|
22
22
|
fi
|
|
23
23
|
|
|
24
|
-
echo "pre-commit:
|
|
24
|
+
echo "pre-commit: gantry tmvc guard --mission ${mission} (advisory default)" >&2
|
|
25
25
|
"${GAPMAN[@]}" tmvc guard --mission "$mission"
|
|
26
26
|
exit 0
|
|
@@ -6,10 +6,10 @@ cd "$(git rev-parse --show-toplevel)"
|
|
|
6
6
|
|
|
7
7
|
if [[ -f dist/cli/index.js ]]; then
|
|
8
8
|
GAPMAN=(node dist/cli/index.js)
|
|
9
|
-
elif command -v
|
|
10
|
-
GAPMAN=(
|
|
9
|
+
elif command -v gantry >/dev/null 2>&1; then
|
|
10
|
+
GAPMAN=(gantry)
|
|
11
11
|
else
|
|
12
|
-
echo "pre-push:
|
|
12
|
+
echo "pre-push: gantry not found — run: npm run build" >&2
|
|
13
13
|
exit 1
|
|
14
14
|
fi
|
|
15
15
|
|
|
@@ -34,17 +34,17 @@ mapfile -t missions < <(
|
|
|
34
34
|
for mission in "${missions[@]}"; do
|
|
35
35
|
[[ -n "$mission" ]] || continue
|
|
36
36
|
[[ -f "$mission" ]] || continue
|
|
37
|
-
echo "pre-push:
|
|
37
|
+
echo "pre-push: gantry verify --mission ${mission} (--pre-push)" >&2
|
|
38
38
|
"${GAPMAN[@]}" verify --mission "$mission" --pre-push || exit 1
|
|
39
39
|
done
|
|
40
40
|
|
|
41
41
|
if git diff --name-only "${base}..HEAD" | grep -qE '^\.gitagent/foreman/MANIFEST\.json$|^\.gitagent/teacher/RULES\.md$|\.gxt-skill\.yaml$'; then
|
|
42
|
-
echo "pre-push:
|
|
42
|
+
echo "pre-push: gantry perimeter (advisory)" >&2
|
|
43
43
|
"${GAPMAN[@]}" perimeter --base-ref "$base" || true
|
|
44
44
|
fi
|
|
45
45
|
|
|
46
46
|
if git diff --name-only "${base}..HEAD" | grep -qE '^\.gitagent/foreman/MANIFEST\.json$|^skills/'; then
|
|
47
|
-
echo "pre-push:
|
|
47
|
+
echo "pre-push: gantry check (manifest / skills changed)" >&2
|
|
48
48
|
"${GAPMAN[@]}" check || exit 1
|
|
49
49
|
fi
|
|
50
50
|
|
|
@@ -49,22 +49,22 @@ jobs:
|
|
|
49
49
|
- name: Install Node deps
|
|
50
50
|
run: npm ci
|
|
51
51
|
|
|
52
|
-
- name: Build
|
|
52
|
+
- name: Build gantry
|
|
53
53
|
run: npm run build
|
|
54
54
|
|
|
55
|
-
- name:
|
|
55
|
+
- name: gantry check (MANIFEST + Rule 4.4 skills sync)
|
|
56
56
|
run: node dist/cli/index.js check
|
|
57
57
|
|
|
58
58
|
- name: Validate Foreman MANIFEST.json (Node parity)
|
|
59
59
|
run: ./scripts/validate-gxt.sh manifest
|
|
60
60
|
|
|
61
|
-
- name:
|
|
61
|
+
- name: gantry unit tests
|
|
62
62
|
run: node --test dist/cli/tests/*.test.js
|
|
63
63
|
|
|
64
|
-
- name:
|
|
64
|
+
- name: gantry doctor (readiness)
|
|
65
65
|
run: node dist/cli/index.js doctor
|
|
66
66
|
|
|
67
|
-
- name:
|
|
67
|
+
- name: gantry perimeter (CI signature enforcement)
|
|
68
68
|
if: github.event_name == 'pull_request'
|
|
69
69
|
env:
|
|
70
70
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
@@ -88,7 +88,7 @@ jobs:
|
|
|
88
88
|
- name: Install Node deps
|
|
89
89
|
run: npm ci
|
|
90
90
|
|
|
91
|
-
- name: Build
|
|
91
|
+
- name: Build gantry
|
|
92
92
|
run: npm run build
|
|
93
93
|
|
|
94
94
|
- name: Changed-code quality gates (complexity + import layers)
|
|
@@ -150,7 +150,7 @@ jobs:
|
|
|
150
150
|
- name: Install Node deps
|
|
151
151
|
run: npm ci
|
|
152
152
|
|
|
153
|
-
- name: Build
|
|
153
|
+
- name: Build gantry
|
|
154
154
|
run: npm run build
|
|
155
155
|
|
|
156
156
|
- name: Full verify on PR-changed missions
|
package/templates/AGENTS.md
CHANGED
|
@@ -21,7 +21,7 @@ When the user **explicitly** asks to write, edit, refactor, or implement code an
|
|
|
21
21
|
- **Do NOT** trigger for questions, explanations, or code discovery — answer normally.
|
|
22
22
|
- **Fast-path** trivial single-file work; **full interview** for heavy/risky scope.
|
|
23
23
|
- **Cursor MCP handoff (preferred):** `gxt_draft_legislation` → human chat approval → `gxt_execute_legislation` → Teacher commit → `gxt_check_signature` → `gxt_pin_mission`.
|
|
24
|
-
- **CLI fallback:** one copy-paste `
|
|
24
|
+
- **CLI fallback:** one copy-paste `gantry legislate …` command — never raw YAML blocks.
|
|
25
25
|
|
|
26
26
|
## External IDE skills (edge quarantine)
|
|
27
27
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
{ "targetPath": "scripts/gxt-shell-agent.sh", "mode": "managed_strict", "executable": true, "tags": ["runtime", "claude-code", "codex-cli", "opencode"] },
|
|
41
41
|
{ "targetPath": "scripts/validate-gxt.sh", "mode": "managed_strict", "executable": true, "tags": ["core"] },
|
|
42
42
|
{ "targetPath": "scripts/verify-pr-missions.sh", "mode": "managed_strict", "executable": true, "tags": ["ci"] },
|
|
43
|
-
{ "targetPath": "skills/
|
|
43
|
+
{ "targetPath": "skills/gantry.md", "mode": "scaffold_only", "tags": ["skill-specimen"] },
|
|
44
44
|
{ "targetPath": "skills/logic.md", "mode": "scaffold_only", "tags": ["skill-minimal", "skill-specimen"] },
|
|
45
45
|
{ "targetPath": "skills/substrate.md", "mode": "scaffold_only", "tags": ["skill-specimen"] },
|
|
46
46
|
{ "targetPath": "skills/ui.md", "mode": "scaffold_only", "tags": ["skill-minimal", "skill-specimen"] }
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Closed-loop checklist
|
|
4
4
|
|
|
5
|
-
1. `
|
|
6
|
-
2. `
|
|
5
|
+
1. `gantry init` + `export GANTRY_TEACHER_EMAILS="$(git config user.email)"` + `gantry doctor`
|
|
6
|
+
2. `gantry legislate "<intent>" --msn MSN-NNNN --skill-key <key>` → Teacher `[MSN-NNNN]` commit
|
|
7
7
|
3. Bootstrap: `source scripts/gxt-runtime-env.sh .gitagent/missions/<file>.yaml`
|
|
8
8
|
4. Worker executes; append PASS quotes to `WORKER_LOG.md`
|
|
9
|
-
5. `
|
|
9
|
+
5. `gantry verify --mission .gitagent/missions/<file>.yaml`
|
|
10
10
|
6. `git push` (pre-push uses `--pre-push` handoff semantics)
|
|
11
11
|
|
|
12
12
|
## External IDE skills
|
|
@@ -17,8 +17,8 @@ Optional third-party skill packs belong on the **local IDE edge** (gitignored),
|
|
|
17
17
|
|
|
18
18
|
| Symptom | Fix |
|
|
19
19
|
|---------|-----|
|
|
20
|
-
| `NO_MSN_COMMITS` on push | Teacher `[MSN-NNNN]` commit modifying the mission file; set `
|
|
20
|
+
| `NO_MSN_COMMITS` on push | Teacher `[MSN-NNNN]` commit modifying the mission file; set `GANTRY_TEACHER_EMAILS` |
|
|
21
21
|
| Pre-push OK, full verify fails trace | Fill `WORKER_LOG.md`; align `trace_rows`; re-run full verify |
|
|
22
|
-
| `TEACHER_IDENTITY_UNCONFIGURED` | `export
|
|
22
|
+
| `TEACHER_IDENTITY_UNCONFIGURED` | `export GANTRY_TEACHER_EMAILS="$(git config user.email)"` |
|
|
23
23
|
|
|
24
|
-
Integration compat verified by OpenGantry release — run `
|
|
24
|
+
Integration compat verified by OpenGantry release — run `gantry doctor` for detected wiring and stale paths.
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# Agent Integrations (GXT wrapper)
|
|
2
2
|
|
|
3
|
-
OpenGantry is **tool-agnostic
|
|
3
|
+
OpenGantry is **tool-agnostic** and **vendor-neutral** — any agent that can run shell commands can participate in the GXT loop. Governance is **local-first**: missions, gates, and **Gantry Git hook** enforcement run in your repository, not through a hosted agent dashboard.
|
|
4
4
|
|
|
5
5
|
## Universal rule
|
|
6
6
|
|
|
7
|
-
1. Teacher legislates a mission under `.gitagent/missions/` (IDE chat: [`.gitagent/teacher/MISSION-ARCHITECT.md`](.gitagent/teacher/MISSION-ARCHITECT.md) — one copy-paste `
|
|
7
|
+
1. Teacher legislates a mission under `.gitagent/missions/` (IDE chat: [`.gitagent/teacher/MISSION-ARCHITECT.md`](.gitagent/teacher/MISSION-ARCHITECT.md) — one copy-paste `gantry legislate` command).
|
|
8
8
|
2. Bootstrap mission-scoped runtime env before worker execution.
|
|
9
9
|
3. Append trace evidence to `WORKER_LOG.md`.
|
|
10
|
-
4. Finish with `
|
|
10
|
+
4. Finish with `gantry verify --mission <path>` (full verify before merge / claiming done).
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
gantry runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- <your-agent-command>
|
|
14
14
|
source scripts/gxt-runtime-env.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
15
|
-
|
|
15
|
+
gantry runtime env --mission .gitagent/missions/MSN-0001.<slug>.yaml --json
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Enforcement boundary
|
|
19
19
|
|
|
20
20
|
| Tier | Mechanism | What it actually traps |
|
|
21
21
|
|------|-----------|------------------------|
|
|
22
|
-
| **Process-boundary** | `
|
|
22
|
+
| **Process-boundary** | `gantry runtime exec` | TMVC roots + forbidden zones for subprocess workers |
|
|
23
23
|
| **Deterministic hook** | Tool hooks (Cursor `beforeShellExecution` on law/manifest paths) | Shell writes to `.gitagent/foreman/`, `.gitagent/teacher/RULES.md` |
|
|
24
24
|
| **Advisory** | Rules / `AGENTS.md` / tool memory | IDE Agent Write/Edit — LLM compliance, not kernel enforcement |
|
|
25
25
|
|
|
@@ -37,9 +37,9 @@ IDE agent file edits are not TMVC-trapped unless the tool runs inside `runtime e
|
|
|
37
37
|
|
|
38
38
|
| Variable | Purpose |
|
|
39
39
|
|----------|---------|
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `GXT_*` | Emitted by `
|
|
40
|
+
| `GANTRY_TEACHER_EMAILS` | Comma-separated Git author emails allowed to legislate |
|
|
41
|
+
| `GANTRY_MISSION` | Optional mission path for `gxt-runtime-env.sh` |
|
|
42
|
+
| `GXT_*` | Emitted by `gantry runtime env` |
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- **Session bootstrap:**
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
|
|
7
|
+
gantry runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- aider --message "<task>"
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
- **Enforcement:** Process-boundary when wrapped — strongest TMVC trap among IDE-adjacent tools.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
### Google Antigravity
|
|
2
2
|
|
|
3
3
|
- **Context injection:** Root `AGENTS.md`; `.agent/rules/gxt.md` with `always_on` pointing at canonical files.
|
|
4
|
-
- **Session bootstrap:** `source scripts/gxt-runtime-env.sh <mission>` or `
|
|
4
|
+
- **Session bootstrap:** `source scripts/gxt-runtime-env.sh <mission>` or `gantry runtime exec … -- <command>`.
|
|
5
5
|
- **Enforcement:** Advisory for Editor/Manager views; process-boundary for wrapped CLI runs.
|
|
6
6
|
- **Gotcha:** Rules load order includes `GEMINI.md` → `AGENTS.md` → `.agent/rules/` — keep GXT pointers in `AGENTS.md`.
|
|
7
7
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
scripts/gxt-pin-mission.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
8
8
|
scripts/gxt-shell-agent.sh claude .gitagent/missions/MSN-0001.<slug>.yaml
|
|
9
9
|
# or with explicit task:
|
|
10
|
-
|
|
10
|
+
gantry runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- claude "<task>"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
- **Enforcement:** Advisory in interactive session; process-boundary when wrapped with `runtime exec` or `gxt-shell-agent.sh`.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
> **Not** the deprecated OpenAI Codex API (2021–2023). This covers [OpenAI Codex CLI](https://github.com/openai/codex) (2025+ terminal/IDE agent).
|
|
4
4
|
|
|
5
|
-
- **Context injection:** Root `AGENTS.md` (native after `
|
|
5
|
+
- **Context injection:** Root `AGENTS.md` (native after `gantry init`); optional `.codex/config.toml` for project defaults.
|
|
6
6
|
- **Session bootstrap (shell wrapper — no project hooks):**
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
scripts/gxt-pin-mission.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
10
10
|
scripts/gxt-shell-agent.sh codex .gitagent/missions/MSN-0001.<slug>.yaml
|
|
11
11
|
# or headless:
|
|
12
|
-
|
|
12
|
+
gantry runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- codex exec "<task>"
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
- **Enforcement:** Advisory in interactive TUI/IDE extension; process-boundary when wrapped with `runtime exec` or `gxt-shell-agent.sh`.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
### Cursor
|
|
2
2
|
|
|
3
|
-
- **Context injection:** `.cursor/rules/opengantry-gxt-substrate.mdc` (`alwaysApply: true`); `.cursor/hooks.json` — `sessionStart` mission scope + `beforeShellExecution` fallback guard; `.cursor/mcp.json` — `
|
|
3
|
+
- **Context injection:** `.cursor/rules/opengantry-gxt-substrate.mdc` (`alwaysApply: true`); `.cursor/hooks.json` — `sessionStart` mission scope + `beforeShellExecution` fallback guard; `.cursor/mcp.json` — `gantry mcp serve`.
|
|
4
4
|
- **Mission Architect:** `/gantry` macro (do not use `/plan` — Cursor native Plan Mode); implicit activation when user asks to **write/edit code** with no pinned mission. Follow `.gitagent/teacher/MISSION-ARCHITECT.md`.
|
|
5
5
|
- **MCP legislation:** `gxt_draft_legislation` → semantic chat approval → `gxt_execute_legislation` → Teacher commit → `gxt_check_signature` → `gxt_pin_mission`. Or **`gxt_start_orchestration`** for goal-first CLI parity.
|
|
6
|
-
- **Verify remediation:** `gxt_verify` returns `error_code`, `fix_hints`, `next_actions` on failure; CLI equivalent: `
|
|
6
|
+
- **Verify remediation:** `gxt_verify` returns `error_code`, `fix_hints`, `next_actions` on failure; CLI equivalent: `gantry verify --mission … --fix`.
|
|
7
7
|
- **Session bootstrap:**
|
|
8
8
|
|
|
9
9
|
```bash
|
|
@@ -14,6 +14,6 @@ source scripts/gxt-runtime-env.sh
|
|
|
14
14
|
- **Enforcement:** Advisory for Agent edits; MCP two-step gate for legislation; shell hook fallback for non-MCP paths; use `runtime exec` for headless CLI/SDK runs.
|
|
15
15
|
- **Gotcha:** Enable hooks **and** MCP in Cursor Settings; restart if they do not load (**Output → Hooks**).
|
|
16
16
|
|
|
17
|
-
Headless: `
|
|
17
|
+
Headless: `gantry runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- cursor agent "<task>"`
|
|
18
18
|
|
|
19
19
|
Vendor docs: https://cursor.com/docs/agent/hooks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# OpenGantry dogfood: run the full local GXT +
|
|
2
|
+
# OpenGantry dogfood: run the full local GXT + gantry stack before push/PR.
|
|
3
3
|
# Usage: ./scripts/dev-validate.sh [base-ref] [head-ref]
|
|
4
4
|
# base-ref defaults to origin/main (falls back to HEAD~1)
|
|
5
5
|
# head-ref defaults to HEAD
|
|
@@ -15,17 +15,17 @@ if ! MISSION="$(scripts/gxt-resolve-mission.sh "${1:-}" 2>/dev/null)"; then
|
|
|
15
15
|
gxt-runtime-env: no mission file resolved.
|
|
16
16
|
scripts/gxt-pin-mission.sh .gitagent/missions/<file>.yaml
|
|
17
17
|
source scripts/gxt-runtime-env.sh .gitagent/missions/<file>.yaml
|
|
18
|
-
export
|
|
18
|
+
export GANTRY_MISSION=.gitagent/missions/<file>.yaml
|
|
19
19
|
EOF
|
|
20
20
|
exit 1
|
|
21
21
|
fi
|
|
22
22
|
|
|
23
|
-
if command -v
|
|
24
|
-
eval "$(
|
|
23
|
+
if command -v gantry >/dev/null 2>&1; then
|
|
24
|
+
eval "$(gantry runtime env --mission "$MISSION")"
|
|
25
25
|
elif [ -f "dist/cli/index.js" ]; then
|
|
26
26
|
eval "$(node dist/cli/index.js runtime env --mission "$MISSION")"
|
|
27
27
|
else
|
|
28
|
-
echo "gxt-runtime-env:
|
|
28
|
+
echo "gxt-runtime-env: gantry not found (npm ci && npm run build)" >&2
|
|
29
29
|
exit 1
|
|
30
30
|
fi
|
|
31
31
|
|
|
@@ -126,7 +126,7 @@ cmd_msn() {
|
|
|
126
126
|
fi
|
|
127
127
|
echo "MSN check FAILED: commit $commit touches MSN-enforced paths but subject does not start with [MSN-NNNN] and has no gxt-bypass git note" >&2
|
|
128
128
|
echo " subject: $subject" >&2
|
|
129
|
-
echo " hint: run
|
|
129
|
+
echo " hint: run gantry verify --break-glass --reason \"...\" with GXT_BYPASS_SECRET, push refs/notes/gxt-bypass" >&2
|
|
130
130
|
echo " touched paths (sample):" >&2
|
|
131
131
|
git diff-tree --no-commit-id --name-only -r "$commit" | head -20 >&2
|
|
132
132
|
exit 1
|