Knowledge Creator
The Knowledge Creator skill manages the generation and validation of structured knowledge files (.json) used by the Factory agents. These files reside in {directories.knowledge}/.
Standard Structure
Knowledge files are JSON objects that follow schemas/knowledge-file.schema.json. They typically include:
description: Purpose.version: Semver versioning.category: Classification.content: The actual structured data (e.g., lists of tools, patterns, or facts).- Validation: Every knowledge file MUST pass
tests/knowledge/test_system_structure.py.
Process
- TDD Phase (RED):
- Write a failing test in
tests/knowledge/representing the new data structure requirements. - Verify RED: Run
conda run -p D:\Anaconda\envs\cursor-factory pytest tests/knowledge/test_system_structure.pyand confirm failure.
- Write a failing test in
- Implementation Phase (GREEN):
- Draft the JSON object structure following
schemas/knowledge-file.schema.json.
- Draft the JSON object structure following
- Validation Phase:
- Verify GREEN: Run structural tests and confirm pass.
- Run structural verification:
conda run -p D:\Anaconda\envs\cursor-factory python scripts/validation/verify_structures.py.
- Sync:
- Update registries:
conda run -p D:\Anaconda\envs\cursor-factory python scripts/validation/sync_artifacts.py. - Mandatory Global Sync: Run
conda run -p D:\Anaconda\envs\cursor-factory python scripts/sync_global_workflows.py.
- Update registries:
When to Use
- When creating a new knowledge file from scratch
- When improving or refactoring an existing knowledge file
- When standardizing an knowledge file to adhere to Factory schemas
- When another skill or agent requests a compliant knowledge file
Prerequisites
- Access to the Factory schemas in
schemas/ - Understanding of the artifact structure defined in this skill
scripts/validation/verify_structures.pymust be available for structural checks
Best Practices
- Always validate against the schema before finalizing
- Keep the artifact focused and non-redundant with existing ones
- Follow the naming conventions defined in the Factory standards
- Document the artifact's purpose clearly in the description field
- Link related artifacts in the
related_skillsorrelated_knowledgefields