@monoes/monomindcli 2.9.7 → 2.9.8
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/.claude/agents/design/design-monodesign.md +1 -2
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-ai-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -1
- package/.claude/agents/engineering/engineering-backend-architect.md +1 -2
- package/.claude/agents/engineering/engineering-code-reviewer.md +1 -2
- package/.claude/agents/engineering/engineering-data-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-database-optimizer.md +1 -2
- package/.claude/agents/engineering/engineering-devops-automator.md +1 -2
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +1 -2
- package/.claude/agents/engineering/engineering-frontend-developer.md +1 -2
- package/.claude/agents/engineering/engineering-git-workflow-master.md +1 -2
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -1
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +1 -2
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +1 -2
- package/.claude/agents/engineering/engineering-security-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-senior-developer.md +1 -2
- package/.claude/agents/engineering/engineering-software-architect.md +1 -2
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-sre.md +0 -1
- package/.claude/agents/engineering/engineering-technical-writer.md +1 -2
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -1
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +1 -2
- package/.claude/agents/github/code-review-swarm.md +0 -1
- package/.claude/agents/github/github-modes.md +0 -1
- package/.claude/agents/github/issue-tracker.md +0 -1
- package/.claude/agents/github/multi-repo-swarm.md +0 -1
- package/.claude/agents/github/pr-manager.md +0 -1
- package/.claude/agents/github/project-board-sync.md +0 -1
- package/.claude/agents/github/release-manager.md +0 -1
- package/.claude/agents/github/repo-architect.md +0 -1
- package/.claude/agents/github/swarm-issue.md +0 -1
- package/.claude/agents/github/swarm-pr.md +0 -1
- package/.claude/agents/github/sync-coordinator.md +0 -1
- package/.claude/agents/github/workflow-automation.md +0 -1
- package/.claude/agents/marketing/marketing-competitive-content.md +1 -2
- package/.claude/agents/marketing/marketing-cro-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-email-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-launch-strategist.md +1 -2
- package/.claude/agents/marketing/marketing-pricing-strategist.md +1 -2
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -1
- package/.claude/agents/specialized/agents-orchestrator.md +1 -2
- package/.claude/agents/specialized/automation-governance-architect.md +1 -2
- package/.claude/agents/specialized/blockchain-security-auditor.md +1 -2
- package/.claude/agents/specialized/compliance-auditor.md +1 -2
- package/.claude/agents/specialized/identity-graph-operator.md +0 -1
- package/.claude/agents/specialized/lsp-index-engineer.md +1 -2
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -1
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -1
- package/.claude/agents/specialized/specialized-developer-advocate.md +1 -2
- package/.claude/agents/specialized/specialized-document-generator.md +1 -2
- package/.claude/agents/specialized/specialized-mcp-builder.md +1 -2
- package/.claude/agents/specialized/specialized-model-qa.md +0 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +1 -2
- package/.claude/agents/specialized/zk-steward.md +1 -2
- package/.claude/agents/testing/production-validator.md +0 -1
- package/.claude/agents/testing/tdd-london-swarm.md +0 -1
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -1
- package/.claude/agents/testing/testing-api-tester.md +1 -2
- package/.claude/agents/testing/testing-evidence-collector.md +1 -2
- package/.claude/agents/testing/testing-performance-benchmarker.md +1 -2
- package/.claude/agents/testing/testing-test-results-analyzer.md +1 -2
- package/.claude/agents/testing/testing-tool-evaluator.md +1 -2
- package/.claude/agents/testing/testing-workflow-optimizer.md +1 -2
- package/.claude/commands/hooks/README.md +1 -1
- package/.claude/commands/memory/README.md +6 -7
- package/.claude/commands/monitoring/README.md +1 -1
- package/.claude/helpers/control-start.cjs +27 -7
- package/.claude/helpers/handlers/route-handler.cjs +22 -3
- package/.claude/helpers/handlers/session-handler.cjs +43 -0
- package/.claude/helpers/intelligence.cjs +27 -6
- package/.claude/helpers/statusline.cjs +45 -11
- package/.claude/skills/agentic-jujutsu/SKILL.md +17 -15
- package/.claude/skills/hive-mind-advanced/SKILL.md +212 -559
- package/.claude/skills/hooks-automation/SKILL.md +1 -1
- package/.claude/skills/mastermind-adapters/SKILL.md +0 -11
- package/.claude/skills/mastermind-agents/SKILL.md +0 -11
- package/.claude/skills/mastermind-backup/SKILL.md +0 -11
- package/.claude/skills/mastermind-bootstrap/SKILL.md +0 -11
- package/.claude/skills/mastermind-delegation/SKILL.md +14 -12
- package/.claude/skills/mastermind-idea/SKILL.md +0 -5
- package/.claude/skills/mastermind-monitor/SKILL.md +0 -15
- package/.claude/skills/mastermind-org-settings/SKILL.md +0 -11
- package/.claude/skills/mastermind-plugins/SKILL.md +0 -11
- package/.claude/skills/mastermind-protocol/SKILL.md +6 -124
- package/.claude/skills/mastermind-repeat/SKILL.md +0 -25
- package/.claude/skills/mastermind-review/SKILL.md +1 -1
- package/.claude/skills/mastermind-stoporg/SKILL.md +0 -19
- package/.claude/skills/memory-toolkit/SKILL.md +12 -11
- package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +8 -1
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +228 -484
- package/.claude/skills/specialagent/SKILL.md +31 -133
- package/.claude/skills/swarm-advanced/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +220 -150
- package/.claude/skills/verification-quality/SKILL.md +247 -571
- package/README.md +3 -3
- package/dist/src/commands/agent-lifecycle.js +3 -3
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/autopilot.d.ts.map +1 -1
- package/dist/src/commands/autopilot.js +7 -1
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/doc.d.ts.map +1 -1
- package/dist/src/commands/doc.js +14 -3
- package/dist/src/commands/doc.js.map +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +3 -37
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +30 -1
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
- package/dist/src/commands/hooks-coverage-commands.js +75 -67
- package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
- package/dist/src/commands/hooks-workers.d.ts.map +1 -1
- package/dist/src/commands/hooks-workers.js +41 -10
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/index.d.ts +1 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +20 -4
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +80 -7
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +78 -2
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/neural-optimize.d.ts.map +1 -1
- package/dist/src/commands/neural-optimize.js +27 -5
- package/dist/src/commands/neural-optimize.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +37 -30
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +129 -2
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/commands/performance.js +1 -1
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +1 -11
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/security-misc.d.ts +0 -9
- package/dist/src/commands/security-misc.d.ts.map +1 -1
- package/dist/src/commands/security-misc.js +33 -54
- package/dist/src/commands/security-misc.js.map +1 -1
- package/dist/src/commands/security-scan.d.ts.map +1 -1
- package/dist/src/commands/security-scan.js +3 -11
- package/dist/src/commands/security-scan.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +7 -2
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/ui.d.ts +8 -0
- package/dist/src/commands/ui.d.ts.map +1 -0
- package/dist/src/commands/ui.js +94 -0
- package/dist/src/commands/ui.js.map +1 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +7 -9
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +13 -3
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/kimi-generator.d.ts +3 -2
- package/dist/src/init/kimi-generator.d.ts.map +1 -1
- package/dist/src/init/kimi-generator.js +45 -13
- package/dist/src/init/kimi-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +1 -1
- package/dist/src/init/statusline-generator.js +1 -1
- package/dist/src/init/write-capabilities.js +7 -7
- package/dist/src/init/write-capabilities.js.map +1 -1
- package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
- package/dist/src/knowledge/document-pipeline.js +1 -0
- package/dist/src/knowledge/document-pipeline.js.map +1 -1
- package/dist/src/knowledge/eval/golden-set.d.ts.map +1 -1
- package/dist/src/knowledge/eval/golden-set.js +21 -32
- package/dist/src/knowledge/eval/golden-set.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +2 -2
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +29 -3
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +32 -19
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.js +48 -18
- package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +15 -10
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.d.ts +4 -0
- package/dist/src/memory/embedding-operations.d.ts.map +1 -1
- package/dist/src/memory/embedding-operations.js +125 -32
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/hnsw-operations.d.ts +1 -1
- package/dist/src/memory/hnsw-operations.js +1 -1
- package/dist/src/memory/memory-bridge.d.ts +8 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +37 -8
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-read.d.ts +1 -1
- package/dist/src/memory/memory-read.js +2 -2
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
- package/dist/src/orgrt/antigravity-runner.js +6 -6
- package/dist/src/orgrt/antigravity-runner.js.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts +11 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.js +18 -86
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
- package/dist/src/orgrt/checkpoint.d.ts +1 -1
- package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint.js +3 -3
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +9 -1
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +267 -139
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +13 -0
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +95 -0
- package/dist/src/orgrt/decisions.js.map +1 -1
- package/dist/src/orgrt/forwarder.d.ts.map +1 -1
- package/dist/src/orgrt/forwarder.js +148 -15
- package/dist/src/orgrt/forwarder.js.map +1 -1
- package/dist/src/orgrt/kimicode-runner.js +1 -1
- package/dist/src/orgrt/kimicode-runner.js.map +1 -1
- package/dist/src/orgrt/opencode-runner.js +1 -1
- package/dist/src/orgrt/opencode-runner.js.map +1 -1
- package/dist/src/orgrt/session.d.ts +27 -1
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +67 -6
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/task-dag.d.ts +11 -1
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js +93 -2
- package/dist/src/orgrt/task-dag.js.map +1 -1
- package/dist/src/orgrt/templates.d.ts.map +1 -1
- package/dist/src/orgrt/templates.js +26 -2
- package/dist/src/orgrt/templates.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +77 -1
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +28 -2
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-providers.js +9 -4
- package/dist/src/orgrt/vercel-providers.js.map +1 -1
- package/dist/src/orgrt/vercel-runner.d.ts +0 -23
- package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-runner.js +38 -7
- package/dist/src/orgrt/vercel-runner.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/.claude/commands/mastermind/approvev1.md +0 -94
- package/.claude/commands/mastermind/architect.md +0 -52
- package/.claude/commands/mastermind/autodev.md +0 -28
- package/.claude/commands/mastermind/build.md +0 -23
- package/.claude/commands/mastermind/finish.md +0 -17
- package/.claude/commands/mastermind/runorgv1.md +0 -159
- package/.claude/commands/mastermind/taskdev.md +0 -23
- package/.claude/commands/mastermind/tdd.md +0 -19
- package/.claude/commands/mastermind/verify.md +0 -19
- package/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
- package/.claude/skills/mastermind-architect/SKILL.md +0 -862
- package/.claude/skills/mastermind-autodev/SKILL.md +0 -360
- package/.claude/skills/mastermind-build/SKILL.md +0 -169
- package/.claude/skills/mastermind-companies/SKILL.md +0 -256
- package/.claude/skills/mastermind-content/SKILL.md +0 -197
- package/.claude/skills/mastermind-costs/SKILL.md +0 -151
- package/.claude/skills/mastermind-finance/SKILL.md +0 -166
- package/.claude/skills/mastermind-finish/SKILL.md +0 -251
- package/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
- package/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
- package/.claude/skills/mastermind-marketing/SKILL.md +0 -228
- package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
- package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
- package/.claude/skills/mastermind-ops/SKILL.md +0 -168
- package/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
- package/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
- package/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
- package/.claude/skills/mastermind-projects/SKILL.md +0 -167
- package/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
- package/.claude/skills/mastermind-sales/SKILL.md +0 -170
- package/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
- package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
- package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
- package/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
- package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
- package/.claude/skills/mastermind-tdd/SKILL.md +0 -424
- package/.claude/skills/mastermind-verify/SKILL.md +0 -196
- package/.claude/skills/mastermind-wiki/SKILL.md +0 -314
- package/.claude/skills/monolean-review/SKILL.md +0 -57
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mastermind-wiki
|
|
3
|
-
description: Mastermind wiki — org-scoped knowledge base with ingest, query, maintain, lint, and distill operations. Stores durable synthesis in .monomind/orgs/<org>/wiki/ with page citations, raw sources, and change log. Port of Paperclip's LLM Wiki plugin skills adapted for mastermind orgs.
|
|
4
|
-
type: domain-skill
|
|
5
|
-
default_mode: auto
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Mastermind Wiki
|
|
9
|
-
|
|
10
|
-
This skill is invoked by `mastermind:wiki` or directly via `/mastermind:wiki`.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Inputs
|
|
15
|
-
|
|
16
|
-
- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
|
|
17
|
-
- `org_name`: org whose wiki to operate on (required)
|
|
18
|
-
- `action`: query | ingest | list | maintain | lint | distill | page
|
|
19
|
-
- `question`: question or search term (required for query)
|
|
20
|
-
- `source`: path or URL to ingest (required for ingest)
|
|
21
|
-
- `page_slug`: wiki page slug to read/write (required for page)
|
|
22
|
-
- `content`: content to write to a page (required for page write)
|
|
23
|
-
- `caller`: command | master
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Wiki Structure
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
.monomind/orgs/<org>/wiki/
|
|
31
|
-
index.md ← navigation hub; must be kept current
|
|
32
|
-
log.md ← append-only change log
|
|
33
|
-
concepts/ ← concepts, definitions, architectural decisions
|
|
34
|
-
projects/ ← per-project knowledge (standup.md + index.md)
|
|
35
|
-
synthesis/ ← synthesized answers filed from queries
|
|
36
|
-
raw/ ← raw source material (never modified after ingest)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Invariants:**
|
|
40
|
-
- Raw sources in `raw/` are NEVER modified after ingest
|
|
41
|
-
- Every durable page write must append a `log.md` entry
|
|
42
|
-
- `index.md` must be updated when pages are added or removed
|
|
43
|
-
- Answers cite wiki pages or raw sources inline, not in footnote blocks
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Step 0 — Brain Load (standalone only)
|
|
48
|
-
|
|
49
|
-
If `caller` is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: `ops`.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Step 1 — Resolve Wiki Root
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
orgFile=".monomind/orgs/${org_name}.json"
|
|
57
|
-
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }
|
|
58
|
-
|
|
59
|
-
wikiRoot=".monomind/orgs/${org_name}/wiki"
|
|
60
|
-
mkdir -p "$wikiRoot/concepts" "$wikiRoot/projects" "$wikiRoot/synthesis" "$wikiRoot/raw"
|
|
61
|
-
|
|
62
|
-
if [ ! -f "$wikiRoot/index.md" ]; then
|
|
63
|
-
cat > "$wikiRoot/index.md" << EOF
|
|
64
|
-
# Wiki — ${org_name}
|
|
65
|
-
|
|
66
|
-
This is the org knowledge base. Navigate by category or search with \`/mastermind:wiki --action query\`.
|
|
67
|
-
|
|
68
|
-
## Concepts
|
|
69
|
-
(none yet)
|
|
70
|
-
|
|
71
|
-
## Projects
|
|
72
|
-
(none yet)
|
|
73
|
-
|
|
74
|
-
## Synthesis
|
|
75
|
-
(none yet)
|
|
76
|
-
EOF
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
[ ! -f "$wikiRoot/log.md" ] && echo "# Wiki Log — ${org_name}" > "$wikiRoot/log.md"
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Step 2 — Execute Action
|
|
85
|
-
|
|
86
|
-
### query (default)
|
|
87
|
-
|
|
88
|
-
Answer a question from what the wiki contains, with citations.
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
[ -z "$question" ] && { echo "ERROR: --question required."; exit 1; }
|
|
92
|
-
echo "WIKI QUERY — ${org_name}"
|
|
93
|
-
echo "Q: $question"
|
|
94
|
-
echo "────────────────────────────────────────────────────────"
|
|
95
|
-
|
|
96
|
-
python3 - "$wikiRoot" "$question" <<'PYEOF'
|
|
97
|
-
import os, sys, re
|
|
98
|
-
root, query = sys.argv[1], sys.argv[2].lower()
|
|
99
|
-
hits = []
|
|
100
|
-
|
|
101
|
-
def scan_dir(d, prefix):
|
|
102
|
-
if not os.path.isdir(d): return
|
|
103
|
-
for fname in os.listdir(d):
|
|
104
|
-
if not fname.endswith(".md"): continue
|
|
105
|
-
fpath = os.path.join(d, fname)
|
|
106
|
-
try:
|
|
107
|
-
text = open(fpath).read()
|
|
108
|
-
if query in text.lower():
|
|
109
|
-
snippet = ""
|
|
110
|
-
for line in text.split("\n"):
|
|
111
|
-
if query in line.lower():
|
|
112
|
-
snippet = line.strip()[:120]
|
|
113
|
-
break
|
|
114
|
-
hits.append((prefix + "/" + fname, snippet))
|
|
115
|
-
except: pass
|
|
116
|
-
|
|
117
|
-
scan_dir(os.path.join(root, "concepts"), "concepts")
|
|
118
|
-
scan_dir(os.path.join(root, "synthesis"), "synthesis")
|
|
119
|
-
scan_dir(os.path.join(root, "projects"), "projects")
|
|
120
|
-
scan_dir(os.path.join(root, "raw"), "raw")
|
|
121
|
-
|
|
122
|
-
if not hits:
|
|
123
|
-
print(" No wiki pages match that query.")
|
|
124
|
-
print(" Use --action ingest to add source material, or --action distill to synthesize from org data.")
|
|
125
|
-
else:
|
|
126
|
-
print(f" {len(hits)} page(s) match:")
|
|
127
|
-
for path, snippet in hits[:10]:
|
|
128
|
-
print(f"\n [[{path}]]")
|
|
129
|
-
if snippet: print(f" → {snippet}")
|
|
130
|
-
PYEOF
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### list
|
|
134
|
-
|
|
135
|
-
Show all wiki pages.
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
echo "WIKI INDEX — ${org_name}"
|
|
139
|
-
echo "────────────────────────────────────────────────────────"
|
|
140
|
-
cat "$wikiRoot/index.md"
|
|
141
|
-
echo ""
|
|
142
|
-
echo " Raw sources: $(ls $wikiRoot/raw/ 2>/dev/null | wc -l) file(s)"
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### ingest
|
|
146
|
-
|
|
147
|
-
Add a raw source file to the wiki. Raw sources are immutable after ingest.
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
[ -z "$source" ] && { echo "ERROR: --source required (path to file)."; exit 1; }
|
|
151
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
152
|
-
srcBase=$(basename "$source")
|
|
153
|
-
dstPath="$wikiRoot/raw/$srcBase"
|
|
154
|
-
|
|
155
|
-
if [ -f "$dstPath" ]; then
|
|
156
|
-
echo " Already ingested: $srcBase"
|
|
157
|
-
else
|
|
158
|
-
cp "$source" "$dstPath" && echo " Ingested: $srcBase → $wikiRoot/raw/"
|
|
159
|
-
echo "$(date -u +%Y-%m-%d) | ingest | raw/$srcBase" >> "$wikiRoot/log.md"
|
|
160
|
-
fi
|
|
161
|
-
echo " To synthesize a page from this source, use: /mastermind:wiki --action distill --source $srcBase"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### page
|
|
165
|
-
|
|
166
|
-
Read or write a specific wiki page.
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
[ -z "$page_slug" ] && { echo "ERROR: --page-slug required."; exit 1; }
|
|
170
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
171
|
-
|
|
172
|
-
if [ -n "$content" ]; then
|
|
173
|
-
# Write/update
|
|
174
|
-
pageDir="$wikiRoot/$(dirname $page_slug)"
|
|
175
|
-
mkdir -p "$pageDir"
|
|
176
|
-
pagePath="$wikiRoot/${page_slug}.md"
|
|
177
|
-
echo "$content" > "$pagePath"
|
|
178
|
-
echo "$(date -u +%Y-%m-%d) | update | ${page_slug}" >> "$wikiRoot/log.md"
|
|
179
|
-
echo " Page written: $pagePath"
|
|
180
|
-
echo " Remember to update index.md if this is a new page."
|
|
181
|
-
else
|
|
182
|
-
# Read
|
|
183
|
-
pagePath="$wikiRoot/${page_slug}.md"
|
|
184
|
-
if [ -f "$pagePath" ]; then
|
|
185
|
-
cat "$pagePath"
|
|
186
|
-
else
|
|
187
|
-
echo " Page not found: $page_slug"
|
|
188
|
-
echo " Available pages:"
|
|
189
|
-
find "$wikiRoot" -name "*.md" ! -name "index.md" ! -name "log.md" | sed "s|$wikiRoot/||"
|
|
190
|
-
fi
|
|
191
|
-
fi
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### distill
|
|
195
|
-
|
|
196
|
-
Synthesize a wiki page from raw sources and org data. The AI synthesizes based on context, writes the page, and logs it.
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
[ -z "$page_slug" ] && { echo "ERROR: --page-slug required."; exit 1; }
|
|
200
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
201
|
-
pagePath="$wikiRoot/${page_slug}.md"
|
|
202
|
-
|
|
203
|
-
echo "WIKI DISTILL — ${org_name}"
|
|
204
|
-
echo "Target: ${page_slug}"
|
|
205
|
-
echo "────────────────────────────────────────────────────────"
|
|
206
|
-
|
|
207
|
-
if [ -n "$source" ] && [ -f "$wikiRoot/raw/$source" ]; then
|
|
208
|
-
echo "Source: $wikiRoot/raw/$source"
|
|
209
|
-
cat "$wikiRoot/raw/$source"
|
|
210
|
-
fi
|
|
211
|
-
|
|
212
|
-
echo ""
|
|
213
|
-
echo " Use the above source material to write a synthesis page at $pagePath."
|
|
214
|
-
echo " The page should: answer the most important questions, cite raw/ sources inline,"
|
|
215
|
-
echo " use a terse factual voice, and avoid summarizing what is already obvious."
|
|
216
|
-
echo " After writing, update index.md to link to the new page and append a distill log entry."
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### maintain
|
|
220
|
-
|
|
221
|
-
Check wiki health: stale pages, missing index links, unreferenced raw sources.
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
echo "WIKI HEALTH — ${org_name}"
|
|
225
|
-
echo "────────────────────────────────────────────────────────"
|
|
226
|
-
|
|
227
|
-
python3 - "$wikiRoot" <<'PYEOF'
|
|
228
|
-
import os, sys
|
|
229
|
-
root = sys.argv[1]
|
|
230
|
-
|
|
231
|
-
pages = []
|
|
232
|
-
for subdir in ["concepts","projects","synthesis"]:
|
|
233
|
-
d = os.path.join(root, subdir)
|
|
234
|
-
if not os.path.isdir(d): continue
|
|
235
|
-
for f in os.listdir(d):
|
|
236
|
-
if f.endswith(".md"): pages.append(f"{subdir}/{f}")
|
|
237
|
-
|
|
238
|
-
raw_sources = os.listdir(os.path.join(root,"raw")) if os.path.isdir(os.path.join(root,"raw")) else []
|
|
239
|
-
|
|
240
|
-
# Check index.md links
|
|
241
|
-
index_text = open(os.path.join(root,"index.md")).read() if os.path.exists(os.path.join(root,"index.md")) else ""
|
|
242
|
-
missing_links = [p for p in pages if p not in index_text]
|
|
243
|
-
orphan_raw = [r for r in raw_sources if r not in index_text and not any(r in open(os.path.join(root,p)).read() for p in pages if os.path.exists(os.path.join(root,p)))]
|
|
244
|
-
|
|
245
|
-
print(f" Pages: {len(pages)}")
|
|
246
|
-
print(f" Raw sources: {len(raw_sources)}")
|
|
247
|
-
print()
|
|
248
|
-
if missing_links:
|
|
249
|
-
print(f" ⚠ {len(missing_links)} page(s) not in index.md:")
|
|
250
|
-
for p in missing_links: print(f" · {p}")
|
|
251
|
-
else:
|
|
252
|
-
print(" ✓ All pages listed in index.md")
|
|
253
|
-
if orphan_raw:
|
|
254
|
-
print(f"\n ⚠ {len(orphan_raw)} raw source(s) not referenced by any page:")
|
|
255
|
-
for r in orphan_raw: print(f" · raw/{r}")
|
|
256
|
-
else:
|
|
257
|
-
print(" ✓ All raw sources referenced")
|
|
258
|
-
PYEOF
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### lint
|
|
262
|
-
|
|
263
|
-
Validate page formatting: headers, citations, no broken links.
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
echo "WIKI LINT — ${org_name}"
|
|
267
|
-
echo "────────────────────────────────────────────────────────"
|
|
268
|
-
|
|
269
|
-
python3 - "$wikiRoot" <<'PYEOF'
|
|
270
|
-
import os, sys, re
|
|
271
|
-
root = sys.argv[1]
|
|
272
|
-
issues = []
|
|
273
|
-
|
|
274
|
-
for subdir in ["concepts","projects","synthesis"]:
|
|
275
|
-
d = os.path.join(root, subdir)
|
|
276
|
-
if not os.path.isdir(d): continue
|
|
277
|
-
for fname in os.listdir(d):
|
|
278
|
-
if not fname.endswith(".md"): continue
|
|
279
|
-
fpath = os.path.join(d, fname)
|
|
280
|
-
text = open(fpath).read()
|
|
281
|
-
path = f"{subdir}/{fname}"
|
|
282
|
-
if not text.strip().startswith("#"):
|
|
283
|
-
issues.append(f" {path}: missing H1 title")
|
|
284
|
-
wikilinks = re.findall(r'\[\[([^\]]+)\]\]', text)
|
|
285
|
-
for wl in wikilinks:
|
|
286
|
-
candidate = os.path.join(root, wl.lstrip("/"))
|
|
287
|
-
if not os.path.exists(candidate) and not os.path.exists(candidate+".md"):
|
|
288
|
-
issues.append(f" {path}: broken wiki-link [[{wl}]]")
|
|
289
|
-
|
|
290
|
-
if not issues:
|
|
291
|
-
print(" ✓ No lint issues found.")
|
|
292
|
-
else:
|
|
293
|
-
print(f" {len(issues)} issue(s):")
|
|
294
|
-
for i in issues: print(i)
|
|
295
|
-
PYEOF
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Step 3 — Return Output
|
|
301
|
-
|
|
302
|
-
```yaml
|
|
303
|
-
domain: ops
|
|
304
|
-
status: complete
|
|
305
|
-
action: <action>
|
|
306
|
-
org_name: <org_name>
|
|
307
|
-
wiki_root: .monomind/orgs/<org_name>/wiki/
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## Step 4 — Brain Write (standalone only)
|
|
313
|
-
|
|
314
|
-
If `caller` is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `ops`.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monolean-review
|
|
3
|
-
description: >
|
|
4
|
-
Code review focused exclusively on over-engineering. Finds what to delete:
|
|
5
|
-
reinvented standard library, unneeded dependencies, speculative abstractions,
|
|
6
|
-
dead flexibility. One line per finding: location, what to cut, what replaces
|
|
7
|
-
it. Use when the user says "review for over-engineering", "what can we
|
|
8
|
-
delete", "is this over-engineered", "simplify review", or invokes
|
|
9
|
-
/monolean-review. Complements correctness-focused review, this one only
|
|
10
|
-
hunts complexity.
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
Review diffs for unnecessary complexity. One line per finding: location, what
|
|
14
|
-
to cut, what replaces it. The diff's best outcome is getting shorter.
|
|
15
|
-
|
|
16
|
-
## Format
|
|
17
|
-
|
|
18
|
-
`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
|
|
19
|
-
multi-file diffs.
|
|
20
|
-
|
|
21
|
-
Tags:
|
|
22
|
-
|
|
23
|
-
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
|
|
24
|
-
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
|
|
25
|
-
- `native:` dependency or code doing what the platform already does. Name the feature.
|
|
26
|
-
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
|
|
27
|
-
- `shrink:` same logic, fewer lines. Show the shorter form.
|
|
28
|
-
|
|
29
|
-
## Examples
|
|
30
|
-
|
|
31
|
-
❌ "This EmailValidator class might be more complex than necessary, have you
|
|
32
|
-
considered whether all these validation rules are needed at this stage?"
|
|
33
|
-
|
|
34
|
-
✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
|
|
35
|
-
|
|
36
|
-
✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
|
|
37
|
-
|
|
38
|
-
✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
|
|
39
|
-
|
|
40
|
-
✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
|
|
41
|
-
|
|
42
|
-
✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
|
|
43
|
-
|
|
44
|
-
## Scoring
|
|
45
|
-
|
|
46
|
-
End with the only metric that matters: `net: -<N> lines possible.`
|
|
47
|
-
|
|
48
|
-
If there is nothing to cut, say `Lean already. Ship.` and stop.
|
|
49
|
-
|
|
50
|
-
## Boundaries
|
|
51
|
-
|
|
52
|
-
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
|
53
|
-
and performance are explicitly out of scope. Route them to a normal review
|
|
54
|
-
pass, not this one. A single smoke test or `assert`-based
|
|
55
|
-
self-check is the monolean minimum, not bloat, never flag it for deletion.
|
|
56
|
-
Does not apply the fixes, only lists them.
|
|
57
|
-
"stop monolean-review" or "normal mode": revert to verbose review style.
|