@archangel70/cosmo 1.10.0 → 1.12.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +48 -5
  3. package/docs/ARCHITECTURE.md +3 -0
  4. package/docs/DELIVERY.md +2 -1
  5. package/docs/ENTITY-MAP.md +87 -0
  6. package/docs/ROADMAP.md +9 -0
  7. package/package.json +5 -2
  8. package/packages/cli/bin/cosmo.mjs +97 -3
  9. package/packages/cli/lib/adoption.mjs +3 -0
  10. package/packages/cli/lib/audit.mjs +16 -0
  11. package/packages/cli/lib/browser-audit.mjs +1 -0
  12. package/packages/cli/lib/delivery.mjs +3 -2
  13. package/packages/cli/lib/entity-map.mjs +408 -0
  14. package/packages/cli/lib/integrity.mjs +6 -0
  15. package/packages/cli/lib/project.mjs +2 -0
  16. package/packages/cli/lib/self-update.mjs +9 -0
  17. package/packages/cli/lib/status.mjs +3 -1
  18. package/plugins/agent-skills/cosmo/.cosmo-agent.json +1 -1
  19. package/plugins/agent-skills/cosmo/SKILL.md +4 -2
  20. package/plugins/antigravity/cosmo.md +4 -1
  21. package/plugins/claude-code/cosmo/.claude-plugin/plugin.json +1 -1
  22. package/plugins/claude-code/cosmo/agents/cosmo.md +2 -0
  23. package/plugins/claude-code/cosmo/skills/cosmo/SKILL.md +6 -3
  24. package/templates/astro-site/.agents/skills/cosmo/SKILL.md +5 -1
  25. package/templates/astro-site/.cosmo/capabilities/registry.json +2 -1
  26. package/templates/astro-site/.cosmo/entities/candidates.json +5 -0
  27. package/templates/astro-site/.cosmo/entities/config.json +28 -0
  28. package/templates/astro-site/.env.example +6 -0
  29. package/templates/astro-site/AGENTS.md +3 -2
  30. package/templates/astro-site/CLAUDE.md +3 -2
  31. package/templates/astro-site/astro.config.mjs +5 -1
  32. package/templates/astro-site/package.json +1 -1
  33. package/templates/astro-site/src/layouts/BaseLayout.astro +3 -0
  34. package/templates/astro-site/src/pages/robots.txt.ts +2 -1
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": 1,
3
+ "enabled": false,
4
+ "includeNoindex": false,
5
+ "verificationStatus": "generator-draft",
6
+ "review": {
7
+ "reviewedBy": null,
8
+ "reviewedAt": null
9
+ },
10
+ "approvedMatches": [],
11
+ "providers": {
12
+ "wikidata": {
13
+ "enabled": true
14
+ },
15
+ "googleKnowledgeGraph": {
16
+ "enabled": false,
17
+ "apiKeyEnv": "COSMO_GOOGLE_KG_API_KEY"
18
+ },
19
+ "googlePlaces": {
20
+ "enabled": false,
21
+ "apiKeyEnv": "COSMO_GOOGLE_PLACES_API_KEY"
22
+ },
23
+ "textRazor": {
24
+ "enabled": false,
25
+ "apiKeyEnv": "COSMO_TEXTRAZOR_API_KEY"
26
+ }
27
+ }
28
+ }
@@ -5,3 +5,9 @@ COSMO_DEPLOY_PASSWORD=
5
5
  # COSMO_DEPLOY_PRIVATE_KEY="-----BEGIN OPENSSH PRIVATE KEY-----..."
6
6
  # COSMO_DEPLOY_KEY_PASSPHRASE=
7
7
  # COSMO_DEPLOY_HOST_FINGERPRINT=SHA256:replace-with-server-fingerprint
8
+
9
+ # Optional EntityMap enrichment. Wikidata works without a key.
10
+ # Enable a provider in .cosmo/entities/config.json before using it.
11
+ # COSMO_GOOGLE_KG_API_KEY=
12
+ # COSMO_GOOGLE_PLACES_API_KEY=
13
+ # COSMO_TEXTRAZOR_API_KEY=
@@ -8,7 +8,7 @@ Before editing:
8
8
 
