Skip to main content
Glama

Zignet

by fulgidus
Do What The F*ck You Want To Public License
DEVELOPMENT.mdโ€ข4.12 kB
# ZigNet Development Guide ## ๐Ÿ› ๏ธ Configurazione Ambiente ### Prerequisiti - Node.js >= 18.0.0 - pnpm (o npm) ### Installazione ```bash pnpm install ``` ## ๐Ÿ“œ Script Disponibili ### Build ```bash pnpm build # Compila TypeScript โ†’ JavaScript pnpm build:watch # Watch mode per sviluppo pnpm clean # Pulisce la directory dist/ ``` ### Testing ```bash pnpm test # Esegue tutti i test pnpm test:watch # Watch mode per i test pnpm test:coverage # Test con coverage report ``` ### Linting & Formatting ```bash pnpm lint # Controlla errori ESLint pnpm lint:fix # Corregge errori ESLint automaticamente pnpm format # Formatta il codice con Prettier pnpm format:check # Verifica formattazione senza modificare pnpm typecheck # Controlla i tipi TypeScript senza compilare ``` ## ๐Ÿ“ Struttura del Progetto ``` zignet/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ lexer.ts โœ… Lexer completo (100% coverage) โ”‚ โ”œโ”€โ”€ parser.ts โณ TODO โ”‚ โ”œโ”€โ”€ type-checker.ts โณ TODO โ”‚ โ”œโ”€โ”€ codegen.ts โณ TODO โ”‚ โ””โ”€โ”€ llm-integration.ts โณ TODO โ”œโ”€โ”€ tests/ โ”‚ โ”œโ”€โ”€ lexer.test.ts โœ… 33 test passati โ”‚ โ””โ”€โ”€ parser.test.ts โณ TODO โ”œโ”€โ”€ dist/ # Output compilato (gitignored) โ”œโ”€โ”€ coverage/ # Report coverage (gitignored) โ””โ”€โ”€ docs/ โ””โ”€โ”€ ARCHITECTURE.md ``` ## ๐Ÿงช Test Coverage **Lexer: 100% Stmts | 99.02% Branch | 100% Funcs | 100% Lines** ``` File | % Stmts | % Branch | % Funcs | % Lines ----------|---------|----------|---------|-------- lexer.ts | 100 | 99.02 | 100 | 100 ``` ## ๐Ÿ”ง Configurazione ### TypeScript (`tsconfig.json`) - Target: ES2022 - Strict mode abilitato - Output: `dist/` - Source maps: โœ… ### ESLint (`eslint.config.js`) - Parser: `@typescript-eslint/parser` - Regole: TypeScript + Prettier - Type-aware linting: โœ… ### Prettier (`.prettierrc.json`) - Single quotes: โœ… - Semicolons: โœ… - Print width: 100 - Tab width: 2 spazi ### Jest (`jest.config.js`) - Preset: ts-jest - Coverage: lcov + html - Test match: `**/*.test.ts`, `**/*.spec.ts` ## ๐Ÿš€ Workflow di Sviluppo ### 1. Sviluppo con Watch Mode ```bash # Terminal 1: Build automatico pnpm build:watch # Terminal 2: Test automatici pnpm test:watch ``` ### 2. Prima di Committare ```bash pnpm typecheck # Controlla tipi pnpm lint:fix # Corregge linting pnpm format # Formatta codice pnpm test # Esegue test ``` ### 3. Workflow Completo ```bash pnpm clean && pnpm build && pnpm lint && pnpm test:coverage ``` ## ๐Ÿ“Š Test Metrics ### Lexer Tests (33 total) - โœ… Keywords (2 tests) - โœ… Types (1 test) - โœ… Literals (7 tests) - โœ… Operators (6 tests) - โœ… Punctuation (3 tests) - โœ… Comments (2 tests) - โœ… Complex Code (3 tests) - โœ… Line/Column Tracking (2 tests) - โœ… Error Handling (2 tests) - โœ… Edge Cases (3 tests) - โœ… Token toString (1 test) ## ๐ŸŽฏ Prossimi Passi ### Phase 3.2: Parser - [ ] Creare `src/parser.ts` - [ ] Implementare AST nodes - [ ] Parser per funzioni - [ ] Parser per structs - [ ] Parser per espressioni - [ ] Test unitari parser - [ ] Coverage > 95% ### Phase 3.3: Type Checker - [ ] Creare `src/type-checker.ts` - [ ] Validazione tipi base - [ ] Gestione generics - [ ] Error reporting - [ ] Test unitari ### Phase 4: LLM Integration - [ ] Creare `src/llm-integration.ts` - [ ] Integrazione Ollama - [ ] Prompt engineering - [ ] Error suggestion system ## ๐Ÿ“š Risorse - [TypeScript Handbook](https://www.typescriptlang.org/docs/) - [Jest Documentation](https://jestjs.io/) - [ESLint Rules](https://eslint.org/docs/rules/) - [Zig Language Reference](https://ziglang.org/documentation/master/) ## ๐Ÿ› Troubleshooting ### Jest non trova i moduli ```bash pnpm clean pnpm install pnpm build ``` ### ESLint errori strani ```bash rm -rf node_modules/.cache pnpm lint:fix ``` ### TypeScript errori di tipo ```bash pnpm typecheck ``` --- **Status**: โœ… Lexer completo, TypeScript configurato, test suite attiva **Last Updated**: 2025-10-26

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fulgidus/zignet'

If you have feedback or need assistance with the MCP directory API, please join our Discord server