goga-cell-javascript
JavaScript CODEMANIFEST contract implementation rules
Install
npx skills add https://github.com/qarium/goga/tree/1.2.x/goga/assets/skills/goga-cell-javascript
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install qarium-goga@llmmart
git clone https://github.com/qarium/goga.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole qarium/goga collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
JavaScript: Contract Implementation Rules
Language skill for JavaScript.
Apply the specification within the context of the invoking skill. Do not paraphrase the contents — use them to drive implementation decisions.
Invoked via the goga-lang-disp router.
Examples
Complete CODEMANIFEST example for JavaScript covering all DSL constructs:
Imports:
- Types:
- EventEmitter
- TransportConfig AS Config
Usages:
- retry_policy
From: path/to/events_cell
Usages:
conventions: .goga/usages/js_conventions.md
pattern: |
Use async/await for all asynchronous operations. Avoid callbacks.
testing: |
Use Jest. Each exported function and class method must have test coverage.
Annotations: |
Use `conventions` for code style.
Use `testing` for test requirements.
Use `retry_policy` from Imports for retry logic on transient failures.
All async functions must return `Promise<T>`.
---
"parseInput(input: string) -> data: Uint8Array":
location: parser.js
annotations: |
Parse raw input string into structured data.
`input`: raw string to parse
Use `pattern` for implementation.
"ApiClient(baseURL: string)":
location: api.js
annotations: |
HTTP client for external API communication.
`baseURL`: root URL for all API requests
Use `retry_policy` from Imports for request retries.
Use `conventions` for code style.
properties:
"baseURL -> string": |
Root URL for API requests.
"timeout -> number": |
Request timeout in milliseconds.
methods:
"fetchData(endpoint: string) -> response: Promise<Object<string, any>>": |
Fetch data from the specified endpoint.
`endpoint`: API endpoint path
`response`: async response data
Use `pattern` for implementation.
"close()": |
Close client and release resources.
"EventEmitter::SocketEmitter(url: string)":
location: emitter.js
annotations: |
Socket-based emitter extending EventEmitter with real-time capabilities.
`url`: WebSocket server URL
Use `retry_policy` from Imports for reconnection logic.
->EventEmitter: {}
---
Author: Goga
CreatedAt: 22/05/26
Description: |
Example CODEMANIFEST demonstrating all DSL constructs for JavaScript.
Cell
A cell is a module:
cell/
├── CODEMANIFEST
├── index.js
Language Specifics
Facade: index.js serves as the single entry point. All contract exports flow through module.exports or export.
Only symbols exported from index.js form the cell facade.
Naming: Use camelCase for functions and methods; use PascalCase for classes.
Types: JSDoc provides type annotations. Signatures cannot be extracted without JSDoc.
Constructors: The entity signature describes a new ClassName() invocation or a factory function.
Construct Mapping
| JavaScript Construct | CODEMANIFEST | Notes |
|---|---|---|
Exported class |
Entity | Class fields → properties, methods → methods |
Exported function |
Routine | Module-level function |
| Class method | Method | |
| Class field / getter | Property | Type inferred from JSDoc |
Implementation
- All exports must go through
index.js
Signature Rules
Use JSDoc for type annotations where needed.
Allowed:
string, number, boolean
Array<T>
Object<string, T>
T | null
Promise<T>
Forbidden:
Function
Object (without generics)
...args
Files (goga)
-
SKILL.md 3.7 KB
--- name: goga-cell-javascript description: JavaScript CODEMANIFEST contract implementation rules --- # JavaScript: Contract Implementation Rules Language skill for JavaScript. Apply the specification within the context of the invoking skill. Do not paraphrase the contents — use them to drive implementation decisions. Invoked via the `goga-lang-disp` router. --- ## Examples Complete CODEMANIFEST example for JavaScript covering all DSL constructs: ```yaml Imports: - Types: - EventEmitter - TransportConfig AS Config Usages: - retry_policy From: path/to/events_cell Usages: conventions: .goga/usages/js_conventions.md pattern: | Use async/await for all asynchronous operations. Avoid callbacks. testing: | Use Jest. Each exported function and class method must have test coverage. Annotations: | Use `conventions` for code style. Use `testing` for test requirements. Use `retry_policy` from Imports for retry logic on transient failures. All async functions must return `Promise<T>`. --- "parseInput(input: string) -> data: Uint8Array": location: parser.js annotations: | Parse raw input string into structured data. `input`: raw string to parse Use `pattern` for implementation. "ApiClient(baseURL: string)": location: api.js annotations: | HTTP client for external API communication. `baseURL`: root URL for all API requests Use `retry_policy` from Imports for request retries. Use `conventions` for code style. properties: "baseURL -> string": | Root URL for API requests. "timeout -> number": | Request timeout in milliseconds. methods: "fetchData(endpoint: string) -> response: Promise<Object<string, any>>": | Fetch data from the specified endpoint. `endpoint`: API endpoint path `response`: async response data Use `pattern` for implementation. "close()": | Close client and release resources. "EventEmitter::SocketEmitter(url: string)": location: emitter.js annotations: | Socket-based emitter extending EventEmitter with real-time capabilities. `url`: WebSocket server URL Use `retry_policy` from Imports for reconnection logic. ->EventEmitter: {} --- Author: Goga CreatedAt: 22/05/26 Description: | Example CODEMANIFEST demonstrating all DSL constructs for JavaScript. ``` ## Cell A cell is a module: ``` cell/ ├── CODEMANIFEST ├── index.js ``` ## Language Specifics **Facade**: `index.js` serves as the single entry point. All contract exports flow through `module.exports` or `export`. Only symbols exported from `index.js` form the cell facade. **Naming**: Use camelCase for functions and methods; use PascalCase for classes. **Types**: JSDoc provides type annotations. Signatures cannot be extracted without JSDoc. **Constructors**: The entity signature describes a `new ClassName()` invocation or a factory function. ## Construct Mapping | JavaScript Construct | CODEMANIFEST | Notes | |------------------------|------------------|----------------------------------------------| | Exported `class` | Entity | Class fields → properties, methods → methods | | Exported `function` | Routine | Module-level function | | Class method | Method | | | Class field / getter | Property | Type inferred from JSDoc | ## Implementation - All exports must go through `index.js` ## Signature Rules Use JSDoc for type annotations where needed. Allowed: ``` string, number, boolean Array<T> Object<string, T> T | null Promise<T> ``` Forbidden: ``` Function Object (without generics) ...args ``` ---
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.