9
9
  1. Read `HANDOFF.md` when present.
10
10
  2. Run `cosmo doctor .` and `cosmo status . --json`. Resume the active workflow and generation state when present.
11
- 3. Read the project, brand, evidence, copy, intelligence, design, plan, page-work, QA, release, and deployment artifacts relevant to the active stage.
11
+ 3. Read the project, brand, evidence, EntityMap configuration, copy, intelligence, design, plan, page-work, QA, release, and deployment artifacts relevant to the active stage.
12
12
  4. Run `cosmo intelligence guide <stage> .` before selected-pack work. The first-party capability library is self-contained; do not depend on Lyra or Sonic files being present.
13
13
  5. Preserve approved evidence, positioning, copy, and signature design elements unless the requested change explicitly revises them.
14
14
 
@@ -25,8 +25,9 @@ cosmo check . --no-build
25
25
  cosmo copy check .
26
26
  cosmo content check .
27
27
  cosmo intelligence check .
28
+ cosmo entity check .
28
29
  cosmo browser check . --no-build
29
30
  cosmo release check .
30
31
  ```
31
32
 
32
- For deployment work, inspect `cosmo deploy status .` and `.cosmo/deploy/history.jsonl`. Review builds may use `cosmo deploy preview .`; production must use `cosmo deploy production .` after the exact current release reports READY. Keep provider credentials in process environment or a gitignored runtime env file. Never delete remote files implicitly.
33
+ For deployment work, inspect `cosmo deploy status .` and `.cosmo/deploy/history.jsonl`. Review builds may use `cosmo deploy preview .`; production must use `cosmo deploy production .` after the exact current release reports READY. Keep provider credentials in process environment or a gitignored runtime env file. Never accept an EntityMap enrichment candidate or mark the map reviewed without explicit human approval. Never delete remote files implicitly.
@@ -5,7 +5,7 @@ This is a Cosmo-managed Astro project. Use Claude for discovery, strategy, conte
5
5
  Before changing the site:
6
6
 
7
7
  1. Run `cosmo doctor .`, `cosmo status .`, and `cosmo workflow resume .` when a workflow is active.
8
- 2. Read `.cosmo/brand/discovery.json`, `BRAND-BRIEF.md`, `.cosmo/brand/entity-canon.json`, `.cosmo/brand/voice-profile.json`, `.cosmo/evidence.json`, `.cosmo/copy/strategy.json`, `.cosmo/intelligence/selection.json`, every selected pack manifest and artifact, `DESIGN-DIRECTION.md`, `.cosmo/build-plan.json`, and the current page's brief, copy brief, sources, outline, and editorial report when present.
8
+ 2. Read `.cosmo/brand/discovery.json`, `BRAND-BRIEF.md`, `.cosmo/brand/entity-canon.json`, `.cosmo/brand/voice-profile.json`, `.cosmo/evidence.json`, `.cosmo/entities/config.json`, `.cosmo/copy/strategy.json`, `.cosmo/intelligence/selection.json`, every selected pack manifest and artifact, `DESIGN-DIRECTION.md`, `.cosmo/build-plan.json`, and the current page's brief, copy brief, sources, outline, and editorial report when present.
9
9
  3. Run `cosmo intelligence guide <stage> .` before doing selected-pack work. Audience, differentiation, search/community, conversion, naturalness, branded-language, authority, local, editorial, regulated, research, image, and Claude Design guidance is built into Cosmo; do not assume Lyra or Sonic is installed.
10
10
  4. Treat the starter appearance as replaceable. Do not let its components or visual motifs constrain Claude Design exploration.
11
11
  5. Once a direction is approved, express it in repository-owned Astro components, `src/styles/tokens.css`, and `DESIGN-DIRECTION.md`.
@@ -21,9 +21,10 @@ cosmo check .
21
21
  cosmo copy check .
22
22
  cosmo content check .
23
23
  cosmo intelligence check .
24
+ cosmo entity check .
24
25
  cosmo browser check .
25
26
  cosmo release check .
26
27
  cosmo handoff create . --from claude --to codex --note "Summary of the completed work and any open judgment calls"
27
28
  ```
