@extreme-go-horse/xgh 2.0.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.
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "ipedro",
3
+ "owner": {
4
+ "name": "Pedro Alves",
5
+ "email": "ipedro@users.noreply.github.com"
6
+ },
7
+ "metadata": {
8
+ "description": "xgh — AI Team Memory and context tools",
9
+ "version": "1.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "xgh",
14
+ "source": {
15
+ "source": "url",
16
+ "url": "https://github.com/ipedro/xgh.git"
17
+ },
18
+ "description": "Persistent memory and team context for AI-assisted development",
19
+ "version": "1.0.0",
20
+ "strict": true
21
+ },
22
+ {
23
+ "name": "lossless-claude",
24
+ "source": {
25
+ "source": "url",
26
+ "url": "https://github.com/ipedro/lossless-claude.git"
27
+ },
28
+ "description": "Lossless context management — DAG-based summarization that preserves every message",
29
+ "version": "0.3.0"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "xgh",
3
+ "description": "The developer's cockpit — memory, compression, context efficiency, and dev methodology",
4
+ "version": "2.0.0",
5
+ "author": {
6
+ "name": "Pedro Almeida",
7
+ "email": "ipedro@users.noreply.github.com"
8
+ },
9
+ "homepage": "https://github.com/ipedro/xgh",
10
+ "repository": "https://github.com/ipedro/xgh",
11
+ "license": "MIT",
12
+ "keywords": ["memory", "context", "workflow", "cockpit", "devtools"]
13
+ }
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ # xgh — Declarative AI Ops
2
+
3
+ **Declare your agent behavior in YAML. Converge every AI platform to match.**
4
+
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+ [![Status](https://img.shields.io/badge/status-initial%20release-brightgreen)](#implementation-status)
7
+
8
+ ---
9
+
10
+ The same way Terraform lets you declare infrastructure and converge reality to match, xgh lets you declare AI agent behavior and converge every platform to match.
11
+
12
+ ```yaml
13
+ # config/project.yaml — your variables.tf
14
+ preferences:
15
+ pair_programming:
16
+ enabled: true
17
+ tool: "xgh:codex"
18
+ effort: high
19
+ superpowers:
20
+ implementation_model: sonnet
21
+ review_model: opus
22
+ ```
23
+
24
+ ```bash
25
+ /xgh-seed # terraform apply — pushes state to Codex, Gemini, OpenCode
26
+ /xgh-brief # what needs attention right now
27
+ /xgh-init # first-time setup
28
+ ```
29
+
30
+ ## The Stack
31
+
32
+ | Layer | Role | xgh equivalent |
33
+ |-------|------|----------------|
34
+ | `config/project.yaml` | workspace variables | `variables.tf` |
35
+ | `config/agents.yaml` | platform registry | `providers.tf` |
36
+ | `config/triggers.yaml` | event sources | event bridge rules |
37
+ | `preferences:` block | workspace defaults | workspace vars |
38
+ | `/xgh-seed` | converge platforms to config | `terraform apply` |
39
+ | `AGENTS.md` | rendered view of current config | plan output |
40
+ | `.xgh/context-tree/` | persistent knowledge base | state + history |
41
+
42
+ The hard problem — as always — is **drift**. Platform skill files go stale, AGENTS.md gets hand-edited, hooks fail silently. xgh solves this the same way Terraform does: one source of truth, derived outputs, explicit apply.
43
+
44
+ ## What it wires together
45
+
46
+ | What you need | What does it |
47
+ |---------------|-------------|
48
+ | Persistent memory across sessions | [lossless-claude](https://github.com/ipedro/lossless-claude) — SQLite + FTS5 |
49
+ | Context tree search | BM25/TF-IDF over `.xgh/context-tree/` |
50
+ | Multi-platform dispatch | Codex CLI, Gemini CLI, OpenCode — all driven from one config |
51
+ | Session-start injection | Top knowledge files injected automatically at session start |
52
+ | Dev methodology | [superpowers](https://github.com/obra/superpowers) — optional plugin |
53
+
54
+ ## Commands
55
+
56
+ | Command | What it does |
57
+ |---------|-------------|
58
+ | `/xgh-init` | First-run setup — verify connections, seed config, generate AGENTS.md |
59
+ | `/xgh-seed` | Push project context to all detected AI platforms |
60
+ | `/xgh-brief` | Session briefing — Slack, Jira, GitHub, what needs attention now |
61
+ | `/xgh-ask` | Search memory and context tree |
62
+ | `/xgh-implement` | Ticket to working code — full context gathering first |
63
+ | `/xgh-investigate` | Systematic debugging from a bug report |
64
+ | `/xgh-doctor` | Validate pipeline health |
65
+ | `/xgh-track` | Add a project to monitoring |
66
+ | `/xgh-analyze` | Classify inbox, extract memories, generate digest |
67
+ | `/xgh-retrieve` | Pull context from Slack, Jira, GitHub |
68
+
69
+ <details>
70
+ <summary><b>All commands</b></summary>
71
+
72
+ | Command | What it does |
73
+ |---------|-------------|
74
+ | `/xgh-setup` | Audit and configure MCP integrations |
75
+ | `/xgh-help` | Contextual guide and command reference |
76
+ | `/xgh-curate` | Store knowledge in memory and context tree |
77
+ | `/xgh-collab` | Multi-agent collaboration |
78
+ | `/xgh-codex` | Dispatch to Codex CLI |
79
+ | `/xgh-gemini` | Dispatch to Gemini CLI |
80
+ | `/xgh-opencode` | Dispatch to OpenCode |
81
+ | `/xgh-design` | Figma to implementation |
82
+ | `/xgh-index` | Index a codebase into memory |
83
+ | `/xgh-profile` | Engineer throughput analysis |
84
+ | `/xgh-schedule` | Manage background scheduler |
85
+ | `/xgh-trigger` | Manage trigger engine |
86
+ | `/xgh-calibrate` | Calibrate dedup threshold |
87
+ | `/xgh-status` | Memory stats and system health |
88
+ | `/xgh-command-center` | Cross-project triage and dispatch |
89
+
90
+ </details>
91
+
92
+ ## Install
93
+
94
+ ```bash
95
+ claude plugin install xgh@ipedro
96
+ /xgh-init
97
+ ```
98
+
99
+ Takes about 5 minutes. Sets up memory, hooks, profile, and seeds your first project.
100
+
101
+ <details>
102
+ <summary><b>Other platforms</b></summary>
103
+
104
+ xgh installs via Claude Code and then seeds instructions into every other platform automatically:
105
+
106
+ | Platform | File | Written by |
107
+ |----------|------|------------|
108
+ | All agents (canonical) | `AGENTS.md` | `/xgh-init` |
109
+ | Claude Code | `CLAUDE.md` | `/xgh-init` |
110
+ | Codex CLI | `.agents/skills/xgh/context.md` + `SKILL.md` | `/xgh-seed` |
111
+ | Gemini CLI | `.gemini/skills/xgh/context.md` + `SKILL.md` | `/xgh-seed` |
112
+ | OpenCode | `.opencode/skills/xgh/context.md` + `SKILL.md` | `/xgh-seed` |
113
+ | GitHub Copilot | `.github/copilot-instructions.md` | `/xgh-init` |
114
+
115
+ </details>
116
+
117
+ <details>
118
+ <summary><b>Uninstall</b></summary>
119
+
120
+ ```bash
121
+ claude plugin uninstall xgh
122
+ ```
123
+
124
+ </details>
125
+
126
+ ## Before / After
127
+
128
+ | Before | After |
129
+ |--------|-------|
130
+ | Agent forgets decisions between sessions | Conventions, decisions, and fixes recalled automatically |
131
+ | Re-explain project context every session | Top knowledge files injected at session start |
132
+ | Configure Codex, Gemini, OpenCode separately | One YAML, one `apply`, all platforms in sync |
133
+ | Drift between platforms | `/xgh-seed` converges everything to config |
134
+
135
+ All knowledge is stored as human-readable markdown in `.xgh/context-tree/` — reviewable in PRs, greppable in CI, readable without xgh.
136
+
137
+ <details>
138
+ <summary><b>Architecture</b></summary>
139
+
140
+ ### Config is code
141
+
142
+ ```
143
+ config/
144
+ project.yaml ← workspace identity + preferences (variables.tf)
145
+ agents.yaml ← platform registry: codex, gemini, opencode (providers.tf)
146
+ triggers.yaml ← event sources: PR opened, Jira assigned, digest ready
147
+ team.yaml ← conventions, iron laws, pitfalls
148
+ workflow.yaml ← phases, test commands, superpowers table
149
+ ```
150
+
151
+ All five files feed `scripts/gen-agents-md.sh`, which emits `AGENTS.md` — the human-readable plan output. Edit the YAML; regenerate the doc.
152
+
153
+ ### Runtime injection
154
+
155
+ At session start, `hooks/session-start.sh` injects top-ranked context tree entries into the system prompt. Skills read `config/project.yaml` at dispatch time for preferences. `/xgh-seed` writes snapshots to platform skill directories.
156
+
157
+ The YAML is the source of truth. AGENTS.md is a view. Platform skill files are derived artifacts.
158
+
159
+ ### Tech stack
160
+
161
+ | Layer | Technology |
162
+ |-------|-----------|
163
+ | Install & hooks | Bash (`set -euo pipefail`) |
164
+ | Config | YAML |
165
+ | Skills / commands / agents | Markdown (Claude Code format) |
166
+ | Context tree search | Python 3 (BM25/TF-IDF) |
167
+ | Persistent memory | lossless-claude (SQLite + FTS5) |
168
+ | Tests | Bash `assert_*` helpers |
169
+
170
+ </details>
171
+
172
+ <details>
173
+ <summary><b>Implementation Status</b></summary>
174
+
175
+ | Plan | Scope | Status |
176
+ |------|-------|--------|
177
+ | 1 — Foundation | Scaffold, installer | Done |
178
+ | 2 — Context Tree Engine | CRUD, BM25, scoring, sync | Done |
179
+ | 3 — Hooks & Core Skills | Session-start hooks, core skills | Done |
180
+ | 4 — Team Collaboration | Team skills, dispatcher agent | Done |
181
+ | 5 — Multi-Agent Bus | Agent registry, workflow templates | Done |
182
+ | 6 — Workflow Skills | investigate, design, implement | Done |
183
+ | 7 — Briefing | Session briefing | Done |
184
+ | 8 — Ollama / Linux | Cross-platform backend support | Done |
185
+ | 9 — Remote Backend | `XGH_BACKEND=remote` | Done |
186
+
187
+ </details>
188
+
189
+ ## Trust & Privacy
190
+
191
+ - **Nothing leaves your machine.** All memory and context stay local. No telemetry, no cloud sync.
192
+ - **Git-native knowledge.** Context tree is plain markdown in your repo — reviewable in PRs, greppable in CI.
193
+ - **Fully open source.** MIT licensed.
194
+
195
+ ## Contributing
196
+
197
+ 1. Read [`AGENTS.md`](AGENTS.md) for conventions
198
+ 2. Write a failing test first (`tests/`)
199
+ 3. Run tests: `bash tests/test-config.sh && bash tests/test-skills.sh && bash tests/test-commands.sh`
200
+ 4. Open a PR targeting `develop`
201
+
202
+ ## License
203
+
204
+ MIT — see [LICENSE](LICENSE).
205
+
206
+ ---
207
+
208
+ *Inspired by [Fastlane](https://fastlane.tools), [Terraform](https://terraform.io), and the [Superpowers methodology](https://www.claudesuperpowers.com).*
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@extreme-go-horse/xgh",
3
+ "version": "2.0.0",
4
+ "description": "The developer's cockpit — memory, compression, context efficiency, and dev methodology",
5
+ "keywords": [
6
+ "claude-code",
7
+ "claude-code-plugin",
8
+ "memory",
9
+ "context",
10
+ "workflow",
11
+ "cockpit",
12
+ "devtools",
13
+ "ai",
14
+ "llm"
15
+ ],
16
+ "author": {
17
+ "name": "Pedro Almeida",
18
+ "email": "ipedro@users.noreply.github.com"
19
+ },
20
+ "homepage": "https://github.com/ipedro/xgh",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/ipedro/xgh.git"
24
+ },
25
+ "license": "MIT",
26
+ "files": [
27
+ ".claude-plugin/"
28
+ ]
29
+ }