@lovelybunch/core 1.0.54 → 1.0.56

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.
@@ -1 +1 @@
1
- {"version":3,"file":"schema-templates.d.ts","sourceRoot":"","sources":["../src/schema-templates.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS3C,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"schema-templates.d.ts","sourceRoot":"","sources":["../src/schema-templates.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS3C,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,9 +1,14 @@
1
- import { readFileSync, readdirSync } from 'fs';
1
+ import { existsSync, readFileSync, readdirSync } from 'fs';
2
2
  import path from 'path';
3
3
  import { fileURLToPath } from 'url';
4
4
  const currentFile = fileURLToPath(import.meta.url);
5
5
  const currentDir = path.dirname(currentFile);
6
- const schemaDir = path.resolve(currentDir, '../../shared/system-prompts/schema');
6
+ const packagedSchemaDir = path.resolve(currentDir, 'system-prompts', 'schema');
7
+ const workspaceSchemaDir = path.resolve(currentDir, '..', '..', 'shared', 'system-prompts', 'schema');
8
+ const schemaDir = existsSync(packagedSchemaDir) ? packagedSchemaDir : workspaceSchemaDir;
9
+ if (!existsSync(schemaDir)) {
10
+ throw new Error(`Schema templates directory not found. Looked in: ${packagedSchemaDir} or ${workspaceSchemaDir}`);
11
+ }
7
12
  const schemaTemplates = Object.fromEntries(readdirSync(schemaDir)
8
13
  .filter((file) => file.endsWith('.md'))
9
14
  .sort()
@@ -1 +1 @@
1
- {"version":3,"file":"schema-templates.js","sourceRoot":"","sources":["../src/schema-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAC/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BAAgB,EAAE,QAAQ,CAAC,CAAC;AAC/E,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAEtG,MAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC;AAEzF,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;IAC3B,MAAM,IAAI,KAAK,CAAC,oDAAoD,iBAAiB,OAAO,kBAAkB,EAAE,CAAC,CAAC;AACpH,CAAC;AAED,MAAM,eAAe,GAA2B,MAAM,CAAC,WAAW,CAChE,WAAW,CAAC,SAAS,CAAC;KACnB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;KACtC,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;IACZ,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzB,CAAC,CAAC,CACL,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ You are the Coconut 🥥 AI assistant for agent‑native development workflows.
2
+
3
+ Goals
4
+ - Help developers with proposals, architecture decisions, planning, and execution.
5
+ - Be precise, actionable, and concise; favor stepwise guidance over essays.
6
+ - Respect repository context and any user‑provided documents.
7
+ - Ask clarifying questions when requirements are ambiguous.
8
+
9
+ Style
10
+ - Use monospace for commands, paths, and code identifiers.
11
+ - Prefer short, direct sentences; avoid filler.
12
+ - Offer succinct next-step options when helpful.
13
+
14
+ Knowledge Base
15
+ - Proactively notice when the conversation surfaces durable knowledge (research summaries, improved docs, reusable insights) and offer to save it into `.nut/context/knowledge`.
16
+ - When you have a knowledge document ready to review, respond with a short natural-language summary followed by a fenced code block tagged `knowledge_action` containing JSON:
17
+ - `action`: `"create"` or `"update"`
18
+ - `title`: human-readable title for the document
19
+ - `filename`: existing file name for updates (include the `.md` suffix)
20
+ - `summary`: concise description of what changed and why it matters
21
+ - `content`: complete markdown body that follows the guidance in `.nut/.schema/knowledge.schema.md`
22
+ - `metadata`: optional object (`category`, `tags`, `sources`, `related`, `owner`, `audience`, etc.) with arrays expanded, not left undefined
23
+ - Use this pattern when refining user-supplied documents (e.g., `project.md`) so the UI can show “View diff” and “Update knowledge.md” actions.
24
+ - Only execute the `knowledge_documents` MCP tool automatically after the user confirms they want the change; otherwise provide the structured payload so they can approve or adjust it.
25
+ - When system messages include context documents, assume you already have the full text—do not ask the user to reshare it; instead, propose revisions or actions directly.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: design-quality-specialist
3
+ description: |
4
+ Example agent profile that reviews UI changes for adherence to brand and accessibility guidelines.
5
+ color: teal
6
+ tools:
7
+ - Read
8
+ - Write
9
+ - MultiEdit
10
+ - Bash
11
+ - Git
12
+ createdAt: '2025-09-20T15:00:00.000Z'
13
+ updatedAt: '2025-09-21T09:00:00.000Z'
14
+ version: '1.0.0'
15
+ focusAreas:
16
+ - Flag unintended visual regressions before release.
17
+ - Coach contributors on meeting accessibility targets.
18
+ contextPreferences:
19
+ - .nut/context/project.md
20
+ - .nut/.schema/proposal.schema.md
21
+ ---
22
+ # Agent Schema Example
23
+
24
+ Spell out the responsibilities, decision-making guidance, and success criteria for the agent.
25
+
26
+ ## Responsibilities
27
+
28
+ Explain the situations where this agent should be invoked and how it collaborates with humans.
29
+
30
+ ## Playbooks
31
+
32
+ Outline repeatable steps the agent should follow when executing its responsibilities.
33
+
34
+ ## Escalation
35
+
36
+ Clarify when the agent should raise issues or hand back to a human teammate.
@@ -0,0 +1,57 @@
1
+ ---
2
+ version: '1.0'
3
+ updated: '2025-09-21'
4
+ type: architecture
5
+ tags:
6
+ - reference
7
+ - engineering
8
+ stack:
9
+ runtime: node
10
+ framework: hono
11
+ language: typescript
12
+ database: postgres
13
+ deployment: vercel
14
+ repository: https://github.com/lovelybunch/coconut
15
+ commands:
16
+ install: pnpm install
17
+ dev: pnpm dev
18
+ test: pnpm test
19
+ build: pnpm build
20
+ deploy: pnpm --filter @lovelybunch/api deploy
21
+ systems:
22
+ frontend: packages/frontend
23
+ api: packages/api
24
+ cli: packages/cli
25
+ shared: packages/shared
26
+ integrationPoints:
27
+ - name: Claude MCP server
28
+ description: Provides remote tool access for the AI assistant.
29
+ protocol: http
30
+ url: https://mcp.lovelybunch.dev
31
+ observability:
32
+ logging: pino
33
+ metrics: prometheus
34
+ tracing: opentelemetry
35
+ ---
36
+ # Architecture Schema Example
37
+
38
+ Describe the high-level system, directory layout, major data flows, and operational considerations.
39
+
40
+ ## System Diagram
41
+
42
+ Capture the primary components and how they interact.
43
+
44
+ ## Data Flow
45
+
46
+ Document how information moves between services, including ingress, processing, and persistence.
47
+
48
+ ## Operational Notes
49
+
50
+ Track deployment strategy, scaling thresholds, and recovery procedures.
51
+
52
+ ## Development Conventions
53
+
54
+ - **File Naming:** kebab-case for files, camelCase for variables.
55
+ - **Code Style:** ESLint + Prettier enforced via CI.
56
+ - **Branch Strategy:** Trunk-based with short-lived feature branches.
57
+ - **Commit Format:** Conventional Commits (`feat:`, `fix:`, etc.).
@@ -0,0 +1,37 @@
1
+ ---
2
+ version: '1.0'
3
+ updated: '2025-09-21'
4
+ type: knowledge
5
+ category: design-system
6
+ tags:
7
+ - branding
8
+ - iconography
9
+ sources:
10
+ - Design System Audit 2025-09-15
11
+ - Customer feedback triage 2025-09-18
12
+ related:
13
+ - .nut/context/project.md
14
+ - .nut/.schema/proposal.schema.md
15
+ owner:
16
+ name: Kevin Bluer
17
+ email: kevin@bluer.com
18
+ audience:
19
+ - Designers
20
+ - Frontend Engineers
21
+ status: active
22
+ ---
23
+ # Knowledge Schema Example
24
+
25
+ Document durable learnings, guidelines, and references that support the team.
26
+
27
+ ## Key Takeaways
28
+
29
+ List the most important facts, decisions, and rationales.
30
+
31
+ ## References
32
+
33
+ Link to designs, proposals, experiments, and conversations that informed the knowledge.
34
+
35
+ ## Follow-ups
36
+
37
+ Capture open questions or next steps for the team to investigate.
@@ -0,0 +1,71 @@
1
+ ---
2
+ version: '1.0'
3
+ updated: '2025-09-21'
4
+ type: project
5
+ status: active
6
+ category: overview
7
+ tags:
8
+ - palm-tree-refresh
9
+ - ui
10
+ project:
11
+ name: Coconut Palm Refresh
12
+ description: Align shared branding assets with the neutral palette across all surfaces.
13
+ website: https://coconut.dev
14
+ version: '2.3.0'
15
+ stage: production
16
+ owners:
17
+ product:
18
+ name: Steve Jobs
19
+ email: steve@apple.com
20
+ engineering:
21
+ name: Coconut AI
22
+ email: coconut.ai@lovelybunch.com
23
+ roadmap:
24
+ milestones:
25
+ - name: Palette audit complete
26
+ targetDate: '2025-09-18'
27
+ owners:
28
+ - design-team
29
+ - name: Updated assets shipped
30
+ targetDate: '2025-09-28'
31
+ owners:
32
+ - frontend-team
33
+ dependencies:
34
+ repositories:
35
+ - https://github.com/lovelybunch/coconut-design-system
36
+ stakeholders:
37
+ - Marketing
38
+ - Customer Support
39
+ communication:
40
+ standups:
41
+ cadence: weekly
42
+ channel: '#coconut-brand-refresh'
43
+ statusReports:
44
+ frequency: bi-weekly
45
+ audience:
46
+ - leadership
47
+ - design
48
+ ---
49
+ # Project Schema Example
50
+
51
+ Use this structure to capture project identity, goals, roadmap, and coordination details.
52
+
53
+ ## Overview
54
+
55
+ Summarize the mission, scope boundaries, and target customers.
56
+
57
+ ## Current Status
58
+
59
+ Highlight what is complete, in progress, blocked, and upcoming.
60
+
61
+ ## Goals & Success Metrics
62
+
63
+ Document the primary project ambition, the key metrics used to assess success, and any explicit non-goals in markdown. For example:
64
+
65
+ - **Primary Goal:** Introduce automated moderation to reduce manual review load.
66
+ - **Success Metrics:** Time-to-triage under 5 minutes, 95% precision on high-risk flags.
67
+ - **Non-Goals:** Real-time interventions, policy redesign.
68
+
69
+ ## Resources
70
+
71
+ List repositories, docs, dashboards, and any external references the team relies on.
@@ -0,0 +1,179 @@
1
+ ---
2
+ id: cp-1758376921669
3
+ intent: Remove the green color for the palm tree icon in the top left header
4
+ createdAt: '2025-09-20T14:02:01.669Z'
5
+ updatedAt: '2025-09-21T09:05:45.123Z'
6
+ status: draft
7
+ priority: medium
8
+ productSpecRef: specs/ui-refresh.md
9
+ author:
10
+ id: current-user
11
+ name: Steve Jobs
12
+ email: apple@apple.com
13
+ role: engineer
14
+ type: human
15
+ plan:
16
+ estimatedDuration: 'P2D'
17
+ dependencies:
18
+ - .nut/context/architecture.md
19
+ - packages/frontend/src/components/AppLogo.tsx
20
+ steps:
21
+ - id: step-01
22
+ description: Audit every usage of the palm tree icon across the frontend.
23
+ status: completed
24
+ expectedOutcome: Inventory of components with the hard-coded fill.
25
+ command: pnpm --filter @lovelybunch/frontend lint
26
+ executedAt: '2025-09-20T17:45:00.000Z'
27
+ - id: step-02
28
+ description: Replace hard-coded green fills with the neutral brand token.
29
+ status: in-progress
30
+ expectedOutcome: All icons inherit shared theme tokens.
31
+ - id: step-03
32
+ description: Update visual regression tests and document changes.
33
+ status: pending
34
+ expectedOutcome: Screenshots reflect the new neutral color.
35
+ tags:
36
+ - branding
37
+ - accessibility
38
+ labels:
39
+ - ui-refresh
40
+ - iteration-21
41
+ comments:
42
+ - id: cmt-01
43
+ author: design-review@lovelybunch.com
44
+ content: Confirm alignment with the design system palette before merging.
45
+ createdAt: '2025-09-20T19:10:00.000Z'
46
+ - id: cmt-02
47
+ author: qa-team@lovelybunch.com
48
+ content: Please include snapshots from the regression suite in evidence.
49
+ createdAt: '2025-09-21T08:30:00.000Z'
50
+ evidence:
51
+ - type: screenshot
52
+ description: Before and after comparison exported from Storybook.
53
+ data: artifacts/screenshots/logo-before-after.png
54
+ timestamp: '2025-09-21T08:45:00.000Z'
55
+ - type: test
56
+ description: Jest snapshot update for the header logo.
57
+ data:
58
+ command: pnpm --filter @lovelybunch/frontend test -- Logo
59
+ result: passed
60
+ timestamp: '2025-09-21T08:50:00.000Z'
61
+ policies:
62
+ - id: policy-brand
63
+ name: Brand consistency
64
+ description: Any palette change must be approved by design.
65
+ status: passed
66
+ message: Confirmed by Design Systems lead.
67
+ checkedAt: '2025-09-21T08:55:00.000Z'
68
+ featureFlags:
69
+ - id: flag-ui-logo-color
70
+ version: v1
71
+ name: ui-logo-neutral
72
+ description: Gradually roll out the neutral palm tree icon.
73
+ type: boolean
74
+ defaultValue: false
75
+ scopes:
76
+ - web
77
+ - desktop
78
+ targets:
79
+ - audience: internal
80
+ value: true
81
+ percentage: 100
82
+ killSwitch: true
83
+ dependencies: []
84
+ createdAt: '2025-09-20T14:05:00.000Z'
85
+ updatedAt: '2025-09-21T08:45:00.000Z'
86
+ experiments:
87
+ - id: exp-logo-sentiment
88
+ name: Logo sentiment experiment
89
+ hypothesis: A neutral logo improves trust without reducing recognition.
90
+ variants:
91
+ - id: control
92
+ name: current-logo
93
+ description: Maintains the green fill.
94
+ allocation: 50
95
+ config:
96
+ asset: logo-green.svg
97
+ - id: treatment
98
+ name: neutral-logo
99
+ description: Uses the neutral brand token.
100
+ allocation: 50
101
+ config:
102
+ asset: logo-neutral.svg
103
+ allocation:
104
+ method: random
105
+ totalAllocation: 20
106
+ successMetrics:
107
+ - trust_score
108
+ - click_through_header
109
+ guardrailMetrics:
110
+ - name: bounce_rate
111
+ threshold: 5
112
+ comparison: greater
113
+ action: alert
114
+ stopRules:
115
+ - metric: trust_score
116
+ condition: treatment <= control
117
+ action: pause
118
+ analysisConfig:
119
+ confidenceLevel: 0.95
120
+ minimumSampleSize: 500
121
+ testType: two-tailed
122
+ status: draft
123
+ telemetryContracts:
124
+ - eventName: header_logo_rendered
125
+ version: '2025-09-20'
126
+ schema:
127
+ iconFill: string
128
+ theme: string
129
+ piiFields: []
130
+ samplingRate: 1
131
+ retentionPolicy:
132
+ duration: 30
133
+ deleteAfter: 90
134
+ approvals: []
135
+ releasePlan:
136
+ strategy: gradual
137
+ stages:
138
+ - name: design-review
139
+ percentage: 10
140
+ duration: 4
141
+ criteria:
142
+ - Design approval recorded in comments.
143
+ - name: staging
144
+ percentage: 30
145
+ duration: 12
146
+ criteria:
147
+ - No visual diffs detected.
148
+ - name: production
149
+ percentage: 60
150
+ duration: 24
151
+ criteria:
152
+ - Support team informed.
153
+ schedule: '2025-09-25T09:00:00.000Z'
154
+ rollbackPlan: Revert to the previous SVG asset and restore original theme tokens.
155
+ aiInteractions:
156
+ - id: ai-01
157
+ timestamp: '2025-09-20T14:10:00.000Z'
158
+ model: claude-3.5
159
+ prompt: Suggest implementation plan for updating the shared logo asset.
160
+ response: Validate the SVG once shared tokens are in place and run visual regression tests.
161
+ tokens:
162
+ prompt: 820
163
+ completion: 260
164
+ total: 1080
165
+ ---
166
+ # Proposal Schema Example
167
+
168
+ This file demonstrates the full front matter and content structure Coconut expects for change proposals.
169
+ - Keep arrays populated with meaningful objects, not empty lists.
170
+ - Update timestamps using ISO 8601 format.
171
+ - Maintain sections below the front matter for narrative context and status updates.
172
+
173
+ ## Problem Statement
174
+
175
+ Document why the change is needed, who benefits, and which constraints apply.
176
+
177
+ ## Implementation Notes
178
+
179
+ Summarize critical decisions, risks, follow-up work, and any files that must be touched.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovelybunch/core",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Core Coconut functionality",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,13 +24,14 @@
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsc",
27
+ "postbuild": "node ./scripts/copy-schema.mjs",
27
28
  "dev": "tsc --watch",
28
29
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
29
30
  "type-check": "tsc --noEmit",
30
31
  "test": "vitest run"
31
32
  },
32
33
  "dependencies": {
33
- "@lovelybunch/types": "^1.0.54",
34
+ "@lovelybunch/types": "^1.0.56",
34
35
  "gray-matter": "^4.0.3",
35
36
  "fuse.js": "^7.0.0",
36
37
  "nanoid": "^5.0.6"