28
29
 
29
- Use `cosmo deploy preview .` for review. Run `cosmo deploy production .` only after `cosmo release check .` reports READY. Provider credentials may come from process environment or a runtime `--env-file`; never write values into Cosmo config, history, handoffs, or tracked files.
30
+ Use `cosmo deploy preview .` for review. Run `cosmo deploy production .` only after `cosmo release check .` reports READY. Provider credentials may come from process environment or a runtime `--env-file`; never write values into Cosmo config, history, handoffs, or tracked files. Never accept an EntityMap enrichment candidate or mark the map reviewed without explicit human approval.
@@ -4,6 +4,7 @@ import { defineConfig } from 'astro/config';
4
4
  import cosmo from './cosmo.config.mjs';
5
5
 
6
6
  const plan = JSON.parse(fs.readFileSync(new URL('./.cosmo/build-plan.json', import.meta.url), 'utf8'));
7
+ const entityMap = JSON.parse(fs.readFileSync(new URL('./.cosmo/entities/config.json', import.meta.url), 'utf8'));
7
8
  const noindexPaths = new Set(plan.version >= 3
8
9
  ? plan.pages.filter((page) => page.architecture.indexability === 'noindex').map((page) => page.path)
9
10
  : []);
@@ -12,5 +13,8 @@ export default defineConfig({
12
13
  site: cosmo.site,
13
14
  output: 'static',
14
15
  trailingSlash: 'always',
15
- integrations: [sitemap({ filter: (page) => !noindexPaths.has(new URL(page).pathname) })],
16
+ integrations: [sitemap({
17
+ filter: (page) => !noindexPaths.has(new URL(page).pathname),
18
+ customPages: entityMap.enabled ? [new URL('/entitymap.html', cosmo.site).toString()] : [],
19
+ })],
16
20
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmo/astro-starter",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import cosmo from '../../cosmo.config.mjs';
3
+ import entityMap from '../../.cosmo/entities/config.json';
3
4
  import SeoHead from '@/components/seo/SeoHead.astro';
4
5
  import '@/styles/global.css';
5
6
 
@@ -22,6 +23,7 @@ const { title, description, path, schemaType, primaryTopic, indexability } = Ast
22
23
  <meta name="viewport" content="width=device-width" />
23
24
  <meta name="generator" content={Astro.generator} />
24
25
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
26
+ {entityMap.enabled && <link rel="entitymap" type="application/json" href="/entitymap.json" />}
25
27
  <SeoHead {title} {description} {path} {schemaType} {primaryTopic} {indexability} />
26
28
  </head>
27
29
  <body>
@@ -50,6 +52,7 @@ const { title, description, path, schemaType, primaryTopic, indexability } = Ast
50
52
  <a href={cosmo.contact.phoneHref}>{cosmo.contact.phoneDisplay}</a>
51
53
  <a href={`mailto:${cosmo.contact.email}`}>{cosmo.contact.email}</a>
52
54
  <span>© {new Date().getFullYear()} {cosmo.brand}</span>
55
+ {entityMap.enabled && <a href="/entitymap.html">EntityMap</a>}
53
56
  </div>
54
57
  </div>
55
58
  </footer>
@@ -1,6 +1,7 @@
1
1
  import type { APIRoute } from 'astro';
2
2
  import cosmo from '../../cosmo.config.mjs';
3
+ import entityMap from '../../.cosmo/entities/config.json';
3
4
 
4
- export const GET: APIRoute = () => new Response(`User-agent: *\nAllow: /\nSitemap: ${cosmo.site}/sitemap-index.xml\n`, {
5
+ export const GET: APIRoute = () => new Response(`User-agent: *\nAllow: /\nSitemap: ${cosmo.site}/sitemap-index.xml\n${entityMap.enabled ? `EntityMap: ${cosmo.site}/entitymap.json\n` : ''}`, {
5
6
  headers: { 'Content-Type': 'text/plain; charset=utf-8' },
6
7
  });