@medyll/idae-cadenzia 0.141.0 → 0.147.2
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/.eslintrc.js +14 -0
- package/.github/copilot-instructions.md +121 -0
- package/.github/skills/idae-agent-full/SKILL.md +75 -0
- package/.github/skills/make-skill-template/SKILL.md +147 -0
- package/.github/skills/readme/skill.md +37 -0
- package/.github/skills/svelte-code-writer/SKILL.md +66 -0
- package/.prettierignore +4 -4
- package/.prettierrc.js +5 -0
- package/CHANGELOG.md +2432 -2232
- package/LICENSE +21 -21
- package/README.md +38 -38
- package/package.json +10 -4
- package/scripts/package-pre.js +3 -3
- package/src/app.d.ts +13 -13
- package/src/app.html +12 -12
- package/src/demo.spec.ts +7 -7
- package/src/lib/components/App.svelte +46 -46
- package/src/lib/components/CadencePanel.svelte +24 -24
- package/src/lib/components/ChordTable.svelte +252 -252
- package/src/lib/components/ChordVisualization.svelte +82 -82
- package/src/lib/constants/constants.ts +49 -49
- package/src/lib/functions/functions.svelte.ts +139 -139
- package/src/lib/functions/rules.ts +118 -118
- package/src/lib/index.ts +9 -9
- package/src/lib/types/types.ts +31 -31
- package/src/routes/+page.svelte +7 -7
- package/svelte.config.js +18 -18
- package/tsconfig.json +19 -19
- package/vite.config.ts +10 -10
- package/.prettierrc +0 -15
- package/eslint.config.js +0 -33
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type { import("eslint").Linter.Config } */
|
|
2
|
+
import idaeConfig from "@medyll/idae-eslint-config";
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
...idaeConfig,
|
|
6
|
+
{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
parserOptions: {
|
|
9
|
+
project: true,
|
|
10
|
+
tsconfigRootDir: import.meta.dirname,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
];
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Idae Database Library - AI Coding Instructions
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
**@medyll/idae-db** is a TypeScript library providing a flexible database abstraction layer for MongoDB, MySQL, and ChromaDB with event-driven CRUD operations, auto-increment support, and connection pooling via singleton pattern.
|
|
6
|
+
|
|
7
|
+
### Architecture
|
|
8
|
+
|
|
9
|
+
The library uses a **Strategy pattern** with adapters:
|
|
10
|
+
- **IdaeDb** (singleton): Entry point, manages instances per URI+DbType combo, handles initialization
|
|
11
|
+
- **IdaeDbConnection**: Per-database connection instance, creates collections/tables via adapters
|
|
12
|
+
- **IdaeDbAdapter**: Generic adapter facade with pre/post hooks via decorators
|
|
13
|
+
- **Database-specific adapters**: MongoDBAdapter, MySQLAdapter, ChromaDBAdapter (implement IdaeDbAdapterInterface)
|
|
14
|
+
- **IdaeDBModel**: Per-collection model for MongoDB, handles auto-increment tracking
|
|
15
|
+
|
|
16
|
+
Key flow: `IdaeDb.init()` → `db(dbName)` → `collection<T>(name)` → operations with events
|
|
17
|
+
|
|
18
|
+
## Development Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run dev # Start Vite dev server
|
|
22
|
+
npm run build # Build and package (runs vite build + svelte-package + publint)
|
|
23
|
+
npm run test # Run Vitest tests (src/**/*.{test,spec}.{js,ts})
|
|
24
|
+
npm run lint # Check Prettier + ESLint
|
|
25
|
+
npm run format # Auto-fix formatting
|
|
26
|
+
npm run check # Svelte type checking
|
|
27
|
+
npm run check:watch # Watch mode type checking
|
|
28
|
+
npm run prepackage # Pre-publish script
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Code Patterns & Conventions
|
|
32
|
+
|
|
33
|
+
### Event System (Critical Pattern)
|
|
34
|
+
|
|
35
|
+
All adapter methods support pre/post/error hooks via **@withEmitter decorator** (in [IdaeEventEmitter.ts](src/lib/IdaeEventEmitter.ts)):
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// In adapter implementation, decorate methods:
|
|
39
|
+
@withEmitter()
|
|
40
|
+
async create(data: Partial<T>): Promise<T> { ... }
|
|
41
|
+
|
|
42
|
+
// Register global listeners on connection:
|
|
43
|
+
const collection = db.collection<User>('user');
|
|
44
|
+
collection.registerEvents<User>({
|
|
45
|
+
create: {
|
|
46
|
+
pre: (data) => console.log('Creating:', data),
|
|
47
|
+
post: (result, data) => console.log('Created:', result),
|
|
48
|
+
error: (err) => console.error(err)
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Emitter events: `pre:methodName`, `post:methodName`, `error:methodName`
|
|
54
|
+
|
|
55
|
+
### Adapter Pattern
|
|
56
|
+
|
|
57
|
+
New adapters must implement `IdaeDbAdapterInterface<T>` from [types.ts](src/lib/@types/types.ts):
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// Required static methods for connection lifecycle
|
|
61
|
+
static async connect(uri: string): Promise<Client>
|
|
62
|
+
static getDb(client: Client, dbName: string): Database
|
|
63
|
+
static async close(client: Client): Promise<void>
|
|
64
|
+
|
|
65
|
+
// Required instance methods
|
|
66
|
+
async create(data: Partial<T>): Promise<T>
|
|
67
|
+
async find(params: IdaeDbParams<T>): Promise<T[]>
|
|
68
|
+
async findOne(params: IdaeDbParams<T>): Promise<T | null>
|
|
69
|
+
async update(id: string, updateData: Partial<T>): Promise<unknown>
|
|
70
|
+
async deleteById(id: string): Promise<unknown>
|
|
71
|
+
async transaction<TResult>(callback: (session) => Promise<TResult>): Promise<TResult>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Register new adapters in [IdaeDbAdapter.ts](src/lib/IdaeDbAdapter.ts) static initializer:
|
|
75
|
+
```typescript
|
|
76
|
+
static {
|
|
77
|
+
IdaeDbAdapter.addAdapter(DbType.NEWDB, MyNewAdapter);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Type Safety
|
|
82
|
+
|
|
83
|
+
- Enforce strict TypeScript with `strict: true` in tsconfig
|
|
84
|
+
- Use generic `T extends object` for all model types
|
|
85
|
+
- Filter types use MongoDB's `Filter<T>` from driver for consistency
|
|
86
|
+
- Query params: `IdaeDbParams<T>` with optional `query`, `sortBy`, `limit`, `skip`
|
|
87
|
+
|
|
88
|
+
### ID Fields
|
|
89
|
+
|
|
90
|
+
- MongoDB: uses `_id` by default or custom via `autoIncrementFormat`
|
|
91
|
+
- Custom ID tracking via `IdaeDBModel.fieldId` and auto-increment collection
|
|
92
|
+
- Retrieved from model: `adapter.model.fieldId`
|
|
93
|
+
|
|
94
|
+
## Build & Package
|
|
95
|
+
|
|
96
|
+
- **Build**: Vite → ESM output to `dist/`, exports via [index.ts](src/lib/index.ts)
|
|
97
|
+
- **Package**: svelte-package generates `dist/index.d.ts` and `dist/index.js`
|
|
98
|
+
- **Pre-publish**: `scripts/package-pre.js` runs before npm publish
|
|
99
|
+
- **Export maps** in package.json support Svelte, ESM, and TypeScript
|
|
100
|
+
|
|
101
|
+
## Testing
|
|
102
|
+
|
|
103
|
+
- Framework: **Vitest** (config in [vite.config.ts](vite.config.ts))
|
|
104
|
+
- Pattern: `describe()`, `it()`, `expect()` (e.g., [index.test.ts](src/index.test.ts))
|
|
105
|
+
- Test files: `src/**/*.{test,spec}.{js,ts}`
|
|
106
|
+
- No test database setup yet—add MongoDB/MySQL fixtures as needed
|
|
107
|
+
|
|
108
|
+
## External Dependencies
|
|
109
|
+
|
|
110
|
+
- **mongodb**: MongoDB driver for queries and transactions
|
|
111
|
+
- **svelte/svelte-kit**: Framework (peer dependency for Svelte 5+)
|
|
112
|
+
- **vite/vitest**: Build and test runner
|
|
113
|
+
- **prettier/eslint**: Code formatting and linting
|
|
114
|
+
- **@sveltejs/package**: Packaging utility
|
|
115
|
+
|
|
116
|
+
## Known Constraints
|
|
117
|
+
|
|
118
|
+
- MongoDB adapter references `.db()` for connection, needs refactoring for MySQL/ChromaDB
|
|
119
|
+
- Auto-increment currently MongoDB-specific, needs abstraction
|
|
120
|
+
- No transaction support in MySQL/ChromaDB adapters yet
|
|
121
|
+
- DbType enum is string-based (consider supporting registration for extensibility)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: make-agent-full
|
|
3
|
+
|
|
4
|
+
description: "Expert Multi-role Agent (PM, Architect, Brainstorm, Dev, Tester, DOC) with GitHub & Kanban integration."
|
|
5
|
+
tools:
|
|
6
|
+
[
|
|
7
|
+
"vscode",
|
|
8
|
+
"execute",
|
|
9
|
+
"read",
|
|
10
|
+
"edit",
|
|
11
|
+
"search",
|
|
12
|
+
"web",
|
|
13
|
+
"agent",
|
|
14
|
+
"todo",
|
|
15
|
+
"daniyalfaraz.copilot-kanban/kanban_create",
|
|
16
|
+
"daniyalfaraz.copilot-kanban/kanban_update",
|
|
17
|
+
"daniyalfaraz.copilot-kanban/kanban_get",
|
|
18
|
+
"daniyalfaraz.copilot-kanban/kanban_reset",
|
|
19
|
+
]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# IDAE AGENT FULL SKILL
|
|
23
|
+
|
|
24
|
+
## SYSTEM INSTRUCTIONS
|
|
25
|
+
|
|
26
|
+
Multi-role AI Agent for Mydde, with GitHub & Kanban integration.
|
|
27
|
+
|
|
28
|
+
**CRITICAL RULE**: Every response MUST start with [[ROLE_NAME]].
|
|
29
|
+
**AUTONOMY**: Never announce an intention without acting. Always execute required actions immediately, without waiting for validation.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 1. DYNAMIC ROLES
|
|
34
|
+
|
|
35
|
+
- **[[PM]]**: Project management. Synchronizes GitHub Issues and Kanban. Examples: sprint planning, managing `backlog.md`.
|
|
36
|
+
- **[[BRAINSTORM]]**: Ideation, alternatives before technical design.
|
|
37
|
+
- **[[ARCHITECT]]**: Technical specifications, file structure, system design.
|
|
38
|
+
- **[[DEV]]**: Implementation (SOLID code). Triggers [[DOC]] if documentation must be updated.
|
|
39
|
+
- **[[TESTER]]**: Quality. **MANDATORY**: No development without a test plan.
|
|
40
|
+
- **[[DOC]]**: Documentation. Manages `README.md` and project docs.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 2. KANBAN WORKFLOW (Copilot Kanban)
|
|
45
|
+
|
|
46
|
+
- **Initialization**: Use `kanban_get` to list existing tasks.
|
|
47
|
+
- **Task creation**: After planning, [[PM]] uses `kanban_create` ("Ready" column).
|
|
48
|
+
- **Continuous execution**: When a task moves to `in_progress` via `kanban_update`, immediately chain with [[ARCHITECT]] or [[DEV]] and execute required tools. Never wait for user validation.
|
|
49
|
+
- **Completion**: Move to `done` only after Mydde's validation or [[TESTER]] approval.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 3. SELF-DIAGNOSTIC & INITIALIZATION
|
|
54
|
+
|
|
55
|
+
- **Startup check**: On first interaction, verify `.github/copilot-instructions.md`, `backlog.md`, `/idae-docs/sprints/` exist.
|
|
56
|
+
- **Auto-init**: If missing, ask Mydde: "Project structure incomplete. Initialize backlog and sprints?"
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 4. CONTEXT & ISSUE DETECTION
|
|
61
|
+
|
|
62
|
+
- **Context search**: Check if the task is linked to a GitHub Issue, Sprint, or Kanban card.
|
|
63
|
+
- **Missing context**: If orphan, ask: "No context found. Create GitHub Issue, add to Sprint, or to Kanban?"
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 5. OPERATIONAL RULES
|
|
68
|
+
|
|
69
|
+
- Always address Mydde as "tu" (informal).
|
|
70
|
+
- **CHAINING**: Use multi-tool calls to chain actions in a single turn.
|
|
71
|
+
- **NO IDLE TALK**: Concise answers, no unnecessary phrases. Never announce the action, just execute it.
|
|
72
|
+
- Use `web` for documentation, `searchSyntax` for deep code analysis.
|
|
73
|
+
- Document every major action in a dedicated `.md` file.
|
|
74
|
+
|
|
75
|
+
---
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: make-skill-template
|
|
3
|
+
description: 'Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Make Skill Template
|
|
7
|
+
|
|
8
|
+
A meta-skill for creating new Agent Skills. Use this skill when you need to scaffold a new skill folder, generate a SKILL.md file, or help users understand the Agent Skills specification.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
- User asks to "create a skill", "make a new skill", or "scaffold a skill"
|
|
13
|
+
- User wants to add a specialized capability to their GitHub Copilot setup
|
|
14
|
+
- User needs help structuring a skill with bundled resources
|
|
15
|
+
- User wants to duplicate this template as a starting point
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- Understanding of what the skill should accomplish
|
|
20
|
+
- A clear, keyword-rich description of capabilities and triggers
|
|
21
|
+
- Knowledge of any bundled resources needed (scripts, references, assets, templates)
|
|
22
|
+
|
|
23
|
+
## Creating a New Skill
|
|
24
|
+
|
|
25
|
+
### Step 1: Create the Skill Directory
|
|
26
|
+
|
|
27
|
+
Create a new folder with a lowercase, hyphenated name:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
skills/<skill-name>/
|
|
31
|
+
└── SKILL.md # Required
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 2: Generate SKILL.md with Frontmatter
|
|
35
|
+
|
|
36
|
+
Every skill requires YAML frontmatter with `name` and `description`:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
---
|
|
40
|
+
name: <skill-name>
|
|
41
|
+
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
|
|
42
|
+
---
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Frontmatter Field Requirements
|
|
46
|
+
|
|
47
|
+
| Field | Required | Constraints |
|
|
48
|
+
|-------|----------|-------------|
|
|
49
|
+
| `name` | **Yes** | 1-64 chars, lowercase letters/numbers/hyphens only, must match folder name |
|
|
50
|
+
| `description` | **Yes** | 1-1024 chars, must describe WHAT it does AND WHEN to use it |
|
|
51
|
+
| `license` | No | License name or reference to bundled LICENSE.txt |
|
|
52
|
+
| `compatibility` | No | 1-500 chars, environment requirements if needed |
|
|
53
|
+
| `metadata` | No | Key-value pairs for additional properties |
|
|
54
|
+
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental) |
|
|
55
|
+
|
|
56
|
+
#### Description Best Practices
|
|
57
|
+
|
|
58
|
+
**CRITICAL**: The `description` is the PRIMARY mechanism for automatic skill discovery. Include:
|
|
59
|
+
|
|
60
|
+
1. **WHAT** the skill does (capabilities)
|
|
61
|
+
2. **WHEN** to use it (triggers, scenarios, file types)
|
|
62
|
+
3. **Keywords** users might mention in prompts
|
|
63
|
+
|
|
64
|
+
**Good example:**
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
description: 'Toolkit for testing local web applications using Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or view browser console logs. Supports Chrome, Firefox, and WebKit.'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Poor example:**
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
description: 'Web testing helpers'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 3: Write the Skill Body
|
|
77
|
+
|
|
78
|
+
After the frontmatter, add markdown instructions. Recommended sections:
|
|
79
|
+
|
|
80
|
+
| Section | Purpose |
|
|
81
|
+
|---------|---------|
|
|
82
|
+
| `# Title` | Brief overview |
|
|
83
|
+
| `## When to Use This Skill` | Reinforces description triggers |
|
|
84
|
+
| `## Prerequisites` | Required tools, dependencies |
|
|
85
|
+
| `## Step-by-Step Workflows` | Numbered steps for tasks |
|
|
86
|
+
| `## Troubleshooting` | Common issues and solutions |
|
|
87
|
+
| `## References` | Links to bundled docs |
|
|
88
|
+
|
|
89
|
+
### Step 4: Add Optional Directories (If Needed)
|
|
90
|
+
|
|
91
|
+
| Folder | Purpose | When to Use |
|
|
92
|
+
|--------|---------|-------------|
|
|
93
|
+
| `scripts/` | Executable code (Python, Bash, JS) | Automation that performs operations |
|
|
94
|
+
| `references/` | Documentation agent reads | API references, schemas, guides |
|
|
95
|
+
| `assets/` | Static files used AS-IS | Images, fonts, templates |
|
|
96
|
+
| `templates/` | Starter code agent modifies | Scaffolds to extend |
|
|
97
|
+
|
|
98
|
+
## Example: Complete Skill Structure
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
my-awesome-skill/
|
|
102
|
+
├── SKILL.md # Required instructions
|
|
103
|
+
├── LICENSE.txt # Optional license file
|
|
104
|
+
├── scripts/
|
|
105
|
+
│ └── helper.py # Executable automation
|
|
106
|
+
├── references/
|
|
107
|
+
│ ├── api-reference.md # Detailed docs
|
|
108
|
+
│ └── examples.md # Usage examples
|
|
109
|
+
├── assets/
|
|
110
|
+
│ └── diagram.png # Static resources
|
|
111
|
+
└── templates/
|
|
112
|
+
└── starter.ts # Code scaffold
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Quick Start: Duplicate This Template
|
|
116
|
+
|
|
117
|
+
1. Copy the `make-skill-template/` folder
|
|
118
|
+
2. Rename to your skill name (lowercase, hyphens)
|
|
119
|
+
3. Update `SKILL.md`:
|
|
120
|
+
- Change `name:` to match folder name
|
|
121
|
+
- Write a keyword-rich `description:`
|
|
122
|
+
- Replace body content with your instructions
|
|
123
|
+
4. Add bundled resources as needed
|
|
124
|
+
5. Validate with `npm run skill:validate`
|
|
125
|
+
|
|
126
|
+
## Validation Checklist
|
|
127
|
+
|
|
128
|
+
- [ ] Folder name is lowercase with hyphens
|
|
129
|
+
- [ ] `name` field matches folder name exactly
|
|
130
|
+
- [ ] `description` is 10-1024 characters
|
|
131
|
+
- [ ] `description` explains WHAT and WHEN
|
|
132
|
+
- [ ] `description` is wrapped in single quotes
|
|
133
|
+
- [ ] Body content is under 500 lines
|
|
134
|
+
- [ ] Bundled assets are under 5MB each
|
|
135
|
+
|
|
136
|
+
## Troubleshooting
|
|
137
|
+
|
|
138
|
+
| Issue | Solution |
|
|
139
|
+
|-------|----------|
|
|
140
|
+
| Skill not discovered | Improve description with more keywords and triggers |
|
|
141
|
+
| Validation fails on name | Ensure lowercase, no consecutive hyphens, matches folder |
|
|
142
|
+
| Description too short | Add capabilities, triggers, and keywords |
|
|
143
|
+
| Assets not found | Use relative paths from skill root |
|
|
144
|
+
|
|
145
|
+
## References
|
|
146
|
+
|
|
147
|
+
- Agent Skills official spec: <https://agentskills.io/specification>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: readme-creator
|
|
3
|
+
description: Skill to create a README.md file for any project where it stands.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: README File Creator (Total Style)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
This skill enables an AI agent to generate comprehensive, high-quality README.md files for any project. The agent deeply analyzes the codebase, infers architecture, usage, and conventions, and produces a README that is both informative and inviting for new contributors or users.
|
|
10
|
+
|
|
11
|
+
## Capabilities
|
|
12
|
+
- **Codebase Exploration**: Scans all source files, tests, configs, and scripts to extract key information.
|
|
13
|
+
- **Architecture Inference**: Summarizes major modules, data flows, and design patterns.
|
|
14
|
+
- **Usage Extraction**: Detects and documents public APIs, CLI commands, and integration points.
|
|
15
|
+
- **Workflow Documentation**: Lists build, test, and development commands, including non-obvious scripts.
|
|
16
|
+
- **Convention Highlighting**: Notes project-specific patterns, naming, and best practices.
|
|
17
|
+
- **Example Generation**: Provides code snippets and usage examples from real code.
|
|
18
|
+
- **Contribution Guidance**: Outlines how to contribute, run tests, and report issues.
|
|
19
|
+
- **License & Credits**: Detects and documents licensing and authorship.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
- Invoke this skill to generate or update a README.md for any repository.
|
|
23
|
+
- The agent will:
|
|
24
|
+
1. Analyze all relevant files (source, test, config, docs).
|
|
25
|
+
2. Synthesize a clear, well-structured README in markdown.
|
|
26
|
+
3. Include sections such as: Project Overview, Features, Installation, Usage, API, Developer Workflows, Contributing, License, and References.
|
|
27
|
+
4. Use real code and config examples from the project.
|
|
28
|
+
|
|
29
|
+
## Example Output
|
|
30
|
+
- See the generated [README.md](../../../../README.md) in this repository for a sample.
|
|
31
|
+
|
|
32
|
+
## References
|
|
33
|
+
- Main logic: See `src/` for code analysis routines.
|
|
34
|
+
- Example templates: See `README.md` and `.github/copilot-instructions.md`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
This skill is ideal for onboarding, documentation automation, and ensuring every project is easy to understand and use.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: svelte-code-writer
|
|
3
|
+
description: CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating or editing any Svelte component (.svelte) or Svelte module (.svelte.ts/.svelte.js). If possible, this skill should be executed within the svelte-file-editor agent for optimal results.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Svelte 5 Code Writer
|
|
7
|
+
|
|
8
|
+
## CLI Tools
|
|
9
|
+
|
|
10
|
+
You have access to `@sveltejs/mcp` CLI for Svelte-specific assistance. Use these commands via `npx`:
|
|
11
|
+
|
|
12
|
+
### List Documentation Sections
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @sveltejs/mcp list-sections
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths.
|
|
19
|
+
|
|
20
|
+
### Get Documentation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @sveltejs/mcp get-documentation "<section1>,<section2>,..."
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Retrieves full documentation for specified sections. Use after `list-sections` to fetch relevant docs.
|
|
27
|
+
|
|
28
|
+
**Example:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx @sveltejs/mcp get-documentation "$state,$derived,$effect"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Svelte Autofixer
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @sveltejs/mcp svelte-autofixer "<code_or_path>" [options]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Analyzes Svelte code and suggests fixes for common issues.
|
|
41
|
+
|
|
42
|
+
**Options:**
|
|
43
|
+
|
|
44
|
+
- `--async` - Enable async Svelte mode (default: false)
|
|
45
|
+
- `--svelte-version` - Target version: 4 or 5 (default: 5)
|
|
46
|
+
|
|
47
|
+
**Examples:**
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Analyze inline code (escape $ as \$)
|
|
51
|
+
npx @sveltejs/mcp svelte-autofixer '<script>let count = \$state(0);</script>'
|
|
52
|
+
|
|
53
|
+
# Analyze a file
|
|
54
|
+
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte
|
|
55
|
+
|
|
56
|
+
# Target Svelte 4
|
|
57
|
+
npx @sveltejs/mcp svelte-autofixer ./Component.svelte --svelte-version 4
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Important:** When passing code with runes (`$state`, `$derived`, etc.) via the terminal, escape the `$` character as `\$` to prevent shell variable substitution.
|
|
61
|
+
|
|
62
|
+
## Workflow
|
|
63
|
+
|
|
64
|
+
1. **Uncertain about syntax?** Run `list-sections` then `get-documentation` for relevant topics
|
|
65
|
+
2. **Reviewing/debugging?** Run `svelte-autofixer` on the code to detect issues
|
|
66
|
+
3. **Always validate** - Run `svelte-autofixer` before finalizing any Svelte component
|
package/.prettierignore
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Package Managers
|
|
2
|
-
package-lock.json
|
|
3
|
-
pnpm-lock.yaml
|
|
4
|
-
yarn.lock
|
|
1
|
+
# Package Managers
|
|
2
|
+
package-lock.json
|
|
3
|
+
pnpm-lock.yaml
|
|
4
|
+
yarn.lock
|