@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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Auto Project Detector
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The `AUTO_PROJECT_DETECTOR.md` serves as the silent, invisible observer within the Agent OS architecture. Its primary purpose is to constantly monitor the state of the user's workspace and dynamically determine if the Agent has enough accurate context to safely execute a task.
|
|
6
|
+
|
|
7
|
+
By fully automating the detection phase, this module entirely eliminates the historical requirement for developers to manually run initialization commands such as `ANALYZE PROJECT`. It transforms the framework into a seamless, "Zero Configuration" environment where a user can clone a repository and instantly type a command like `BUG: fix header` with zero friction.
|
|
8
|
+
|
|
9
|
+
## Responsibilities
|
|
10
|
+
|
|
11
|
+
This module is entrusted with several critical, background responsibilities:
|
|
12
|
+
|
|
13
|
+
1. **Existence Verification**: It must verify whether the `.agent-os/project/` directory exists and contains valid markdown templates.
|
|
14
|
+
2. **Context Monitoring**: It must monitor the core root configuration files of the project to track significant architectural shifts.
|
|
15
|
+
3. **Execution Interception**: It must possess the authority to temporarily pause the user's primary task (e.g., a bug fix) to perform required onboarding tasks.
|
|
16
|
+
4. **Silent Operation**: It must perform its duties without prompting the user for permission, ensuring a frictionless developer experience.
|
|
17
|
+
|
|
18
|
+
## Detection Scope
|
|
19
|
+
|
|
20
|
+
The Auto Project Detector scans specific boundaries to understand the workspace. The scope of detection includes, but is not limited to:
|
|
21
|
+
|
|
22
|
+
- Package Manager Definitions (`package.json`, `pnpm-workspace.yaml`, `yarn.lock`)
|
|
23
|
+
- Backend Environment Configs (`pom.xml`, `go.mod`, `requirements.txt`, `composer.json`)
|
|
24
|
+
- Container and Deployment Configs (`docker-compose.yml`, `Dockerfile`, `k8s/`)
|
|
25
|
+
- Directory Structures (e.g., detecting an `apps/` and `packages/` folder indicates a Monorepo pattern)
|
|
26
|
+
|
|
27
|
+
## Project Knowledge Check
|
|
28
|
+
|
|
29
|
+
When an agent receives a prompt (such as `BUG:`, `ENHANCEMENT:`, `NEW PAGE:`, `AUDIT:`, or `TEST:`), the detector must perform an immediate Project Knowledge Check.
|
|
30
|
+
|
|
31
|
+
This check involves reading the `.agent-os/project/` folder.
|
|
32
|
+
If the folder is completely missing, or if it lacks core templates like `TECH_STACK.md` or `ARCHITECTURE.md`, the detector flags the workspace as "Unknown".
|
|
33
|
+
|
|
34
|
+
An "Unknown" workspace is highly dangerous for an LLM to modify, as it leads to hallucinations and incorrect architectural assumptions. Therefore, the knowledge check is a mandatory, non-skippable gate.
|
|
35
|
+
|
|
36
|
+
## Multi-Root Workspace Detection
|
|
37
|
+
|
|
38
|
+
If the Agent operates inside an `.agent-os-workspace` folder, the detector must prioritize reading the `WORKSPACE_MAP.md` file.
|
|
39
|
+
The detector must treat all independent folders defined in the map as a single, unified project environment.
|
|
40
|
+
Any structural shifts (such as dependency changes) inside *any* of the mapped folders will trigger the `KNOWLEDGE_VALIDATOR.md`.
|
|
41
|
+
|
|
42
|
+
## Change Detection
|
|
43
|
+
|
|
44
|
+
If the Project Knowledge Check passes (i.e., the `.agent-os/project/` folder exists), the detector moves to Change Detection.
|
|
45
|
+
|
|
46
|
+
This phase involves comparing the existing `TECH_STACK.md` against the actual, current state of the repository's dependency files.
|
|
47
|
+
For example, if the documentation states the project uses `Express.js`, but the detector sees a new `nestjs/core` package in the `package.json`, it flags a structural shift.
|
|
48
|
+
|
|
49
|
+
If a major shift is detected, the detector escalates the issue to the `KNOWLEDGE_VALIDATOR.md` for deeper inspection.
|
|
50
|
+
|
|
51
|
+
## Auto-Onboarding Trigger
|
|
52
|
+
|
|
53
|
+
If the Project Knowledge Check fails (the workspace is "Unknown"), the detector automatically triggers the Auto-Onboarding sequence.
|
|
54
|
+
|
|
55
|
+
**Rule**: The user *does not need* to run `ANALYZE PROJECT`. The detector must silently invoke the `AGENT_OS_BOOTSTRAP.md` module in the background.
|
|
56
|
+
|
|
57
|
+
The Bootstrap module will dynamically map the entire project, identify the frameworks, and scaffold the necessary markdown templates in `.agent-os/project/`. Once this process is complete, the detector releases the hold on the original task.
|
|
58
|
+
|
|
59
|
+
## Pass-through Rules
|
|
60
|
+
|
|
61
|
+
To ensure maximum speed and minimal latency for the developer, the detector must follow strict Pass-through Rules:
|
|
62
|
+
|
|
63
|
+
1. If `.agent-os/project/` exists and is fully populated...
|
|
64
|
+
2. AND no major structural shifts are detected in the root configurations...
|
|
65
|
+
3. THEN the detector must instantly pass execution control back to the `SKILL_ORCHESTRATOR.md` without any further background processing.
|
|
66
|
+
|
|
67
|
+
## Failure Handling
|
|
68
|
+
|
|
69
|
+
In the rare event that the Auto Project Detector cannot read the file system (e.g., due to strict OS permission issues) or if the Auto-Onboarding process fails catastrophically, the detector must execute its failure protocol:
|
|
70
|
+
|
|
71
|
+
1. Terminate the active task.
|
|
72
|
+
2. Inform the user that the workspace context could not be mapped securely.
|
|
73
|
+
3. Suggest verifying directory permissions or checking for corrupted config files.
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
### Scenario: First Time Usage
|
|
78
|
+
```txt
|
|
79
|
+
USER: ENHANCEMENT: Add a dark mode toggle to the navbar.
|
|
80
|
+
DETECTOR: Intercepting request.
|
|
81
|
+
DETECTOR: Scanning for `.agent-os/project/`... [Not Found].
|
|
82
|
+
DETECTOR: Triggering AGENT_OS_BOOTSTRAP.md silently.
|
|
83
|
+
BOOTSTRAP: Project mapped successfully.
|
|
84
|
+
DETECTOR: Knowledge verified. Releasing task to SKILL_ORCHESTRATOR.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Scenario: Returning User
|
|
88
|
+
```txt
|
|
89
|
+
USER: BUG: The API returns a 404 on the user route.
|
|
90
|
+
DETECTOR: Intercepting request.
|
|
91
|
+
DETECTOR: Scanning for `.agent-os/project/`... [Found].
|
|
92
|
+
DETECTOR: Change Detection... [No major structural shifts found].
|
|
93
|
+
DETECTOR: Pass-through granted. Releasing task immediately.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
> [!NOTE]
|
|
99
|
+
> The Auto Project Detector is the absolute bedrock of the V2 Zero Configuration philosophy. By guaranteeing that context is always present and accurate, it allows the LLM to focus 100% of its reasoning capabilities on the user's actual coding problem, rather than wasting tokens trying to guess the environment.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# COMPLIANCE_GATE
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Enforces mandatory pre-execution rules to ensure the Agent OS framework operates deterministically. This file acts as the absolute barrier before any codebase changes or deep analysis occurs.
|
|
5
|
+
|
|
6
|
+
## Mandatory Rules
|
|
7
|
+
|
|
8
|
+
Before executing any `BUG`, `AUDIT`, `ENHANCEMENT`, `NEW PAGE`, or `TEST` task, the agent MUST strictly adhere to the following sequence:
|
|
9
|
+
|
|
10
|
+
1. **Load Entrypoint:** Agent MUST load `ENTRYPOINT.md`.
|
|
11
|
+
2. **Load Workspace:** Agent MUST load `WORKSPACE_MAP.md` if available.
|
|
12
|
+
3. **Validate Knowledge:** Agent MUST validate `.agent-os/project/`.
|
|
13
|
+
4. **Auto-Onboarding:** If project knowledge is missing or incomplete, agent MUST run `project-onboarding` automatically.
|
|
14
|
+
5. **Load Skill:** Agent MUST load the matching skill before analyzing source code.
|
|
15
|
+
6. **Pass Checklist:** Agent MUST not produce a final answer before the compliance checklist passes.
|
|
16
|
+
|
|
17
|
+
## Explicit Execution Block
|
|
18
|
+
> [!CAUTION]
|
|
19
|
+
> DO NOT perform direct file audit, direct bug fix, or direct code change before Agent OS compliance gate passes.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Framework Auditor
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To provide Agent OS with the capability to perform self-healing diagnostics, ensuring the local instance remains structurally sound, secure, and production-ready.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Audit repository structure ensuring all required files exist.
|
|
8
|
+
- Audit skills for missing `workflow.md`, `checklist.md`, or `examples.md`.
|
|
9
|
+
- Audit project onboarding templates for dead or empty documentation.
|
|
10
|
+
- Audit IDE adapters and installer scripts for version drift.
|
|
11
|
+
- Generate a Framework Health Score (0-100).
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
1. **Trigger Recognition**: User invokes `AUDIT FRAMEWORK`.
|
|
15
|
+
2. **Scan Structure**: Agent verifies existence of `core/`, `skills/`, `templates/`, `adapters/`.
|
|
16
|
+
3. **Scan Skills**: For each directory in `skills/`, agent verifies standard file compliance.
|
|
17
|
+
4. **Scan Knowledge**: Agent checks `.agent-os/project/` for empty or missing mandatory templates.
|
|
18
|
+
5. **Score Generation**: Agent calculates a percentage score based on missing constraints.
|
|
19
|
+
6. **Self-Healing**: If a critical file is missing or malformed, the agent proposes regenerating it.
|
|
20
|
+
7. **Report**: Agent outputs the `Framework Health Score` to the user.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
```txt
|
|
24
|
+
USER: AUDIT FRAMEWORK
|
|
25
|
+
AGENT:
|
|
26
|
+
- Scanning Structure... [OK]
|
|
27
|
+
- Scanning Skills... [WARNING: bug-fix/examples.md is empty]
|
|
28
|
+
- Scanning Adapters... [OK]
|
|
29
|
+
Health Score: 95/100
|
|
30
|
+
Action: Regenerating bug-fix/examples.md...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
> [!NOTE]
|
|
35
|
+
> The Auditor must not modify user source code. It only targets `.agent-os/` internal framework files.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Knowledge Regenerator
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To dynamically update, merge, or overwrite specific Project Knowledge templates without destroying manual user overrides or requiring a complete repository re-scan.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Regenerate outdated knowledge identified by the `KNOWLEDGE_VALIDATOR`.
|
|
8
|
+
- Safely merge new architectural findings into existing templates.
|
|
9
|
+
- Update the system's global project understanding silently.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
1. **Receive Flags**: Obtain the list of stale templates from `KNOWLEDGE_VALIDATOR.md`.
|
|
13
|
+
2. **Targeted Scan**: Perform an isolated scan on the relevant modules (e.g., if Database Rules are stale, scan only the database layer).
|
|
14
|
+
3. **Merge Logic**:
|
|
15
|
+
- Read the existing template.
|
|
16
|
+
- Retain custom user notes (usually marked in `> [!NOTE]` blocks).
|
|
17
|
+
- Overwrite outdated technical specifications with newly detected facts.
|
|
18
|
+
4. **Commit Updates**: Save the new content into `.agent-os/project/`.
|
|
19
|
+
5. **Return Control**: Hand execution back to the `SKILL_ORCHESTRATOR.md` to resume the user's original task.
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
```txt
|
|
23
|
+
REGENERATOR: Updating `TECH_STACK.md`...
|
|
24
|
+
REGENERATOR: Merging new dependency `zustand` into State Management.
|
|
25
|
+
REGENERATOR: Update complete. Returning control to Orchestrator.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Notes
|
|
29
|
+
> [!NOTE]
|
|
30
|
+
> The Regenerator must prioritize non-destructive updates. If in doubt about a conflict, preserve the existing text and append the new findings below it.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Knowledge Validator
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To ensure that existing Project Knowledge correctly reflects the active state of the repository, preventing Agent OS from hallucinating or using stale architectural context.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Validate generated knowledge templates against actual source code files.
|
|
8
|
+
- Detect stale knowledge (e.g., `TECH_STACK.md` says React, but the project is now Vue).
|
|
9
|
+
- Detect missing knowledge (e.g., `DATABASE_RULES.md` says N/A, but a Prisma schema was recently added).
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
1. **Trigger**: Invoked by `AUTO_PROJECT_DETECTOR` when a major file changes, or invoked periodically by the Orchestrator.
|
|
13
|
+
2. **Cross-Reference**:
|
|
14
|
+
- Compare `TECH_STACK.md` vs `package.json` or `go.mod`.
|
|
15
|
+
- Compare `ARCHITECTURE.md` vs actual folder structure.
|
|
16
|
+
- Compare `DEPENDENCY_MAP.md` vs workspace setups.
|
|
17
|
+
3. **Flag Stale Elements**: Mark discrepancies.
|
|
18
|
+
4. **Trigger Regeneration**: If discrepancies exceed the threshold, pass the list of flagged templates to `KNOWLEDGE_REGENERATOR.md`.
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
```txt
|
|
22
|
+
VALIDATOR: Checking `DATABASE_RULES.md`...
|
|
23
|
+
VALIDATOR: [STALE] Database rules show N/A, but `prisma/schema.prisma` found in workspace.
|
|
24
|
+
VALIDATOR: Triggering KNOWLEDGE_REGENERATOR for Database Rules.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
> [!WARNING]
|
|
29
|
+
> Do not invalidate custom manual rules added by developers unless they fundamentally conflict with new dependencies. Validate structural shifts, not minor text edits.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# PROJECT_CONTEXT_STANDARD
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Defines the strict project context standard for Agent OS.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Enforce standards during agent execution.
|
|
8
|
+
- Provide deterministic rules for evaluation.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
1. Load this standard before executing skill.
|
|
12
|
+
2. Verify compliance during task execution.
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
See `examples/` directory for concrete examples.
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
> [!NOTE]
|
|
19
|
+
> Always prioritize existing implementation over general assumptions.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# QUALITY_GATES
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Defines the mandatory executable checks that must pass before Agent OS work is reported as complete.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Convert governance expectations into commands that can be rerun.
|
|
8
|
+
- Block completion when framework structure, runtime sync, tests, or report standards fail.
|
|
9
|
+
- Keep static checks local and deterministic unless an optional external scanner is explicitly configured.
|
|
10
|
+
|
|
11
|
+
## Required Commands
|
|
12
|
+
Run these commands before reporting a framework change as complete:
|
|
13
|
+
|
|
14
|
+
1. `npm run quality`
|
|
15
|
+
2. `npm run sync:runtime` when source files under `core/`, `skills/`, `templates/`, `validators/`, `hooks/`, or CLI scripts affect runtime behavior.
|
|
16
|
+
3. `git diff --check`
|
|
17
|
+
|
|
18
|
+
## PASS Criteria
|
|
19
|
+
- `npm run quality` exits with code `0`.
|
|
20
|
+
- `npm run quality:static` exits with code `0`.
|
|
21
|
+
- `npm test` reports zero failed tests.
|
|
22
|
+
- `npm run validate` reports `Framework validation passed`.
|
|
23
|
+
- Runtime `.agent-os/` files are synchronized when runtime-facing source changes.
|
|
24
|
+
- No generated report uses forbidden placeholder markers.
|
|
25
|
+
|
|
26
|
+
## FAIL Criteria
|
|
27
|
+
- Any required command exits non-zero.
|
|
28
|
+
- A skill is missing `SKILL.md`, `workflow.md`, `checklist.md`, or `report-template.md`.
|
|
29
|
+
- A report template is missing any standard section.
|
|
30
|
+
- Runtime project knowledge is missing `PROJECT_PROFILE.md`, `TECH_STACK.md`, `ARCHITECTURE.md`, or `WORKSPACE_MAP.md`.
|
|
31
|
+
- A completion claim is made without fresh command evidence.
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
1. Determine whether the task changes source, runtime, tests, or docs.
|
|
35
|
+
2. Add or update regression tests before implementation.
|
|
36
|
+
3. Run `npm run quality`.
|
|
37
|
+
4. If runtime-facing files changed, run `npm run sync:runtime` and rerun `npm run quality`.
|
|
38
|
+
5. Report the exact commands and outcomes.
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
> [!NOTE]
|
|
42
|
+
> External Sonar or hosted static-analysis services can be added later, but the local quality gate must remain runnable without network access.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# REPORTING_STANDARD
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Defines the required structure and evidence rules for Agent OS reports, exports, and notifications.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Keep human-facing reports consistent across CLI commands and skill workflows.
|
|
8
|
+
- Ensure every pass/fail claim includes evidence.
|
|
9
|
+
- Prevent placeholder or unverifiable report content from being delivered.
|
|
10
|
+
|
|
11
|
+
## Required Sections
|
|
12
|
+
Every execution report must include:
|
|
13
|
+
1. Executive Summary
|
|
14
|
+
2. Scope
|
|
15
|
+
3. Knowledge Confidence
|
|
16
|
+
4. Knowledge Classification
|
|
17
|
+
5. Traceability Matrix
|
|
18
|
+
6. Evidence
|
|
19
|
+
7. Root Cause
|
|
20
|
+
8. Impact
|
|
21
|
+
9. Recommendation
|
|
22
|
+
10. Quality Gate
|
|
23
|
+
11. Enterprise Readiness
|
|
24
|
+
12. Final Decision
|
|
25
|
+
|
|
26
|
+
## Evidence Requirements
|
|
27
|
+
- Include exact command names for tests, validation, quality gates, and report notifications.
|
|
28
|
+
- Include run IDs and step statuses when reporting run lifecycle outcomes.
|
|
29
|
+
- Include Telegram dry-run payload path or live-send status when Telegram notification is used.
|
|
30
|
+
- State `N/A. Reason: ...` only when a section is structurally required but not applicable to the task.
|
|
31
|
+
|
|
32
|
+
## Final Decision
|
|
33
|
+
Allowed final decisions:
|
|
34
|
+
- `PASS` when implementation executed and all required gates passed.
|
|
35
|
+
- `CONDITIONAL PASS` when only a validated plan or dry-run execution was produced.
|
|
36
|
+
- `FAIL` when any required validation failed.
|
|
37
|
+
- `BLOCKED` when the task cannot proceed without missing credentials, permissions, or user input.
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
1. Render reports from structured run data when available.
|
|
41
|
+
2. Validate required sections before saving or delivering a report.
|
|
42
|
+
3. Export reports through configured channels only when the channel is enabled.
|
|
43
|
+
4. For Telegram, require explicit dry-run or send mode.
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
> [!NOTE]
|
|
47
|
+
> Reports must summarize evidence; they must not expose secrets such as Telegram bot tokens.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Skill Orchestrator V2
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
To manage the end-to-end lifecycle of an agentic task, serving as the central nervous system that seamlessly handles Auto-Onboarding, task routing, and sequential skill chaining natively.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Intercept tasks and validate environment readiness before executing them.
|
|
8
|
+
- Ensure project knowledge is fresh and present.
|
|
9
|
+
- Chain skills sequentially (e.g., Fix Bug -> Audit Security -> Run E2E Tests).
|
|
10
|
+
- Maintain context across skill transitions.
|
|
11
|
+
- Aggregate execution reports into a single final output.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
1. **Receive Task**: Parse the user's initial prompt.
|
|
15
|
+
2. **Detect Task Type**: Route to the correct primary skill (`BUG:`, `ENHANCEMENT:`, etc.).
|
|
16
|
+
3. **Validate Project Knowledge**:
|
|
17
|
+
- Invoke `AUTO_PROJECT_DETECTOR.md` to ensure `.agent-os/project/` exists.
|
|
18
|
+
- Invoke `KNOWLEDGE_VALIDATOR.md` to ensure knowledge is not stale.
|
|
19
|
+
4. **Auto-Onboard (If Required)**: If knowledge is missing or invalid, invoke `AGENT_OS_BOOTSTRAP.md` or `KNOWLEDGE_REGENERATOR.md` in the background. Do not ask the user for permission.
|
|
20
|
+
5. **Execute Primary Skill**: Pass context to the required skill (e.g., `bug-fix`).
|
|
21
|
+
6. **Execute Dependent Skills**: Run chained tasks (e.g., `audit` and `selenium-e2e`) passing context forward.
|
|
22
|
+
7. **Produce Report**: Compile the final results into a master report.
|
|
23
|
+
|
|
24
|
+
## CLI Planning
|
|
25
|
+
The `agent-os orchestrate "<prompt>"` command produces a deterministic sequential execution plan without executing skills. The plan includes:
|
|
26
|
+
- Detected trigger.
|
|
27
|
+
- Ordered skill chain.
|
|
28
|
+
- Step dependencies.
|
|
29
|
+
- Validation diagnostics with `PASS` or `FAIL` status.
|
|
30
|
+
- Master report section skeleton.
|
|
31
|
+
|
|
32
|
+
The planner fails closed when prompts use unsupported triggers, required skills are missing from source or runtime, or dependency order is invalid. Automatic execution and parallel dispatch are separate milestones and must remain gated by dependency validation.
|
|
33
|
+
|
|
34
|
+
Use `--write-report <path>` to render a master report stub from a validated plan. Report writing is blocked when validation fails.
|
|
35
|
+
|
|
36
|
+
Use `--run-root <dir>` to create an execution run directory from a validated plan. The run directory contains:
|
|
37
|
+
- `plan.json`
|
|
38
|
+
- `steps.json`
|
|
39
|
+
- `master-report.md`
|
|
40
|
+
|
|
41
|
+
Use `--run-id <id>` only when a deterministic run directory name is required, such as in tests.
|
|
42
|
+
|
|
43
|
+
Use `agent-os run-step --run-dir <dir> --step <number> --status <status>` to update execution state inside an existing run directory. Allowed statuses are `pending`, `running`, `passed`, `failed`, and `blocked`. A step can only move to `running` or `passed` after every dependency in `dependsOn` is already `passed`. When a step is marked `failed`, downstream dependent steps are automatically marked `blocked`. This updates `steps.json`, `plan.json`, and `master-report.md`.
|
|
44
|
+
|
|
45
|
+
Use `agent-os run-status --run-dir <dir>` to summarize an execution run. The command returns total step count, counts for each state, and a derived run status of `pending`, `running`, `failed`, or `complete`.
|
|
46
|
+
|
|
47
|
+
Use `agent-os run-list --run-root <dir>` to summarize every valid run directory inside a run root.
|
|
48
|
+
|
|
49
|
+
## Examples
|
|
50
|
+
```txt
|
|
51
|
+
USER: BUG: The login page crashes. Fix it, audit the auth module, and test it.
|
|
52
|
+
ORCHESTRATOR:
|
|
53
|
+
1. Validating Knowledge... [Missing! Triggering Auto-Onboarding...]
|
|
54
|
+
2. Auto-Onboarding... [Done]
|
|
55
|
+
3. Loading `bug-fix` skill... [Done]
|
|
56
|
+
4. Passing changes to `audit` skill... [Done]
|
|
57
|
+
5. Passing UI changes to `selenium-e2e` skill... [Done]
|
|
58
|
+
Master Report Generated.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
> [!IMPORTANT]
|
|
63
|
+
> If an unrecoverable failure occurs during a skill execution, the orchestrator must halt the chain immediately and inform the user.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# TASK_ROUTER
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Defines the strict task router for Agent OS.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Enforce standards during agent execution.
|
|
8
|
+
- Provide deterministic rules for evaluation.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
1. Load this standard before executing skill.
|
|
12
|
+
2. Verify compliance during task execution.
|
|
13
|
+
|
|
14
|
+
## Strict Routing
|
|
15
|
+
|
|
16
|
+
### AUDIT
|
|
17
|
+
When the `AUDIT:` trigger is detected, the router MUST route through the following sequence:
|
|
18
|
+
1. `COMPLIANCE_GATE`
|
|
19
|
+
2. `AUTO_PROJECT_DETECTOR`
|
|
20
|
+
3. `KNOWLEDGE_VALIDATOR`
|
|
21
|
+
4. `SKILL_ORCHESTRATOR`
|
|
22
|
+
5. `audit` skill
|
|
23
|
+
6. `TRACEABILITY_STANDARD`
|
|
24
|
+
7. `REPORTING_STANDARD`
|
|
25
|
+
|
|
26
|
+
**Rule:** `AUDIT` must never be limited to frontend files when backend or service folders exist in `WORKSPACE_MAP.md`.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
See `examples/` directory for concrete examples.
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
> [!NOTE]
|
|
33
|
+
> Always prioritize existing implementation over general assumptions.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# TRACEABILITY_STANDARD
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Defines the minimum traceability chain that every Agent OS task must preserve from prompt to evidence.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Make task routing auditable.
|
|
8
|
+
- Link implementation changes to validation evidence.
|
|
9
|
+
- Ensure frontend, backend, service, runtime, and reporting impacts are not reviewed in isolation when a workspace map shows multiple roots.
|
|
10
|
+
|
|
11
|
+
## Traceability Layers
|
|
12
|
+
- **Layer 1: User Trigger** - Original prompt and detected trigger.
|
|
13
|
+
- **Layer 2: Entrypoint** - `ENTRYPOINT.md` and mandatory pre-execution checklist.
|
|
14
|
+
- **Layer 3: Router** - `core/TASK_ROUTER.md` trigger and ordered skill chain.
|
|
15
|
+
- **Layer 4: Project Knowledge** - `.agent-os/project/` files used for context.
|
|
16
|
+
- **Layer 5: Skill Contract** - Matching `skills/<skill>/SKILL.md`, `workflow.md`, and `checklist.md`.
|
|
17
|
+
- **Layer 6: Source Changes** - Exact files changed.
|
|
18
|
+
- **Layer 7: Runtime Sync** - `.agent-os/` runtime files affected by source changes.
|
|
19
|
+
- **Layer 8: Run Lifecycle** - `plan.json`, `steps.json`, and `master-report.md` updates.
|
|
20
|
+
- **Layer 9: Report Channel** - Export or notification channel used, when applicable.
|
|
21
|
+
- **Layer 10: Evidence** - Test, validation, static-analysis, and notification outputs.
|
|
22
|
+
|
|
23
|
+
## Required Traceability Output
|
|
24
|
+
Every final report must include:
|
|
25
|
+
- Trigger and skill chain.
|
|
26
|
+
- Files inspected and files changed.
|
|
27
|
+
- Tests and validation commands run.
|
|
28
|
+
- Any skipped validation with a concrete reason.
|
|
29
|
+
- Notification channel evidence when Telegram or another report channel is used.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
1. Read the entrypoint and router.
|
|
33
|
+
2. Resolve the task to a skill chain.
|
|
34
|
+
3. Inspect project knowledge and impacted files.
|
|
35
|
+
4. Execute changes and update run lifecycle artifacts when a run directory is used.
|
|
36
|
+
5. Attach Layer 10 evidence before reporting completion.
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
> [!NOTE]
|
|
40
|
+
> If `WORKSPACE_MAP.md` lists frontend and backend or service roots, audits and enhancements must account for cross-root impact.
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adityaaria/agent-os",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Portable Agent OS for skill-based coding workflows across IDEs and projects.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"bin",
|
|
8
|
+
"scripts",
|
|
9
|
+
"core",
|
|
10
|
+
"skills",
|
|
11
|
+
"templates",
|
|
12
|
+
"adapters",
|
|
13
|
+
"AGENTS.md",
|
|
14
|
+
"ENTRYPOINT.md",
|
|
15
|
+
"AGENT_OS_BOOTSTRAP.md"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"agent-os": "bin/agent-os.mjs"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "node --test",
|
|
22
|
+
"validate": "node scripts/validate-framework.mjs",
|
|
23
|
+
"quality": "npm run quality:static && npm test && npm run validate",
|
|
24
|
+
"quality:static": "node scripts/quality-static.mjs",
|
|
25
|
+
"sync:runtime": "node scripts/sync-runtime.mjs",
|
|
26
|
+
"setup": "node scripts/setup-wizard.mjs"
|
|
27
|
+
}
|
|
28
|
+
}
|