Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ The rise of AI-powered code generation tools like Cursor, GitHub Copilot, and Cl
- **Agents don't know how to configure their environment** - Agents need to run certain commands that usually require some sort of environment (aka how do you run E2E tests without your `.env` setup properly)

We need our agents to not only generate code, but validate that the code they wrote:
- ✅ passes tests
- ✅ is formatted correctly
- ✅ can transpile

- ✅ actually works, aka it passes tests
- ✅ is formatted correctly, aka it passes linting and formatting
- ✅ can transpile, aka it passes type-checking
- ✅ can run, aka it can be run locally

## The Standard

Expand Down Expand Up @@ -53,7 +55,7 @@ What this does in this case is allow for the `scripts` (aka `tasks`) to run usin

#### Monorepository

The `agents.js` standard also supports the concept of monorepositories:
The `agents.js` standard also supports the concept of monorepos:

```json
{
Expand Down Expand Up @@ -111,4 +113,8 @@ You will need to configure the agents to utilize these commands, by updating you

### Examples

Below are a list of open source projects that have implemented the `agents.js` standard:

- [Viteval](https://github.com/viteval/viteval)

You can view pre-built examples [here](./examples).
46 changes: 46 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Configuration

You need to provide basic information about your project to the agent




.you can this in one of the following ways:

- Detection: let the agent detect the project type and configuration.
- Manual: provide the information manually.

## Manual

Configure the

```markdown
## Project Details


```

## Detection

```markdown
## Project Details

### Package Manager

You need to determine which package manager you are using:

- If there is a `package-lock.json` file, you are using `npm`.
- If there is a `yarn.lock` file, you are using `yarn`.
- If there is a `pnpm-lock.yaml` file, you are using `pnpm`.

### Monorepos

You need to determine if you are using a monorepo, check the following in order:

1. If there is a `turbo.json` file, you are using a `turbo` monorepo.
2. If there is a `lerna.json` file, you are using a `lerna` monorepo.
3. If there is a `nx.json` file, you are using a `nx` monorepo.
4. If there is a `pnpm-workspace.yaml` file, you are using a `pnpm` monorepo.
5. If the project has a `package.json` file in the root check if there is a "workspaces" field, that you are using a `npm` or `yarn` monorepo.
```

17 changes: 17 additions & 0 deletions examples/dotenv/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
}
}
30 changes: 30 additions & 0 deletions examples/dotenv/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions examples/dotenv/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@examples/dotenv",
"description": "An example using dotenv",
"scripts": {
"agents": "dotenv -e .env.dev -- npm run",
"test": "node --test src/index.test.ts",
"check": "biome check src/",
"fix": "biome check --write src/",
"typecheck": "tsc --noEmit",
"build": "tsc",
"validate": "npm run check && npm run typecheck && npm run test"
},
"devDependencies": {
"@types/node": "^24.3.0",
"@biomejs/biome": "^1.8.3",
"typescript": "^5.0.0"
}
}
7 changes: 7 additions & 0 deletions examples/dotenv/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test } from "node:test";
import assert from "node:assert";
import { openPodBayDoors } from "./index";

test("should return false", () => {
assert.strictEqual(openPodBayDoors(), false);
});
4 changes: 4 additions & 0 deletions examples/dotenv/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function openPodBayDoors() {
console.log("I'm sorry, Dave. I'm afraid I can't do that.");
return false;
}
14 changes: 14 additions & 0 deletions examples/dotenv/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
17 changes: 17 additions & 0 deletions examples/infisical/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
}
}
30 changes: 30 additions & 0 deletions examples/infisical/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions examples/infisical/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@examples/npm",
"description": "An example using npm",
"scripts": {
"agents": "CI=true npm run",
"test": "node --test src/index.test.ts",
"check": "biome check src/",
"fix": "biome check --write src/",
"typecheck": "tsc --noEmit",
"build": "tsc",
"validate": "npm run check && npm run typecheck && npm run test"
},
"devDependencies": {
"@types/node": "^24.3.0",
"@biomejs/biome": "^1.8.3",
"typescript": "^5.0.0"
}
}
7 changes: 7 additions & 0 deletions examples/infisical/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test } from "node:test";
import assert from "node:assert";
import { openPodBayDoors } from "./index";

test("should return false", () => {
assert.strictEqual(openPodBayDoors(), false);
});
4 changes: 4 additions & 0 deletions examples/infisical/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function openPodBayDoors() {
console.log("I'm sorry, Dave. I'm afraid I can't do that.");
return false;
}
14 changes: 14 additions & 0 deletions examples/infisical/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
17 changes: 17 additions & 0 deletions examples/npm/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
}
}
30 changes: 30 additions & 0 deletions examples/npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions examples/npm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@examples/infisical",
"description": "An example using infisical",
"scripts": {
"agents": "infisical run --projectId=agent-project --env=dev --silent -- npm run",
"test": "node --test src/index.test.ts",
"check": "biome check src/",
"fix": "biome check --write src/",
"typecheck": "tsc --noEmit",
"build": "tsc",
"validate": "npm run check && npm run typecheck && npm run test"
},
"devDependencies": {
"@types/node": "^24.3.0",
"@biomejs/biome": "^1.8.3",
"typescript": "^5.0.0"
}
}
7 changes: 7 additions & 0 deletions examples/npm/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test } from "node:test";
import assert from "node:assert";
import { openPodBayDoors } from "./index";

test("should return false", () => {
assert.strictEqual(openPodBayDoors(), false);
});
4 changes: 4 additions & 0 deletions examples/npm/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function openPodBayDoors() {
console.log("I'm sorry, Dave. I'm afraid I can't do that.");
return false;
}
14 changes: 14 additions & 0 deletions examples/npm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
Loading