The dark factory is the execution engine of the three-skill pipeline. It takes a structured specification produced by intent-engineering, validates it, runs behavioral tests, generates code, executes tests, and produces a cryptographically signed Provable Outcome Report — all autonomously.
RoleDescriptionThe "How"Executes the "Why" defined by intent-engineeringInputspecification.json from intent-engineeringOutputoutcome_report.json — signed, verifiable, ready for feedback-loop
text
┌─────────────────────────────────────────────────────────────────┐
│ Agent (Orchestrator) │
└─────────────────────────────────────────────────────────────────┘
▲
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ intent- │ │ dark-factory │ │ feedback-loop │
│ engineering │ │ │ │ │
│ (The "Why") │ │ (The "How") │ │ (The "Learn") │
└──────────────────┘ └──────────────────┘ └──────────────────┘
│ │ │
└─────────────────────┼─────────────────────┘
▼
┌──────────────────┐
│ Shared Data │
│ Contracts │
└──────────────────┘
bash
python /home/ubuntu/skills/dark-factory/scripts/specification_validator.py my_spec.json
Checks required fields, validates structure, ensures behavioral scenarios are complete, and provides warnings.
bash
python /home/ubuntu/skills/dark-factory/scripts/behavioral_test_engine.py my_spec.json
Executes all behavioral scenarios against a mock environment, calculates pass rates, and generates a test report.
bash
python /home/ubuntu/skills/dark-factory/scripts/orchestrator.py my_spec.json
The orchestrator runs the complete workflow in sequence:
Output: <spec-name>_outcome_report.json
json
{
"specification_id": "spec-12345678",
"title": "Feature Name",
"description": "What should be built",
"behavioral_scenarios": [
{
"scenario": "Description",
"input": {},
"expected_output": {}
}
],
"success_criteria": {
"test_pass_rate": 0.95
}
}
json
{
"report_id": "report-12345678",
"specification_id": "spec-12345678",
"status": "success",
"generated_code": {},
"test_results": {},
"security_evidence": {},
"cryptographic_signature": {}
}
The dark factory provides four core capabilities. Specification-Driven Development ensures all execution is grounded in a validated, human-readable specification before any code is generated. Behavioral Validation runs all scenarios against a mock environment first, catching ambiguities early. Autonomous Execution coordinates code generation, unit testing, integration testing, and deployment without human intervention. Provable Outcomes produce a cryptographically signed report that can be independently verified and fed into the feedback-loop for continuous improvement.
MetricTargetSpecification Validation Pass Rate> 95%Behavioral Test Pass Rate> 95%Execution Success Rate> 90%Average Execution Time< 5 minutesEvidence Verification Rate100%
Autonomous Skill Development — define a specification in intent-engineering, run the dark factory to build the skill autonomously, then verify with feedback-loop.
Specification-Driven Testing — validate and test a specification before committing to implementation using specification_validator.py and behavioral_test_engine.py independently.
Continuous Integration — integrate into CI/CD pipelines by running the validator and orchestrator as pipeline steps.
PathPurposescripts/specification_validator.pyValidates specification structure and completenessscripts/behavioral_test_engine.pyExecutes behavioral scenarios against mock environmentscripts/orchestrator.pyFull workflow orchestrator — main entry pointreferences/specification_schema.jsonJSON Schema defining valid specification formatreferences/outcome_report_schema.jsonJSON Schema defining outcome report formatreferences/triad_integration.mdComplete three-skill ecosystem architecturereferences/behavioral_testing_guide.mdHow to write effective behavioral testsreferences/dark_factory_operations.mdOperational procedures, monitoring, troubleshooting