@archangel70/cosmo 1.7.0 → 1.9.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/CHANGELOG.md +22 -0
- package/README.md +112 -88
- package/docs/AGENT-HANDOFF.md +8 -8
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/CONTENT-QA.md +2 -0
- package/docs/COPY-STUDIO.md +154 -0
- package/docs/FIRST-PARTY-CAPABILITIES.md +1 -1
- package/docs/GENERATION.md +1 -1
- package/docs/INTELLIGENCE-PACKS.md +2 -2
- package/docs/MULTI-AGENT.md +69 -0
- package/docs/PAGE-PRODUCTION.md +2 -0
- package/docs/ROADMAP.md +10 -0
- package/package.json +9 -3
- package/packages/cli/bin/cosmo.mjs +139 -17
- package/packages/cli/lib/adoption.mjs +21 -0
- package/packages/cli/lib/agent-adapters.mjs +124 -0
- package/packages/cli/lib/claude-plugin.mjs +3 -0
- package/packages/cli/lib/copy-studio.mjs +355 -0
- package/packages/cli/lib/delivery.mjs +4 -2
- package/packages/cli/lib/editorial-guidance.mjs +17 -0
- package/packages/cli/lib/generation.mjs +6 -2
- package/packages/cli/lib/intelligence-audit.mjs +22 -5
- package/packages/cli/lib/intelligence.mjs +14 -2
- package/packages/cli/lib/project.mjs +2 -0
- package/packages/cli/lib/status.mjs +1 -1
- package/plugins/agent-skills/cosmo/.cosmo-agent.json +4 -0
- package/plugins/agent-skills/cosmo/SKILL.md +68 -0
- package/plugins/antigravity/cosmo.md +17 -0
- package/plugins/claude-code/cosmo/.claude-plugin/plugin.json +2 -2
- package/plugins/claude-code/cosmo/skills/cosmo/SKILL.md +5 -4
- package/scripts/postinstall.mjs +10 -8
- package/templates/astro-site/.agents/rules/cosmo.md +3 -0
- package/templates/astro-site/.agents/skills/cosmo/SKILL.md +18 -0
- package/templates/astro-site/.agents/workflows/cosmo.md +3 -0
- package/templates/astro-site/.cosmo/workflows/default.json +15 -2
- package/templates/astro-site/AGENTS.md +12 -6
- package/templates/astro-site/CLAUDE.md +3 -2
- package/templates/astro-site/README.md +1 -1
- package/templates/astro-site/package.json +1 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Copy Studio
|
|
2
|
+
|
|
3
|
+
Copy Studio turns approved business facts, audience understanding, positioning, and evidence into a page-specific writing contract for Claude or another agent. It gives the writer room to create while preventing unsupported claims, generic page formulas, manipulative pressure, and strategy drift.
|
|
4
|
+
|
|
5
|
+
Copy Studio is built into Cosmo. It does not require Lyra, Sonic, a hosted service, or access to private source material.
|
|
6
|
+
|
|
7
|
+
## The simple workflow
|
|
8
|
+
|
|
9
|
+
When using Cosmo conversationally, invoke it in Claude with `cosmo`, in Codex with `$cosmo`, or in Antigravity with `/cosmo`, then answer the assistant's questions. The selected assistant handles these files and commands for you.
|
|
10
|
+
|
|
11
|
+
The writing process is:
|
|
12
|
+
|
|
13
|
+
1. Understand the reader's situation and current alternative.
|
|
14
|
+
2. Record what the reader presently believes and what the evidence can credibly help them understand.
|
|
15
|
+
3. Define the meaningful benefit, credible difference, category, voice, and proof.
|
|
16
|
+
4. Decide whether the copy needs to help the reader reconsider a current solution. If so, use factual questions or documented friction—not fear, invented weakness, or personal attack.
|
|
17
|
+
5. Approve the project strategy.
|
|
18
|
+
6. Create and approve a flexible brief for each planned page.
|
|
19
|
+
7. Let the selected writing agent draft from the brief in separate writing, evidence, editing, and reader-review passes.
|
|
20
|
+
8. Run Copy Studio QA before release.
|
|
21
|
+
|
|
22
|
+
## Files
|
|
23
|
+
|
|
24
|
+
### Project strategy
|
|
25
|
+
|
|
26
|
+
`.cosmo/copy/strategy.json` records:
|
|
27
|
+
|
|
28
|
+
- Primary audience and current alternative.
|
|
29
|
+
- Starting and desired beliefs.
|
|
30
|
+
- Motivation and practical ability to change.
|
|
31
|
+
- Meaningful benefit, category, and credible differentiation.
|
|
32
|
+
- Project-owned voice techniques and language boundaries.
|
|
33
|
+
- Optional competitive-transition strategy.
|
|
34
|
+
- Evidence IDs and a named human owner.
|
|
35
|
+
- Non-negotiable safeguards against fabricated claims and manipulation.
|
|
36
|
+
|
|
37
|
+
The switching state is derived from two separately recorded observations:
|
|
38
|
+
|
|
39
|
+
| Motivation to change | Ability to change | Cosmo state | Practical implication |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| High | High | `mobile` | Make the choice and proof clear. |
|
|
42
|
+
| Low | High | `content` | Establish why reconsideration is worthwhile. |
|
|
43
|
+
| Low | Low | `committed` | Do not force conversion; reduce risk and build understanding. |
|
|
44
|
+
| High | Low | `constrained` | Address migration, cost, timing, or implementation barriers. |
|
|
45
|
+
| Unknown | Unknown | `unknown` | Research instead of pretending to know. |
|
|
46
|
+
|
|
47
|
+
Cosmo rejects a state that contradicts its motivation and ability inputs.
|
|
48
|
+
|
|
49
|
+
### Page copy briefs
|
|
50
|
+
|
|
51
|
+
`.cosmo/work/pages/<page-id>/copy-brief.json` translates strategy into an annotated page contract:
|
|
52
|
+
|
|
53
|
+
- Reader entry point, primary question, page job, angle, and objections.
|
|
54
|
+
- Awareness and switching context.
|
|
55
|
+
- Positioning and evidence assigned to the page.
|
|
56
|
+
- An open-ended section list with purpose, answer target, word budget, claims, proof, technique, transition, and CTA role.
|
|
57
|
+
- Revision owner, factual-preservation promise, and change log.
|
|
58
|
+
|
|
59
|
+
The section contract is intentionally flexible. It does not require every site or page to use the same six-section copy formula.
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
Initialize Copy Studio in an older Cosmo project:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cosmo copy init .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After the site plan is approved, create page briefs:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
cosmo copy brief --all .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
To regenerate one brief after an intentional strategy or plan change:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cosmo copy brief home . --replace
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Once the strategy and page brief are complete and approved, print the agent's grounded writing instructions:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cosmo copy guide home .
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Validate every strategy and brief:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cosmo copy check .
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The check writes `.cosmo/reports/copy-check.json`. When Copy Studio is enabled, a current passing report is required for release.
|
|
94
|
+
|
|
95
|
+
## Writing passes
|
|
96
|
+
|
|
97
|
+
The generated guide separates jobs that are easy to blur together:
|
|
98
|
+
|
|
99
|
+
1. **Grounding:** read approved facts, evidence, source manifests, voice, and the copy brief.
|
|
100
|
+
2. **Drafting:** answer first, add useful depth, and keep the reader as protagonist.
|
|
101
|
+
3. **Evidence:** verify factual and comparative claims and place proof where the claim appears.
|
|
102
|
+
4. **Editing:** improve structure, transitions, specificity, rhythm, and redundancy without changing facts.
|
|
103
|
+
5. **Reader review:** test whether the message meets the recorded starting belief and earns its CTA.
|
|
104
|
+
6. **Finalization:** record material changes and rerun QA.
|
|
105
|
+
|
|
106
|
+
## Contextual editorial review
|
|
107
|
+
|
|
108
|
+
Copy Studio's writing guide now includes a minimum-edit review: facts and evidence take priority over page purpose and positioning, followed by brand voice, then style preferences. Keep strong sentences and deliberate personality intact.
|
|
109
|
+
|
|
110
|
+
The built-in `editorial-naturalness` pack flags clusters of possible filler, vague praise, unsupported attribution, faux-insight setups, redundant asides, and recap openers. Its report includes page and file identifiers, matched wording, surrounding excerpts, and suggestions. These are advisory observations, not proof of AI authorship or a quality score. The audit never edits prose.
|
|
111
|
+
|
|
112
|
+
For existing projects, enable the pack if needed:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cosmo intelligence add editorial-naturalness .
|
|
116
|
+
cosmo intelligence scaffold .
|
|
117
|
+
cosmo intelligence check .
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Complete the pack's artifact with owned voice samples, a review owner, and the desired cluster threshold. Existing selections remain valid. `allowedPatterns` accepts pattern IDs such as `not-just-but` to exempt intentional choices. Record the reason for each exception in the page's revision change log. Other checks remain active.
|
|
121
|
+
|
|
122
|
+
The editor also asks whether generic sentences could describe almost any business, whether terminology has shifted unnecessarily, and whether every sentence contributes. These require contextual judgment; they are not claimed as automated detections. Replace filler only with verified details. Never invent a statistic or anecdote to satisfy a style rule.
|
|
123
|
+
|
|
124
|
+
Useful comparisons, technical terms, FAQs, rhetorical questions, passive voice, fragments, summaries, and punctuation remain available. There are no universal word bans or punctuation quotas in this review. Explicit project voice restrictions and evidence rules still apply.
|
|
125
|
+
|
|
126
|
+
For material edits, record the original and revised passages, reason, affected claim/proof IDs, and reviewer in `revision.changeLog`. Changes to claims, qualifications, positioning, CTAs, or approved voice require human review. Rerun evidence and copy checks after accepted edits. `cosmo copy check` validates contracts; `cosmo intelligence check` supplies the selected naturalness pack's prose observations.
|
|
127
|
+
|
|
128
|
+
## Competitive transition
|
|
129
|
+
|
|
130
|
+
Competitive transition is optional. It helps copy address the honest reason a reader remains with a current category or solution. It requires:
|
|
131
|
+
|
|
132
|
+
- The current alternative.
|
|
133
|
+
- A documented vulnerability in the reader's present situation.
|
|
134
|
+
- A truthful question or friction-based reframe.
|
|
135
|
+
- A clear category distinction.
|
|
136
|
+
- A proof bridge showing why the new promise is credible.
|
|
137
|
+
- Migration support that makes change realistically possible.
|
|
138
|
+
|
|
139
|
+
Named competitors require the explicit `named-with-proof` policy and verified evidence. Category-level comparison is the default. Copy Studio does not authorize false claims, impersonation, copied language, fear tactics, fabricated dissatisfaction, or attacks on people.
|
|
140
|
+
|
|
141
|
+
## What the check blocks
|
|
142
|
+
|
|
143
|
+
- Unapproved strategies or page briefs.
|
|
144
|
+
- Missing audience, belief, positioning, or ownership decisions.
|
|
145
|
+
- Contradictory switching assessments.
|
|
146
|
+
- Unknown or unverified proof IDs.
|
|
147
|
+
- Named comparisons without explicit evidence-backed approval.
|
|
148
|
+
- Claims or proofs that were not planned for the page.
|
|
149
|
+
- Planned claims or proofs that were never placed in a section.
|
|
150
|
+
- Missing answer-first value.
|
|
151
|
+
- CTA pressure above the page's funnel-stage ceiling.
|
|
152
|
+
- A revision process that does not preserve approved facts.
|
|
153
|
+
|
|
154
|
+
The report lists deterministic findings rather than presenting a subjective “great copy” score.
|
|
@@ -30,7 +30,7 @@ cosmo intelligence guide plan ./site
|
|
|
30
30
|
cosmo intelligence check ./site
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
`cosmo intelligence guide` exposes
|
|
33
|
+
`cosmo intelligence guide` exposes selected first-party questions with build and review guidance, or guidance for a named supported agent with `--agent`. Completed artifacts remain repository-owned and portable across agents.
|
|
34
34
|
|
|
35
35
|
## Research workbench
|
|
36
36
|
|
package/docs/GENERATION.md
CHANGED
|
@@ -50,7 +50,7 @@ cosmo generate status .
|
|
|
50
50
|
|
|
51
51
|
Generation progress v2 moves through `planned`, `briefed`, `sourced`, `outlined`, `drafted`, `edited`, `verified`, and `done`. See `docs/PAGE-PRODUCTION.md` for the artifact required by each transition.
|
|
52
52
|
|
|
53
|
-
The queue is deliberately model-neutral. A
|
|
53
|
+
The queue is deliberately model-neutral. A build may use Claude Design, another agent, or a human for visual exploration and any capable writing agent for content work. A later Claude, Codex, or Antigravity session can continue from the same plan, progress ledger, content schema, and design documentation without access to the earlier conversation.
|
|
54
54
|
|
|
55
55
|
## Completion gates
|
|
56
56
|
|
|
@@ -37,7 +37,7 @@ A profile is only a convenient composition. Adding or removing a single pack cha
|
|
|
37
37
|
| `image-direction` | Design | `.cosmo/design/image-direction.json` |
|
|
38
38
|
| `claude-design` | Design | `.cosmo/design/claude-design-handoff.json` |
|
|
39
39
|
|
|
40
|
-
The local pack manifest includes its discovery questions,
|
|
40
|
+
The local pack manifest includes its discovery questions, agent or role guidance, required keys, and artifact template. Older Claude/Codex guidance remains supported; new packs may provide `default`, `build`, `review`, or named-agent entries. Workflow submission validates selected packs at their declared stage. Direct generation rechecks every upstream pack gate, so the workflow cannot be bypassed accidentally.
|
|
41
41
|
|
|
42
42
|
## v1.1 evaluation
|
|
43
43
|
|
|
@@ -111,7 +111,7 @@ Imported packs may use only four artifact rules: `non-empty`, `equals`, `min-ite
|
|
|
111
111
|
"capability": { "id": "conversion-evidence", "version": 1, "status": "active", "stages": ["plan", "qa"] },
|
|
112
112
|
"questions": ["Which conversion decision is supported by evidence?"],
|
|
113
113
|
"artifact": { "stage": "plan", "path": ".cosmo/intelligence/artifacts/conversion-evidence/evidence.json", "requiredKeys": ["version", "hypotheses"], "nonEmptyKeys": ["hypotheses"], "template": { "version": 1, "hypotheses": [] } },
|
|
114
|
-
"guidance": { "
|
|
114
|
+
"guidance": { "default": "Document assumptions before designing.", "review": "Preserve approved experiment ids." },
|
|
115
115
|
"checks": [{ "id": "enough-hypotheses", "severity": "blocking", "path": "hypotheses", "rule": "min-items", "min": 2, "message": "Record at least two hypotheses." }]
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Multi-agent Cosmo
|
|
2
|
+
|
|
3
|
+
Cosmo separates its deterministic website engine from the conversational agent that operates it. Project truth lives in `.cosmo`, typed Astro content, design artifacts, QA reports, and `HANDOFF.md`; it does not depend on one vendor's chat history.
|
|
4
|
+
|
|
5
|
+
## Supported agents
|
|
6
|
+
|
|
7
|
+
| Agent | Installed adapter | Deterministic invocation |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Claude Code | Claude plugin and shared Cosmo skill | `cosmo` or `/cosmo:cosmo` |
|
|
10
|
+
| Codex | User skill at `~/.agents/skills/cosmo` | `$cosmo` or a matching natural request |
|
|
11
|
+
| Google Antigravity | Global workflow at `~/.gemini/config/global_workflows/cosmo.md` | `/cosmo` |
|
|
12
|
+
|
|
13
|
+
New and adopted projects also contain:
|
|
14
|
+
|
|
15
|
+
- `.agents/skills/cosmo/SKILL.md`: shared start, adopt, resume, build, review, and release behavior.
|
|
16
|
+
- `.agents/rules/cosmo.md`: persistent project safeguards for Antigravity and compatible agents.
|
|
17
|
+
- `.agents/workflows/cosmo.md`: workspace `/cosmo` workflow for Antigravity.
|
|
18
|
+
- `AGENTS.md`: concise cross-agent project guidance, loaded automatically by Codex.
|
|
19
|
+
- `CLAUDE.md`: Claude-specific guidance and optional Claude Design integration.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
A global npm installation installs all three lightweight adapters:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install --global @archangel70/cosmo
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Repair or refresh every adapter:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cosmo setup
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Manage one adapter without affecting the others:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cosmo setup --agent codex
|
|
39
|
+
cosmo agent install antigravity --replace
|
|
40
|
+
cosmo agent status all
|
|
41
|
+
cosmo agent uninstall claude
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The older `cosmo claude install|status|uninstall` commands remain supported.
|
|
45
|
+
|
|
46
|
+
## Switching agents
|
|
47
|
+
|
|
48
|
+
Run relevant checks, then record the switch:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cosmo handoff create . --from claude --to antigravity --note "Homepage approved; services copy still needs review."
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Open the same project folder in the next agent and invoke Cosmo. The receiving agent reads `HANDOFF.md` and repository state, so no chat export is required.
|
|
55
|
+
|
|
56
|
+
## Design portability
|
|
57
|
+
|
|
58
|
+
Claude Design remains an optional capability rather than a Cosmo dependency. Projects using it retain the resulting design direction, responsive states, reference renders, tokens, components, and implementation notes in the repository. Codex, Antigravity, another design authority, or a human designer can fulfill or continue the same contract when Claude Design is unavailable.
|
|
59
|
+
|
|
60
|
+
## Adapter contract
|
|
61
|
+
|
|
62
|
+
Every adapter must:
|
|
63
|
+
|
|
64
|
+
1. Inspect before mutating and never initialize over a non-empty unrelated folder.
|
|
65
|
+
2. Distinguish a new site, an existing Astro site, and an existing Cosmo project.
|
|
66
|
+
3. Resume from repository state and preserve prior-agent handoffs.
|
|
67
|
+
4. Never invent evidence or approval, weaken a gate, or write secrets into tracked files.
|
|
68
|
+
5. Follow the same workflow, copy, intelligence, generation, QA, release, and deployment commands.
|
|
69
|
+
6. Keep conversational guidance plain enough that a user does not need to learn the CLI.
|
package/docs/PAGE-PRODUCTION.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Cosmo Page Production
|
|
2
2
|
|
|
3
|
+
Before a page moves from sourced material into outlining, Copy Studio requires an approved `.cosmo/work/pages/<page-id>/copy-brief.json`. Run `cosmo copy guide <page-id> .` to give the writing agent its approved reader entry point, angle, evidence placement, section contracts, and CTA ceiling. See [Copy Studio](COPY-STUDIO.md).
|
|
4
|
+
|
|
3
5
|
Generation progress v2 records the real state of each page instead of treating content creation as one opaque operation.
|
|
4
6
|
|
|
5
7
|
## State machine
|
package/docs/ROADMAP.md
CHANGED
|
@@ -175,6 +175,16 @@ The acceptance pilot completed five generation entries, static and browser QA wi
|
|
|
175
175
|
- Local-state resume behavior with workflow, intelligence, approval, QA, release, handoff, and deployment awareness.
|
|
176
176
|
- Human approval and evidence boundaries carried into the conversational entry point.
|
|
177
177
|
|
|
178
|
+
## Milestone 19 — v1.9 multi-agent Cosmo (complete)
|
|
179
|
+
|
|
180
|
+
- One-command adapter setup for Claude Code, Codex, and Google Antigravity.
|
|
181
|
+
- Shared repository skill for start, adoption, resume, production, review, release, and cross-agent continuation.
|
|
182
|
+
- Codex user-skill installation plus repository `AGENTS.md` discovery.
|
|
183
|
+
- Antigravity global and workspace `/cosmo` workflows with persistent project rules.
|
|
184
|
+
- Agent-neutral design authority while preserving optional Claude Design workflows.
|
|
185
|
+
- Backward-compatible Claude commands and durable handoffs between any named agents.
|
|
186
|
+
- Adapter conformance, starter, adoption, and packed-install smoke coverage.
|
|
187
|
+
|
|
178
188
|
## Later, only when justified
|
|
179
189
|
|
|
180
190
|
- Additional deployment adapters, including Cloudflare Workers.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archangel70/cosmo",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Local-first Astro website builder for Claude,
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"description": "Local-first, multi-agent Astro website builder for Claude, Codex, Antigravity, and the command line.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"packages/cli/bin/**",
|
|
12
12
|
"packages/cli/lib/**",
|
|
13
13
|
"plugins/claude-code/cosmo/**",
|
|
14
|
+
"plugins/agent-skills/cosmo/**",
|
|
15
|
+
"plugins/antigravity/**",
|
|
14
16
|
"templates/astro-site/.cosmo/brand/**",
|
|
15
17
|
"templates/astro-site/.cosmo/build-plan.json",
|
|
16
18
|
"templates/astro-site/.cosmo/capabilities/**",
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
"templates/astro-site/.cosmo/work/**",
|
|
22
24
|
"templates/astro-site/.cosmo/workflows/**",
|
|
23
25
|
"templates/astro-site/.env.example",
|
|
26
|
+
"templates/astro-site/.agents/**",
|
|
24
27
|
"templates/astro-site/gitignore.template",
|
|
25
28
|
"templates/astro-site/AGENTS.md",
|
|
26
29
|
"templates/astro-site/CLAUDE.md",
|
|
@@ -38,7 +41,9 @@
|
|
|
38
41
|
"docs/BRAND-DISCOVERY.md",
|
|
39
42
|
"docs/BROWSER-QA.md",
|
|
40
43
|
"docs/CLAUDE-LAUNCHER.md",
|
|
44
|
+
"docs/MULTI-AGENT.md",
|
|
41
45
|
"docs/CONTENT-QA.md",
|
|
46
|
+
"docs/COPY-STUDIO.md",
|
|
42
47
|
"docs/DELIVERY.md",
|
|
43
48
|
"docs/DEPLOYMENT.md",
|
|
44
49
|
"docs/FIRST-PARTY-CAPABILITIES.md",
|
|
@@ -71,12 +76,13 @@
|
|
|
71
76
|
"qa": "node packages/cli/bin/cosmo.mjs check templates/astro-site",
|
|
72
77
|
"integrity:qa": "node packages/cli/bin/cosmo.mjs integrity check templates/astro-site",
|
|
73
78
|
"content:qa": "node packages/cli/bin/cosmo.mjs content check templates/astro-site",
|
|
79
|
+
"copy:qa": "node packages/cli/bin/cosmo.mjs copy check templates/astro-site",
|
|
74
80
|
"intelligence:qa": "node packages/cli/bin/cosmo.mjs intelligence check templates/astro-site",
|
|
75
81
|
"browser:qa": "node packages/cli/bin/cosmo.mjs browser check templates/astro-site",
|
|
76
82
|
"package:smoke": "node scripts/smoke-package.mjs",
|
|
77
83
|
"postinstall": "node scripts/postinstall.mjs",
|
|
78
84
|
"test": "node --test packages/cli/test/*.test.mjs",
|
|
79
|
-
"verify": "npm run test && npm run check && npm run integrity:qa && npm run qa && npm run content:qa && npm run intelligence:qa && npm run browser:qa"
|
|
85
|
+
"verify": "npm run test && npm run check && npm run integrity:qa && npm run qa && npm run copy:qa && npm run content:qa && npm run intelligence:qa && npm run browser:qa"
|
|
80
86
|
},
|
|
81
87
|
"dependencies": {
|
|
82
88
|
"axe-core": "^4.13.0",
|
|
@@ -6,9 +6,11 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
import { auditDist, writeAuditReport } from '../lib/audit.mjs';
|
|
7
7
|
import { auditBrowser, writeBrowserReport } from '../lib/browser-audit.mjs';
|
|
8
8
|
import { auditContent, writeContentReport } from '../lib/content-audit.mjs';
|
|
9
|
+
import { copyGuide, evaluateCopyStudio, scaffoldCopyBrief, scaffoldCopyStudio, writeCopyStudioReport } from '../lib/copy-studio.mjs';
|
|
9
10
|
import { checkBrandDiscovery, scaffoldBrandDiscovery } from '../lib/brand.mjs';
|
|
10
11
|
import { adoptAstroProject } from '../lib/adoption.mjs';
|
|
11
12
|
import { claudePluginStatus, installClaudePlugin, uninstallClaudePlugin } from '../lib/claude-plugin.mjs';
|
|
13
|
+
import { agentInvocation, agentStatus, installAgent, normalizeAgent, SUPPORTED_AGENTS, uninstallAgent } from '../lib/agent-adapters.mjs';
|
|
12
14
|
import { evaluateDelivery, readDelivery, writeDeliveryReport } from '../lib/delivery.mjs';
|
|
13
15
|
import { diagnoseProject } from '../lib/doctor.mjs';
|
|
14
16
|
import { configureDeployment, deployProject, readDeploymentConfig, readDeploymentHistory } from '../lib/deployment.mjs';
|
|
@@ -20,6 +22,7 @@ import {
|
|
|
20
22
|
applyIntelligenceProfile,
|
|
21
23
|
intelligenceCatalog,
|
|
22
24
|
importIntelligencePack,
|
|
25
|
+
guidanceForAgent,
|
|
23
26
|
readIntelligence,
|
|
24
27
|
readIntelligenceLock,
|
|
25
28
|
removeIntelligencePack,
|
|
@@ -59,7 +62,7 @@ import {
|
|
|
59
62
|
workflowSummary,
|
|
60
63
|
} from '../lib/workflow.mjs';
|
|
61
64
|
|
|
62
|
-
const VERSION = '1.
|
|
65
|
+
const VERSION = '1.9.0';
|
|
63
66
|
const cliDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
64
67
|
const templateDirectory = path.resolve(cliDirectory, '../../../templates/astro-site');
|
|
65
68
|
const [command = 'help', ...rawArgs] = process.argv.slice(2);
|
|
@@ -73,7 +76,11 @@ function help() {
|
|
|
73
76
|
Cosmo ${VERSION} — local-first Astro site builder
|
|
74
77
|
|
|
75
78
|
Commands
|
|
76
|
-
cosmo setup
|
|
79
|
+
cosmo setup [--agent claude|codex|antigravity|all]
|
|
80
|
+
cosmo agent list
|
|
81
|
+
cosmo agent install <claude|codex|antigravity|all> [--replace]
|
|
82
|
+
cosmo agent status [claude|codex|antigravity|all]
|
|
83
|
+
cosmo agent uninstall <claude|codex|antigravity|all>
|
|
77
84
|
cosmo init [directory] [--name slug] [--brand name] [--site url] [--profile id]
|
|
78
85
|
cosmo adopt [directory] [--name slug] [--brand name] [--site url] [--profile id] [--design-mode mode]
|
|
79
86
|
cosmo claude install [--replace]
|
|
@@ -83,18 +90,23 @@ Commands
|
|
|
83
90
|
cosmo build [directory]
|
|
84
91
|
cosmo check [directory] [--no-build]
|
|
85
92
|
cosmo content check [directory]
|
|
93
|
+
cosmo copy init [directory] [--replace]
|
|
94
|
+
cosmo copy brief <page-id> [directory] [--replace]
|
|
95
|
+
cosmo copy brief --all [directory] [--replace]
|
|
96
|
+
cosmo copy guide <page-id> [directory]
|
|
97
|
+
cosmo copy check [directory]
|
|
86
98
|
cosmo browser check [directory] [--no-build] [--no-lighthouse]
|
|
87
99
|
cosmo status [directory] [--json]
|
|
88
100
|
cosmo doctor [directory] [--json]
|
|
89
101
|
cosmo intake [directory] --niche value --audience value --goal value [--location value] [--pages number]
|
|
90
|
-
cosmo design brief [directory]
|
|
102
|
+
cosmo design brief [directory] [--agent claude|codex|antigravity]
|
|
91
103
|
cosmo design capture [directory]
|
|
92
104
|
cosmo integrity init [directory] [--replace]
|
|
93
105
|
cosmo integrity check [directory] [--allow-missing-briefs]
|
|
94
106
|
cosmo intelligence list
|
|
95
107
|
cosmo intelligence show [directory]
|
|
96
108
|
cosmo intelligence check [directory]
|
|
97
|
-
cosmo intelligence guide <stage> [directory]
|
|
109
|
+
cosmo intelligence guide <stage> [directory] [--agent claude|codex|antigravity]
|
|
98
110
|
cosmo intelligence apply <profile> [directory]
|
|
99
111
|
cosmo intelligence add <pack> [directory]
|
|
100
112
|
cosmo intelligence remove <pack> [directory]
|
|
@@ -184,6 +196,8 @@ async function init(args) {
|
|
|
184
196
|
writeJson(planFile, plan);
|
|
185
197
|
for (const page of plan.pages) createPageBrief(target, page.id, { replace: true });
|
|
186
198
|
applyIntelligenceProfile(target, String(options.profile ?? 'lean'));
|
|
199
|
+
scaffoldCopyStudio(target);
|
|
200
|
+
for (const page of plan.pages) scaffoldCopyBrief(target, page.id);
|
|
187
201
|
|
|
188
202
|
const configFile = path.join(target, 'cosmo.config.mjs');
|
|
189
203
|
const config = fs.readFileSync(configFile, 'utf8')
|
|
@@ -230,12 +244,69 @@ function claudeCommand(args) {
|
|
|
230
244
|
throw new Error(`Unknown claude command: ${subcommand}`);
|
|
231
245
|
}
|
|
232
246
|
|
|
233
|
-
function
|
|
234
|
-
|
|
235
|
-
console.log(`
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
|
|
247
|
+
function printAgentStatus(agent, status) {
|
|
248
|
+
console.log(`${agent.padEnd(12)} ${status.installed ? 'ready' : 'not installed'}${status.version ? ` v${status.version}` : ''}`);
|
|
249
|
+
console.log(` ${status.target}`);
|
|
250
|
+
if (status.installed) console.log(` Start: ${agentInvocation(agent)}`);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function agentCommand(args) {
|
|
254
|
+
const [subcommand = 'status', requested = 'all', ...rest] = args;
|
|
255
|
+
const { options } = parseOptions(rest);
|
|
256
|
+
if (subcommand === 'list') {
|
|
257
|
+
console.log('Supported Cosmo agents');
|
|
258
|
+
for (const agent of SUPPORTED_AGENTS) printAgentStatus(agent, agentStatus(agent));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const agent = normalizeAgent(requested);
|
|
262
|
+
const agents = agent === 'all' ? SUPPORTED_AGENTS : [agent];
|
|
263
|
+
if (subcommand === 'status') {
|
|
264
|
+
for (const name of agents) printAgentStatus(name, agentStatus(name));
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (subcommand === 'install') {
|
|
268
|
+
let failed = false;
|
|
269
|
+
for (const name of agents) {
|
|
270
|
+
try {
|
|
271
|
+
const result = installAgent(name, { replace: Boolean(options.replace), validate: name === 'claude' });
|
|
272
|
+
printAgentStatus(name, result);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
if (agents.length === 1) throw error;
|
|
275
|
+
failed = true;
|
|
276
|
+
console.error(`${name.padEnd(12)} failed: ${error.message}`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (failed) process.exitCode = 1;
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (subcommand === 'uninstall') {
|
|
283
|
+
for (const name of agents) {
|
|
284
|
+
const result = uninstallAgent(name);
|
|
285
|
+
console.log(result.removed ? `Removed Cosmo for ${name} from ${result.target}` : `Cosmo for ${name} is not installed at ${result.target}`);
|
|
286
|
+
}
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
throw new Error(`Unknown agent command: ${subcommand}`);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function setup(args) {
|
|
293
|
+
const { options, positional } = parseOptions(args);
|
|
294
|
+
const requested = normalizeAgent(options.agent ?? positional[0] ?? 'all');
|
|
295
|
+
const agents = requested === 'all' ? SUPPORTED_AGENTS : [requested];
|
|
296
|
+
console.log(`Cosmo ${VERSION} agent setup`);
|
|
297
|
+
let failed = false;
|
|
298
|
+
for (const agent of agents) {
|
|
299
|
+
try {
|
|
300
|
+
const result = installAgent(agent, { replace: true, validate: agent === 'claude' });
|
|
301
|
+
printAgentStatus(agent, result);
|
|
302
|
+
} catch (error) {
|
|
303
|
+
if (agents.length === 1) throw error;
|
|
304
|
+
failed = true;
|
|
305
|
+
console.error(`${agent.padEnd(12)} failed: ${error.message}`);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
console.log('Open a website folder in your preferred agent and invoke Cosmo using the instruction shown above.');
|
|
309
|
+
if (failed) process.exitCode = 1;
|
|
239
310
|
}
|
|
240
311
|
|
|
241
312
|
async function build(args) {
|
|
@@ -285,6 +356,52 @@ function contentCheck(args) {
|
|
|
285
356
|
}
|
|
286
357
|
}
|
|
287
358
|
|
|
359
|
+
function copyCommand(args) {
|
|
360
|
+
const subcommand = args[0] ?? 'check';
|
|
361
|
+
const rest = args.slice(1);
|
|
362
|
+
if (subcommand === 'init') {
|
|
363
|
+
const { options, positional } = parseOptions(rest);
|
|
364
|
+
const target = projectDirectory(positional[0] ?? '.');
|
|
365
|
+
const result = scaffoldCopyStudio(target, { replace: Boolean(options.replace) });
|
|
366
|
+
console.log(result.created ? `Created Copy Studio strategy: ${result.file}` : `Copy Studio strategy already exists: ${result.file}`);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (subcommand === 'brief') {
|
|
370
|
+
const all = rest.includes('--all');
|
|
371
|
+
const parsed = rest.filter((arg) => arg !== '--all');
|
|
372
|
+
const { options, positional } = parseOptions(parsed);
|
|
373
|
+
const target = projectDirectory(all ? positional[0] ?? '.' : positional[1] ?? '.');
|
|
374
|
+
const plan = readPlan(target, { requireApproved: false }).data;
|
|
375
|
+
const pageIds = all ? plan.pages.map((page) => page.id) : [positional[0]];
|
|
376
|
+
if (!pageIds[0]) throw new Error('Usage: cosmo copy brief <page-id> [directory] [--replace]');
|
|
377
|
+
for (const pageId of pageIds) {
|
|
378
|
+
const result = scaffoldCopyBrief(target, pageId, { replace: Boolean(options.replace) });
|
|
379
|
+
console.log(result.created ? `Created copy brief: ${result.file}` : `Copy brief already exists: ${result.file}`);
|
|
380
|
+
}
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (subcommand === 'guide') {
|
|
384
|
+
const { positional } = parseOptions(rest);
|
|
385
|
+
if (!positional[0]) throw new Error('Usage: cosmo copy guide <page-id> [directory]');
|
|
386
|
+
console.log(copyGuide(projectDirectory(positional[1] ?? '.'), positional[0]));
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (subcommand === 'check') {
|
|
390
|
+
const { positional } = parseOptions(rest);
|
|
391
|
+
const target = projectDirectory(positional[0] ?? '.');
|
|
392
|
+
const report = evaluateCopyStudio(target);
|
|
393
|
+
const file = writeCopyStudioReport(target, report);
|
|
394
|
+
console.log(`Copy Studio: ${report.summary.pages} pages, ${report.summary.blocking} blocking, ${report.summary.warnings} warnings`);
|
|
395
|
+
console.log(`Report: ${file}`);
|
|
396
|
+
if (!report.passed) {
|
|
397
|
+
for (const item of report.findings.filter((entry) => entry.severity === 'blocking').slice(0, 20)) console.error(`- ${item.scope}: ${item.code} (${item.message})`);
|
|
398
|
+
process.exitCode = 1;
|
|
399
|
+
}
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
throw new Error(`Unknown copy command: ${subcommand}`);
|
|
403
|
+
}
|
|
404
|
+
|
|
288
405
|
function staticServer(projectDir) {
|
|
289
406
|
const distDir = path.join(projectDir, 'dist');
|
|
290
407
|
const types = { '.css': 'text/css', '.html': 'text/html', '.js': 'text/javascript', '.json': 'application/json', '.png': 'image/png', '.svg': 'image/svg+xml', '.txt': 'text/plain', '.xml': 'application/xml' };
|
|
@@ -446,11 +563,11 @@ function designBrief(args) {
|
|
|
446
563
|
}
|
|
447
564
|
const selectedDesignPacks = readIntelligence(target).manifests.filter((pack) => pack.stages.includes('design'));
|
|
448
565
|
const intelligenceSection = selectedDesignPacks.length
|
|
449
|
-
? `\n## Selected intelligence packs\n\n${selectedDesignPacks.map((pack) => `### ${pack.title}\n\n${pack.
|
|
566
|
+
? `\n## Selected intelligence packs\n\n${selectedDesignPacks.map((pack) => `### ${pack.title}\n\n${guidanceForAgent(pack, options.agent ?? 'build')}\n\nQuestions:\n${pack.questions.map((question) => `- ${question}`).join('\n')}\n\nRequired handoff: \`${pack.artifact.path}\``).join('\n\n')}\n`
|
|
450
567
|
: '';
|
|
451
568
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
452
|
-
fs.writeFileSync(file, `# Creative Brief — ${data.brand}\n\n## Goal\n\nCreate a distinctive, conversion-aware visual direction for ${data.brand}. Explore at least three genuinely different compositions before selecting one.\n\n## Inputs to complete\n\n- Audience:\n- Primary conversion:\n- Desired first-five-seconds feeling:\n- Brand truths that must remain visible:\n- Real assets available:\n- Competitors and references:\n\n## Required page capabilities\n\n- Semantic hook, problem, proof, solution, evidence, and action sections\n- Mobile-first behavior at 320px, 768px, and 1440px\n- Keyboard-visible focus and reduced-motion support\n- Strong content hierarchy with exactly one H1\n- Components that can be reused without forcing identical page compositions\n\n## Creative freedom\n\
|
|
453
|
-
console.log(`Created
|
|
569
|
+
fs.writeFileSync(file, `# Creative Brief — ${data.brand}\n\n## Goal\n\nCreate a distinctive, conversion-aware visual direction for ${data.brand}. Explore at least three genuinely different compositions before selecting one.\n\n## Inputs to complete\n\n- Audience:\n- Primary conversion:\n- Desired first-five-seconds feeling:\n- Brand truths that must remain visible:\n- Real assets available:\n- Competitors and references:\n\n## Required page capabilities\n\n- Semantic hook, problem, proof, solution, evidence, and action sections\n- Mobile-first behavior at 320px, 768px, and 1440px\n- Keyboard-visible focus and reduced-motion support\n- Strong content hierarchy with exactly one H1\n- Components that can be reused without forcing identical page compositions\n\n## Creative freedom\n\nThe selected design authority owns composition, typography, palette, rhythm, texture, art direction, and signature interaction. This may be Claude Design, the current capable agent, another design tool, or a human designer. Cosmo owns content structure, accessibility, SEO, and build integrity. Avoid treating the existing starter styling as a visual requirement.\n${intelligenceSection}\n## Deliverables\n\n1. Three visual directions with a short rationale for each\n2. One selected and refined homepage direction\n3. Mobile and desktop states\n4. Component inventory and design tokens\n5. Notes describing the distinctive element that should survive implementation\n`);
|
|
570
|
+
console.log(`Created design brief: ${file}`);
|
|
454
571
|
}
|
|
455
572
|
|
|
456
573
|
function designCapture(args) {
|
|
@@ -555,7 +672,7 @@ function intelligenceCommand(args) {
|
|
|
555
672
|
return;
|
|
556
673
|
}
|
|
557
674
|
if (subcommand === 'guide') {
|
|
558
|
-
const { positional } = parseOptions(rest);
|
|
675
|
+
const { options, positional } = parseOptions(rest);
|
|
559
676
|
if (!positional[0]) throw new Error('Usage: cosmo intelligence guide <stage> [directory]');
|
|
560
677
|
const target = projectDirectory(positional[1] ?? '.');
|
|
561
678
|
const packs = readIntelligence(target).manifests.filter((pack) => pack.stages.includes(positional[0]));
|
|
@@ -563,8 +680,11 @@ function intelligenceCommand(args) {
|
|
|
563
680
|
console.log(`Intelligence guidance — ${positional[0]}`);
|
|
564
681
|
for (const pack of packs) {
|
|
565
682
|
console.log(`\n${pack.title} (${pack.id})`);
|
|
566
|
-
console.log(`
|
|
567
|
-
|
|
683
|
+
if (options.agent) console.log(` ${normalizeAgent(options.agent)}: ${guidanceForAgent(pack, options.agent)}`);
|
|
684
|
+
else {
|
|
685
|
+
console.log(` Build: ${guidanceForAgent(pack, 'build')}`);
|
|
686
|
+
console.log(` Review: ${guidanceForAgent(pack, 'review')}`);
|
|
687
|
+
}
|
|
568
688
|
console.log(' Questions:');
|
|
569
689
|
for (const question of pack.questions) console.log(` - ${question}`);
|
|
570
690
|
if (pack.artifact.stage === positional[0]) console.log(` Gate: ${pack.artifact.path}`);
|
|
@@ -867,14 +987,16 @@ async function deployCommand(args) {
|
|
|
867
987
|
async function main() {
|
|
868
988
|
if (command === 'help' || command === '--help' || command === '-h') return help();
|
|
869
989
|
if (command === '--version' || command === '-v' || command === 'version') return console.log(VERSION);
|
|
870
|
-
if (command === 'setup') return setup();
|
|
990
|
+
if (command === 'setup') return setup(rawArgs);
|
|
871
991
|
if (command === 'init') return init(rawArgs);
|
|
872
992
|
if (command === 'adopt') return adopt(rawArgs);
|
|
873
993
|
if (command === 'claude') return claudeCommand(rawArgs);
|
|
994
|
+
if (command === 'agent') return agentCommand(rawArgs);
|
|
874
995
|
if (command === 'dev') return dev(rawArgs);
|
|
875
996
|
if (command === 'build') return build(rawArgs);
|
|
876
997
|
if (command === 'check') return check(rawArgs);
|
|
877
998
|
if (command === 'content' && rawArgs[0] === 'check') return contentCheck(rawArgs.slice(1));
|
|
999
|
+
if (command === 'copy') return copyCommand(rawArgs);
|
|
878
1000
|
if (command === 'browser' && rawArgs[0] === 'check') return browserCheck(rawArgs.slice(1));
|
|
879
1001
|
if (command === 'status') return status(rawArgs);
|
|
880
1002
|
if (command === 'doctor') return doctorCommand(rawArgs);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { applyIntelligenceProfile } from './intelligence.mjs';
|
|
4
|
+
import { scaffoldCopyStudio } from './copy-studio.mjs';
|
|
4
5
|
import { slugify, writeJson } from './project.mjs';
|
|
5
6
|
|
|
6
7
|
const GOVERNANCE_PATHS = [
|
|
@@ -11,6 +12,12 @@ const GOVERNANCE_PATHS = [
|
|
|
11
12
|
'.cosmo/workflows',
|
|
12
13
|
];
|
|
13
14
|
|
|
15
|
+
const AGENT_ADAPTERS = [
|
|
16
|
+
'.agents/skills/cosmo/SKILL.md',
|
|
17
|
+
'.agents/rules/cosmo.md',
|
|
18
|
+
'.agents/workflows/cosmo.md',
|
|
19
|
+
];
|
|
20
|
+
|
|
14
21
|
function detectsAstro(target) {
|
|
15
22
|
const config = ['astro.config.mjs', 'astro.config.js', 'astro.config.ts', 'astro.config.cjs'].some((name) => fs.existsSync(path.join(target, name)));
|
|
16
23
|
const packageFile = path.join(target, 'package.json');
|
|
@@ -34,6 +41,18 @@ function installAgentGuide(templateDirectory, target, filename) {
|
|
|
34
41
|
return path.relative(target, destination);
|
|
35
42
|
}
|
|
36
43
|
|
|
44
|
+
function installAgentAdapters(templateDirectory, target) {
|
|
45
|
+
return AGENT_ADAPTERS.map((relative) => {
|
|
46
|
+
const source = path.join(templateDirectory, relative);
|
|
47
|
+
if (!fs.existsSync(source)) return null;
|
|
48
|
+
const preferred = path.join(target, relative);
|
|
49
|
+
const destination = fs.existsSync(preferred) ? path.join(target, '.cosmo', 'agent-adapters', relative) : preferred;
|
|
50
|
+
fs.mkdirSync(path.dirname(destination), { recursive: true });
|
|
51
|
+
fs.copyFileSync(source, destination, fs.constants.COPYFILE_EXCL);
|
|
52
|
+
return path.relative(target, destination);
|
|
53
|
+
}).filter(Boolean);
|
|
54
|
+
}
|
|
55
|
+
|
|
37
56
|
export function adoptAstroProject(templateDirectory, target, options = {}) {
|
|
38
57
|
const resolved = path.resolve(target);
|
|
39
58
|
if (!fs.existsSync(resolved) || !fs.statSync(resolved).isDirectory()) throw new Error(`Project directory not found: ${resolved}`);
|
|
@@ -66,7 +85,9 @@ export function adoptAstroProject(templateDirectory, target, options = {}) {
|
|
|
66
85
|
const voice = JSON.parse(fs.readFileSync(voiceFile, 'utf8'));
|
|
67
86
|
writeJson(voiceFile, { ...voice, entityId: slugify(brand) });
|
|
68
87
|
applyIntelligenceProfile(resolved, profile);
|
|
88
|
+
scaffoldCopyStudio(resolved);
|
|
69
89
|
|
|
70
90
|
const guides = ['CLAUDE.md', 'AGENTS.md'].map((file) => installAgentGuide(templateDirectory, resolved, file)).filter(Boolean);
|
|
91
|
+
guides.push(...installAgentAdapters(templateDirectory, resolved));
|
|
71
92
|
return { target: resolved, name, brand, site, profile, guides };
|
|
72
93
|
}
|