genesis-compiler 1.10.8 → 1.10.9

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.
@@ -223,8 +223,11 @@ the installed Skill do not rewrite what an already-run command proved.
223
223
 
224
224
  `City regions` and `Indexers` control only the derived structural maps. Indexers
225
225
  identify language adapters. City regions can exclude test/spec paths and group
226
- indexed files into deterministic regions and campuses. Both projections are
227
- navigation data, not proof of complete runtime behavior.
226
+ indexed files into deterministic regions and campuses. A project adds its own
227
+ exclusions, such as example fixtures, in a `## City exclusions` section of
228
+ `genesis/stack.md` with the same ``- Ignore `glob` `` lines (or `- Nothing.`);
229
+ they add to the component exclusions. Both projections are navigation data, not
230
+ proof of complete runtime behavior.
228
231
 
229
232
  ## Project customization
230
233
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-compiler",
3
- "version": "1.10.8",
3
+ "version": "1.10.9",
4
4
  "type": "module",
5
5
  "description": "An agent-independent prompt, multi-language code-index, cleanup, and verification companion with project agent guidance.",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis",
3
- "version": "1.10.8",
3
+ "version": "1.10.9",
4
4
  "description": "Makes Codex aware of optional Genesis adoption for existing projects.",
5
5
  "author": {
6
6
  "name": "Mobily Enterprises"
@@ -151,13 +151,26 @@ technology's workspace substrate exists. Finishing an item or resuming a
151
151
  session does not itself require a broad verification run. Keep full output in
152
152
  local artifacts, preserve exit status, and read summaries and relevant failure
153
153
  excerpts before expanding logs. Do not weaken assertions or omit required
154
- coverage to save time or tokens. An unconfigured result
155
- means the declared workspace or checks do not exist yet; it is not a failing
156
- check. Before reporting completion, compare the requested observable behavior,
157
- required inputs and resources, declared project operations, and focused evidence
158
- with what actually exists. Report files changed, checks actually run,
159
- anything not proven, and anything still requiring attention. Never claim that
160
- an unrun check passed or that passing checks prove the whole product.
154
+ coverage to save time or tokens.
155
+
156
+ A change to user-visible behavior ships with the browser specs that cover it
157
+ updated and run in the same change, before pushing. When an existing spec
158
+ fails, first classify it as outdated (the behavior changed on purpose) or as a
159
+ regression. Fix regressions in the product, and change a spec only for an
160
+ intended change, naming the change that made it outdated. Test resources a
161
+ managed host supplies, such as a login state, base URL, browser, or ports, are
162
+ the host's contract. If they do not work (for example, tests run signed out
163
+ despite a supplied login), report the host defect with evidence and stop; never
164
+ compensate in the project by rewriting cookies or adding its own login or
165
+ browser.
166
+
167
+ An unconfigured result means the declared workspace or checks do not exist
168
+ yet; it is not a failing check. Before reporting completion, compare the
169
+ requested observable behavior, required inputs and resources, declared project
170
+ operations, and focused evidence with what actually exists. Report files
171
+ changed, checks actually run, anything not proven, and anything still requiring
172
+ attention. Never claim that an unrun check passed or that passing checks prove
173
+ the whole product.
161
174
 
162
175
  ## Subsystem maintenance
163
176
 
