@adityaaria/agent-os 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 +41 -0
- package/AGENT_OS_BOOTSTRAP.md +29 -0
- package/ENTRYPOINT.md +118 -0
- package/LICENSE +21 -0
- package/README.md +230 -0
- package/adapters/antigravity/README.md +9 -0
- package/adapters/antigravity/plugin.json +13 -0
- package/adapters/claude/CLAUDE.md +16 -0
- package/adapters/claude/README.md +10 -0
- package/adapters/codex/README.md +20 -0
- package/adapters/cursor/README.md +9 -0
- package/adapters/cursor/agent-os.rules.md +18 -0
- package/bin/agent-os.mjs +98 -0
- package/core/AUTO_PROJECT_DETECTOR.md +99 -0
- package/core/COMPLIANCE_GATE.md +19 -0
- package/core/FRAMEWORK_AUDITOR.md +35 -0
- package/core/KNOWLEDGE_REGENERATOR.md +30 -0
- package/core/KNOWLEDGE_VALIDATOR.md +29 -0
- package/core/PROJECT_CONTEXT_STANDARD.md +19 -0
- package/core/QUALITY_GATES.md +42 -0
- package/core/REPORTING_STANDARD.md +47 -0
- package/core/SKILL_ORCHESTRATOR.md +63 -0
- package/core/TASK_ROUTER.md +33 -0
- package/core/TRACEABILITY_STANDARD.md +40 -0
- package/package.json +28 -0
- package/scripts/install.mjs +690 -0
- package/scripts/lib/cli-utils.mjs +148 -0
- package/scripts/lib/run-utils.mjs +185 -0
- package/scripts/lib/telegram-audit-log.mjs +50 -0
- package/scripts/lib/telegram-bot-utils.mjs +413 -0
- package/scripts/lib/telegram-utils.mjs +127 -0
- package/scripts/orchestrate.mjs +230 -0
- package/scripts/quality-static.mjs +19 -0
- package/scripts/report-export.mjs +86 -0
- package/scripts/report-notify.mjs +169 -0
- package/scripts/run-execution.mjs +83 -0
- package/scripts/run-list.mjs +44 -0
- package/scripts/run-status.mjs +38 -0
- package/scripts/run-step.mjs +173 -0
- package/scripts/setup-wizard.mjs +116 -0
- package/scripts/sync-runtime.mjs +87 -0
- package/scripts/telegram-bot.mjs +88 -0
- package/scripts/telegram-check.mjs +94 -0
- package/scripts/telegram-poll.mjs +176 -0
- package/scripts/validate-framework.mjs +290 -0
- package/skills/api-contract-audit/SKILL.md +26 -0
- package/skills/api-contract-audit/checklist.md +16 -0
- package/skills/api-contract-audit/examples.md +3 -0
- package/skills/api-contract-audit/report-template.md +39 -0
- package/skills/api-contract-audit/workflow.md +15 -0
- package/skills/audit/SKILL.md +28 -0
- package/skills/audit/checklist.md +18 -0
- package/skills/audit/examples.md +26 -0
- package/skills/audit/report-template.md +39 -0
- package/skills/audit/workflow.md +15 -0
- package/skills/bug-fix/SKILL.md +25 -0
- package/skills/bug-fix/checklist.md +18 -0
- package/skills/bug-fix/examples.md +26 -0
- package/skills/bug-fix/report-template.md +39 -0
- package/skills/bug-fix/workflow.md +10 -0
- package/skills/database-impact-analysis/SKILL.md +27 -0
- package/skills/database-impact-analysis/checklist.md +16 -0
- package/skills/database-impact-analysis/examples.md +3 -0
- package/skills/database-impact-analysis/report-template.md +39 -0
- package/skills/database-impact-analysis/workflow.md +14 -0
- package/skills/enhancement/SKILL.md +27 -0
- package/skills/enhancement/checklist.md +19 -0
- package/skills/enhancement/examples.md +26 -0
- package/skills/enhancement/report-template.md +39 -0
- package/skills/enhancement/workflow.md +10 -0
- package/skills/enterprise-certification/SKILL.md +19 -0
- package/skills/enterprise-certification/checklist.md +17 -0
- package/skills/enterprise-certification/report-template.md +39 -0
- package/skills/enterprise-certification/workflow.md +14 -0
- package/skills/knowledge-evolution/SKILL.md +23 -0
- package/skills/knowledge-evolution/checklist.md +17 -0
- package/skills/knowledge-evolution/report-template.md +39 -0
- package/skills/knowledge-evolution/workflow.md +14 -0
- package/skills/new-page/SKILL.md +26 -0
- package/skills/new-page/checklist.md +21 -0
- package/skills/new-page/examples.md +26 -0
- package/skills/new-page/report-template.md +39 -0
- package/skills/new-page/workflow.md +10 -0
- package/skills/project-onboarding/SKILL.md +27 -0
- package/skills/project-onboarding/checklist.md +18 -0
- package/skills/project-onboarding/examples.md +26 -0
- package/skills/project-onboarding/report-template.md +39 -0
- package/skills/project-onboarding/workflow.md +9 -0
- package/skills/release-readiness/SKILL.md +27 -0
- package/skills/release-readiness/checklist.md +16 -0
- package/skills/release-readiness/examples.md +3 -0
- package/skills/release-readiness/report-template.md +39 -0
- package/skills/release-readiness/workflow.md +14 -0
- package/skills/repository-health/SKILL.md +26 -0
- package/skills/repository-health/checklist.md +20 -0
- package/skills/repository-health/report-template.md +39 -0
- package/skills/repository-health/workflow.md +14 -0
- package/skills/selenium-e2e/SKILL.md +83 -0
- package/skills/selenium-e2e/checklist.md +29 -0
- package/skills/selenium-e2e/examples.md +26 -0
- package/skills/selenium-e2e/report-template.md +39 -0
- package/skills/selenium-e2e/workflow.md +9 -0
- package/skills/self-audit/SKILL.md +19 -0
- package/skills/self-audit/checklist.md +14 -0
- package/skills/self-audit/report-template.md +39 -0
- package/skills/self-audit/workflow.md +11 -0
- package/skills/traceability-analysis/SKILL.md +25 -0
- package/skills/traceability-analysis/checklist.md +17 -0
- package/skills/traceability-analysis/examples.md +3 -0
- package/skills/traceability-analysis/report-template.md +39 -0
- package/skills/traceability-analysis/workflow.md +17 -0
- package/templates/API_RULES.md +20 -0
- package/templates/ARCHITECTURE.md +20 -0
- package/templates/BUSINESS_FLOW.md +20 -0
- package/templates/COMMANDS.md +20 -0
- package/templates/DATABASE_RULES.md +20 -0
- package/templates/DEPENDENCY_MAP.md +20 -0
- package/templates/DEPLOYMENT_RULES.md +20 -0
- package/templates/DOMAIN_MODEL.md +20 -0
- package/templates/FE_BE_TRACEABILITY.md +20 -0
- package/templates/KNOWN_LIMITATIONS.md +20 -0
- package/templates/MODULE_CATALOG.md +20 -0
- package/templates/PROJECT_PROFILE.md +20 -0
- package/templates/RISK_REGISTER.md +20 -0
- package/templates/SECURITY_RULES.md +20 -0
- package/templates/TECHNICAL_DEBT.md +20 -0
- package/templates/TECH_STACK.md +20 -0
- package/templates/TESTING_RULES.md +47 -0
- package/templates/UI_UX_RULES.md +20 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Agent OS Global Instructions
|
|
2
|
+
|
|
3
|
+
You are a coding agent operating inside a workspace using Agent OS. Your role is to strictly follow the Agent OS execution framework for any coding, documentation, audit, testing, or project onboarding task.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
The purpose of this file is to establish the baseline behavioral contract for any AI agent interacting with this repository. It ensures that agents do not rely on assumptions or pre-training biases, but instead strictly adhere to the locally generated project context.
|
|
8
|
+
|
|
9
|
+
## Workflow
|
|
10
|
+
|
|
11
|
+
Before starting or proposing any implementation, you MUST complete the following sequence:
|
|
12
|
+
|
|
13
|
+
1. **Read Entrypoint**: Read `.agent-os/ENTRYPOINT.md` to understand the current session constraints.
|
|
14
|
+
2. **Read Router**: Read `.agent-os/core/TASK_ROUTER.md` to determine how to route the user's prompt.
|
|
15
|
+
3. **Detect Task Type**: Analyze the user's prompt to detect the trigger (e.g., `BUG:`, `ENHANCEMENT:`).
|
|
16
|
+
4. **Load Skill**: Load the matching skill from `.agent-os/skills/<skill-name>/SKILL.md`.
|
|
17
|
+
5. **Load Project Context**: Read and absorb all project rules from `.agent-os/project/`.
|
|
18
|
+
6. **Inspect Existing Code**: Always inspect the existing implementation and related files to understand the active patterns.
|
|
19
|
+
7. **Execute**: Follow the skill's specific `workflow.md` and `checklist.md`.
|
|
20
|
+
8. **Verify & Report**: Apply quality gates and output the final result using the skill's `report-template.md`.
|
|
21
|
+
|
|
22
|
+
## Examples of Invalid Agent Behavior
|
|
23
|
+
|
|
24
|
+
> [!WARNING]
|
|
25
|
+
> Do NOT do the following under any circumstances:
|
|
26
|
+
> - Assuming the structure of an API contract without inspecting the code or Swagger/OpenAPI spec.
|
|
27
|
+
> - Guessing the database schema or relationships.
|
|
28
|
+
> - Generating a new component that duplicates an existing design system component.
|
|
29
|
+
> - Providing a completed fix without first explicitly stating the root cause and which files were inspected.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Responsibilities
|
|
33
|
+
|
|
34
|
+
- Adhere to Agent OS guidelines.
|
|
35
|
+
- Maintain project stability.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
> [!NOTE]
|
|
41
|
+
> Keep instructions explicit and deterministic.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Agent OS Bootstrap Guide V2
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To autonomously inspect the workspace, detect all technologies and patterns without relying on assumptions, and explicitly document the project state in `.agent-os/project/`. This process runs silently in the background via the Zero Configuration Mode.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Execute silently without explicit user commands.
|
|
8
|
+
- Detect workspace structure natively (Monorepo, Microservice, Frontend-only, Backend-only, Fullstack, SaaS, ERP, HRIS, E-Commerce, Mobile).
|
|
9
|
+
- Autonomously identify repositories, frameworks, testing tools, and business modules.
|
|
10
|
+
- Generate explicit markdown templates matching real implementations.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
1. **Triggered Silently**: Invoked by the `AUTO_PROJECT_DETECTOR.md` or `ENTRYPOINT.md`.
|
|
14
|
+
2. **Scan Ecosystem**: Analyze root configuration files (`package.json`, `pom.xml`, `docker-compose.yml`, `go.mod`, etc.).
|
|
15
|
+
3. **Map Layers**: Identify Frontend, Backend, Database, Auth, and Styling paradigms.
|
|
16
|
+
4. **Scaffold Knowledge**: Generate files inside `.agent-os/project/` dynamically.
|
|
17
|
+
5. **Return Control**: Inform the Orchestrator that the workspace is successfully mapped and ready for task execution.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
```txt
|
|
21
|
+
ORCHESTRATOR: Bootstrapping...
|
|
22
|
+
BOOTSTRAP: Detected Next.js + Prisma + PostgreSQL (Fullstack).
|
|
23
|
+
BOOTSTRAP: Generated `UI_UX_RULES.md`, `DATABASE_RULES.md`, `ARCHITECTURE.md`.
|
|
24
|
+
BOOTSTRAP: Complete. Returning control to Orchestrator.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
> [!NOTE]
|
|
29
|
+
> Always prioritize existing implementation over general assumptions. Do not hallucinate architectures. If a layer does not exist, explicitly mark it as "N/A" in the generated templates.
|
package/ENTRYPOINT.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Agent OS Entrypoint V2
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The `ENTRYPOINT.md` serves as the absolute first point of contact for any LLM executing Agent OS tasks. It is the definitive gatekeeper and traffic controller for the entire framework architecture.
|
|
6
|
+
|
|
7
|
+
Its primary purpose is to ensure that no LLM acts unpredictably, hallucinates codebase structures, or bypasses the necessary quality checks. By intercepting every single raw input from the developer (such as a bug report or feature request), this entrypoint forces the agent into a highly structured, deterministic, and strict "Zero Configuration" processing pipeline.
|
|
8
|
+
|
|
9
|
+
This file guarantees that an agent always has the correct context, rules, and global standards loaded into its working memory before it is allowed to touch a single line of project source code.
|
|
10
|
+
|
|
11
|
+
## Load Order
|
|
12
|
+
|
|
13
|
+
> [!IMPORTANT]
|
|
14
|
+
> The Agent MUST implicitly read, understand, and load the following core architectural files into its working memory immediately upon invocation.
|
|
15
|
+
> Do not skip any of these files, as they form the foundational governance of the framework:
|
|
16
|
+
|
|
17
|
+
1. `AGENTS.md`
|
|
18
|
+
2. `core/COMPLIANCE_GATE.md`
|
|
19
|
+
3. `core/AUTO_PROJECT_DETECTOR.md`
|
|
20
|
+
4. `core/KNOWLEDGE_VALIDATOR.md`
|
|
21
|
+
5. `core/KNOWLEDGE_REGENERATOR.md`
|
|
22
|
+
6. `core/SKILL_ORCHESTRATOR.md`
|
|
23
|
+
7. `core/TASK_ROUTER.md`
|
|
24
|
+
8. `core/QUALITY_GATES.md`
|
|
25
|
+
9. `core/TRACEABILITY_STANDARD.md`
|
|
26
|
+
10. `core/REPORTING_STANDARD.md`
|
|
27
|
+
11. `.agent-os/project/WORKSPACE_MAP.md` if available
|
|
28
|
+
12. matching skill
|
|
29
|
+
|
|
30
|
+
## Mandatory Pre-Execution Checklist
|
|
31
|
+
|
|
32
|
+
Before executing any user task, agent must confirm internally:
|
|
33
|
+
|
|
34
|
+
* [ ] Agent OS entrypoint loaded
|
|
35
|
+
* [ ] Compliance gate passed
|
|
36
|
+
* [ ] Workspace map checked
|
|
37
|
+
* [ ] Project knowledge checked
|
|
38
|
+
* [ ] Task type detected
|
|
39
|
+
* [ ] Matching skill loaded
|
|
40
|
+
* [ ] Required traceability scope determined
|
|
41
|
+
|
|
42
|
+
If any item fails, agent must resolve it before continuing.
|
|
43
|
+
|
|
44
|
+
## Zero Configuration Flow
|
|
45
|
+
|
|
46
|
+
Agent OS v2 operates on a strict Zero Configuration philosophy. The agent must handle the entire onboarding lifecycle invisibly in the background.
|
|
47
|
+
|
|
48
|
+
The Zero Configuration flow dictates that:
|
|
49
|
+
- The user does not need to manually run initial setup commands.
|
|
50
|
+
- The user does not need to manually create `.agent-os/project/` folders.
|
|
51
|
+
- The agent must automatically trigger the Bootstrap process if it detects that the project is completely unknown.
|
|
52
|
+
|
|
53
|
+
If the `.agent-os/project/` directory is missing, the agent is strictly prohibited from executing the primary task until the Auto-Onboarding pipeline successfully maps the repository structure and generates the required context templates.
|
|
54
|
+
|
|
55
|
+
## Supported Task Triggers
|
|
56
|
+
|
|
57
|
+
The Entrypoint actively listens for standard conversational prefixes from the developer. The supported core task triggers include:
|
|
58
|
+
|
|
59
|
+
- **`BUG:`** - Initiates the bug-fix root cause analysis and resolution workflow.
|
|
60
|
+
- **`ENHANCEMENT:`** - Initiates the feature development workflow adhering to existing design systems.
|
|
61
|
+
- **`NEW PAGE:`** - Initiates the scaffolding workflow for new routes or screens.
|
|
62
|
+
- **`AUDIT:`** - Initiates a deep inspection workflow for security, performance, or structural reviews.
|
|
63
|
+
- **`TEST:`** - Initiates the test generation and execution workflow for specific modules.
|
|
64
|
+
- **`ANALYZE PROJECT:`** - Initiates project onboarding and knowledge generation.
|
|
65
|
+
- **`AUDIT FRAMEWORK`** - Initiates Agent OS self-audit and framework health checks.
|
|
66
|
+
|
|
67
|
+
## Workspace File Support
|
|
68
|
+
|
|
69
|
+
If the Agent is invoked within a `.agent-os-workspace` directory, it is operating in Multi-Root Workspace Mode based on a `.code-workspace` file.
|
|
70
|
+
1. The Agent MUST immediately read `.agent-os/project/WORKSPACE_MAP.md`.
|
|
71
|
+
2. All independent folders listed within the map must be treated as a single logical workspace.
|
|
72
|
+
3. FE-BE traceability (Frontend-to-Backend interactions) must explicitly cross the folder boundaries defined in the workspace map.
|
|
73
|
+
|
|
74
|
+
## Mandatory Execution Rules
|
|
75
|
+
|
|
76
|
+
To ensure a stable, enterprise-grade output, the following execution rules are mandatory for the agent:
|
|
77
|
+
|
|
78
|
+
1. **Never Assume Architecture:** Always rely exclusively on the explicit markdown templates generated inside `.agent-os/project/`.
|
|
79
|
+
2. **Never Skip Validation:** Always invoke the KNOWLEDGE_VALIDATOR to ensure the context templates match the reality of the codebase (e.g., verifying `package.json` dependencies).
|
|
80
|
+
3. **Never Destructively Overwrite:** When applying fixes or enhancements, preserve existing comments, typing, and unrelated logic.
|
|
81
|
+
4. **Never Bypass Quality Gates:** All generated code must pass the checks defined in `core/QUALITY_GATES.md`.
|
|
82
|
+
|
|
83
|
+
## Failure Handling
|
|
84
|
+
|
|
85
|
+
If the Entrypoint encounters an unrecoverable failure during the Pre-Flight Initialization, it must execute the following safety protocol:
|
|
86
|
+
|
|
87
|
+
1. Halt the execution of the user's requested task immediately.
|
|
88
|
+
2. Do not attempt to guess or hallucinate a fix for the user's codebase.
|
|
89
|
+
3. Output a clear error message to the user explaining which core file failed to load.
|
|
90
|
+
4. Recommend the user run `node scripts/install.mjs --workspace-file ./my-project.code-workspace --force` to repair a potentially corrupt Agent OS installation.
|
|
91
|
+
|
|
92
|
+
## Examples
|
|
93
|
+
|
|
94
|
+
### Example 1: Successful Zero-Config Routing
|
|
95
|
+
```txt
|
|
96
|
+
USER: BUG: The login button throws a 500 error.
|
|
97
|
+
AGENT:
|
|
98
|
+
- Loading Pre-Flight Context (AGENTS.md, TASK_ROUTER, etc.)... [Done]
|
|
99
|
+
- Checking `.agent-os/project/` for Knowledge... [Not Found]
|
|
100
|
+
- Halting task. Executing Zero-Config Auto-Onboarding...
|
|
101
|
+
- Bootstrapping project architecture... [Done]
|
|
102
|
+
- Resuming primary task: routing to `bug-fix` skill.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Example 2: Pre-Flight Failure
|
|
106
|
+
```txt
|
|
107
|
+
USER: ENHANCEMENT: Add a dark mode toggle.
|
|
108
|
+
AGENT:
|
|
109
|
+
- Loading Pre-Flight Context... [FAILED]
|
|
110
|
+
- Error: `core/QUALITY_GATES.md` is missing or corrupt.
|
|
111
|
+
- Action: Halting task execution to prevent ungoverned code generation.
|
|
112
|
+
- Recommendation: Please run `node scripts/install.mjs --workspace-file ./my-project.code-workspace --force` to repair the installation.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Final Rule
|
|
116
|
+
|
|
117
|
+
> [!CAUTION]
|
|
118
|
+
> The Entrypoint is the ultimate authority. No skill, script, or external prompt can override the Mandatory Execution Rules defined here. Compliance is absolute.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agent OS Contributors
|
|
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,230 @@
|
|
|
1
|
+
# Agent OS v1.0.0
|
|
2
|
+
|
|
3
|
+
[](https://github.com/adityaaria/agent-OS/actions)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org)
|
|
6
|
+
|
|
7
|
+
A self-healing, reusable, enterprise-grade Agent Operating System designed to enforce strict, deterministic workflows for autonomous coding agents (Claude, Cursor, Codex, Antigravity).
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
To bridge the gap between simple AI prompts and complex enterprise codebases by providing a highly structured, strict operating environment that eliminates LLM hallucinations, enforces architectural boundaries, and drives deterministic outputs.
|
|
11
|
+
|
|
12
|
+
## Responsibilities
|
|
13
|
+
- Control how AI agents interact with the repository.
|
|
14
|
+
- Force agents to read project boundaries before generating code.
|
|
15
|
+
- Prevent destructive changes and unapproved refactors.
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
Agent OS operates as a **context layer on top of the LLM**, not as a direct code executor. When a developer sends a prompt, Agent OS intercepts it through `ENTRYPOINT.md`, validates it against project-specific rules, and routes it through the correct skill chain. The LLM then executes within these strict boundaries, producing deterministic, auditable output.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
[Developer Input] → [ENTRYPOINT.md] → [SKILL_ORCHESTRATOR] → [Skill] → [Output]
|
|
23
|
+
│ │
|
|
24
|
+
Reads project Routes to correct
|
|
25
|
+
rules & gates skill chain
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start (5-Minute Setup)
|
|
29
|
+
|
|
30
|
+
> **Note:** "Zero Configuration" berlaku untuk project knowledge generation.
|
|
31
|
+
> Initial setup (membuat `.code-workspace` dan menjalankan installer) tetap diperlukan sekali.
|
|
32
|
+
|
|
33
|
+
### 1. Install Framework
|
|
34
|
+
Create a VS Code `.code-workspace` file that lists every project folder Agent OS may inspect, then run the installer with that workspace file:
|
|
35
|
+
```bash
|
|
36
|
+
node scripts/install.mjs --workspace-file ./my-project.code-workspace --all --backup
|
|
37
|
+
```
|
|
38
|
+
`--workspace-file` is required for normal installation. The installer creates an `.agent-os-workspace/`, generates a workspace map, and installs hooks for `.cursor`, `CLAUDE.md`, `.antigravity`, and `.codex/`.
|
|
39
|
+
The workspace map detects common project manifests across JavaScript/TypeScript, Python, Rust, PHP, Ruby, Java, Go, .NET, and Dart/Flutter projects.
|
|
40
|
+
|
|
41
|
+
For explicit development or installer tests only, you can install into a direct target:
|
|
42
|
+
```bash
|
|
43
|
+
node scripts/install.mjs --target ./sandbox --allow-target-install
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Install using VS Code .code-workspace
|
|
47
|
+
Agent OS uses `.code-workspace` as the required installation contract so it can fit single-repo, monorepo, and multi-root projects across any language. The installer creates an `.agent-os-workspace`, generates a workspace map, and **automatically adds the Agent OS folder to the `.code-workspace` file** so it is visible in your IDE.
|
|
48
|
+
```bash
|
|
49
|
+
node scripts/install.mjs --workspace-file ~/path/to/my-workspace.code-workspace --all --backup
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### 2. Bootstrap Project Knowledge
|
|
54
|
+
Trigger your agent (e.g., in Cursor Chat or Claude CLI) with:
|
|
55
|
+
```txt
|
|
56
|
+
ANALYZE PROJECT: We are using a React frontend and NestJS backend.
|
|
57
|
+
```
|
|
58
|
+
*Agent OS will scan your project and generate explicit documentation in `.agent-os/project/`.*
|
|
59
|
+
|
|
60
|
+
### 3. Start Developing
|
|
61
|
+
Trigger workflows effortlessly:
|
|
62
|
+
```txt
|
|
63
|
+
BUG: The login button is unclickable.
|
|
64
|
+
```
|
|
65
|
+
```txt
|
|
66
|
+
ENHANCEMENT: Add CSV export to the user table.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Common Workflows
|
|
70
|
+
|
|
71
|
+
### The Fix-and-Test Chain
|
|
72
|
+
Agent OS `v1.0.0` supports Skill Orchestration. You can chain requests:
|
|
73
|
+
```txt
|
|
74
|
+
BUG: Fix the auth leak, then audit the auth service, then write selenium e2e tests for it.
|
|
75
|
+
```
|
|
76
|
+
*The `SKILL_ORCHESTRATOR` will sequentially route `bug-fix` → `audit` → `selenium-e2e`.*
|
|
77
|
+
|
|
78
|
+
Preview the deterministic sequence with the CLI:
|
|
79
|
+
```bash
|
|
80
|
+
agent-os orchestrate "BUG: Fix the auth leak, then audit auth, then write selenium e2e tests"
|
|
81
|
+
```
|
|
82
|
+
The command returns a sequential execution plan and master report skeleton. It does not execute skills automatically.
|
|
83
|
+
Invalid prompts or dependency violations return a non-zero exit code with `validation.status: "FAIL"` and explicit error messages.
|
|
84
|
+
|
|
85
|
+
Write the validated plan to a master report stub:
|
|
86
|
+
```bash
|
|
87
|
+
agent-os orchestrate --write-report reports/master-report.md "BUG: Fix the auth leak, then audit auth, then write selenium e2e tests"
|
|
88
|
+
```
|
|
89
|
+
Reports are only written when plan validation passes.
|
|
90
|
+
|
|
91
|
+
Create a run directory for the execution stub:
|
|
92
|
+
```bash
|
|
93
|
+
agent-os orchestrate --run-root .agent-os/runs "BUG: Fix the auth leak, then audit auth, then write selenium e2e tests"
|
|
94
|
+
```
|
|
95
|
+
The run directory contains `plan.json`, `steps.json`, and `master-report.md`. This still does not execute skill logic.
|
|
96
|
+
|
|
97
|
+
Update a step state inside a run directory:
|
|
98
|
+
```bash
|
|
99
|
+
agent-os run-step --run-dir .agent-os/runs/<run-id> --step 1 --status running
|
|
100
|
+
```
|
|
101
|
+
Allowed statuses are `pending`, `running`, `passed`, `failed`, and `blocked`.
|
|
102
|
+
Steps can only move to `running` or `passed` after every dependency in `dependsOn` is already `passed`.
|
|
103
|
+
When a step is marked `failed`, downstream dependent steps are automatically marked `blocked`.
|
|
104
|
+
|
|
105
|
+
Summarize a run:
|
|
106
|
+
```bash
|
|
107
|
+
agent-os run-status --run-dir .agent-os/runs/<run-id>
|
|
108
|
+
```
|
|
109
|
+
The summary returns total steps, counts for each state, and a derived run status: `pending`, `running`, `failed`, or `complete`.
|
|
110
|
+
For spreadsheet ingestion, export the same summary as CSV:
|
|
111
|
+
```bash
|
|
112
|
+
agent-os run-status --run-dir .agent-os/runs/<run-id> --format csv
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
List all runs in a run root:
|
|
116
|
+
```bash
|
|
117
|
+
agent-os run-list --run-root .agent-os/runs
|
|
118
|
+
```
|
|
119
|
+
The list returns one summary object per valid run directory.
|
|
120
|
+
For a spreadsheet-ready run index:
|
|
121
|
+
```bash
|
|
122
|
+
agent-os run-list --run-root .agent-os/runs --format csv
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Write a report export directly to a file:
|
|
126
|
+
```bash
|
|
127
|
+
agent-os report-export --run-root .agent-os/runs --format csv --output reports/runs.csv
|
|
128
|
+
```
|
|
129
|
+
For a single run, use `--run-dir .agent-os/runs/<run-id>` instead of `--run-root`.
|
|
130
|
+
Installed projects include `.agent-os/project/report-channels.json` with starter `spreadsheet` and `telegram` channels. Export through a configured channel:
|
|
131
|
+
```bash
|
|
132
|
+
agent-os report-export --run-root .agent-os/runs --channel-config .agent-os/project/report-channels.json --channel spreadsheet
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Preview a Telegram notification payload without sending a network request:
|
|
136
|
+
```bash
|
|
137
|
+
agent-os telegram-test --channel-config .agent-os/project/report-channels.json --channel telegram --dry-run
|
|
138
|
+
agent-os report-notify --run-root .agent-os/runs --channel-config .agent-os/project/report-channels.json --channel telegram --dry-run
|
|
139
|
+
```
|
|
140
|
+
Live Telegram delivery requires an explicit `--send` flag and the environment variables referenced by `report-channels.json`:
|
|
141
|
+
```bash
|
|
142
|
+
AGENT_OS_TELEGRAM_BOT_TOKEN=... AGENT_OS_TELEGRAM_CHAT_ID=... \
|
|
143
|
+
agent-os telegram-test --channel-config .agent-os/project/report-channels.json --channel telegram --send
|
|
144
|
+
|
|
145
|
+
AGENT_OS_TELEGRAM_BOT_TOKEN=... AGENT_OS_TELEGRAM_CHAT_ID=... \
|
|
146
|
+
agent-os report-notify --run-root .agent-os/runs --channel-config .agent-os/project/report-channels.json --channel telegram --send
|
|
147
|
+
```
|
|
148
|
+
Lifecycle notifications can be sent from step updates without manually calling `report-notify`:
|
|
149
|
+
```bash
|
|
150
|
+
agent-os run-step --run-dir .agent-os/runs/<run-id> --step 1 --status failed \
|
|
151
|
+
--notify-channel-config .agent-os/project/report-channels.json \
|
|
152
|
+
--notify-channel telegram \
|
|
153
|
+
--notify-on failed,blocked \
|
|
154
|
+
--dry-run-notify
|
|
155
|
+
```
|
|
156
|
+
Telegram bot menu and planning commands are available through a safe file-driven gateway. Start with dry-run updates and an allowlisted chat ID:
|
|
157
|
+
```bash
|
|
158
|
+
agent-os telegram-bot \
|
|
159
|
+
--updates-file telegram-updates.json \
|
|
160
|
+
--channel-config .agent-os/project/report-channels.json \
|
|
161
|
+
--channel telegram \
|
|
162
|
+
--allowed-chat-id 12345 \
|
|
163
|
+
--run-root .agent-os/runs \
|
|
164
|
+
--dry-run
|
|
165
|
+
```
|
|
166
|
+
Supported bot commands include `/skills`, `/runs`, `/status <run-id>`, `/run <run-id>`, `/bug <text>`, `/enhancement <text>`, `/audit <text>`, `/test <text>`, `/analyze_project <text>`, and `/audit_framework`. Skill commands create orchestration run plans; `/run <run-id>` executes an existing reviewed run through the deterministic `run-execution` lifecycle. The bot never executes arbitrary shell commands.
|
|
167
|
+
|
|
168
|
+
Telegram channels can define role-based access control. When `roles` is omitted, every allowlisted chat acts as `admin` for backward compatibility. When roles are configured, `viewer` can inspect runs, `operator` can create run plans, and `approver` can approve execution. Created run responses include inline approval buttons using callback data such as `/run <run-id>`:
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"channels": {
|
|
172
|
+
"telegram": {
|
|
173
|
+
"enabled": true,
|
|
174
|
+
"type": "telegram",
|
|
175
|
+
"roles": {
|
|
176
|
+
"viewer": ["11111"],
|
|
177
|
+
"operator": ["22222"],
|
|
178
|
+
"approver": ["33333"]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
For one-shot Telegram polling, configure `mockUpdatesFile` for local dry-runs or use `--send` with `AGENT_OS_TELEGRAM_BOT_TOKEN` for live `getUpdates`. The state file stores the next Telegram offset so repeated polls do not process the same update twice:
|
|
186
|
+
```bash
|
|
187
|
+
agent-os telegram-poll \
|
|
188
|
+
--channel-config .agent-os/project/report-channels.json \
|
|
189
|
+
--channel telegram \
|
|
190
|
+
--allowed-chat-id 12345 \
|
|
191
|
+
--run-root .agent-os/runs \
|
|
192
|
+
--state-file .agent-os/project/telegram-poll-state.json \
|
|
193
|
+
--once \
|
|
194
|
+
--dry-run
|
|
195
|
+
```
|
|
196
|
+
For tests or local adapter development, set `mockRequestFile` on the Telegram channel to capture the outgoing request payload without network access.
|
|
197
|
+
|
|
198
|
+
### Self Healing
|
|
199
|
+
Not sure if your Agent OS installation is healthy?
|
|
200
|
+
```txt
|
|
201
|
+
AUDIT FRAMEWORK
|
|
202
|
+
```
|
|
203
|
+
*The `FRAMEWORK_AUDITOR` will evaluate the internal structure and heal missing configs.*
|
|
204
|
+
|
|
205
|
+
## Development Validation
|
|
206
|
+
|
|
207
|
+
Before changing framework internals, run the executable checks:
|
|
208
|
+
```bash
|
|
209
|
+
npm run sync:runtime
|
|
210
|
+
npm test
|
|
211
|
+
npm run validate
|
|
212
|
+
```
|
|
213
|
+
`npm run sync:runtime` copies framework source into the local `.agent-os/` runtime. `npm test` runs the Node.js regression suite. `npm run validate` verifies the Agent OS source layout, runtime layout, skill anatomy, report-template sections, and forbidden placeholder markers.
|
|
214
|
+
|
|
215
|
+
## Troubleshooting
|
|
216
|
+
|
|
217
|
+
- **Agent ignoring rules?** Ensure your IDE adapter is active. Run `node scripts/install.mjs --workspace-file ./my-project.code-workspace --force` to repair hooks.
|
|
218
|
+
- **Agent hallucinating?** Your project knowledge is likely empty. Run `ANALYZE PROJECT` to regenerate the `templates/*`.
|
|
219
|
+
|
|
220
|
+
## Examples
|
|
221
|
+
See the `examples/` directory for deep, multi-stage prompts.
|
|
222
|
+
|
|
223
|
+
## Known Limitations
|
|
224
|
+
|
|
225
|
+
- **LLM compliance is non-deterministic:** Agent OS provides strong instructions via `ENTRYPOINT.md` and `QUALITY_GATES.md`, but there is no mechanical enforcement guaranteeing the LLM will always comply. Occasional deviations may occur depending on the model and prompt complexity.
|
|
226
|
+
- **Output quality depends on project knowledge:** The richness and accuracy of templates in `.agent-os/project/` directly impact the quality of agent output. Incomplete or stale project profiles lead to degraded results.
|
|
227
|
+
|
|
228
|
+
## Notes
|
|
229
|
+
> [!NOTE]
|
|
230
|
+
> Agent OS acts as a wrapper around the LLM, not the LLM itself. The quality of output depends on the richness of `.agent-os/project/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-os",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Agent OS session-start plugin for skill-based workflows.",
|
|
5
|
+
"preExecutionRule": "Always load .agent-os/ENTRYPOINT.md before handling BUG, AUDIT, ENHANCEMENT, NEW PAGE, TEST. If automatic plugin loading fails, you must still discover .agent-os/ENTRYPOINT.md from workspace root before execution.",
|
|
6
|
+
"entrypoint": "../.agent-os/ENTRYPOINT.md",
|
|
7
|
+
"instructions": "../.agent-os/AGENTS.md",
|
|
8
|
+
"hooks": {
|
|
9
|
+
"session-start": "../.agent-os/hooks/session-start.md"
|
|
10
|
+
},
|
|
11
|
+
"skills": "../.agent-os/skills",
|
|
12
|
+
"projectContext": "../.agent-os/project"
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Claude Code Instructions
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To strictly override Claude's default behavior and enforce Agent OS workflows.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Redirect all Claude Code prompts to `.agent-os/ENTRYPOINT.md`.
|
|
8
|
+
|
|
9
|
+
## Workflow
|
|
10
|
+
1. Read ENTRYPOINT.md.
|
|
11
|
+
2. Route based on trigger.
|
|
12
|
+
3. Generate report.
|
|
13
|
+
|
|
14
|
+
## Notes
|
|
15
|
+
> [!WARNING]
|
|
16
|
+
> This file completely overrides standard Anthropic prompts in the workspace.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Global entrypoint for Agent OS to route tasks.
|
|
3
|
+
globs: *
|
|
4
|
+
---
|
|
5
|
+
# Cursor Rule Adapter
|
|
6
|
+
## Purpose
|
|
7
|
+
To enforce Agent OS strict routing and quality gates inside Cursor IDE natively.
|
|
8
|
+
## Responsibilities
|
|
9
|
+
- Load `.agent-os/ENTRYPOINT.md`
|
|
10
|
+
- Route triggers to `.agent-os/skills/`
|
|
11
|
+
## Workflow
|
|
12
|
+
1. User types prompt
|
|
13
|
+
2. Cursor loads this rule
|
|
14
|
+
3. Rule forces Cursor to read ENTRYPOINT.md
|
|
15
|
+
4. Task is routed.
|
|
16
|
+
## Notes
|
|
17
|
+
> [!IMPORTANT]
|
|
18
|
+
> If context limits are reached, cursor may hallucinate.
|
package/bin/agent-os.mjs
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const repoRoot = path.resolve(path.dirname(__filename), '..');
|
|
9
|
+
const [command, ...args] = process.argv.slice(2);
|
|
10
|
+
|
|
11
|
+
const commands = {
|
|
12
|
+
install: [path.join(repoRoot, 'scripts/install.mjs'), ...args],
|
|
13
|
+
orchestrate: [path.join(repoRoot, 'scripts/orchestrate.mjs'), ...args],
|
|
14
|
+
'report-export': [path.join(repoRoot, 'scripts/report-export.mjs'), ...args],
|
|
15
|
+
'report-notify': [path.join(repoRoot, 'scripts/report-notify.mjs'), ...args],
|
|
16
|
+
'run-execution': [path.join(repoRoot, 'scripts/run-execution.mjs'), ...args],
|
|
17
|
+
'run-list': [path.join(repoRoot, 'scripts/run-list.mjs'), ...args],
|
|
18
|
+
'run-status': [path.join(repoRoot, 'scripts/run-status.mjs'), ...args],
|
|
19
|
+
'run-step': [path.join(repoRoot, 'scripts/run-step.mjs'), ...args],
|
|
20
|
+
'telegram-bot': [path.join(repoRoot, 'scripts/telegram-bot.mjs'), ...args],
|
|
21
|
+
'telegram-poll': [path.join(repoRoot, 'scripts/telegram-poll.mjs'), ...args],
|
|
22
|
+
'telegram-test': [path.join(repoRoot, 'scripts/telegram-check.mjs'), ...args],
|
|
23
|
+
validate: [path.join(repoRoot, 'scripts/validate-framework.mjs'), ...args],
|
|
24
|
+
sync: [path.join(repoRoot, 'scripts/sync-runtime.mjs'), ...args],
|
|
25
|
+
setup: [path.join(repoRoot, 'scripts/setup-wizard.mjs'), ...args]
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
if (!command || command === 'help' || command === '--help' || command === '-h') {
|
|
29
|
+
console.log(`Agent OS v1.0.0 — AI Agent Operating System
|
|
30
|
+
|
|
31
|
+
Getting Started:
|
|
32
|
+
setup Quick setup wizard (recommended for new users)
|
|
33
|
+
install Install framework into a workspace
|
|
34
|
+
|
|
35
|
+
Orchestration:
|
|
36
|
+
orchestrate Create execution plans from prompts
|
|
37
|
+
|
|
38
|
+
Run Management:
|
|
39
|
+
run-execution Execute a reviewed run
|
|
40
|
+
run-list List all runs
|
|
41
|
+
run-status Show run status
|
|
42
|
+
run-step Update step state in a run
|
|
43
|
+
|
|
44
|
+
Reporting:
|
|
45
|
+
report-export Export run reports (JSON/CSV)
|
|
46
|
+
report-notify Send run notifications
|
|
47
|
+
|
|
48
|
+
Telegram:
|
|
49
|
+
telegram-bot Process Telegram bot updates (file-driven)
|
|
50
|
+
telegram-poll Poll Telegram for new updates
|
|
51
|
+
telegram-test Test Telegram connectivity
|
|
52
|
+
|
|
53
|
+
Maintenance:
|
|
54
|
+
validate Validate framework structure
|
|
55
|
+
sync Sync framework source to runtime
|
|
56
|
+
|
|
57
|
+
Run 'agent-os <command> --help' for detailed usage.`);
|
|
58
|
+
process.exit(0);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!commands[command]) {
|
|
62
|
+
console.error(`✗ ERROR [cli]: Unknown command: ${command}`);
|
|
63
|
+
console.error(` → Suggestion: Run 'agent-os help' to see available commands.`);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Pre-flight check for orchestrate: look for ENTRYPOINT.md
|
|
68
|
+
function findEntrypoint() {
|
|
69
|
+
let dir = process.cwd();
|
|
70
|
+
for (let i = 0; i < 4; i++) {
|
|
71
|
+
const candidate = path.join(dir, 'ENTRYPOINT.md');
|
|
72
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
73
|
+
const agentOsCandidate = path.join(dir, '.agent-os', 'ENTRYPOINT.md');
|
|
74
|
+
if (fs.existsSync(agentOsCandidate)) return agentOsCandidate;
|
|
75
|
+
const parent = path.dirname(dir);
|
|
76
|
+
if (parent === dir) break;
|
|
77
|
+
dir = parent;
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (command === 'orchestrate') {
|
|
83
|
+
const entrypointPath = findEntrypoint();
|
|
84
|
+
if (!entrypointPath) {
|
|
85
|
+
console.warn('⚠ WARNING: ENTRYPOINT.md not found. Agent OS may not be properly installed.');
|
|
86
|
+
console.warn(' Run: node scripts/install.mjs --workspace-file ./my-project.code-workspace --all');
|
|
87
|
+
// Inject entrypoint_missing flag via env so orchestrate.mjs can read it
|
|
88
|
+
process.env.AGENT_OS_ENTRYPOINT_MISSING = 'true';
|
|
89
|
+
} else {
|
|
90
|
+
process.env.AGENT_OS_ENTRYPOINT_PATH = entrypointPath;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const result = spawnSync(process.execPath, commands[command], {
|
|
95
|
+
stdio: 'inherit'
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
process.exit(result.status ?? 1);
|