godpowers 1.6.17 → 1.6.20

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,286 @@
1
+ /**
2
+ * Route quality sync.
3
+ *
4
+ * Detects disconnected route automation surfaces: symbolic spawn tokens,
5
+ * unresolved agent targets, contextual exits without an approved reason, and
6
+ * composite flows that should be represented as primary plus secondary or
7
+ * parallel spawns.
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+
13
+ const { parseSimpleYaml } = require('./intent');
14
+
15
+ const LOG_PATH = '.godpowers/surface/ROUTE-QUALITY-SYNC.md';
16
+
17
+ const CONTEXTUAL_NEXT_ALLOWED = new Set([
18
+ '/god',
19
+ '/god-agent-audit',
20
+ '/god-budget',
21
+ '/god-cache-clear',
22
+ '/god-check-todos',
23
+ '/god-context-scan',
24
+ '/god-cost',
25
+ '/god-discuss',
26
+ '/god-doctor',
27
+ '/god-extension-add',
28
+ '/god-extension-info',
29
+ '/god-extension-list',
30
+ '/god-extension-remove',
31
+ '/god-graph',
32
+ '/god-help',
33
+ '/god-lifecycle',
34
+ '/god-list-assumptions',
35
+ '/god-locate',
36
+ '/god-logs',
37
+ '/god-metrics',
38
+ '/god-next',
39
+ '/god-redo',
40
+ '/god-resume-work',
41
+ '/god-test-extension',
42
+ '/god-thread',
43
+ '/god-trace',
44
+ '/god-workstream'
45
+ ]);
46
+
47
+ const STANDARDS_EXEMPT_COMMANDS = new Set([
48
+ '/god-archaeology',
49
+ '/god-audit',
50
+ '/god-automation-setup',
51
+ '/god-debug',
52
+ '/god-discuss',
53
+ '/god-explore',
54
+ '/god-feature',
55
+ '/god-hotfix',
56
+ '/god-hygiene',
57
+ '/god-init',
58
+ '/god-org-context',
59
+ '/god-party',
60
+ '/god-pause-work',
61
+ '/god-preflight',
62
+ '/god-reconstruct',
63
+ '/god-roadmap-check',
64
+ '/god-smite',
65
+ '/god-tech-debt'
66
+ ]);
67
+
68
+ function read(projectRoot, relPath) {
69
+ const file = path.join(projectRoot, relPath);
70
+ if (!fs.existsSync(file)) return '';
71
+ return fs.readFileSync(file, 'utf8');
72
+ }
73
+
74
+ function write(projectRoot, relPath, content) {
75
+ const file = path.join(projectRoot, relPath);
76
+ fs.mkdirSync(path.dirname(file), { recursive: true });
77
+ fs.writeFileSync(file, content);
78
+ }
79
+
80
+ function listFiles(projectRoot, relDir, pattern) {
81
+ const dir = path.join(projectRoot, relDir);
82
+ if (!fs.existsSync(dir)) return [];
83
+ return fs.readdirSync(dir)
84
+ .filter((name) => pattern.test(name))
85
+ .sort()
86
+ .map((name) => `${relDir}/${name}`.replace(/\\/g, '/'));
87
+ }
88
+
89
+ function arr(value) {
90
+ return Array.isArray(value) ? value : [];
91
+ }
92
+
93
+ function parseRoute(projectRoot, routePath) {
94
+ try {
95
+ return parseSimpleYaml(read(projectRoot, routePath)) || {};
96
+ } catch (err) {
97
+ return {};
98
+ }
99
+ }
100
+
101
+ function addCheck(checks, id, status, relPath, message, opts = {}) {
102
+ checks.push({
103
+ area: 'route-quality',
104
+ id,
105
+ status,
106
+ path: relPath,
107
+ message,
108
+ severity: opts.severity || (status === 'fresh' ? 'info' : 'warning'),
109
+ spawn: opts.spawn || null
110
+ });
111
+ }
112
+
113
+ function spawnTokens(route) {
114
+ const execution = route.execution || {};
115
+ return normalizeSpawnList([
116
+ ...arr(execution.spawns),
117
+ ...arr(execution['secondary-spawns']),
118
+ ...arr(execution['parallel-spawns'])
119
+ ]);
120
+ }
121
+
122
+ function normalizeSpawnList(tokens) {
123
+ return tokens
124
+ .map((token) => {
125
+ if (token && typeof token === 'object' && token.agent) return token.agent;
126
+ return token;
127
+ })
128
+ .filter((token) => token !== null && token !== undefined);
129
+ }
130
+
131
+ function isAtomicSpawn(token) {
132
+ return token === 'built-in' || /^god-[a-z0-9-]+$/.test(token);
133
+ }
134
+
135
+ function detect(projectRoot) {
136
+ const checks = [];
137
+ const routes = listFiles(projectRoot, 'routing', /^god.*\.yaml$/);
138
+ const agents = new Set(listFiles(projectRoot, 'agents', /^god.*\.md$/)
139
+ .map((file) => path.basename(file, '.md')));
140
+ let symbolicCount = 0;
141
+ let unresolvedCount = 0;
142
+ let contextualExitCount = 0;
143
+ let standardsExemptCount = 0;
144
+
145
+ for (const routePath of routes) {
146
+ const route = parseRoute(projectRoot, routePath);
147
+ const command = route.metadata && route.metadata.command
148
+ ? route.metadata.command
149
+ : `/${path.basename(routePath, '.yaml')}`;
150
+
151
+ for (const token of spawnTokens(route)) {
152
+ if (!isAtomicSpawn(String(token))) {
153
+ symbolicCount++;
154
+ addCheck(
155
+ checks,
156
+ `symbolic-spawn-${command.replace(/[^a-z0-9]+/gi, '-')}`,
157
+ 'stale',
158
+ routePath,
159
+ `${command} uses symbolic spawn token ${token}.`,
160
+ { spawn: 'god-auditor' }
161
+ );
162
+ continue;
163
+ }
164
+ if (String(token).startsWith('god-') && !agents.has(String(token))) {
165
+ unresolvedCount++;
166
+ addCheck(
167
+ checks,
168
+ `unresolved-spawn-${command.replace(/[^a-z0-9]+/gi, '-')}-${token}`,
169
+ 'stale',
170
+ routePath,
171
+ `${command} references missing agent ${token}.`,
172
+ { spawn: 'god-auditor' }
173
+ );
174
+ }
175
+ }
176
+
177
+ const next = route['success-path'] && route['success-path']['next-recommended'];
178
+ const conditionalNext = route['success-path'] && arr(route['success-path']['conditional-next']);
179
+ if (next === 'varies' && conditionalNext.length === 0) {
180
+ if (CONTEXTUAL_NEXT_ALLOWED.has(command)) {
181
+ contextualExitCount++;
182
+ } else {
183
+ addCheck(
184
+ checks,
185
+ `unapproved-varies-${command.replace(/[^a-z0-9]+/gi, '-')}`,
186
+ 'stale',
187
+ routePath,
188
+ `${command} uses next-recommended: varies without an approved contextual-exit classification.`,
189
+ { spawn: 'god-roadmap-reconciler' }
190
+ );
191
+ }
192
+ }
193
+
194
+ const writes = arr(route.execution && route.execution.writes);
195
+ const writesDurableSurface = writes.length > 0;
196
+ if (writesDurableSurface && !route.standards) {
197
+ if (STANDARDS_EXEMPT_COMMANDS.has(command)) {
198
+ standardsExemptCount++;
199
+ } else {
200
+ addCheck(
201
+ checks,
202
+ `missing-standards-${command.replace(/[^a-z0-9]+/gi, '-')}`,
203
+ 'stale',
204
+ routePath,
205
+ `${command} writes durable surfaces but has no standards block or approved exemption.`,
206
+ { spawn: 'god-auditor' }
207
+ );
208
+ }
209
+ }
210
+ }
211
+
212
+ if (symbolicCount === 0) {
213
+ addCheck(checks, 'atomic-spawn-tokens', 'fresh', 'routing/', 'All route spawn tokens are atomic.');
214
+ }
215
+ if (unresolvedCount === 0) {
216
+ addCheck(checks, 'resolved-spawn-targets', 'fresh', 'routing/', 'All route spawn targets resolve to shipped agents or built-in runtime work.');
217
+ }
218
+ addCheck(
219
+ checks,
220
+ 'contextual-exit-policy',
221
+ checks.some((check) => check.id.startsWith('unapproved-varies-')) ? 'stale' : 'fresh',
222
+ 'routing/',
223
+ `${contextualExitCount} contextual route exits are approved and all other next routes are explicit.`,
224
+ { spawn: checks.some((check) => check.id.startsWith('unapproved-varies-')) ? 'god-roadmap-reconciler' : null }
225
+ );
226
+ addCheck(
227
+ checks,
228
+ 'standards-policy',
229
+ checks.some((check) => check.id.startsWith('missing-standards-')) ? 'stale' : 'fresh',
230
+ 'routing/',
231
+ `${standardsExemptCount} durable-writing routes have approved standards exemptions and all other writing routes declare standards.`,
232
+ { spawn: checks.some((check) => check.id.startsWith('missing-standards-')) ? 'god-auditor' : null }
233
+ );
234
+
235
+ const stale = checks.filter((check) => check.status !== 'fresh');
236
+ return {
237
+ status: stale.length === 0 ? 'fresh' : 'stale',
238
+ checks,
239
+ stale
240
+ };
241
+ }
242
+
243
+ function appendLog(projectRoot, before, after) {
244
+ const now = new Date().toISOString();
245
+ const lines = [];
246
+ if (fs.existsSync(path.join(projectRoot, LOG_PATH))) {
247
+ lines.push(read(projectRoot, LOG_PATH).replace(/\s*$/, ''));
248
+ lines.push('');
249
+ } else {
250
+ lines.push('# Route Quality Sync Log');
251
+ lines.push('');
252
+ lines.push('- [DECISION] This file records route-quality sync checks run by Godpowers.');
253
+ lines.push('');
254
+ }
255
+ lines.push(`## ${now}`);
256
+ lines.push('');
257
+ lines.push(`- [DECISION] Route quality status before apply was ${before.status}.`);
258
+ lines.push(`- [DECISION] Route quality status after apply is ${after.status}.`);
259
+ lines.push('');
260
+ write(projectRoot, LOG_PATH, lines.join('\n'));
261
+ }
262
+
263
+ function run(projectRoot, opts = {}) {
264
+ const before = detect(projectRoot);
265
+ const after = detect(projectRoot);
266
+ if (opts.log !== false) appendLog(projectRoot, before, after);
267
+ return {
268
+ before,
269
+ after,
270
+ applied: [],
271
+ logPath: opts.log === false ? null : LOG_PATH
272
+ };
273
+ }
274
+
275
+ function summary(report) {
276
+ return report.status === 'fresh' ? 'fresh' : `${report.stale.length} stale`;
277
+ }
278
+
279
+ module.exports = {
280
+ LOG_PATH,
281
+ CONTEXTUAL_NEXT_ALLOWED,
282
+ STANDARDS_EXEMPT_COMMANDS,
283
+ detect,
284
+ run,
285
+ summary
286
+ };
package/lib/router.js CHANGED
@@ -221,7 +221,10 @@ function getSpawnedAgents(command) {
221
221
  if (!routing || !routing.execution) return [];
222
222
  const primary = routing.execution.spawns || [];
223
223
  const secondary = routing.execution['secondary-spawns'] || [];
224
- return [...primary, ...secondary];
224
+ const parallel = routing.execution['parallel-spawns'] || [];
225
+ return [...primary, ...secondary, ...parallel]
226
+ .map(spawn => (spawn && typeof spawn === 'object' && spawn.agent) ? spawn.agent : spawn)
227
+ .filter(spawn => spawn !== null && spawn !== undefined);
225
228
  }
226
229
 
227
230
  /**
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "godpowers",
3
- "version": "1.6.17",
3
+ "version": "1.6.20",
4
4
  "description": "AI-powered development system: 109 slash commands and 40 specialist agents that take a project from raw idea to hardened production. Runs inside Claude Code, Codex, Cursor, Windsurf, Gemini, and 10+ other AI coding tools.",
5
5
  "bin": {
6
6
  "godpowers": "./bin/install.js"
7
7
  },
8
8
  "scripts": {
9
- "test": "node scripts/validate-skills.js && node scripts/test-doc-surface-counts.js && bash scripts/smoke.sh && node scripts/test-runtime.js && node scripts/test-router.js && node scripts/test-recipes.js && node scripts/test-context-writer.js && node scripts/test-pillars.js && node scripts/test-artifact-linter.js && node scripts/test-artifact-diff.js && node scripts/test-design-foundation.js && node scripts/test-linkage.js && node scripts/test-impact.js && node scripts/test-reverse-sync.js && node scripts/test-planning-systems.js && node scripts/test-feature-awareness.js && node scripts/test-repo-doc-sync.js && node scripts/test-integration.js && node scripts/test-cross-artifact.js && node scripts/test-awesome-design.js && node scripts/test-skillui-bridge.js && node scripts/test-runtime-verification.js && node scripts/test-agent-browser.js && node scripts/test-mode-d.js && node scripts/test-runtime-heuristics.js && node scripts/test-agent-validator.js && node scripts/test-story-validator.js && node scripts/test-state.js && node scripts/test-dashboard.js && node scripts/test-automation-providers.js && node scripts/test-intent.js && node scripts/test-events.js && node scripts/test-golden-artifacts.js && node scripts/test-install-smoke.js && node scripts/test-checkpoint.js && node scripts/test-extensions.js && node scripts/test-event-reader.js && node scripts/test-state-lock.js && node scripts/test-cost-saver.js && node scripts/test-budget-onoff.js && node scripts/test-workflow-runner.js && npm run test:e2e && node scripts/test-otel-exporter.js && node scripts/test-extensions-publish.js",
9
+ "test": "node scripts/validate-skills.js && node scripts/test-doc-surface-counts.js && bash scripts/smoke.sh && node scripts/test-runtime.js && node scripts/test-router.js && node scripts/test-recipes.js && node scripts/test-context-writer.js && node scripts/test-pillars.js && node scripts/test-artifact-linter.js && node scripts/test-artifact-diff.js && node scripts/test-design-foundation.js && node scripts/test-linkage.js && node scripts/test-impact.js && node scripts/test-reverse-sync.js && node scripts/test-planning-systems.js && node scripts/test-feature-awareness.js && node scripts/test-repo-doc-sync.js && node scripts/test-repo-surface-sync.js && node scripts/test-automation-surface-sync.js && node scripts/test-integration.js && node scripts/test-cross-artifact.js && node scripts/test-awesome-design.js && node scripts/test-skillui-bridge.js && node scripts/test-runtime-verification.js && node scripts/test-agent-browser.js && node scripts/test-mode-d.js && node scripts/test-runtime-heuristics.js && node scripts/test-agent-validator.js && node scripts/test-story-validator.js && node scripts/test-state.js && node scripts/test-dashboard.js && node scripts/test-automation-providers.js && node scripts/test-intent.js && node scripts/test-events.js && node scripts/test-golden-artifacts.js && node scripts/test-install-smoke.js && node scripts/test-checkpoint.js && node scripts/test-extensions.js && node scripts/test-event-reader.js && node scripts/test-state-lock.js && node scripts/test-cost-saver.js && node scripts/test-budget-onoff.js && node scripts/test-workflow-runner.js && npm run test:e2e && node scripts/test-otel-exporter.js && node scripts/test-extensions-publish.js",
10
10
  "prepublishOnly": "npm test",
11
11
  "validate-skills": "node scripts/validate-skills.js",
12
12
  "test:surface": "node scripts/test-doc-surface-counts.js",
@@ -9,9 +9,11 @@ prerequisites:
9
9
  required: []
10
10
 
11
11
  execution:
12
- spawns: [multi]
12
+ spawns: [built-in]
13
13
  context: fresh
14
- writes: []
14
+ parallel-spawns: [god-pm, god-architect, god-executor, god-quality-reviewer, god-harden-auditor, god-launch-strategist]
15
+ writes:
16
+ - .godpowers/party/*.md
15
17
 
16
18
  success-path:
17
19
  next-recommended: /god-next
@@ -10,9 +10,18 @@ prerequisites:
10
10
  - .godpowers/stories/STORY-*.md
11
11
 
12
12
  execution:
13
- spawns: [god-planner+god-executor+reviewers]
13
+ spawns: [god-planner]
14
14
  context: fresh
15
- writes: []
15
+ secondary-spawns: [god-executor, god-spec-reviewer, god-quality-reviewer]
16
+ writes:
17
+ - .godpowers/stories/STORY-*.md
18
+ - source code
19
+
20
+ standards:
21
+ substitution-test: true
22
+ three-label-test: true
23
+ have-nots: [B-01, B-02, B-03, B-04, B-05, B-06, B-07, B-08, B-09, B-10, B-11, B-12]
24
+ gate-on-failure: pause-for-user
16
25
 
17
26
  success-path:
18
27
  next-recommended: /god-story-verify
@@ -0,0 +1,25 @@
1
+ apiVersion: godpowers/v1
2
+ kind: Recipe
3
+ metadata:
4
+ name: automation-setup
5
+ category: maintaining
6
+ description: "Set up and verify native Godpowers automations"
7
+
8
+ triggers:
9
+ intent-keywords:
10
+ - "create automation"
11
+ - "set up automation"
12
+ - "recurring godpowers"
13
+ - "weekly automation"
14
+ - "automation status"
15
+
16
+ sequences:
17
+ default:
18
+ description: "Set up and verify native Godpowers automations"
19
+ steps:
20
+ - command: "/god-automation-setup"
21
+ why: "Create approved host-native automation"
22
+ - command: "/god-automation-status"
23
+ why: "Confirm configured providers and active templates"
24
+
25
+ default-sequence: default
@@ -0,0 +1,26 @@
1
+ apiVersion: godpowers/v1
2
+ kind: Recipe
3
+ metadata:
4
+ name: context-refresh
5
+ category: knowledge
6
+ description: "Refresh agent context after repo, docs, or workflow changes"
7
+
8
+ triggers:
9
+ intent-keywords:
10
+ - "context refresh"
11
+ - "update agent context"
12
+ - "make agents aware"
13
+ - "new godpowers features"
14
+
15
+ sequences:
16
+ default:
17
+ description: "Refresh agent context after repo, docs, or workflow changes"
18
+ steps:
19
+ - command: "/god-context"
20
+ why: "Refresh portable agent context files"
21
+ - command: "/god-sync"
22
+ why: "Apply feature-awareness and Pillars sync checks"
23
+ - command: "/god-status"
24
+ why: "Confirm proactive checks are fresh"
25
+
26
+ default-sequence: default
@@ -0,0 +1,27 @@
1
+ apiVersion: godpowers/v1
2
+ kind: Recipe
3
+ metadata:
4
+ name: release-maintenance
5
+ category: maintaining
6
+ description: "Release closeout, package, docs, and published-surface maintenance"
7
+
8
+ triggers:
9
+ intent-keywords:
10
+ - "create release"
11
+ - "publish npm"
12
+ - "update readme badge"
13
+ - "release notes"
14
+ - "package release"
15
+
16
+ sequences:
17
+ default:
18
+ description: "Release closeout, package, docs, and published-surface maintenance"
19
+ steps:
20
+ - command: "/god-sync"
21
+ why: "Refresh project artifacts and repo surface checks before release work"
22
+ - command: "/god-docs"
23
+ why: "Verify README, release notes, badges, and public docs against code"
24
+ - command: "/god-version"
25
+ why: "Confirm installed runtime and package version visibility"
26
+
27
+ default-sequence: default
@@ -0,0 +1,29 @@
1
+ apiVersion: godpowers/v1
2
+ kind: Recipe
3
+ metadata:
4
+ name: story-work
5
+ category: feature-addition
6
+ description: "Create, build, verify, and close a scoped story"
7
+
8
+ triggers:
9
+ intent-keywords:
10
+ - "create story"
11
+ - "build story"
12
+ - "implement story"
13
+ - "verify story"
14
+ - "close story"
15
+
16
+ sequences:
17
+ default:
18
+ description: "Create, build, verify, and close a scoped story"
19
+ steps:
20
+ - command: "/god-story"
21
+ why: "Create or select a runtime-testable story"
22
+ - command: "/god-story-build"
23
+ why: "Plan and implement the selected story with reviewers"
24
+ - command: "/god-story-verify"
25
+ why: "Runtime-test the story acceptance criteria"
26
+ - command: "/god-story-close"
27
+ why: "Close the story only after verification passes"
28
+
29
+ default-sequence: default
@@ -28,6 +28,10 @@ documentation claims such as README badges, version references, public surface
28
28
  counts, and `/god-doctor` sample counts. Report this as `Agent: none, local
29
29
  runtime only`.
30
30
 
31
+ Then call `lib/repo-surface-sync.run(projectRoot)` so documentation work sees
32
+ whether route, package, agent, workflow, recipe, extension, or release policy
33
+ surfaces disagree before prose claims are rewritten.
34
+
31
35
  Spawn **god-docs-writer** in fresh context.
32
36
 
33
37
  The agent:
@@ -62,6 +66,7 @@ Godpowers may invoke docs work proactively in two ways:
62
66
  | Docs changed after code changed | Spawn `god-docs-writer` in drift-check mode when current workflow owns docs | Do not invent new docs scope |
63
67
  | Code changed after docs that claim current behavior | Suggest `/god-docs` or spawn drift-check inside `/god-mode`, `/god-feature`, `/god-refactor`, or `/god-sync` closeout | Verify claims against code before editing |
64
68
  | Repo docs surface drift | Run `lib/repo-doc-sync.run` for safe mechanical fixes, then spawn `god-docs-writer` for prose | Do not auto-invent changelog or release notes |
69
+ | Repo structural surface drift | Run `lib/repo-surface-sync.run` and include findings in docs scope | Do not invent routing or agent ownership prose without evidence |
65
70
  | `REVIEW-REQUIRED.md` contains docs drift items | Suggest `/god-review-changes` first | Do not auto-clear review items |
66
71
 
67
72
  When auto-invoked, show:
@@ -72,6 +77,7 @@ Auto-invoked:
72
77
  Agent: god-docs-writer
73
78
  Local syncs:
74
79
  + repo-doc-sync: <safe mechanical fixes, prose review needed, or no-op>
80
+ + repo-surface-sync: <structural surface fresh, scoped findings, or no-op>
75
81
  + docs-drift-check: <N claims checked, N drift items>
76
82
  Artifacts: .godpowers/docs/UPDATE-LOG.md or no-op
77
83
  Log: .godpowers/docs/UPDATE-LOG.md
@@ -126,6 +126,19 @@ helper writes only safe mechanical version, badge, and count claims. It should
126
126
  recommend `god-docs-writer` when narrative release, contribution, support, or
127
127
  security prose needs judgment.
128
128
 
129
+ ## Repo Surface Sync
130
+
131
+ For initialized projects, `/god-doctor` calls `lib/repo-surface-sync.detect`
132
+ as a read-only diagnostic. It reports structural drift across command routing,
133
+ package payload rules, agent spawn targets, workflow metadata, recipe command
134
+ routes, extension packs, route quality, recipe coverage, release surfaces, and
135
+ release policy checks.
136
+
137
+ `/god-doctor --fix` may call
138
+ `lib/repo-surface-sync.run(projectRoot, { fixRouting: true })` to create
139
+ missing routing metadata for shipped slash-command skills. Other structural
140
+ findings should recommend the scoped specialist named by the helper.
141
+
129
142
  ## Implementation
130
143
 
131
144
  Built-in, no spawned agent. Reads:
@@ -135,6 +148,14 @@ Built-in, no spawned agent. Reads:
135
148
  - `lib/feature-awareness.detect(projectRoot)` for existing-project upgrade
136
149
  awareness
137
150
  - `lib/repo-doc-sync.detect(projectRoot)` for repo documentation freshness
151
+ - `lib/repo-surface-sync.detect(projectRoot)` for structural repo surface
152
+ freshness
153
+ - `lib/route-quality-sync.detect(projectRoot)` through repo surface sync for
154
+ atomic spawn and contextual route exit freshness
155
+ - `lib/recipe-coverage-sync.detect(projectRoot)` through repo surface sync for
156
+ high-frequency intent recipe coverage freshness
157
+ - `lib/release-surface-sync.detect(projectRoot)` through repo surface sync for
158
+ release-facing surface freshness
138
159
  - `bin/install.js` VERSION constant
139
160
 
140
161
  ## Exit codes
@@ -307,6 +307,7 @@ Sync status:
307
307
  + feature-awareness: <recorded runtime features, refreshed context, or no-op>
308
308
  + reverse-sync: <counts and result>
309
309
  + repo-doc-sync: <refreshed repo docs, recommended god-docs-writer, or no-op>
310
+ + repo-surface-sync: <checked structural surfaces, recommended scoped agents, or no-op>
310
311
  + pillars-sync: <counts and result>
311
312
  + checkpoint-sync: <created, updated, no-op, or skipped>
312
313
  + context-refresh: <spawned, no-op, or skipped>
@@ -330,6 +331,11 @@ The mandatory final sync also receives repo documentation sync through
330
331
  security policy checks, and Pillars context planning arc-ready before the
331
332
  project run is declared complete.
332
333
 
334
+ The mandatory final sync also receives repo surface sync through `/god-sync`.
335
+ This keeps routes, packages, agent handoffs, workflow metadata, recipe routes,
336
+ extension packs, and release policy checks aligned before the project run is
337
+ declared complete.
338
+
333
339
  If `/god-mode` resumes an existing `.godpowers` project that lacks Pillars,
334
340
  it Pillar-izes the project before continuing. Existing `.godpowers` artifacts
335
341
  become managed source references in the relevant `agents/*.md` files.
@@ -352,6 +358,7 @@ Sync status:
352
358
  + feature-awareness: <recorded runtime features, refreshed context, or no-op>
353
359
  + reverse-sync: <counts and result>
354
360
  + repo-doc-sync: <refreshed repo docs, recommended god-docs-writer, or no-op>
361
+ + repo-surface-sync: <checked structural surfaces, recommended scoped agents, or no-op>
355
362
  + pillars-sync: <counts and result>
356
363
  + checkpoint-sync: <created, updated, no-op, or skipped>
357
364
  + context-refresh: <spawned, no-op, or skipped>
@@ -25,6 +25,9 @@ Before reading routing data or calling runtime modules, resolve the Godpowers ru
25
25
  4. For status output, load `<runtimeRoot>/lib/dashboard.js` and call
26
26
  `dashboard.compute(projectRoot)`. Use `dashboard.render(result)` for the
27
27
  shared dashboard section before adding route-specific detail.
28
+ 5. If the checkout runtime and installed runtime differ, say which runtime root
29
+ was used. Only call the output a manual disk scan when `lib/dashboard.js`
30
+ cannot be loaded at all.
28
31
 
29
32
  ## Three modes of invocation
30
33
 
@@ -347,11 +350,13 @@ Godpowers Next
347
350
 
348
351
  Godpowers Dashboard
349
352
 
353
+ Source: runtime dashboard (lib/dashboard.js)
354
+
350
355
  Current status:
351
356
  State: proposal
352
357
  Phase: [plain-language phase] (tier [human ordinal] of [human total])
353
358
  Step: [current step label] (step [n] of [total steps])
354
- Progress: [pct]% ([done] of [total] steps complete)
359
+ Progress: [pct]% workflow progress ([done] of [total] tracked steps complete)
355
360
  Worktree: [clean | modified files unstaged | staged changes | mixed]
356
361
  Index: [untouched | staged files listed]
357
362
 
@@ -359,7 +364,7 @@ Planning visibility:
359
364
  PRD: [done | pending | missing | deferred] [path when present]
360
365
  Roadmap: [done | pending | missing | deferred] [path when present]
361
366
  Current milestone: [roadmap milestone, phase, tier, or next planning gate]
362
- Completion: [pct]% [basis from state.json, PROGRESS.md, or artifacts]
367
+ Completion basis: [state.json, PROGRESS.md, artifacts, or audit score source]
363
368
 
364
369
  Suggested next: [/god-X]
365
370
 
@@ -38,9 +38,10 @@ Re-derive state from disk. Your memory is not authoritative. The file system is.
38
38
  - If PROGRESS.md says "done" but artifact is missing: FLAG as phantom resume
39
39
  - If artifact exists but PROGRESS.md says "pending": FLAG as untracked work
40
40
  8. Report the Godpowers Dashboard from `dashboard.render(result)`:
41
+ - Dashboard source: runtime dashboard or unavailable manual scan
41
42
  - Current mode and scale
42
43
  - Current phase, tier number, step label, and step number
43
- - Progress summary: percentage, completed step count, current step number
44
+ - Workflow progress summary: percentage, completed step count, current step number
44
45
  - Planning visibility: PRD status, roadmap status, active milestone, and
45
46
  completion basis
46
47
  - What happened recently, using CHECKPOINT.md actions when available
@@ -55,11 +56,16 @@ Re-derive state from disk. Your memory is not authoritative. The file system is.
55
56
  If the runtime module is unavailable, fall back to the manual scan below and
56
57
  say `Dashboard engine: unavailable, manual scan used`.
57
58
 
59
+ Never mix workflow progress with audit, hygiene, or remediation scores. If an
60
+ audit score is relevant, label it separately as `Audit score`.
61
+
58
62
  ## Output Format
59
63
 
60
64
  ```text
61
65
  Godpowers Dashboard
62
66
 
67
+ Source: runtime dashboard (lib/dashboard.js)
68
+
63
69
  Mode: A (greenfield) Scale: medium
64
70
  Started: 2026-05-09
65
71
 
@@ -67,7 +73,7 @@ Current status:
67
73
  State: in progress
68
74
  Phase: Planning (tier 2 of 4, internal tier-1)
69
75
  Step: Architecture (step 3 of 13)
70
- Progress: 15% (2 of 13 steps complete)
76
+ Progress: 15% workflow progress (2 of 13 tracked steps complete)
71
77
  Worktree: clean
72
78
  Index: untouched
73
79
 
@@ -75,7 +81,7 @@ Planning visibility:
75
81
  PRD: done .godpowers/prd/PRD.md
76
82
  Roadmap: pending
77
83
  Current milestone: Planning / Architecture
78
- Completion: 15% based on PROGRESS.md tracked steps
84
+ Completion basis: .godpowers/state.json workflow steps
79
85
 
80
86
  What happened recently:
81
87
  1. PRD artifact verified on disk
@@ -173,6 +179,8 @@ Report:
173
179
  - Sync: `fresh`, `missing`, `stale`, or `suggest /god-sync`
174
180
  - Docs: `fresh`, `<N> stale, suggest /god-docs`, `possible drift, suggest
175
181
  /god-docs`, or `repo-doc-sync ran`
182
+ - Repo surface: `fresh`, `<N> stale, suggest /god-doctor`, or
183
+ `repo-surface-sync ran`
176
184
  - Runtime: `not-applicable`, `known URL, suggest /god-test-runtime`, or
177
185
  `no known URL, defer deployed verification`
178
186
  - Automation: `not configured`, `<N> active`, or