@@ -7,8 +7,8 @@ const FALLBACK_LINE = /^- Fallback `([^`]+)` as `([^`]+)`[ \t]*$/u;
7
7
  const REGEXP_SPECIAL = /[.+^${}()|[\]\\]/u;
8
8
  const compiledGlobPatterns = new Map();
9
9
 
10
- function invalid(piecePath, message) {
11
- throw new GenesisError('STACK_PIECE_INVALID', message, { path: piecePath });
10
+ function invalid(piecePath, message, code = 'STACK_PIECE_INVALID') {
11
+ throw new GenesisError(code, message, { path: piecePath });
12
12
  }
13
13
 
14
14
  function normalizedPrefix(value, piecePath) {
@@ -25,7 +25,7 @@ function normalizedPrefix(value, piecePath) {
25
25
  return prefix;
26
26
  }
27
27
 
28
- function normalizedGlob(value, piecePath) {
28
+ function normalizedGlob(value, piecePath, { code, section = 'City regions' } = {}) {
29
29
  const pattern = String(value || '').trim();
30
30
  if (
31
31
  !pattern
@@ -37,7 +37,8 @@ function normalizedGlob(value, piecePath) {
37
37
  ) {
38
38
  invalid(
39
39
  piecePath,
40
- '## City regions ignore patterns must be canonical project-relative globs using only * and ** wildcards.',
40
+ `## ${section} ignore patterns must be canonical project-relative globs using only * and ** wildcards.`,
41
+ code,
41
42
  );
42
43
  }
43
44
  return pattern;
@@ -156,6 +157,27 @@ export function parseStackCityPresentationLines(lines, { path = 'stack piece' }
156
157
  return { exclusions, regions };
157
158
  }
158
159
 
160
+ /**
161
+ * A project's own `## City exclusions` section removes paths no selected
162
+ * component can know about, such as example fixtures. It uses the City regions
163
+ * Ignore grammar and adds to the component exclusions.
164
+ */
165
+ export function parseProjectCityExclusionLines(lines, { path }) {
166
+ if (lines === undefined) return [];
167
+ const content = lines.filter((line) => line.trim());
168
+ if (content.length === 1 && content[0].trim() === '- Nothing.') return [];
169
+ const options = { code: 'STACK_INVALID', section: 'City exclusions' };
170
+ const exclusions = content.map((line) => {
171
+ const ignore = line.match(IGNORE_LINE);
172
+ if (!ignore) invalid(path, '## City exclusions entries must each be one Ignore with a glob.', options.code);
173
+ return normalizedGlob(ignore[1], path, options);
174
+ });
175
+ if (exclusions.length === 0 || new Set(exclusions).size !== exclusions.length) {
176
+ invalid(path, '## City exclusions needs distinct Ignore entries or `- Nothing.`.', options.code);
177
+ }
178
+ return exclusions;
179
+ }
180
+
159
181
  export function composeStackCityPresentation(components = []) {
160
182
  const owners = components.filter((component) => (
161
183
  component.cityRegions.length > 0 || component.cityExclusions.length > 0
@@ -7,7 +7,10 @@ import {
7
7
  normalizeStackPackageName,
8
8
  readStackCatalog,
9
9
  } from './stack-catalog.js';
10
- import { composeStackCityPresentation } from './stack-city-presentation.js';
10
+ import {
11
+ composeStackCityPresentation,
12
+ parseProjectCityExclusionLines,
13
+ } from './stack-city-presentation.js';
11
14
  import { parseUiDiscovery } from './stack-ui-discovery.js';
12
15
  import { parsePackageDiscovery } from './stack-package-discovery.js';
13
16
  import { resolveStackPieces } from './stack-composition.js';
@@ -371,6 +374,13 @@ async function readStackWithContractMode(projectRoot, {
371
374
  source: 'project',
372
375
  diagnostics: [],
373
376
  }));
377
+ const cityExclusions = [...new Set([
378
+ ...cityPresentation.exclusions,
379
+ ...parseProjectCityExclusionLines(
380
+ extensions.find(entry => entry.name === 'City exclusions')?.lines,
381
+ { path: STACK_PATH },
382
+ ),
383
+ ])];
374
384
  const uiDiscovery = parseUiDiscovery(extensions.find(entry => entry.name === 'UI discovery')?.lines);
375
385
  const packageDiscovery = parsePackageDiscovery(extensions.find(entry => entry.name === 'Package discovery')?.lines);
376
386
  return {
@@ -378,7 +388,7 @@ async function readStackWithContractMode(projectRoot, {
378
388
  identityHash: sha256(stableJson({
379
389
  stackPackages: declaredPackages,
380
390
  components: components.map(({ id }) => id),
381
- cityExclusions: cityPresentation.exclusions,
391
+ cityExclusions,
382
392
  cityRegions: cityPresentation.regions,
383
393
  verificationCommands: verificationCommands.map(({ label, argv }) => ({ label, argv })),
384
394
  environmentDefaults,
@@ -388,7 +398,7 @@ async function readStackWithContractMode(projectRoot, {
388
398
  })),
389
399
  components,
390
400
  stackPackages: declaredPackages,
391
- cityExclusions: cityPresentation.exclusions,
401
+ cityExclusions,
392
402
  cityRegions: cityPresentation.regions,
393
403
  uiDiscovery,
394
404
  packageDiscovery,