factory-ai 1.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.
- package/AGENTS.md +3 -0
- package/ARCHITECTURE.md +9 -0
- package/CHANGELOG.md +21 -0
- package/CODE_OF_CONDUCT.md +7 -0
- package/CONTRIBUTING.md +17 -0
- package/Dockerfile.worker +19 -0
- package/GOVERNANCE.md +21 -0
- package/HANDOFF.md +23 -0
- package/LICENSE +21 -0
- package/README.md +244 -0
- package/ROADMAP.md +23 -0
- package/RUNBOOK.md +42 -0
- package/SECURITY.md +7 -0
- package/SUPPORT.md +7 -0
- package/bin/factory +271 -0
- package/bootstrap/agent-factory-control.service +32 -0
- package/bootstrap/agent-factory-release.service +25 -0
- package/bootstrap/agent-factory-reporter.service +17 -0
- package/bootstrap/agent-factory-reporter.timer +10 -0
- package/bootstrap/agent-factory-telegram.service +31 -0
- package/bootstrap/agent-factory-worker.service +39 -0
- package/bootstrap/cloud-init.yaml +78 -0
- package/bootstrap/deploy-runtime.sh +74 -0
- package/bootstrap/setup.sh +124 -0
- package/capabilities/autonomous-loop/SKILL.md +10 -0
- package/capabilities/code-search.md +3 -0
- package/capabilities/dependency-security.md +3 -0
- package/capabilities/frontend-verification.md +3 -0
- package/capabilities/goal-management/SKILL.md +10 -0
- package/capabilities/project-context/SKILL.md +10 -0
- package/capabilities/release-checklist.md +3 -0
- package/capabilities/secure-review.md +3 -0
- package/capabilities/systematic-debugging.md +3 -0
- package/capabilities/test-discipline.md +3 -0
- package/capabilities/test-driven-development.md +3 -0
- package/capabilities/token-efficiency.md +3 -0
- package/capabilities/verification-before-completion.md +3 -0
- package/config/agent-instructions.md +8 -0
- package/config/capabilities.json +107 -0
- package/infra/main.bicep +310 -0
- package/package.json +78 -0
- package/src/agent-executor.js +52 -0
- package/src/agent-runner.js +110 -0
- package/src/azure-harness.js +118 -0
- package/src/bedrock-harness.js +52 -0
- package/src/bus.js +20 -0
- package/src/capabilities.js +43 -0
- package/src/ceo.js +67 -0
- package/src/config.js +65 -0
- package/src/container-runner.js +77 -0
- package/src/control-plane.js +142 -0
- package/src/control-service.js +55 -0
- package/src/dashboard.js +180 -0
- package/src/log.js +19 -0
- package/src/mcp-tools.js +53 -0
- package/src/operator.js +57 -0
- package/src/process.js +48 -0
- package/src/project-memory.js +22 -0
- package/src/registry.js +6 -0
- package/src/release-bot.js +36 -0
- package/src/release-gate.js +11 -0
- package/src/release-service.js +41 -0
- package/src/release.js +102 -0
- package/src/reporter.js +49 -0
- package/src/routing.js +34 -0
- package/src/scanner-suite.js +58 -0
- package/src/secrets.js +22 -0
- package/src/setup-menu.js +26 -0
- package/src/state.js +49 -0
- package/src/task-entry.js +19 -0
- package/src/task-graph.js +67 -0
- package/src/telegram-service.js +99 -0
- package/src/telegram.js +31 -0
- package/src/tui.js +130 -0
- package/src/validation.js +74 -0
- package/src/worker.js +77 -0
- package/src/workspace-tools.js +121 -0
- package/src/workspace.js +78 -0
- package/templates/project/architecture.md +3 -0
- package/templates/project/commands.md +3 -0
- package/templates/project/decisions.md +3 -0
- package/templates/project/handoff.md +3 -0
- package/templates/project/project.md +3 -0
- package/templates/project/risks.md +3 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Factory AI Development
|
|
2
|
+
|
|
3
|
+
Prefer the smallest correct change. Use test-first development. Never print or persist secrets. Preserve deterministic control-plane separation and container isolation. Run syntax, lint, tests, audit, Bicep, and shell validation before completion. For reviews prioritize data loss, privilege crossing, queue idempotency, retry behavior, Git safety, and missing tests.
|
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
The CEO submits one objective. A deterministic control service persists state and delegates planning to an isolated planner container. It validates the returned DAG, dispatches one container per task through Service Bus, records results, enforces tester/reviewer/security approval, and sends approved publication to a separate release service.
|
|
4
|
+
|
|
5
|
+
The control service has no model, shell, Git, workspace, Docker, Key Vault secret-loading, or release implementation. Agent containers have bounded CPU, memory, PIDs, steps, output, runtime, filesystem mounts, commands, skills, and MCP tools. GitHub credentials remain on trusted host services.
|
|
6
|
+
|
|
7
|
+
Durability comes from Service Bus peek-lock/redelivery, systemd supervision, a retained Premium SSD, atomic state writes, Git checkpoints, and GitHub pull requests. Benchmarked GPT-5.4 nano handles scouting, GPT-5.4 handles independent testing, Kimi K2.7-Code handles implementation, and GPT-5.6 handles planning, debugging, review, security, and release analysis.
|
|
8
|
+
|
|
9
|
+
Trust boundaries: CEO input and repository content are untrusted; capability definitions are pinned and allowlisted; agent containers cannot publish; the release bot cannot bypass approval gates; Azure credentials are loaded from Key Vault into process memory.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes follow semantic versioning and the Keep a Changelog structure.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Full-screen terminal administration console.
|
|
10
|
+
- Telegram remote objective intake with chat allowlisting.
|
|
11
|
+
- Azure and Bedrock provider wizard.
|
|
12
|
+
- Durable evaluation, analytics, scaling, policy, extension, and recovery roadmap.
|
|
13
|
+
|
|
14
|
+
## [1.0.0] - 2026-07-12
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Deterministic CTO control plane and isolated role workers.
|
|
19
|
+
- Azure Service Bus durability, retained memory/state, Key Vault, and cost dashboard.
|
|
20
|
+
- GPT-5.4 nano, GPT-5.4, GPT-5.6, Kimi, and Bedrock routing.
|
|
21
|
+
- Gated GitHub delivery, MCP/skills, project memory, CI, security scans, and one-command setup.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
We are committed to a welcoming, harassment-free community. Be respectful, assume good intent, focus criticism on ideas and code, protect private information, and avoid disruptive or discriminatory behavior.
|
|
4
|
+
|
|
5
|
+
Maintainers may remove content or participation that threatens safety, privacy, collaboration, or project integrity. Report conduct concerns privately through the repository security/contact channel. Reports will be reviewed promptly and handled confidentially where possible.
|
|
6
|
+
|
|
7
|
+
This policy applies to project repositories, discussions, issues, pull requests, community spaces, and direct interactions related to Factory AI.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use a branch and pull request. Keep changes small, add a failing test first, and preserve trust boundaries. Run:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm ci
|
|
7
|
+
npm run check
|
|
8
|
+
npm run lint
|
|
9
|
+
npm test
|
|
10
|
+
npm audit --audit-level=high
|
|
11
|
+
az bicep build --file infra/main.bicep --stdout >/dev/null
|
|
12
|
+
bash -n bootstrap/setup.sh bootstrap/deploy-runtime.sh bin/factory
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Validate package distribution with `npm pack --dry-run` and a clean-prefix install whenever setup, dependencies, package metadata, or the `factory` executable changes.
|
|
16
|
+
|
|
17
|
+
Do not add unpinned dependencies, arbitrary MCP installation, direct base-branch pushes, secret values, or model-controlled release authority.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
FROM node:20.20.2-bookworm-slim
|
|
2
|
+
|
|
3
|
+
RUN apt-get update \
|
|
4
|
+
&& apt-get install -y --no-install-recommends git ripgrep ca-certificates \
|
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
6
|
+
|
|
7
|
+
WORKDIR /opt/agent-factory/app
|
|
8
|
+
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
9
|
+
COPY package.json package-lock.json ./
|
|
10
|
+
RUN npm ci --omit=dev \
|
|
11
|
+
&& npx playwright install --with-deps chromium \
|
|
12
|
+
&& chmod -R a+rX /ms-playwright \
|
|
13
|
+
&& npm cache clean --force
|
|
14
|
+
COPY src ./src
|
|
15
|
+
COPY config ./config
|
|
16
|
+
COPY capabilities ./capabilities
|
|
17
|
+
|
|
18
|
+
USER node
|
|
19
|
+
ENTRYPOINT ["node", "/opt/agent-factory/app/src/task-entry.js"]
|
package/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
Factory AI uses maintainer-led governance.
|
|
4
|
+
|
|
5
|
+
## Roles
|
|
6
|
+
|
|
7
|
+
- Contributors propose issues, documentation, tests, and code changes.
|
|
8
|
+
- Maintainers triage work, review changes, manage releases, and enforce security boundaries.
|
|
9
|
+
- The lead maintainer resolves decisions that lack consensus and owns release signing and trust-root changes.
|
|
10
|
+
|
|
11
|
+
## Decisions
|
|
12
|
+
|
|
13
|
+
Routine changes use pull-request review. Architecture, security-floor, extension trust, credential handling, and backward-incompatible changes require a written decision in the pull request and explicit maintainer approval.
|
|
14
|
+
|
|
15
|
+
## Releases
|
|
16
|
+
|
|
17
|
+
Releases follow semantic versioning. Every release must pass CI, tests, dependency audit, Gitleaks, Trivy, package inspection, and release-note review.
|
|
18
|
+
|
|
19
|
+
## Security Floor
|
|
20
|
+
|
|
21
|
+
Repository policy may tighten but never weaken container isolation, capability-free orchestration, secret boundaries, release gates, or least-privilege credentials.
|
package/HANDOFF.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Factory AI Handoff
|
|
2
|
+
|
|
3
|
+
## Product
|
|
4
|
+
|
|
5
|
+
Azure-hosted autonomous coding factory with one CEO interface, deterministic CTO orchestration, isolated role agents, durable queues/state, curated skills/MCP, GitHub checkpoints, approval gates, CLI dashboard, and hourly reports.
|
|
6
|
+
|
|
7
|
+
## Azure resources
|
|
8
|
+
|
|
9
|
+
- Resource group: configured by `FACTORY_RESOURCE_GROUP`
|
|
10
|
+
- VM: configured by `FACTORY_VM`
|
|
11
|
+
- Service Bus: configured by `FACTORY_SERVICE_BUS`
|
|
12
|
+
- Key Vault: configured by `FACTORY_KEY_VAULT`
|
|
13
|
+
- Queues: `control-events`, `agent-tasks`, `release-tasks`
|
|
14
|
+
|
|
15
|
+
Infrastructure is reproducible from `infra/main.bicep`. Runtime is installed from a pinned Git commit. See `ARCHITECTURE.md`, `RUNBOOK.md`, and `SECURITY.md` before changing production behavior.
|
|
16
|
+
|
|
17
|
+
Global API keys belong in Key Vault, never repository `.env` files. Use `bin/factory secret` commands; temporary operator IP access is removed automatically after each command.
|
|
18
|
+
|
|
19
|
+
For GitHub Enterprise Cloud, keep the `github.com` host. Run `bin/factory github connect ORG` with an organization-authorized `gh` session, then explicitly transfer repositories with `bin/factory github transfer OWNER/REPO ORG`.
|
|
20
|
+
|
|
21
|
+
## Known platform limitation
|
|
22
|
+
|
|
23
|
+
Private-repository branch protection and auto-merge depend on the GitHub account or organization plan. Factory AI leaves approved PRs open whenever repository policy does not permit auto-merge.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vedant Kumar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Factory AI
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
**Securely deploy your own autonomous software-engineering factory on Azure.**
|
|
6
|
+
|
|
7
|
+
One CEO interface delegates to a deterministic CTO that coordinates isolated coding, testing, security, and release agents across Azure AI and Bedrock—then delivers verified GitHub pull requests with durable memory, recovery, and cost visibility.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/itsvedantkumar/factory-ai/actions/workflows/ci.yml)
|
|
10
|
+
[](https://nodejs.org/)
|
|
11
|
+
[](https://azure.microsoft.com/)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
## Why Factory AI?
|
|
17
|
+
|
|
18
|
+
Most coding-agent setups are interactive sessions pretending to be infrastructure. Factory AI is an actual delivery system:
|
|
19
|
+
|
|
20
|
+
- Objectives survive terminal closures, model interruptions, VM reboots, and worker crashes.
|
|
21
|
+
- The orchestrator cannot edit code, execute shell commands, access model credentials, or publish releases.
|
|
22
|
+
- Every task runs in a bounded, disposable container and isolated Git branch.
|
|
23
|
+
- Tester, reviewer, and security agents must approve before the trusted release bot opens a PR.
|
|
24
|
+
- Project memory, queue state, costs, logs, and hourly progress remain visible from one CLI.
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
Requirements: Node.js 20, [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli), [GitHub CLI](https://cli.github.com/), `az login`, and `gh auth login`.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g factory-ai
|
|
32
|
+
factory setup
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The arrow-key wizard handles the rest. A GitHub organization is not required; personal repositories work by default.
|
|
36
|
+
|
|
37
|
+
1. Select Azure AI Foundry, AWS Bedrock, or hybrid routing.
|
|
38
|
+
2. Select infrastructure region and optional GitHub Enterprise organization.
|
|
39
|
+
3. Enter provider credentials through hidden prompts.
|
|
40
|
+
4. Let the installer create Azure infrastructure, Key Vault secrets, model routing, and supervised services.
|
|
41
|
+
5. Start shipping.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
factory init ~/Projects/my-app
|
|
45
|
+
factory submit MY_ORG/my-app "/goal ship authenticated health checks"
|
|
46
|
+
factory ui
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Operator Experience
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
╔═ FACTORY AI ════════════════════════════════════════════════╗
|
|
53
|
+
Worker active · queue 0 · DLQ 0 · Azure MTD INR 16,068.56
|
|
54
|
+
Objectives complete:12 running:2 failed:1
|
|
55
|
+
|
|
56
|
+
[running] Add authenticated health checks
|
|
57
|
+
succeeded scout GPT-5.4 nano · inspect conventions
|
|
58
|
+
running builder GPT-5.6 · implement contract
|
|
59
|
+
blocked tester GPT-5.4 · verify behavior
|
|
60
|
+
blocked reviewer GPT-5.6 · review correctness
|
|
61
|
+
blocked security GPT-5.6 · assess boundaries
|
|
62
|
+
blocked release GPT-5.6 · publish reviewed PR
|
|
63
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
| Command | Purpose |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| `factory setup` | Interactive cloud/provider installation |
|
|
69
|
+
| `factory ui` | Full-screen interactive admin console |
|
|
70
|
+
| `factory submit OWNER/REPO "OBJECTIVE"` | Send one CEO objective |
|
|
71
|
+
| `factory issue OWNER/REPO NUMBER` | Turn a GitHub issue into a tracked objective |
|
|
72
|
+
| `factory telegram configure` | Configure allowlisted Telegram remote intake |
|
|
73
|
+
| `factory dashboard` | Objectives, agents, models, queue, DLQ, and Azure cost |
|
|
74
|
+
| `factory init PATH` | Create durable repo-local project context |
|
|
75
|
+
| `factory doctor` | Services, storage, memory, and host health |
|
|
76
|
+
| `factory queue` | Queue and dead-letter depth |
|
|
77
|
+
| `factory logs` | Consolidated service logs |
|
|
78
|
+
| `factory report` | Latest hourly executive report |
|
|
79
|
+
| `factory pause` / `resume` | Pause or resume execution safely |
|
|
80
|
+
| `factory secret set NAME` | Store a credential in global Key Vault |
|
|
81
|
+
| `factory github connect ORG` | Connect GitHub Enterprise credentials |
|
|
82
|
+
|
|
83
|
+
## Architecture
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
flowchart TD
|
|
87
|
+
CEO[CEO CLI] --> CQ[Control Queue]
|
|
88
|
+
CQ --> CTO[Deterministic CTO Control Plane]
|
|
89
|
+
CTO --> AQ[Agent Task Queue]
|
|
90
|
+
AQ --> P[Planner Container]
|
|
91
|
+
AQ --> S[Scout Container]
|
|
92
|
+
AQ --> B[Builder Container]
|
|
93
|
+
AQ --> T[Tester Container]
|
|
94
|
+
AQ --> V[Reviewer and Security Containers]
|
|
95
|
+
P & S & B & T & V --> CQ
|
|
96
|
+
CTO -->|approval gate passed| RQ[Release Queue]
|
|
97
|
+
RQ --> RB[Trusted Release Bot]
|
|
98
|
+
RB --> PR[GitHub Pull Request]
|
|
99
|
+
KV[Azure Key Vault] --> B
|
|
100
|
+
SB[(Retained State Disk)] --> CTO
|
|
101
|
+
MEM[Unified Project Memory] --> P
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The CTO is deliberately capability-free. It stores state, validates DAGs, dispatches tasks, and enforces gates. Model calls, Git workspaces, shell tools, MCP servers, and release credentials live behind separate trust boundaries.
|
|
105
|
+
|
|
106
|
+
See [ARCHITECTURE.md](ARCHITECTURE.md) for details.
|
|
107
|
+
|
|
108
|
+
## Model Routing
|
|
109
|
+
|
|
110
|
+
Defaults are evidence-based and role-specific:
|
|
111
|
+
|
|
112
|
+
| Role | Default | Rationale |
|
|
113
|
+
| --- | --- | --- |
|
|
114
|
+
| Scout | GPT-5.4 nano | Low-cost search and repository inspection |
|
|
115
|
+
| Simple builder task | Kimi K2.7-Code | Economy coding path, independently reviewed |
|
|
116
|
+
| Complex/unspecified builder task | GPT-5.6 | Fail-safe implementation default |
|
|
117
|
+
| Tester | GPT-5.4 | Independent behavioral verification |
|
|
118
|
+
| Planner, debugger, reviewer, security, release | GPT-5.6 | Higher-judgment work |
|
|
119
|
+
|
|
120
|
+
Any role can be overridden with an Azure deployment or `bedrock/MODEL_ID`. Bedrock uses the Converse tool API behind the same sandbox and approval gates.
|
|
121
|
+
|
|
122
|
+
## Reliability
|
|
123
|
+
|
|
124
|
+
- Azure Service Bus peek-lock delivery, duplicate detection, retries, and dead letters
|
|
125
|
+
- systemd restart supervision and reboot recovery
|
|
126
|
+
- Atomic objective state on a retained Premium SSD
|
|
127
|
+
- One self-contained clone and branch per task
|
|
128
|
+
- Continuous trusted Git checkpoint pushes
|
|
129
|
+
- Bounded model steps, execution time, output, CPU, memory, and PIDs
|
|
130
|
+
- Permanent failures become explicit objective results instead of stale tasks
|
|
131
|
+
- Hourly durable executive reports
|
|
132
|
+
|
|
133
|
+
The production smoke suite has verified worker `SIGKILL`, message redelivery, reboot persistence, gated PR publication, and content-filter failure handling.
|
|
134
|
+
|
|
135
|
+
## Memory and Skills
|
|
136
|
+
|
|
137
|
+
Every repository gets two memory layers:
|
|
138
|
+
|
|
139
|
+
- Deterministic project events injected into future planner context
|
|
140
|
+
- Pinned MCP knowledge-graph memory on retained storage
|
|
141
|
+
|
|
142
|
+
Built-in progressive skills include `/goal`, `/loop`, project context, systematic debugging, TDD, verification, security review, dependency security, browser verification, release discipline, and token efficiency. Context7 and Playwright MCPs are pinned and role-scoped.
|
|
143
|
+
|
|
144
|
+
Use `factory init PATH` to create `.agent-factory/` project, architecture, commands, decisions, risks, and handoff files without overwriting existing context.
|
|
145
|
+
|
|
146
|
+
## Credentials
|
|
147
|
+
|
|
148
|
+
Credentials never belong in repository `.env` files. Store them globally:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
factory secret set SERVICE-API-KEY
|
|
152
|
+
factory secret list
|
|
153
|
+
factory secret copy SERVICE-API-KEY
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Values are held in Azure Key Vault, loaded into trusted process memory, and passed only to role-required containers. Secret values are never displayed by the CLI.
|
|
157
|
+
|
|
158
|
+
## GitHub Enterprise
|
|
159
|
+
|
|
160
|
+
GitHub Enterprise Cloud continues to use `github.com`:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
gh auth refresh -h github.com -s admin:org,repo,workflow,read:org
|
|
164
|
+
factory github status
|
|
165
|
+
factory github connect YOUR_ORG
|
|
166
|
+
factory github transfer OWNER/REPO YOUR_ORG
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Organization rulesets can then enforce private-repo status checks, reviews, and auto-merge.
|
|
170
|
+
|
|
171
|
+
## Telegram Remote Control
|
|
172
|
+
|
|
173
|
+
Create a bot with `@BotFather`, obtain your numeric chat ID, then run:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
factory telegram configure
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Only explicitly allowlisted chat IDs are accepted. Supported commands:
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
/submit OWNER/REPO objective
|
|
183
|
+
/goal OWNER/REPO objective
|
|
184
|
+
/loop OWNER/REPO objective
|
|
185
|
+
/status
|
|
186
|
+
/help
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Telegram cannot run shell commands, read secrets, modify release policy, or bypass review gates. Durable update offsets prevent duplicate objectives after restarts.
|
|
190
|
+
|
|
191
|
+
## Security
|
|
192
|
+
|
|
193
|
+
- No VM public IP or inbound network path
|
|
194
|
+
- Stable outbound-only NAT
|
|
195
|
+
- Managed identity and RBAC
|
|
196
|
+
- Subnet-restricted Key Vault
|
|
197
|
+
- Trusted Launch, Secure Boot, and vTPM
|
|
198
|
+
- Read-only worker image, dropped capabilities, `no-new-privileges`, and no Docker socket
|
|
199
|
+
- GitHub publication isolated from model-controlled containers
|
|
200
|
+
- Pinned dependencies, MCPs, skills, and runtime revisions
|
|
201
|
+
- CI, Dependabot, npm audit, Trivy vulnerability/secret/misconfiguration scans
|
|
202
|
+
|
|
203
|
+
Read [SECURITY.md](SECURITY.md) before adding tools, providers, or permissions.
|
|
204
|
+
|
|
205
|
+
## Development
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
git clone https://github.com/itsvedantkumar/factory-ai.git
|
|
209
|
+
cd factory-ai
|
|
210
|
+
npm ci
|
|
211
|
+
npm run check
|
|
212
|
+
npm run lint
|
|
213
|
+
npm test
|
|
214
|
+
npm audit --audit-level=high
|
|
215
|
+
az bicep build --file infra/main.bicep --stdout >/dev/null
|
|
216
|
+
bash -n bootstrap/setup.sh bootstrap/deploy-runtime.sh bin/factory
|
|
217
|
+
npm pack --dry-run
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Documentation
|
|
221
|
+
|
|
222
|
+
| Document | Purpose |
|
|
223
|
+
| --- | --- |
|
|
224
|
+
| [ARCHITECTURE.md](ARCHITECTURE.md) | Runtime, boundaries, and data flow |
|
|
225
|
+
| [RUNBOOK.md](RUNBOOK.md) | Operations, recovery, and cost control |
|
|
226
|
+
| [SECURITY.md](SECURITY.md) | Security policy and extension rules |
|
|
227
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Development and verification contract |
|
|
228
|
+
| [HANDOFF.md](HANDOFF.md) | Team/friend transfer context |
|
|
229
|
+
| [docs/COMPARISON.md](docs/COMPARISON.md) | Honest comparison with paid alternatives |
|
|
230
|
+
| [ROADMAP.md](ROADMAP.md) | Planned platform and ecosystem work |
|
|
231
|
+
| [GOVERNANCE.md](GOVERNANCE.md) | Decision and release governance |
|
|
232
|
+
| [SUPPORT.md](SUPPORT.md) | Community support process |
|
|
233
|
+
| [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | Community standards |
|
|
234
|
+
|
|
235
|
+
## Current Limitations
|
|
236
|
+
|
|
237
|
+
- Azure Cost Management data is authoritative but delayed.
|
|
238
|
+
- Private-repo auto-merge requires an eligible GitHub Team/Enterprise organization policy.
|
|
239
|
+
- Kimi is used only for explicitly simple coding tasks until broader evaluations justify expansion.
|
|
240
|
+
- npm releases are verified and published with provenance through GitHub Actions.
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
[MIT](LICENSE)
|
package/ROADMAP.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Near Term
|
|
4
|
+
|
|
5
|
+
- Evaluation Lab with model promotion and rollback evidence.
|
|
6
|
+
- Enhanced TUI timeline, diffs, files, checks, and safe takeover leases.
|
|
7
|
+
- Telegram remote objective status and completion notifications.
|
|
8
|
+
- Multi-repository objective schema and release groups.
|
|
9
|
+
|
|
10
|
+
## Platform
|
|
11
|
+
|
|
12
|
+
- Policy engine and risk-based model/tool/release controls.
|
|
13
|
+
- OpenTelemetry and Application Insights traces and metrics.
|
|
14
|
+
- VMSS queue autoscaling with regular and Spot workers.
|
|
15
|
+
- Signed curated extension catalog and lockfile.
|
|
16
|
+
- Blob-backed state, automated snapshots, and recovery drills.
|
|
17
|
+
|
|
18
|
+
## Ecosystem
|
|
19
|
+
|
|
20
|
+
- Slack, Teams, Linear, and Jira adapters.
|
|
21
|
+
- VS Code integration and optional signed macOS application.
|
|
22
|
+
- Organization analytics and cost per accepted PR.
|
|
23
|
+
- Optional managed control plane and support offering.
|
package/RUNBOOK.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Operator Runbook
|
|
2
|
+
|
|
3
|
+
## Daily commands
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bin/factory setup
|
|
7
|
+
bin/factory github status
|
|
8
|
+
bin/factory github connect YOUR_ENTERPRISE_ORG
|
|
9
|
+
bin/factory submit OWNER/REPO "/loop ship the objective"
|
|
10
|
+
bin/factory init /path/to/new-project
|
|
11
|
+
bin/factory secret list
|
|
12
|
+
bin/factory secret set SERVICE-NAME-API-KEY
|
|
13
|
+
bin/factory secret copy SERVICE-NAME-API-KEY
|
|
14
|
+
bin/factory telegram configure
|
|
15
|
+
bin/factory telegram status
|
|
16
|
+
bin/factory dashboard
|
|
17
|
+
bin/factory queue
|
|
18
|
+
bin/factory logs
|
|
19
|
+
bin/factory report
|
|
20
|
+
bin/factory doctor
|
|
21
|
+
bin/factory pause
|
|
22
|
+
bin/factory resume
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Fresh install:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g factory-ai
|
|
29
|
+
factory setup
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Override defaults with `FACTORY_RESOURCE_GROUP`, `FACTORY_VM`, and `FACTORY_SERVICE_BUS`.
|
|
33
|
+
|
|
34
|
+
## Recovery
|
|
35
|
+
|
|
36
|
+
If a worker dies, systemd restarts it and Service Bus redelivers after lock expiry. Do not manually duplicate the task. Check `dashboard`, then `logs`, then queue dead-letter counts. Preserve objective state before purging dead letters.
|
|
37
|
+
|
|
38
|
+
Deploy only a full commit SHA through `bootstrap/deploy-runtime.sh`. Setup builds an immutable local worker image and restarts supervised services. State lives at `/opt/agent-factory/state` on the retained data disk.
|
|
39
|
+
|
|
40
|
+
## Cost control
|
|
41
|
+
|
|
42
|
+
Pause workers before deallocating the VM. Deallocation stops compute but not disk, NAT, Service Bus, Key Vault, or model charges. Resume and run `doctor` after startup.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
Report vulnerabilities privately to the repository owner. Do not open public issues containing credentials, exploit details, or customer repository data.
|
|
4
|
+
|
|
5
|
+
Never commit secrets. Azure model and GitHub credentials belong in Key Vault. The control service must remain capability-free. New MCP servers, skills, dependencies, commands, and network access require pinning, role scoping, tests, and review. Agent containers must not receive GitHub credentials or the Docker socket.
|
|
6
|
+
|
|
7
|
+
Before release run `npm audit --audit-level=high`, tests, lint, Bicep compilation, shell syntax checks, secret scanning, and container scanning. Rotate credentials after confirmed disclosure.
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
Use GitHub Discussions for questions and design conversations. Use issues for reproducible bugs and scoped feature requests. Use private vulnerability reporting or the process in `SECURITY.md` for security concerns.
|
|
4
|
+
|
|
5
|
+
Include Factory AI version, operating system, provider, relevant redacted logs, expected behavior, and reproduction steps. Never attach credentials, complete environment files, private source code, or unredacted cloud responses.
|
|
6
|
+
|
|
7
|
+
Community support is best effort. There is currently no commercial SLA.
|