@godharness/cli 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/LICENSE +21 -0
- package/README.md +222 -0
- package/bin/godharness.js +33 -0
- package/package.json +32 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tomer Gal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/godharness-icon.svg" width="168" alt="Godharness logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Godharness: Temporary Product Brief
|
|
6
|
+
|
|
7
|
+
Status: Working notes — not a Viewstone product document
|
|
8
|
+
Date: 2026-08-05
|
|
9
|
+
|
|
10
|
+
## Problem
|
|
11
|
+
|
|
12
|
+
Coding agents can enforce deterministic rules after changing code, but they do
|
|
13
|
+
not automatically know a repository's architecture decisions, product intent,
|
|
14
|
+
engineering practices, or the rationale behind policies. Raw documentation is
|
|
15
|
+
easy to miss, too broad to load in full, and difficult to keep structurally
|
|
16
|
+
healthy.
|
|
17
|
+
|
|
18
|
+
## Desired Outcome
|
|
19
|
+
|
|
20
|
+
Godharness gives coding agents the right engineering context before they act.
|
|
21
|
+
It ships a small, versioned, opinionated default suite of best practices and
|
|
22
|
+
lets each repository add its own standards, decision records, product context,
|
|
23
|
+
and service-specific guidance.
|
|
24
|
+
|
|
25
|
+
## Product Positioning
|
|
26
|
+
|
|
27
|
+
Godharness is an agent-context and documentation-governance framework. It is
|
|
28
|
+
related to Oh My Claude Code and Superpowers in that it supports coding-agent
|
|
29
|
+
workflows, but its job is distinct:
|
|
30
|
+
|
|
31
|
+
- Workflow frameworks prescribe how an agent works.
|
|
32
|
+
- Godharness supplies the project-specific and default context the agent needs
|
|
33
|
+
to make sound decisions.
|
|
34
|
+
- Godlint deterministically verifies the codifiable subset in code and CI.
|
|
35
|
+
|
|
36
|
+
The family promise is:
|
|
37
|
+
|
|
38
|
+
> Godharness helps agents understand the project. Godlint makes sure the
|
|
39
|
+
> project stays true to what it decided.
|
|
40
|
+
|
|
41
|
+
## Relationship to Godlint
|
|
42
|
+
|
|
43
|
+
Godlint and Godharness have deliberately different authority boundaries.
|
|
44
|
+
|
|
45
|
+
| Product | Authority | Example |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| Godharness | Guidance before a change | "Validate untrusted data at runtime boundaries." |
|
|
48
|
+
| Godlint | Deterministic enforcement after a change | "Do not read environment variables outside the configured boundary." |
|
|
49
|
+
|
|
50
|
+
Godharness handles decisions that cannot safely be inferred from syntax:
|
|
51
|
+
|
|
52
|
+
- product intent and non-goals;
|
|
53
|
+
- architecture tradeoffs and ADRs;
|
|
54
|
+
- testing philosophy and recovery strategy;
|
|
55
|
+
- domain vocabulary and service ownership;
|
|
56
|
+
- instructions for evaluating ambiguous cases.
|
|
57
|
+
|
|
58
|
+
Godlint handles objective, explainable checks against source and workflows.
|
|
59
|
+
Godharness must not claim that injecting guidance proves compliance; Godlint,
|
|
60
|
+
tests, review, and other deterministic checks remain the proof mechanisms.
|
|
61
|
+
|
|
62
|
+
## Version 1 Scope
|
|
63
|
+
|
|
64
|
+
Godharness v1 is a local-first, installable CLI with Markdown and Git as the
|
|
65
|
+
source of truth. It has no user interface and no Obsidian integration in v1.
|
|
66
|
+
|
|
67
|
+
### Recommended suite
|
|
68
|
+
|
|
69
|
+
`recommended@1` ships a small, curated, versioned set of broadly useful
|
|
70
|
+
standards, such as:
|
|
71
|
+
|
|
72
|
+
- testing and verification;
|
|
73
|
+
- error handling;
|
|
74
|
+
- small focused units;
|
|
75
|
+
- security and secrets hygiene;
|
|
76
|
+
- configuration boundaries;
|
|
77
|
+
- CI expectations;
|
|
78
|
+
- documentation and decision-record practices.
|
|
79
|
+
|
|
80
|
+
The suite is not injected wholesale. The resolver selects a tiny universal
|
|
81
|
+
core plus standards relevant to the task and changed paths. Suites must remain
|
|
82
|
+
small enough that their context is useful rather than generic noise.
|
|
83
|
+
|
|
84
|
+
### Repository context
|
|
85
|
+
|
|
86
|
+
Repositories compose the default suite with their own Markdown standards,
|
|
87
|
+
architecture decisions, product context, playbooks, and service-specific
|
|
88
|
+
guidance. Project content can refine the default guidance without copying it.
|
|
89
|
+
|
|
90
|
+
Illustrative configuration:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
version: 1
|
|
94
|
+
suites: [recommended@1]
|
|
95
|
+
|
|
96
|
+
standards:
|
|
97
|
+
- docs/engineering/**
|
|
98
|
+
- docs/process/**
|
|
99
|
+
- docs/architecture/**
|
|
100
|
+
|
|
101
|
+
adapters:
|
|
102
|
+
codex: true
|
|
103
|
+
claude-code: true
|
|
104
|
+
pi: true
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Commands
|
|
108
|
+
|
|
109
|
+
The initial CLI surface should be small:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
godharness init
|
|
113
|
+
godharness check
|
|
114
|
+
godharness context --prompt "..."
|
|
115
|
+
godharness context --paths services/api/src/auth.ts
|
|
116
|
+
godharness doctor
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- `init` creates the configuration and starter standards.
|
|
120
|
+
- `check` validates document schema, links, classification, selectors, and
|
|
121
|
+
adapter configuration.
|
|
122
|
+
- `context` resolves the standards and decisions relevant to a prompt or set
|
|
123
|
+
of changed paths in a deterministic machine-readable form.
|
|
124
|
+
- `doctor` validates local installation and adapter wiring.
|
|
125
|
+
|
|
126
|
+
### Installing
|
|
127
|
+
|
|
128
|
+
- **Homebrew:** `brew install tomerwave/tap/godharness`
|
|
129
|
+
- **cargo:** `cargo install godharness-cli`
|
|
130
|
+
- **npm:** `npm install --global @godharness/cli`
|
|
131
|
+
- **pip:** `pip install godharness`
|
|
132
|
+
|
|
133
|
+
This repository keeps its own installed copy current automatically:
|
|
134
|
+
`.github/workflows/self-update.yml` runs `godharness update` whenever a new
|
|
135
|
+
version releases and commits any resulting change directly to `main`.
|
|
136
|
+
|
|
137
|
+
## Technical Direction
|
|
138
|
+
|
|
139
|
+
Build the core in Rust.
|
|
140
|
+
|
|
141
|
+
Reasons:
|
|
142
|
+
|
|
143
|
+
- a single fast binary works locally and in CI without Node or Bun;
|
|
144
|
+
- the resolver, validator, configuration model, diagnostics, and release
|
|
145
|
+
approach align with Godlint;
|
|
146
|
+
- it supports deterministic, local-first behavior and cross-platform installs;
|
|
147
|
+
- thin agent-specific adapters can call the binary and consume JSON rather than
|
|
148
|
+
duplicating matching logic.
|
|
149
|
+
|
|
150
|
+
The existing Viewstone TypeScript harness is a useful reference implementation,
|
|
151
|
+
not the product core. It proves three useful mechanisms:
|
|
152
|
+
|
|
153
|
+
- prompt-keyword matching;
|
|
154
|
+
- changed-path glob matching;
|
|
155
|
+
- adapters for Codex, Claude Code, and Pi that inject selected context.
|
|
156
|
+
|
|
157
|
+
The extracted core should use a real YAML/frontmatter parser and schema
|
|
158
|
+
validation rather than preserving the current hand-written parser.
|
|
159
|
+
|
|
160
|
+
## Required Product Properties
|
|
161
|
+
|
|
162
|
+
- Deterministic resolution: no LLM decides which context is mandatory.
|
|
163
|
+
- Local-first: repository source and context stay local by default.
|
|
164
|
+
- Markdown and Git native: standards and decisions remain reviewable and
|
|
165
|
+
portable.
|
|
166
|
+
- Explainability: users can answer "why was this injected?".
|
|
167
|
+
- Versioned suites: `recommended@1` remains stable when future suites change.
|
|
168
|
+
- Scoped context: support universal, task, path, service, and repository scope.
|
|
169
|
+
- Conflict handling: define precedence and surface contradictory standards.
|
|
170
|
+
- CI validation: prevent broken links, malformed metadata, unindexed
|
|
171
|
+
standards, stale ownership, and adapter drift.
|
|
172
|
+
|
|
173
|
+
## Explicit Non-Goals for v1
|
|
174
|
+
|
|
175
|
+
- No graphical interface, desktop application, or Obsidian integration.
|
|
176
|
+
- No generic notes app or knowledge graph.
|
|
177
|
+
- No vector search/RAG as the policy-selection mechanism.
|
|
178
|
+
- No LLM-driven enforcement or opaque context selection.
|
|
179
|
+
- No duplicate source-code linter; Godlint owns deterministic source and
|
|
180
|
+
workflow policy.
|
|
181
|
+
- No automatic invention of engineering standards.
|
|
182
|
+
|
|
183
|
+
## Later Possibilities
|
|
184
|
+
|
|
185
|
+
An Obsidian-like product experience could be valuable later for authoring,
|
|
186
|
+
exploring relationships, ownership/review dates, contradictions, and context
|
|
187
|
+
previews. It must remain a view over the Git-backed Markdown source of truth,
|
|
188
|
+
not replace it.
|
|
189
|
+
|
|
190
|
+
Future Godlint integration can map a finding to its relevant Godharness
|
|
191
|
+
standard so developers receive both the deterministic violation and the
|
|
192
|
+
decision rationale.
|
|
193
|
+
|
|
194
|
+
## Risks
|
|
195
|
+
|
|
196
|
+
- A large default suite will become generic prompt noise and be ignored.
|
|
197
|
+
- Simple keyword and glob matching can over-match or miss relevant context.
|
|
198
|
+
- Injecting a rule does not prove an agent followed it.
|
|
199
|
+
- Project-specific standards can conflict unless precedence and ownership are
|
|
200
|
+
explicit.
|
|
201
|
+
- A UI too early would distract from the core resolution and validation loop.
|
|
202
|
+
|
|
203
|
+
## Open Decisions
|
|
204
|
+
|
|
205
|
+
- Adapter protocol and installation model for each supported agent.
|
|
206
|
+
- The first Godlint-to-Godharness rationale-linking contract.
|
|
207
|
+
- Conflict-reporting between two standards whose content disagrees (as opposed to resolution
|
|
208
|
+
order, which is decided — see below).
|
|
209
|
+
|
|
210
|
+
Decided since this section was first written, with the implementation in
|
|
211
|
+
`crates/godharness-core`:
|
|
212
|
+
|
|
213
|
+
- Standard frontmatter schema and selectors: `id`, `title`, `keywords`, `paths`, `must-read`,
|
|
214
|
+
`supersedes`, `relates-to`; word-boundary keyword matching; glob path matching.
|
|
215
|
+
- Resolution precedence: a must-read standard always resolves regardless of prompt or changed
|
|
216
|
+
paths; `supersedes` suppresses the standard it names; `relates-to` surfaces a neighbor
|
|
217
|
+
alongside a match.
|
|
218
|
+
- Extension model: a repository adds standards through the `standards` globs in
|
|
219
|
+
`godharness.yaml`. Overriding an existing standard means superseding it under a new id —
|
|
220
|
+
reusing an existing id is a duplicate-id error, not a silent override.
|
|
221
|
+
- The minimal universal core every task receives: whichever standards are marked `must-read`.
|
|
222
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// npm installed exactly one platform package, the one matching os and cpu, so this finds that
|
|
5
|
+
// package rather than guessing a path. Nothing is downloaded here: the binary is already on disk,
|
|
6
|
+
// which is what lets the install work with --ignore-scripts and without a network.
|
|
7
|
+
const { spawnSync } = require("node:child_process");
|
|
8
|
+
const path = require("node:path");
|
|
9
|
+
|
|
10
|
+
const suffix = process.platform === "win32" ? ".exe" : "";
|
|
11
|
+
const name = `@godharness/cli-${process.platform}-${process.arch}`;
|
|
12
|
+
|
|
13
|
+
let binary;
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
binary = path.join(path.dirname(require.resolve(`${name}/package.json`)), `godharness${suffix}`);
|
|
17
|
+
} catch {
|
|
18
|
+
console.error(
|
|
19
|
+
`godharness: no prebuilt binary for ${process.platform}-${process.arch}.`,
|
|
20
|
+
`\nInstall ${name} directly, or build from source with \`cargo install godharness-cli\`.`
|
|
21
|
+
);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const finished = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
26
|
+
|
|
27
|
+
if (finished.error) {
|
|
28
|
+
console.error(`godharness: could not run ${binary}: ${finished.error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// A signalled child reports a null status, which must not become a success.
|
|
33
|
+
process.exit(finished.status === null ? 1 : finished.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@godharness/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent-context and documentation-governance framework.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/tomerwave/godharness.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/tomerwave/godharness#readme",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"agents",
|
|
13
|
+
"documentation",
|
|
14
|
+
"context",
|
|
15
|
+
"developer-tools"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"godharness": "bin/godharness.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/godharness.js",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"optionalDependencies": {
|
|
26
|
+
"@godharness/cli-darwin-arm64": "0.1.0",
|
|
27
|
+
"@godharness/cli-darwin-x64": "0.1.0",
|
|
28
|
+
"@godharness/cli-linux-arm64": "0.1.0",
|
|
29
|
+
"@godharness/cli-linux-x64": "0.1.0",
|
|
30
|
+
"@godharness/cli-win32-x64": "0.1.0"
|
|
31
|
+
}
|
|
32
|
+
}
|