@gcunharodrigues/wrxn 0.1.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.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/bin/wrxn.cjs +342 -0
  4. package/lib/connect.cjs +216 -0
  5. package/lib/executor.cjs +238 -0
  6. package/lib/install.cjs +105 -0
  7. package/lib/manifest.cjs +67 -0
  8. package/lib/migrate.cjs +93 -0
  9. package/lib/onboard.cjs +84 -0
  10. package/lib/semver.cjs +14 -0
  11. package/lib/update.cjs +91 -0
  12. package/lib/worktree.cjs +217 -0
  13. package/manifest.json +451 -0
  14. package/migrations/README.md +21 -0
  15. package/package.json +23 -0
  16. package/payload/.claude/constitution.local.md +13 -0
  17. package/payload/.claude/constitution.md +28 -0
  18. package/payload/.claude/hooks/code-intel-push.cjs +108 -0
  19. package/payload/.claude/hooks/enforce-managed-guard.cjs +68 -0
  20. package/payload/.claude/hooks/enforce-managed-precommit.cjs +74 -0
  21. package/payload/.claude/hooks/enforce-push-authority.cjs +51 -0
  22. package/payload/.claude/hooks/enforce-review-marker.cjs +62 -0
  23. package/payload/.claude/hooks/enforce-tests-on-push.cjs +40 -0
  24. package/payload/.claude/hooks/recall-surface.cjs +127 -0
  25. package/payload/.claude/hooks/reference-detect.cjs +83 -0
  26. package/payload/.claude/hooks/session-end.cjs +132 -0
  27. package/payload/.claude/hooks/session-history.cjs +76 -0
  28. package/payload/.claude/hooks/session-start.cjs +117 -0
  29. package/payload/.claude/hooks/synapse-engine.cjs +351 -0
  30. package/payload/.claude/hooks/wiki-lint.cjs +104 -0
  31. package/payload/.claude/settings.json +60 -0
  32. package/payload/.claude/skills/audit/SKILL.md +23 -0
  33. package/payload/.claude/skills/diagnose/SKILL.md +117 -0
  34. package/payload/.claude/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  35. package/payload/.claude/skills/grill-me/SKILL.md +10 -0
  36. package/payload/.claude/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  37. package/payload/.claude/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
  38. package/payload/.claude/skills/grill-with-docs/SKILL.md +88 -0
  39. package/payload/.claude/skills/handoff/SKILL.md +19 -0
  40. package/payload/.claude/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  41. package/payload/.claude/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  42. package/payload/.claude/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  43. package/payload/.claude/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  44. package/payload/.claude/skills/improve-codebase-architecture/SKILL.md +81 -0
  45. package/payload/.claude/skills/level-up/SKILL.md +28 -0
  46. package/payload/.claude/skills/memory/SKILL.md +79 -0
  47. package/payload/.claude/skills/onboard/SKILL.md +43 -0
  48. package/payload/.claude/skills/prototype/LOGIC.md +79 -0
  49. package/payload/.claude/skills/prototype/SKILL.md +30 -0
  50. package/payload/.claude/skills/prototype/UI.md +112 -0
  51. package/payload/.claude/skills/qa-walk/SKILL.md +227 -0
  52. package/payload/.claude/skills/qa-walk/references/cli-mode.md +28 -0
  53. package/payload/.claude/skills/qa-walk/references/finding-issue-template.md +48 -0
  54. package/payload/.claude/skills/qa-walk/references/walk-report-template.md +56 -0
  55. package/payload/.claude/skills/qa-walk/references/web-mode.md +112 -0
  56. package/payload/.claude/skills/setup-matt-pocock-skills/SKILL.md +121 -0
  57. package/payload/.claude/skills/setup-matt-pocock-skills/domain.md +51 -0
  58. package/payload/.claude/skills/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  59. package/payload/.claude/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  60. package/payload/.claude/skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  61. package/payload/.claude/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  62. package/payload/.claude/skills/skill-creator/LICENSE.txt +202 -0
  63. package/payload/.claude/skills/skill-creator/SKILL.md +209 -0
  64. package/payload/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  65. package/payload/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  66. package/payload/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  67. package/payload/.claude/skills/synapse/SKILL.md +132 -0
  68. package/payload/.claude/skills/synapse/assets/README.md +50 -0
  69. package/payload/.claude/skills/synapse/references/brackets.md +100 -0
  70. package/payload/.claude/skills/synapse/references/commands.md +118 -0
  71. package/payload/.claude/skills/synapse/references/domains.md +126 -0
  72. package/payload/.claude/skills/synapse/references/layers.md +186 -0
  73. package/payload/.claude/skills/synapse/references/manifest.md +142 -0
  74. package/payload/.claude/skills/tdd/SKILL.md +22 -0
  75. package/payload/.claude/skills/tech-search/SKILL.md +431 -0
  76. package/payload/.claude/skills/tech-search/prompts/page-extract.md +133 -0
  77. package/payload/.claude/skills/to-issues/SKILL.md +83 -0
  78. package/payload/.claude/skills/to-prd/SKILL.md +74 -0
  79. package/payload/.claude/skills/triage/AGENT-BRIEF.md +168 -0
  80. package/payload/.claude/skills/triage/OUT-OF-SCOPE.md +101 -0
  81. package/payload/.claude/skills/triage/SKILL.md +103 -0
  82. package/payload/.claude/skills/write-a-skill/SKILL.md +117 -0
  83. package/payload/.recon.json +3 -0
  84. package/payload/.synapse/global +6 -0
  85. package/payload/.synapse/manifest +38 -0
  86. package/payload/.synapse/pipeline +6 -0
  87. package/payload/.synapse/routing +8 -0
  88. package/payload/.wrxn/continuity/.gitkeep +0 -0
  89. package/payload/.wrxn/history/.gitkeep +0 -0
  90. package/payload/.wrxn/wiki/.gitkeep +0 -0
  91. package/payload/.wrxn/wiki/concepts/.gitkeep +0 -0
  92. package/payload/.wrxn/wiki/decisions/.gitkeep +0 -0
  93. package/payload/.wrxn/wiki/gotchas/.gitkeep +0 -0
  94. package/payload/.wrxn/wiki/sessions/.gitkeep +0 -0
  95. package/payload/.wrxn/wiki.cjs +164 -0
  96. package/payload/aios-intake.md +32 -0
  97. package/payload/connections.md +15 -0
  98. package/payload/decisions/log.md +18 -0
  99. package/payload/docs/agents/domain.md +38 -0
  100. package/payload/docs/agents/issue-tracker.md +25 -0
  101. package/payload/docs/agents/triage-labels.md +15 -0
  102. package/payload/docs/workspace/operator-layer.md +14 -0
