ai-developer-skill-os 6.0.3 → 7.0.0

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.
@@ -0,0 +1,38 @@
1
+ # DESIGN.md - The Brand Contract
2
+
3
+ > **CRITICAL RULE:** This file is the Single Source of Truth for all UI/UX in this project.
4
+ > Any AI agent performing frontend work MUST adhere strictly to the rules, tokens, and components defined here.
5
+ > DO NOT invent generic Tailwind colors or default layouts. DO NOT use "slop" AI aesthetics.
6
+
7
+ ## 1. Typography
8
+ - **Primary Font:** [Specify Font Family, e.g., Inter, Roboto]
9
+ - **Heading Font:** [Specify Font Family if different]
10
+ - **Base Size:** [e.g., 16px]
11
+ - **Scale:** [e.g., Major Third (1.25) or Perfect Fourth (1.333)]
12
+
13
+ ## 2. Color Palette (Strict Constraints)
14
+ - **Primary:** HSL(xxx, xx%, xx%)
15
+ - **Secondary:** HSL(xxx, xx%, xx%)
16
+ - **Background (Light):** HSL(xxx, xx%, xx%)
17
+ - **Background (Dark):** HSL(xxx, xx%, xx%)
18
+ - **Text (Light/Dark):** HSL(xxx, xx%, xx%)
19
+ - **Forbidden Colors:** [e.g., Default Tailwind `blue-500`, `red-500`. NEVER use default primary colors].
20
+
21
+ ## 3. Spacing & Grid System
22
+ - **Base Unit:** [e.g., 4px / 0.25rem]
23
+ - **Grid Layout:** [e.g., 12-column grid, max-width: 1280px]
24
+ - **Whitespace Rule:** Always favor generous whitespace (whitespace is cheap, clutter is expensive).
25
+
26
+ ## 4. UI Components & Micro-interactions
27
+ - **Border Radius:** [e.g., 8px for cards, 4px for buttons, 9999px for pills]
28
+ - **Shadows/Elevation:** [Define soft, organic shadows; avoid harsh, generic drop shadows]
29
+ - **Animations:** [e.g., 200ms ease-out for hover states, use micro-animations for button presses].
30
+
31
+ ## 5. Anti-Slop Guidelines (Hallmark Rules)
32
+ - **NO Default Borders:** Avoid adding a 1px solid border to everything. Use background color shifts or soft shadows instead.
33
+ - **NO Cluttered Forms:** Forms must have clear visual hierarchy, grouped inputs, and explicit focus states.
34
+ - **NO Floating Elements:** Elements must be anchored visually to a grid.
35
+ - **MUST Check Contrast:** All text must meet WCAG AA contrast ratios.
36
+
37
+ ---
38
+ *Note to AI Agent: If you are about to emit code that violates these rules, STOP. Redesign it, run an [AUDIT], and apply the correct constraints.*
@@ -22,12 +22,14 @@ function parseBSF(skillPath) {
22
22
  const fmMatch = content.match(/^---\s*\n([\s\S]*?)\n---/);
23
23
  if (!fmMatch) return null;
24
24
  const frontmatter = YAML.load(fmMatch[1]);
25
- if (frontmatter.version !== '6.0.0') return { type: 'v5', frontmatter };
26
-
27
- const bsf = { type: 'v6', frontmatter };
25
+ let type = 'legacy';
26
+ if (frontmatter.version && frontmatter.version.startsWith('7.')) type = 'v7';
27
+ else if (frontmatter.version && frontmatter.version.startsWith('6.')) type = 'v6';
28
+
29
+ const bsf = { type, frontmatter };
28
30
 
29
31
  // Parse YAML blocks
30
- const yamlBlocks = [...content.matchAll(/```yaml\n([\s\S]*?)\n```/g)];
32
+ const yamlBlocks = [...content.matchAll(/```yaml\r?\n([\s\S]*?)\r?\n```/g)];
31
33
 
32
34
  try {
33
35
  let parsedBlocks = {};
@@ -61,24 +63,24 @@ function parseBSF(skillPath) {
61
63
  describe('Behavior Validation Framework', () => {
62
64
 
63
65
  describe('Level 1: Specification Valid', () => {
64
- it('Every v6 skill must have valid Schema (Metadata, Scope, Constraints)', () => {
66
+ it('Every v6/v7 skill must have valid Schema (Metadata, Scope, Constraints)', () => {
65
67
  const dirs = getActiveSkillDirs();
66
- const v6Skills = [];
68
+ const modernSkills = [];
67
69
 
68
70
  dirs.forEach(dir => {
69
71
  const skillPath = path.join(dir, 'SKILL.md');
70
72
  if (!fs.existsSync(skillPath)) return;
71
73
  const bsf = parseBSF(skillPath);
72
74
 
73
- if (bsf && bsf.type === 'v6') {
74
- v6Skills.push(dir);
75
+ if (bsf && bsf.type === 'v7') {
76
+ modernSkills.push(dir);
75
77
  expect(bsf.error, `Parser error in ${path.basename(dir)}: ${bsf.error}`).toBeUndefined();
76
78
  expect(bsf.frontmatter.category, `Missing category metadata in ${path.basename(dir)}`).toBeDefined();
77
79
  expect(bsf.constraints, `Missing Constraints in ${path.basename(dir)}`).toBeDefined();
78
80
  }
79
81
  });
80
82
 
81
- expect(v6Skills.length).toBeGreaterThan(0);
83
+ expect(modernSkills.length).toBeGreaterThan(0);
82
84
  });
83
85
  });
84
86
 
@@ -91,12 +93,13 @@ describe('Behavior Validation Framework', () => {
91
93
  if (!fs.existsSync(skillPath)) return;
92
94
  const bsf = parseBSF(skillPath);
93
95
 
94
- if (bsf && bsf.type === 'v6' && !bsf.error) {
96
+ if (bsf && bsf.type === 'v7' && !bsf.error) {
95
97
  const must = bsf.constraints.must || [];
96
98
  const must_not = bsf.constraints.must_not || [];
97
99
 
98
100
  must.forEach(rule => {
99
- const conflict = must_not.some(c => c.toLowerCase() === rule.toLowerCase());
101
+ if (typeof rule !== 'string') return;
102
+ const conflict = must_not.some(c => typeof c === 'string' && c.toLowerCase() === rule.toLowerCase());
100
103
  expect(conflict, `Conflict detected in ${path.basename(dir)}: '${rule}' is in both must and must_not`).toBe(false);
101
104
  });
102
105
  }
@@ -1,66 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const repoDir = 'd:\\ai-code-skin-mcp\\rules-skill';
5
- const skillsJsonPath = path.join(repoDir, 'skills.json');
6
-
7
- try {
8
- const data = fs.readFileSync(skillsJsonPath, 'utf8');
9
- const skillsConfig = JSON.parse(data);
10
-
11
- skillsConfig.skills.forEach(skill => {
12
- if (skill.path && skill.description) {
13
- const skillMdPath = path.join(repoDir, skill.path);
14
- if (fs.existsSync(skillMdPath)) {
15
- let content = fs.readFileSync(skillMdPath, 'utf8');
16
- const frontmatterRegex = /^---\r?\n([\s\S]*?)\r?\n---/;
17
- const match = content.match(frontmatterRegex);
18
-
19
- if (match) {
20
- let frontmatter = match[1];
21
- // Update version to 6.0.3 in frontmatter
22
- if (/^version:/m.test(frontmatter)) {
23
- frontmatter = frontmatter.replace(/^version:.*$/m, `version: 6.0.3`);
24
- } else {
25
- frontmatter += `\nversion: 6.0.3`;
26
- }
27
-
28
- // Check if description already exists
29
- if (/^description:/m.test(frontmatter)) {
30
- frontmatter = frontmatter.replace(/^description:.*$/m, `description: "${skill.description}"`);
31
- } else {
32
- frontmatter += `\ndescription: "${skill.description}"`;
33
- }
34
-
35
- const newContent = content.replace(frontmatterRegex, `---\n${frontmatter}\n---`);
36
- fs.writeFileSync(skillMdPath, newContent, 'utf8');
37
- console.log(`Updated ${skillMdPath}`);
38
- } else {
39
- console.log(`No frontmatter found in ${skillMdPath}`);
40
- }
41
- } else {
42
- console.log(`File not found: ${skillMdPath}`);
43
- }
44
- }
45
- });
46
-
47
- // Also update package.json version
48
- const packageJsonPath = path.join(repoDir, 'package.json');
49
- if (fs.existsSync(packageJsonPath)) {
50
- const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
51
- pkg.version = "6.0.3";
52
- fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2), 'utf8');
53
- console.log('Updated package.json to 6.0.3');
54
- }
55
-
56
- // Also update skills.json version if needed
57
- if (skillsConfig.version) {
58
- skillsConfig.version = "6.0.3";
59
- fs.writeFileSync(skillsJsonPath, JSON.stringify(skillsConfig, null, 2), 'utf8');
60
- console.log('Updated skills.json version to 6.0.3');
61
- }
62
-
63
- console.log('Done!');
64
- } catch (err) {
65
- console.error('Error:', err);
66
- }