← 返回 Skills 市场
danielfoojunwei

Dark-Factory-Agent

作者 Daniel Foo Jun Wei · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
78
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dark-factory
功能描述
Autonomously validates specifications, runs behavioral tests, generates code, executes tests, and produces cryptographically signed outcome reports.
使用说明 (SKILL.md)

Dark Factory

Overview

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.

Role Description
The "How" Executes the "Why" defined by intent-engineering
Input specification.json from intent-engineering
Output outcome_report.json — signed, verifiable, ready for feedback-loop

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                      Agent (Orchestrator)                       │
└─────────────────────────────────────────────────────────────────┘
                              ▲
                              │
        ┌─────────────────────┼─────────────────────┐
        │                     │                     │
        ▼                     ▼                     ▼
┌──────────────────┐  ┌──────────────────┐  ┌──────────────────┐
│ intent-          │  │ dark-factory     │  │ feedback-loop    │
│ engineering      │  │                  │  │                  │
│ (The "Why")      │  │ (The "How")      │  │ (The "Learn")    │
└──────────────────┘  └──────────────────┘  └──────────────────┘
        │                     │                     │
        └─────────────────────┼─────────────────────┘
                              ▼
                    ┌──────────────────┐
                    │  Shared Data     │
                    │  Contracts       │
                    └──────────────────┘

Workflow

Step 1 — Validate the Specification

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.

Step 2 — Run Behavioral Tests

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.

Step 3 — Run the Full Dark Factory

python /home/ubuntu/skills/dark-factory/scripts/orchestrator.py my_spec.json

The orchestrator runs the complete workflow in sequence:

  1. Load and validate the specification
  2. Execute behavioral tests
  3. Generate code (AI agent integration point)
  4. Execute unit and integration tests
  5. Generate the signed outcome report

Output: \x3Cspec-name>_outcome_report.json

Data Contracts

Input — Specification from intent-engineering

{
  "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
  }
}

Output — Provable Outcome Report

{
  "report_id": "report-12345678",
  "specification_id": "spec-12345678",
  "status": "success",
  "generated_code": {},
  "test_results": {},
  "security_evidence": {},
  "cryptographic_signature": {}
}

Key Features

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.

Key Metrics

Metric Target
Specification Validation Pass Rate > 95%
Behavioral Test Pass Rate > 95%
Execution Success Rate > 90%
Average Execution Time \x3C 5 minutes
Evidence Verification Rate 100%

Use Cases

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.

Resources

Path Purpose
scripts/specification_validator.py Validates specification structure and completeness
scripts/behavioral_test_engine.py Executes behavioral scenarios against mock environment
scripts/orchestrator.py Full workflow orchestrator — main entry point
references/specification_schema.json JSON Schema defining valid specification format
references/outcome_report_schema.json JSON Schema defining outcome report format
references/triad_integration.md Complete three-skill ecosystem architecture
references/behavioral_testing_guide.md How to write effective behavioral tests
references/dark_factory_operations.md Operational procedures, monitoring, troubleshooting
安全使用建议
This skill is plausible for local specification validation and mock behavioral testing, but do not assume its reports are cryptographically signed or that generated code is actually compiled/executed. Specifically: - Cryptographic signing: The orchestrator embeds a SHA-256 digest of the report and states 'In production, sign with a private key' — there is no private-key signing or key management. A SHA-256 digest alone does not provide non-repudiation. If you need verifiable signatures, add a real signing step and secure key storage. - Code generation & test execution: The code-generation and test stages are placeholders that simulate success/failure with randomness and return stub files; the orchestrator does not run the generated source through a test runner or execute the generated binaries. Do not rely on this skill for real CI verification without replacing stubs with real generation and test execution. - Hard-coded paths: SKILL.md examples use absolute paths under /home/ubuntu/skills/... — ensure the runtime environment matches or adjust paths; running the scripts on a different layout may fail. - Safe usage recommendations: run the skill in an isolated/sandbox environment, inspect the generated outcome_report.json before trusting it, and treat the report digest as an integrity checksum rather than a cryptographic signature unless you extend the workflow with private-key signing. If you intend autonomous pipeline use with real production specs or secrets, add access controls and integrate real test runners and signing infrastructure first.
功能分析
Type: OpenClaw Skill Name: dark-factory Version: 1.0.0 The 'dark-factory' skill bundle is a well-structured framework for autonomous software specification validation and testing. The provided Python scripts (orchestrator.py, behavioral_test_engine.py, and specification_validator.py) implement the described logic using standard libraries without any signs of data exfiltration, malicious execution, or obfuscation. While the skill describes high-risk autonomous code generation capabilities, the current implementation uses safe placeholders and mock environments, showing no evidence of malicious intent or prompt injection.
能力标签
cryptorequires-wallet
能力评估
Purpose & Capability
The skill's name/description (validate specs, run behavioral tests, generate code, execute tests, produce cryptographically signed reports) broadly matches the included scripts. However two important capability mismatches exist: (1) 'cryptographically signed outcome reports' is implemented only as a SHA-256 digest stored in the report (no private-key signature or key management), and (2) code generation and unit/integration test steps are simulated/stubbed (randomized pass/fail and placeholder generated files) rather than actually invoking a code-generation backend or executing real test suites. These are material gaps between the advertised capabilities and what the code actually performs.
Instruction Scope
SKILL.md instructs running the included Python scripts and references absolute paths like /home/ubuntu/skills/dark-factory/scripts/*. The runtime instructions and scripts operate only on provided specification JSON files and write local outcome reports; they do not read unrelated system files or request credentials. However the docs reference integrating with other skills (intent-engineering, feedback-loop) and a unified orchestrator; those integrations are only procedural examples and not implemented here. Also the orchestrator does not actually execute generated source code or run real test frameworks — it simulates those steps.
Install Mechanism
No install spec (instruction-only with bundled scripts). Nothing is downloaded or executed from remote URLs; all code is included with the skill. This minimizes install-time risk.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The code uses only local filesystem I/O for specs and reports and standard library modules (json, hashlib, etc.). No secrets or external credentials are requested or used.
Persistence & Privilege
always:false and default agent invocation are used. The skill writes output files to the specified output directory (creates directories if needed) but does not attempt to modify other skills' config or system-wide settings. Autonomous invocation is permitted by platform default — not a unique risk here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dark-factory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dark-factory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of dark-factory, the autonomous execution engine for validated specifications. - Validates specifications from intent-engineering for clarity and completeness. - Runs behavioral tests against a mock environment before implementation. - Autonomously generates code, executes unit and integration tests. - Produces cryptographically signed, verifiable outcome reports. - Can be used standalone or as Stage 2 in the unified-orchestrator pipeline.
元数据
Slug dark-factory
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Dark-Factory-Agent 是什么?

Autonomously validates specifications, runs behavioral tests, generates code, executes tests, and produces cryptographically signed outcome reports. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 78 次。

如何安装 Dark-Factory-Agent?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dark-factory」即可一键安装,无需额外配置。

Dark-Factory-Agent 是免费的吗?

是的,Dark-Factory-Agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Dark-Factory-Agent 支持哪些平台?

Dark-Factory-Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Dark-Factory-Agent?

由 Daniel Foo Jun Wei(@danielfoojunwei)开发并维护,当前版本 v1.0.0。

💬 留言讨论