@@ -0,0 +1,303 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Initializer - Creates a new skill from template
4
+
5
+ Usage:
6
+ init_skill.py <skill-name> --path <path>
7
+
8
+ Examples:
9
+ init_skill.py my-new-skill --path skills/public
10
+ init_skill.py my-api-helper --path skills/private
11
+ init_skill.py custom-skill --path /custom/location
12
+ """
13
+
14
+ import sys
15
+ from pathlib import Path
16
+
17
+
18
+ SKILL_TEMPLATE = """---
19
+ name: {skill_name}
20
+ description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
21
+ ---
22
+
23
+ # {skill_title}
24
+
25
+ ## Overview
26
+
27
+ [TODO: 1-2 sentences explaining what this skill enables]
28
+
29
+ ## Structuring This Skill
30
+
31
+ [TODO: Choose the structure that best fits this skill's purpose. Common patterns:
32
+
33
+ **1. Workflow-Based** (best for sequential processes)
34
+ - Works well when there are clear step-by-step procedures
35
+ - Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
36
+ - Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
37
+
38
+ **2. Task-Based** (best for tool collections)
39
+ - Works well when the skill offers different operations/capabilities
40
+ - Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
41
+ - Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
42
+
43
+ **3. Reference/Guidelines** (best for standards or specifications)
44
+ - Works well for brand guidelines, coding standards, or requirements
45
+ - Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
46
+ - Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
47
+
48
+ **4. Capabilities-Based** (best for integrated systems)
49
+ - Works well when the skill provides multiple interrelated features
50
+ - Example: Product Management with "Core Capabilities" → numbered capability list
51
+ - Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
52
+
53
+ Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
54
+
55
+ Delete this entire "Structuring This Skill" section when done - it's just guidance.]
56
+
57
+ ## [TODO: Replace with the first main section based on chosen structure]
58
+
59
+ [TODO: Add content here. See examples in existing skills:
60
+ - Code samples for technical skills
61
+ - Decision trees for complex workflows
62
+ - Concrete examples with realistic user requests
63
+ - References to scripts/templates/references as needed]
64
+
65
+ ## Resources
66
+
67
+ This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
68
+
69
+ ### scripts/
70
+ Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
71
+
72
+ **Examples from other skills:**
73
+ - PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
74
+ - DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
75
+
76
+ **Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
77
+
78
+ **Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
79
+
80
+ ### references/
81
+ Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
82
+
83
+ **Examples from other skills:**
84
+ - Product management: `communication.md`, `context_building.md` - detailed workflow guides
85
+ - BigQuery: API reference documentation and query examples
86
+ - Finance: Schema documentation, company policies
87
+
88
+ **Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
89
+
90
+ ### assets/
91
+ Files not intended to be loaded into context, but rather used within the output Claude produces.
92
+
93
+ **Examples from other skills:**
94
+ - Brand styling: PowerPoint template files (.pptx), logo files
95
+ - Frontend builder: HTML/React boilerplate project directories
96
+ - Typography: Font files (.ttf, .woff2)
97
+
98
+ **Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
99
+
100
+ ---
101
+
102
+ **Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
103
+ """
104
+
105
+ EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
106
+ """
107
+ Example helper script for {skill_name}
108
+
109
+ This is a placeholder script that can be executed directly.
110
+ Replace with actual implementation or delete if not needed.
111
+
112
+ Example real scripts from other skills:
113
+ - pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
114
+ - pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
115
+ """
116
+
117
+ def main():
118
+ print("This is an example script for {skill_name}")
119
+ # TODO: Add actual script logic here
120
+ # This could be data processing, file conversion, API calls, etc.
121
+
122
+ if __name__ == "__main__":
123
+ main()
124
+ '''
125
+
126
+ EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
127
+
128
+ This is a placeholder for detailed reference documentation.
129
+ Replace with actual reference content or delete if not needed.
130
+
131
+ Example real reference docs from other skills:
132
+ - product-management/references/communication.md - Comprehensive guide for status updates
133
+ - product-management/references/context_building.md - Deep-dive on gathering context
134
+ - bigquery/references/ - API references and query examples
135
+
136
+ ## When Reference Docs Are Useful
137
+
138
+ Reference docs are ideal for:
139
+ - Comprehensive API documentation
140
+ - Detailed workflow guides
141
+ - Complex multi-step processes
142
+ - Information too lengthy for main SKILL.md
143
+ - Content that's only needed for specific use cases
144
+
145
+ ## Structure Suggestions
146
+
147
+ ### API Reference Example
148
+ - Overview
149
+ - Authentication
150
+ - Endpoints with examples
151
+ - Error codes
152
+ - Rate limits
153
+
154
+ ### Workflow Guide Example
155
+ - Prerequisites
156
+ - Step-by-step instructions
157
+ - Common patterns
158
+ - Troubleshooting
159
+ - Best practices
160
+ """
161
+
162
+ EXAMPLE_ASSET = """# Example Asset File
163
+
164
+ This placeholder represents where asset files would be stored.
165
+ Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
166
+
167
+ Asset files are NOT intended to be loaded into context, but rather used within
168
+ the output Claude produces.
169
+
170
+ Example asset files from other skills:
171
+ - Brand guidelines: logo.png, slides_template.pptx
172
+ - Frontend builder: hello-world/ directory with HTML/React boilerplate
173
+ - Typography: custom-font.ttf, font-family.woff2
174
+ - Data: sample_data.csv, test_dataset.json
175
+
176
+ ## Common Asset Types
177
+
178
+ - Templates: .pptx, .docx, boilerplate directories
179
+ - Images: .png, .jpg, .svg, .gif
180
+ - Fonts: .ttf, .otf, .woff, .woff2
181
+ - Boilerplate code: Project directories, starter files
182
+ - Icons: .ico, .svg
183
+ - Data files: .csv, .json, .xml, .yaml
184
+
185
+ Note: This is a text placeholder. Actual assets can be any file type.
186
+ """
187
+
188
+
189
+ def title_case_skill_name(skill_name):
190
+ """Convert hyphenated skill name to Title Case for display."""
191
+ return ' '.join(word.capitalize() for word in skill_name.split('-'))
192
+
193
+
194
+ def init_skill(skill_name, path):
195
+ """
196
+ Initialize a new skill directory with template SKILL.md.
197
+
198
+ Args:
199
+ skill_name: Name of the skill
200
+ path: Path where the skill directory should be created
201
+
202
+ Returns:
203
+ Path to created skill directory, or None if error
204
+ """
205
+ # Determine skill directory path
206
+ skill_dir = Path(path).resolve() / skill_name
207
+
208
+ # Check if directory already exists
209
+ if skill_dir.exists():
210
+ print(f"❌ Error: Skill directory already exists: {skill_dir}")
211
+ return None
212
+
213
+ # Create skill directory
214
+ try:
215
+ skill_dir.mkdir(parents=True, exist_ok=False)
216
+ print(f"✅ Created skill directory: {skill_dir}")
217
+ except Exception as e:
218
+ print(f"❌ Error creating directory: {e}")
219
+ return None
220
+
221
+ # Create SKILL.md from template
222
+ skill_title = title_case_skill_name(skill_name)
223
+ skill_content = SKILL_TEMPLATE.format(
224
+ skill_name=skill_name,
225
+ skill_title=skill_title
226
+ )
227
+
228
+ skill_md_path = skill_dir / 'SKILL.md'
229
+ try:
230
+ skill_md_path.write_text(skill_content)
231
+ print("✅ Created SKILL.md")
232
+ except Exception as e:
233
+ print(f"❌ Error creating SKILL.md: {e}")
234
+ return None
235
+
236
+ # Create resource directories with example files
237
+ try:
238
+ # Create scripts/ directory with example script
239
+ scripts_dir = skill_dir / 'scripts'
240
+ scripts_dir.mkdir(exist_ok=True)
241
+ example_script = scripts_dir / 'example.py'
242
+ example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
243
+ example_script.chmod(0o755)
244
+ print("✅ Created scripts/example.py")
245
+
246
+ # Create references/ directory with example reference doc
247
+ references_dir = skill_dir / 'references'
248
+ references_dir.mkdir(exist_ok=True)
249
+ example_reference = references_dir / 'api_reference.md'
250
+ example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
251
+ print("✅ Created references/api_reference.md")
252
+
253
+ # Create assets/ directory with example asset placeholder
254
+ assets_dir = skill_dir / 'assets'
255
+ assets_dir.mkdir(exist_ok=True)
256
+ example_asset = assets_dir / 'example_asset.txt'
257
+ example_asset.write_text(EXAMPLE_ASSET)
258
+ print("✅ Created assets/example_asset.txt")
259
+ except Exception as e:
260
+ print(f"❌ Error creating resource directories: {e}")
261
+ return None
262
+
263
+ # Print next steps
264
+ print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
265
+ print("\nNext steps:")
266
+ print("1. Edit SKILL.md to complete the TODO items and update the description")
267
+ print("2. Customize or delete the example files in scripts/, references/, and assets/")
268
+ print("3. Run the validator when ready to check the skill structure")
269
+
270
+ return skill_dir
271
+
272
+
273
+ def main():
274
+ if len(sys.argv) < 4 or sys.argv[2] != '--path':
275
+ print("Usage: init_skill.py <skill-name> --path <path>")
276
+ print("\nSkill name requirements:")
277
+ print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
278
+ print(" - Lowercase letters, digits, and hyphens only")
279
+ print(" - Max 40 characters")
280
+ print(" - Must match directory name exactly")
281
+ print("\nExamples:")
282
+ print(" init_skill.py my-new-skill --path skills/public")
283
+ print(" init_skill.py my-api-helper --path skills/private")
284
+ print(" init_skill.py custom-skill --path /custom/location")
285
+ sys.exit(1)
286
+
287
+ skill_name = sys.argv[1]
288
+ path = sys.argv[3]
289
+
290
+ print(f"🚀 Initializing skill: {skill_name}")
291
+ print(f" Location: {path}")
292
+ print()
293
+
294
+ result = init_skill(skill_name, path)
295
+
296
+ if result:
297
+ sys.exit(0)
298
+ else:
299
+ sys.exit(1)
300
+
301
+
302
+ if __name__ == "__main__":
303
+ main()
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Packager - Creates a distributable zip file of a skill folder
4
+
5
+ Usage:
6
+ python utils/package_skill.py <path/to/skill-folder> [output-directory]
7
+
8
+ Example:
9
+ python utils/package_skill.py skills/public/my-skill
10
+ python utils/package_skill.py skills/public/my-skill ./dist
11
+ """
12
+
13
+ import sys
14
+ import zipfile
15
+ from pathlib import Path
16
+ from quick_validate import validate_skill
17
+
18
+
19
+ def package_skill(skill_path, output_dir=None):
20
+ """
21
+ Package a skill folder into a zip file.
22
+
23
+ Args:
24
+ skill_path: Path to the skill folder
25
+ output_dir: Optional output directory for the zip file (defaults to current directory)
26
+
27
+ Returns:
28
+ Path to the created zip file, or None if error
29
+ """
30
+ skill_path = Path(skill_path).resolve()
31
+
32
+ # Validate skill folder exists
33
+ if not skill_path.exists():
34
+ print(f"❌ Error: Skill folder not found: {skill_path}")
35
+ return None
36
+
37
+ if not skill_path.is_dir():
38
+ print(f"❌ Error: Path is not a directory: {skill_path}")
39
+ return None
40
+
41
+ # Validate SKILL.md exists
42
+ skill_md = skill_path / "SKILL.md"
43
+ if not skill_md.exists():
44
+ print(f"❌ Error: SKILL.md not found in {skill_path}")
45
+ return None
46
+
47
+ # Run validation before packaging
48
+ print("🔍 Validating skill...")
49
+ valid, message = validate_skill(skill_path)
50
+ if not valid:
51
+ print(f"❌ Validation failed: {message}")
52
+ print(" Please fix the validation errors before packaging.")
53
+ return None
54
+ print(f"✅ {message}\n")
55
+
56
+ # Determine output location
57
+ skill_name = skill_path.name
58
+ if output_dir:
59
+ output_path = Path(output_dir).resolve()
60
+ output_path.mkdir(parents=True, exist_ok=True)
61
+ else:
62
+ output_path = Path.cwd()
63
+
64
+ zip_filename = output_path / f"{skill_name}.zip"
65
+
66
+ # Create the zip file
67
+ try:
68
+ with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
69
+ # Walk through the skill directory
70
+ for file_path in skill_path.rglob('*'):
71
+ if file_path.is_file():
72
+ # Calculate the relative path within the zip
73
+ arcname = file_path.relative_to(skill_path.parent)
74
+ zipf.write(file_path, arcname)
75
+ print(f" Added: {arcname}")
76
+
77
+ print(f"\n✅ Successfully packaged skill to: {zip_filename}")
78
+ return zip_filename
79
+
80
+ except Exception as e:
81
+ print(f"❌ Error creating zip file: {e}")
82
+ return None
83
+
84
+
85
+ def main():
86
+ if len(sys.argv) < 2:
87
+ print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
88
+ print("\nExample:")
89
+ print(" python utils/package_skill.py skills/public/my-skill")
90
+ print(" python utils/package_skill.py skills/public/my-skill ./dist")
91
+ sys.exit(1)
92
+
93
+ skill_path = sys.argv[1]
94
+ output_dir = sys.argv[2] if len(sys.argv) > 2 else None
95
+
96
+ print(f"📦 Packaging skill: {skill_path}")
97
+ if output_dir:
98
+ print(f" Output directory: {output_dir}")
99
+ print()
100
+
101
+ result = package_skill(skill_path, output_dir)
102
+
103
+ if result:
104
+ sys.exit(0)
105
+ else:
106
+ sys.exit(1)
107
+
108
+
109
+ if __name__ == "__main__":
110
+ main()
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Quick validation script for skills - minimal version
4
+ """
5
+
6
+ import sys
7
+ import os
8
+ import re
9
+ from pathlib import Path
10
+
11
+ def validate_skill(skill_path):
12
+ """Basic validation of a skill"""
13
+ skill_path = Path(skill_path)
14
+
15
+ # Check SKILL.md exists
16
+ skill_md = skill_path / 'SKILL.md'
17
+ if not skill_md.exists():
18
+ return False, "SKILL.md not found"
19
+
20
+ # Read and validate frontmatter
21
+ content = skill_md.read_text()
22
+ if not content.startswith('---'):
23
+ return False, "No YAML frontmatter found"
24
+
25
+ # Extract frontmatter
26
+ match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
27
+ if not match:
28
+ return False, "Invalid frontmatter format"
29
+
30
+ frontmatter = match.group(1)
31
+
32
+ # Check required fields
33
+ if 'name:' not in frontmatter:
34
+ return False, "Missing 'name' in frontmatter"
35
+ if 'description:' not in frontmatter:
36
+ return False, "Missing 'description' in frontmatter"
37
+
38
+ # Extract name for validation
39
+ name_match = re.search(r'name:\s*(.+)', frontmatter)
40
+ if name_match:
41
+ name = name_match.group(1).strip()
42
+ # Check naming convention (hyphen-case: lowercase with hyphens)
43
+ if not re.match(r'^[a-z0-9-]+$', name):
44
+ return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
45
+ if name.startswith('-') or name.endswith('-') or '--' in name:
46
+ return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
47
+
48
+ # Extract and validate description
49
+ desc_match = re.search(r'description:\s*(.+)', frontmatter)
50
+ if desc_match:
51
+ description = desc_match.group(1).strip()
52
+ # Check for angle brackets
53
+ if '<' in description or '>' in description:
54
+ return False, "Description cannot contain angle brackets (< or >)"
55
+
56
+ return True, "Skill is valid!"
57
+
58
+ if __name__ == "__main__":
59
+ if len(sys.argv) != 2:
60
+ print("Usage: python quick_validate.py <skill_directory>")
61
+ sys.exit(1)
62
+
63
+ valid, message = validate_skill(sys.argv[1])
64
+ print(message)
65
+ sys.exit(0 if valid else 1)
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: synapse
3
+ description: "This skill should be used when users want to understand the SYNAPSE context engine, manage domains, configure context rules, or troubleshoot rule injection. Use when asked about SYNAPSE architecture, domain management, star-commands, context brackets, or the 8-layer processing pipeline."
4
+ ---
5
+
6
+ # SYNAPSE Context Engine
7
+
8
+ ## Overview
9
+
10
+ SYNAPSE (Synkra Adaptive Processing & State Engine) is the unified context engine for AIOX. It injects contextual rules into every prompt via an 8-layer processing pipeline, adapting to context window usage through bracket-aware filtering.
11
+
12
+ **What it does:**
13
+ - Injects rules per-prompt via Claude Code's `UserPromptSubmit` hook
14
+ - Processes 8 layers (L0 Constitution through L7 Star-Commands) sequentially
15
+ - Adapts injection volume based on context brackets (FRESH/MODERATE/DEPLETED/CRITICAL)
16
+ - Integrates with agent state (active agent, workflow, task, squad)
17
+ - Outputs `<synapse-rules>` XML block appended to each prompt
18
+
19
+ **What it replaces:** SYNAPSE replaces the legacy CARL system with full feature parity plus 8 new capabilities including agent-scoped domains, workflow activation, and CRUD management commands.
20
+
21
+ **Architecture model:** Open Core — the 8-layer engine lives in `aiox-core` (open source), memory integration is feature-gated in `aiox-pro`.
22
+
23
+ ## Quick Start
24
+
25
+ ### Verify SYNAPSE is Active
26
+
27
+ SYNAPSE runs automatically via the Claude Code hook. To check status:
28
+
29
+ ```
30
+ *synapse status
31
+ ```
32
+
33
+ This shows: active domains, current bracket, session info, and loaded layers.
34
+
35
+ ### Basic Commands
36
+
37
+ | Command | What it does |
38
+ |---------|-------------|
39
+ | `*synapse status` | Show current engine state |
40
+ | `*synapse domains` | List all registered domains |
41
+ | `*synapse debug` | Show detailed debug info (manifest parse, load times, rule counts) |
42
+ | `*synapse help` | Show all available synapse commands |
43
+ | `*brief` | Switch to brief response mode |
44
+ | `*dev` | Switch to developer mode (code-focused) |
45
+ | `*review` | Switch to code review mode |
46
+
47
+ ### Create a Custom Domain
48
+
49
+ ```
50
+ *synapse create
51
+ ```
52
+
53
+ This walks you through creating a new domain file + manifest entry. See [references/domains.md](references/domains.md) for the full domain guide.
54
+
55
+ ## Architecture
56
+
57
+ SYNAPSE operates as a 4-layer architecture:
58
+
59
+ ```
60
+ .claude/hooks/synapse-engine.js # Layer 1: Hook Entry (~50 lines)
61
+ |
62
+ v imports
63
+ .aiox-core/core/synapse/ # Layer 2: Engine Modules
64
+ |-- engine.js # SynapseEngine class
65
+ |-- layers/ # 8 layer processors (L0-L7)
66
+ |-- session/session-manager.js # Session state (JSON v2.0)
67
+ |-- domain/domain-loader.js # Manifest + domain parser
68
+ |-- context/context-tracker.js # Bracket calculation
69
+ |-- memory/memory-bridge.js # Pro-gated MIS consumer
70
+ |-- output/formatter.js # <synapse-rules> XML
71
+ |
72
+ v reads/writes
73
+ .synapse/ # Layer 3: Runtime Data
74
+ |-- manifest # Central domain registry (KEY=VALUE)
75
+ |-- constitution, global, context # Core domains (L0, L1)
76
+ |-- agent-*, workflow-* # Scoped domains (L2, L3)
77
+ |-- commands # Star-command definitions (L7)
78
+ |-- sessions/, cache/ # Session state (gitignored)
79
+ |
80
+ v user-invoked
81
+ .claude/commands/synapse/ # Layer 4: CRUD Commands + Skill Docs
82
+ |-- manager.md # Router/dispatcher
83
+ |-- tasks/ (6 tasks) # create, add, edit, toggle, command, suggest
84
+ ```
85
+
86
+ **Key principle:** SYNAPSE is a **consumer** of existing systems (UAP for session state, MIS for memories). It never rewrites code from other epics.
87
+
88
+ ## References
89
+
90
+ ### Reference Guides
91
+
92
+ | Guide | Description |
93
+ |-------|-------------|
94
+ | [domains.md](references/domains.md) | Domain types (L0-L7), KEY=VALUE format, creation guide |
95
+ | [commands.md](references/commands.md) | Star-commands, *synapse sub-commands, CRUD operations |
96
+ | [manifest.md](references/manifest.md) | Manifest format specification, all valid keys |
97
+ | [brackets.md](references/brackets.md) | Context bracket system, token budgets, layer activation |
98
+ | [layers.md](references/layers.md) | 8-layer processor architecture, priority, conflict resolution |
99
+
100
+ ### Assets (Templates)
101
+
102
+ Templates for creating custom domains and manifest entries are maintained at:
103
+
104
+ - **Domain template:** `.claude/commands/synapse/templates/domain-template`
105
+ - **Manifest entry template:** `.claude/commands/synapse/templates/manifest-entry-template`
106
+
107
+ See [assets/README.md](assets/README.md) for details.
108
+
109
+ ### CRUD Commands
110
+
111
+ For domain management operations, use the SYNAPSE manager:
112
+
113
+ | Command | Purpose |
114
+ |---------|---------|
115
+ | `*synapse create` | Create new domain + manifest entry |
116
+ | `*synapse add` | Add rule to existing domain |
117
+ | `*synapse edit` | Edit or remove rule by index |
118
+ | `*synapse toggle` | Toggle domain active/inactive |
119
+ | `*synapse command` | Create new star-command |
120
+ | `*synapse suggest` | Suggest best domain for a rule |
121
+
122
+ Full details: [references/commands.md](references/commands.md)
123
+
124
+ ## Key Files
125
+
126
+ | File | Purpose |
127
+ |------|---------|
128
+ | `.claude/hooks/synapse-engine.js` | Hook entry point (UserPromptSubmit) |
129
+ | `.aiox-core/core/synapse/engine.js` | SynapseEngine orchestrator |
130
+ | `.synapse/manifest` | Domain registry (KEY=VALUE) |
131
+ | `.synapse/commands` | Star-command definitions |
132
+ | `.claude/commands/synapse/manager.md` | CRUD command router |
@@ -0,0 +1,50 @@
1
+ # SYNAPSE Assets
2
+
3
+ Templates for creating custom SYNAPSE domains and manifest entries.
4
+
5
+ ## Templates Location
6
+
7
+ Templates are maintained as the single source of truth in the CRUD commands directory:
8
+
9
+ | Template | Location |
10
+ |----------|----------|
11
+ | **Domain template** | `.claude/commands/synapse/templates/domain-template` |
12
+ | **Manifest entry template** | `.claude/commands/synapse/templates/manifest-entry-template` |
13
+
14
+ These templates are used by the `*synapse create` command to scaffold new domains.
15
+
16
+ ## Usage
17
+
18
+ To create a new domain using these templates, run:
19
+
20
+ ```
21
+ *synapse create
22
+ ```
23
+
24
+ Or reference the templates directly when creating domains manually.
25
+
26
+ ## Template Formats
27
+
28
+ ### Domain Template
29
+
30
+ ```
31
+ # ==========================================
32
+ # SYNAPSE Domain: {DOMAIN_NAME}
33
+ # Created: {CURRENT_DATE}
34
+ # Description: {DESCRIPTION}
35
+ # ==========================================
36
+
37
+ # Rules
38
+ {DOMAIN_KEY}_RULE_0={FIRST_RULE}
39
+ ```
40
+
41
+ ### Manifest Entry Template
42
+
43
+ ```
44
+ # Layer 6: {domain-name}
45
+ {DOMAIN_KEY}_STATE=active
46
+ {DOMAIN_KEY}_RECALL={KEYWORDS}
47
+ {DOMAIN_KEY}_EXCLUDE=
48
+ ```
49
+
50
+ For the complete KEY=VALUE format specification, see [../references/manifest.md](../references/manifest.md).