Skip to content

Commit 592b5bb

Browse files
cobusgreylingCobus Greyling
andauthored
feat: add goal-audit npm package (publish from loop-engineering) (#53)
Mirror tools/goal-audit from goal-engineering for npm releases via release-goal-audit.yml tag workflow. Source of truth remains cobusgreyling/goal-engineering. Co-authored-by: Cobus Greyling <cobusgreyling@Cobuss-MacBook-Pro-2.local>
1 parent e968fca commit 592b5bb

22 files changed

Lines changed: 1011 additions & 0 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release goal-audit
2+
3+
on:
4+
push:
5+
tags:
6+
- 'goal-audit-v*'
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
test-and-publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version: '22'
21+
registry-url: 'https://registry.npmjs.org'
22+
cache: 'npm'
23+
cache-dependency-path: tools/goal-audit/package-lock.json
24+
25+
- name: Ensure npm supports trusted publishing (OIDC)
26+
run: npm install -g npm@latest
27+
28+
- name: Install, build, test
29+
working-directory: tools/goal-audit
30+
run: |
31+
npm ci
32+
npm run build
33+
npm test
34+
35+
- name: Publish to npm
36+
working-directory: tools/goal-audit
37+
run: npm publish --access public --provenance
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ build/
2929
**/node_modules/
3030
!tools/loop-audit/dist/
3131
!tools/loop-cost/dist/
32+
!tools/goal-audit/dist/
3233
*.egg-info/
3334

3435
# State files that should not be committed in consumer projects (reference repo dogfoods STATE.md)

tools/goal-audit/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# goal-audit
2+
3+
Goal Readiness Score CLI for Grok Build `/goal` workflows.
4+
5+
## Install / run
6+
7+
```bash
8+
npx @cobusgreyling/goal-audit .
9+
npx @cobusgreyling/goal-audit . --suggest
10+
npx @cobusgreyling/goal-audit . --json
11+
```
12+
13+
## Levels
14+
15+
| Level | Score | Meaning |
16+
|-------|-------|---------|
17+
| G0 | < 40 | Ad hoc `/goal` usage |
18+
| G1 | 40–59 | GOAL.md + assisted goals |
19+
| G2 | 60–79 | Verifier + test gates |
20+
| G3 | 80+ | CI, budget, run log |
21+
22+
## Development
23+
24+
```bash
25+
npm install
26+
npm test
27+
```

tools/goal-audit/dist/auditor.d.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export interface GoalSignals {
2+
goalFile: {
3+
present: boolean;
4+
path?: string;
5+
};
6+
goalConfig: {
7+
present: boolean;
8+
};
9+
skills: {
10+
count: number;
11+
goalSkills: string[];
12+
};
13+
verifier: {
14+
present: boolean;
15+
};
16+
scoper: {
17+
present: boolean;
18+
};
19+
agentsMd: {
20+
present: boolean;
21+
mentionsGoal: boolean;
22+
};
23+
patterns: {
24+
documented: boolean;
25+
};
26+
safety: {
27+
safetyDocPresent: boolean;
28+
budgetDoc: boolean;
29+
};
30+
tests: {
31+
present: boolean;
32+
};
33+
ci: {
34+
present: boolean;
35+
};
36+
runLog: {
37+
present: boolean;
38+
};
39+
}
40+
export interface Finding {
41+
level: 'ok' | 'warn' | 'fail';
42+
message: string;
43+
}
44+
export interface AuditResult {
45+
target: string;
46+
score: number;
47+
level: 'G0' | 'G1' | 'G2' | 'G3';
48+
assessment: string;
49+
signals: GoalSignals;
50+
findings: Finding[];
51+
recommendations: string[];
52+
}
53+
export declare function auditProject(target: string): Promise<AuditResult>;
54+
//# sourceMappingURL=auditor.d.ts.map

tools/goal-audit/dist/auditor.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/goal-audit/dist/auditor.js

Lines changed: 240 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)