chore: add ion package, codesight wiki, work plans, ascli config

New @boocode/ion package (v0.0.1) for inference optimization network.
.codesight/ wiki artifacts for codebase documentation.
.omo/ work plans for openspec cleanup and enhanced file panel.
This commit is contained in:
2026-06-07 22:16:45 +00:00
parent ec48066a80
commit 02063072ab
63 changed files with 14025 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
import { describe, it, expect } from 'vitest';
import { isValidCommandName } from '../command-validation.js';
describe('isValidCommandName', () => {
describe('valid command names', () => {
it('accepts simple lowercase names', () => {
expect(isValidCommandName('assist')).toBe(true);
});
it('accepts kebab-case names', () => {
expect(isValidCommandName('code-review')).toBe(true);
});
it('accepts names with numbers', () => {
expect(isValidCommandName('deploy-v2')).toBe(true);
});
it('accepts single character names', () => {
expect(isValidCommandName('a')).toBe(true);
});
it('accepts names with only numbers', () => {
expect(isValidCommandName('123')).toBe(true);
});
it('accepts names with mixed alphanumeric and hyphens', () => {
expect(isValidCommandName('a1-b2-c3')).toBe(true);
});
it('accepts names starting with numbers', () => {
expect(isValidCommandName('2fa-verify')).toBe(true);
});
});
describe('invalid command names', () => {
it('rejects uppercase letters', () => {
expect(isValidCommandName('Assist')).toBe(false);
expect(isValidCommandName('CODE-REVIEW')).toBe(false);
});
it('rejects leading hyphens', () => {
expect(isValidCommandName('-assist')).toBe(false);
});
it('rejects trailing hyphens', () => {
expect(isValidCommandName('assist-')).toBe(false);
});
it('rejects double hyphens', () => {
expect(isValidCommandName('code--review')).toBe(false);
});
it('rejects empty strings', () => {
expect(isValidCommandName('')).toBe(false);
});
it('rejects underscores', () => {
expect(isValidCommandName('code_review')).toBe(false);
});
it('rejects spaces', () => {
expect(isValidCommandName('code review')).toBe(false);
});
it('rejects special characters', () => {
expect(isValidCommandName('code.review')).toBe(false);
expect(isValidCommandName('code@review')).toBe(false);
});
});
});