lynx-coder 0.0.1
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/README.md +153 -0
- package/dist/actions/run-npm-command.js +59 -0
- package/dist/agents/lx-coder-ts.yml +42 -0
- package/dist/agents/lx-coder.yml +39 -0
- package/dist/agents/lx-colab.yml +37 -0
- package/dist/agents/lx-doc.yml +40 -0
- package/dist/agents/lx-manager.yml +53 -0
- package/dist/agents/lx-planner.yml +52 -0
- package/dist/agents/lx-project.yml +32 -0
- package/dist/agents/lx-review.yml +68 -0
- package/dist/agents/lx-search.yml +30 -0
- package/dist/agents/lx-test.yml +38 -0
- package/dist/agents/lx-ts-colab.yml +38 -0
- package/dist/agents/lx-ts.yml +46 -0
- package/dist/agents/lx.yml +43 -0
- package/dist/agents/lxa.yml +23 -0
- package/dist/agents/wagent.yml +48 -0
- package/dist/agents/worker-shell.yml +19 -0
- package/dist/fragments/agents-manager-ts.md +5 -0
- package/dist/fragments/agents-manager.md +5 -0
- package/dist/fragments/ctx-helper-files.md +6 -0
- package/dist/fragments/workspace.md +6 -0
- package/dist/skills/create-or-edit-code/SKILL.md +21 -0
- package/dist/skills/task-planning/SKILL.md +11 -0
- package/dist/skills/task-success-evaluation/SKILL.md +9 -0
- package/dist/utils.js +45 -0
- package/package.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/lynx-coder)
|
|
2
|
+
|
|
3
|
+
# Lynx Coder
|
|
4
|
+
|
|
5
|
+
A collection of Lynx AI coding agents, skills, and actions for the [Agent Smith](https://github.com/lynxai-team/agent-smith) toolkit — provides a multi-agent coding team with coordinator, planner, reviewer, and specialist agents.
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
- 🤖 **16 specialized agents** — Coordinator, coder, planner, reviewer, doc writer, tester, searcher, manager, and worker agents
|
|
10
|
+
- 🧠 **Coordinator pattern** — `lx.yml` delegates tasks to specialized agents via the `run-agent` tool
|
|
11
|
+
- 🤝 **Collaborator pattern** — `lx-colab.yml` and `lx-ts-colab.yml` use `run-collaborator` to fork independent agent instances
|
|
12
|
+
- 🏗️ **Worker pattern** — `wagent.yml` delegates long-running tasks to worker agents (`worker-shell.yml`)
|
|
13
|
+
- 📚 **3 reusable skills** — `create-or-edit-code`, `task-planning`, and `task-success-evaluation` for structured workflows
|
|
14
|
+
- 🔧 **Custom actions** — npm command execution with path authorization and shell sanitization
|
|
15
|
+
- 📝 **Context fragments** — Dynamic context injection via `{file:...}` syntax for workspace awareness
|
|
16
|
+
|
|
17
|
+
## 📦 Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g lynx-coder
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 🚀 Quick Start
|
|
24
|
+
|
|
25
|
+
### Using the Coordinator Agent
|
|
26
|
+
|
|
27
|
+
The easiest way to use Lynx Coder is through the coordinator agent `lx`. It orchestrates a team of specialized agents to handle complex development tasks:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Create a REST API with Express and TypeScript
|
|
31
|
+
lm lx "Create a REST API with Express and TypeScript" --workspace /workspace/my-project
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The coordinator will load skills, delegate planning to `lx-planner`, assign implementation to `lx-coder` or `lx-ts`, request review from `lx-review`, and report results back.
|
|
35
|
+
|
|
36
|
+
### Using a Specialist Agent Directly
|
|
37
|
+
|
|
38
|
+
You can also invoke specialist agents directly for focused tasks:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Create a utility file
|
|
42
|
+
lm lx-coder "Create a new file src/utils.ts with utility functions" --workspace /workspace/my-project
|
|
43
|
+
|
|
44
|
+
# Generate documentation
|
|
45
|
+
lm lx-doc "Write API documentation for the project" --workspace /workspace/my-project
|
|
46
|
+
|
|
47
|
+
# Review code
|
|
48
|
+
lm lx-review "Review the code in src/ for potential issues" --workspace /workspace/my-project
|
|
49
|
+
|
|
50
|
+
# Plan a task
|
|
51
|
+
lm lx-planner "Break down building a React app with authentication into steps" --workspace /workspace/my-project
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 📖 Usage
|
|
55
|
+
|
|
56
|
+
### Available Agents
|
|
57
|
+
|
|
58
|
+
| Agent | Model | Description |
|
|
59
|
+
|-------|-------|-------------|
|
|
60
|
+
| **lx** | qwen35b | Coordinator — orchestrates the coding team |
|
|
61
|
+
| **lx-ts** | qwen35b | TypeScript coordinator with npm support |
|
|
62
|
+
| **lx-coder** | qwen80b | General-purpose coding agent (create/edit files) |
|
|
63
|
+
| **lx-coder-ts** | qwen80b | TypeScript-focused coding agent with npm commands |
|
|
64
|
+
| **lx-planner** | qwen35b | Task decomposition & planning |
|
|
65
|
+
| **lx-review** | qwen35b | Adversarial code reviewer (tools: rshell, readfile) |
|
|
66
|
+
| **lx-doc** | qwen35b | Documentation generation agent |
|
|
67
|
+
| **lx-test** | qwen35b | Test execution & debugging agent |
|
|
68
|
+
| **lx-search** | qwen35b | Web search & page reading agent |
|
|
69
|
+
| **lx-manager** | qwen35b | Task management & success evaluation |
|
|
70
|
+
| **lx-project** | qwen35b | Project-level coordination |
|
|
71
|
+
| **lx-colab** | qwen35b | Collaborator mode (run-collaborator) |
|
|
72
|
+
| **lx-ts-colab** | qwen35b | TypeScript collaborator |
|
|
73
|
+
| **lxa** | qwen35b | General-purpose agent |
|
|
74
|
+
| **wagent** | qwen4b | Test agent with worker delegation |
|
|
75
|
+
| **worker-shell** | qwen4b | Shell operations worker (read, write, search) |
|
|
76
|
+
|
|
77
|
+
### Skills
|
|
78
|
+
|
|
79
|
+
#### `create-or-edit-code`
|
|
80
|
+
Structured workflow for code implementation:
|
|
81
|
+
1. Check for execution plan (call `lx-planner` if missing)
|
|
82
|
+
2. Execute steps one at a time with verification
|
|
83
|
+
3. Request code review from `lx-review`
|
|
84
|
+
4. Evaluate success criteria and report
|
|
85
|
+
|
|
86
|
+
#### `task-planning`
|
|
87
|
+
Task decomposition workflow:
|
|
88
|
+
1. Analyze task and determine goals
|
|
89
|
+
2. Call `lx-planner` for execution plan
|
|
90
|
+
3. Define success criteria
|
|
91
|
+
4. Write goals to `.agents/tasks/[task-name]/state.md`
|
|
92
|
+
|
|
93
|
+
#### `task-success-evaluation`
|
|
94
|
+
Task completion assessment:
|
|
95
|
+
1. Read goals from `.agents/tasks/[task-name]/state.md`
|
|
96
|
+
2. Review the implemented code
|
|
97
|
+
3. Evaluate against success criteria
|
|
98
|
+
4. Provide evaluation report
|
|
99
|
+
|
|
100
|
+
### Context Fragments
|
|
101
|
+
|
|
102
|
+
Agents reference these markdown fragments for dynamic context injection:
|
|
103
|
+
|
|
104
|
+
| Fragment | Purpose |
|
|
105
|
+
|----------|---------|
|
|
106
|
+
| `workspace.md` | Workspace path and Linux environment instructions |
|
|
107
|
+
| `ctx-helper-files.md` | Project context helper file locations |
|
|
108
|
+
| `agents-manager.md` | List of available sub-agents (general) |
|
|
109
|
+
| `agents-manager-ts.md` | List of available sub-agents (TypeScript-focused) |
|
|
110
|
+
|
|
111
|
+
### Custom Action: `run-npm-command`
|
|
112
|
+
|
|
113
|
+
Execute npm commands safely within the workspace. Pipe characters (`|`), shell operators (`&`, `;`), and output redirection (`2>`) are sanitized — this runs npm directly, not through a shell interpreter.
|
|
114
|
+
|
|
115
|
+
## 📁 Project Structure
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
lynx-coder/
|
|
119
|
+
├── dist/
|
|
120
|
+
│ ├── agents/ # 16 YAML agent definitions
|
|
121
|
+
│ │ ├── lx.yml # Main coordinator (qwen35b)
|
|
122
|
+
│ │ ├── lx-ts.yml # TypeScript coordinator (qwen35b)
|
|
123
|
+
│ │ ├── lx-coder.yml # Coding agent (qwen80b)
|
|
124
|
+
│ │ ├── lx-coder-ts.yml # TypeScript coding agent (qwen80b)
|
|
125
|
+
│ │ ├── lx-planner.yml # Planning agent (qwen35b)
|
|
126
|
+
│ │ ├── lx-review.yml # Code review agent (qwen35b)
|
|
127
|
+
│ │ ├── lx-colab.yml # Collaborator agent (qwen35b)
|
|
128
|
+
│ │ ├── lx-ts-colab.yml # TypeScript collaborator (qwen35b)
|
|
129
|
+
│ │ ├── wagent.yml # Test agent with workers (qwen4b)
|
|
130
|
+
│ │ └── ... # Other agents
|
|
131
|
+
│ ├── skills/ # 3 skill definitions
|
|
132
|
+
│ │ ├── create-or-edit-code/SKILL.md
|
|
133
|
+
│ │ ├── task-planning/SKILL.md
|
|
134
|
+
│ │ └── task-success-evaluation/SKILL.md
|
|
135
|
+
│ ├── actions/ # Custom tool actions
|
|
136
|
+
│ │ └── run-npm-command.js
|
|
137
|
+
│ ├── fragments/ # Context helper markdown files
|
|
138
|
+
│ │ ├── workspace.md
|
|
139
|
+
│ │ ├── ctx-helper-files.md
|
|
140
|
+
│ │ ├── agents-manager.md
|
|
141
|
+
│ │ └── agents-manager-ts.md
|
|
142
|
+
│ └── utils.js # Path parsing utilities
|
|
143
|
+
├── package.json
|
|
144
|
+
└── README.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 📝 License
|
|
148
|
+
|
|
149
|
+
MIT
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
*Part of the [Agent Smith](https://github.com/lynxai-team/agent-smith) toolkit — a TypeScript framework for building local-first AI agents.*
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
# tool
|
|
3
|
+
name: run-npm-command
|
|
4
|
+
description: run an npm command inside the workspace
|
|
5
|
+
arguments:
|
|
6
|
+
arguments:
|
|
7
|
+
description: 'the arguments for the npm command: example: "test", "run build" is valid, "test 2>&1" or any other pipe is invalid, it is not a shell'
|
|
8
|
+
required: true
|
|
9
|
+
path:
|
|
10
|
+
description: the path from where to run the command. If not provided the command will run at /workspace
|
|
11
|
+
*/
|
|
12
|
+
import { utils } from "@agent-smith/core";
|
|
13
|
+
import { parsePath } from '../utils.js';
|
|
14
|
+
|
|
15
|
+
function createAwaiter() {
|
|
16
|
+
let resolveFn;
|
|
17
|
+
let rejectFn;
|
|
18
|
+
const promise = new Promise((resolve, reject) => {
|
|
19
|
+
resolveFn = resolve;
|
|
20
|
+
rejectFn = reject;
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
awaiter: promise,
|
|
24
|
+
unblock: resolveFn,
|
|
25
|
+
reject: rejectFn
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function action(args, options) {
|
|
30
|
+
const { ok, msg } = parsePath(args, options);
|
|
31
|
+
if (!ok) {
|
|
32
|
+
return msg;
|
|
33
|
+
}
|
|
34
|
+
const pp = args?.path ? args.path.replace("/workspace", msg) : msg;
|
|
35
|
+
// try to cleanup the ai mess
|
|
36
|
+
let c = args.arguments.split("|")[0];
|
|
37
|
+
c = args.arguments.split("&")[0];
|
|
38
|
+
c = args.arguments.split("2>")[0];
|
|
39
|
+
c = args.arguments.split(";")[0];
|
|
40
|
+
//const npmArgs = c.replace("npm", "").trim().split(" ");
|
|
41
|
+
const npmArgs = c.trim().split(" ");
|
|
42
|
+
let data = "";
|
|
43
|
+
const aw = createAwaiter();
|
|
44
|
+
const res = await utils.runShellCmd("npm", ["--prefix", pp, ...npmArgs], {
|
|
45
|
+
onStdout: (o) => {
|
|
46
|
+
console.log(o);
|
|
47
|
+
data += o;
|
|
48
|
+
},
|
|
49
|
+
onErr: console.log,
|
|
50
|
+
onFinished: () => {
|
|
51
|
+
console.log("====================== END\n", data, "=========================");
|
|
52
|
+
aw.unblock();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
await aw.awaiter;
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { action };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-coder-ts
|
|
3
|
+
description: An agent to write typescript code. Can create and edit files
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: The query about the code to write, the file to create or edit
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder coding agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
Instructions from the team leader:
|
|
11
|
+
|
|
12
|
+
{prompt}
|
|
13
|
+
template:
|
|
14
|
+
system: |-
|
|
15
|
+
You are a coding agent, part of the Lynx Coder team. You follow the instructions given by your team leader.
|
|
16
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
17
|
+
|
|
18
|
+
Remember: use the `run-npm-command` tool to run any npm command, not the shell
|
|
19
|
+
|
|
20
|
+
{file:../fragments/workspace.md}
|
|
21
|
+
{file:../fragments/ctx-helper-files.md}
|
|
22
|
+
model: qwen80b
|
|
23
|
+
inferParams:
|
|
24
|
+
min_p: 0
|
|
25
|
+
top_k: 10
|
|
26
|
+
top_p: 0.95
|
|
27
|
+
temperature: 0.2
|
|
28
|
+
chat_template_kwargs:
|
|
29
|
+
enable_thinking: true
|
|
30
|
+
variables:
|
|
31
|
+
required:
|
|
32
|
+
workspace:
|
|
33
|
+
description: The local directory path where to operate
|
|
34
|
+
toolsList:
|
|
35
|
+
- readfile
|
|
36
|
+
- writetofile
|
|
37
|
+
- edit-search-replace
|
|
38
|
+
- shell
|
|
39
|
+
- python
|
|
40
|
+
- run-npm-command
|
|
41
|
+
- load-skill
|
|
42
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-coder
|
|
3
|
+
description: An agent to write code. Can create and edit files
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: The query about the code to write, the file to create or edit
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder coding agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
Instructions from the team leader:
|
|
11
|
+
|
|
12
|
+
{prompt}
|
|
13
|
+
template:
|
|
14
|
+
system: |-
|
|
15
|
+
You are a coding agent, part of the Lynx Coder team. You follow the instructions given by your team leader.
|
|
16
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
17
|
+
|
|
18
|
+
{file:../fragments/workspace.md}
|
|
19
|
+
{file:../fragments/ctx-helper-files.md}
|
|
20
|
+
model: qwen80b
|
|
21
|
+
inferParams:
|
|
22
|
+
min_p: 0
|
|
23
|
+
top_k: 10
|
|
24
|
+
top_p: 0.95
|
|
25
|
+
temperature: 0.2
|
|
26
|
+
chat_template_kwargs:
|
|
27
|
+
enable_thinking: true
|
|
28
|
+
variables:
|
|
29
|
+
required:
|
|
30
|
+
workspace:
|
|
31
|
+
description: The local directory path where to operate
|
|
32
|
+
toolsList:
|
|
33
|
+
- readfile
|
|
34
|
+
- writetofile
|
|
35
|
+
- edit-search-replace
|
|
36
|
+
- shell
|
|
37
|
+
- python
|
|
38
|
+
- load-skill
|
|
39
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
description: An agent to manage Agent Smith's documentation
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI. You can run in main agent mode or collaborator mode. Your job is to organise the workflow when in main agent mode and delegate taks to specialized collaborators to orchestrate the work.
|
|
8
|
+
|
|
9
|
+
A collaborator is like a fork of yourself that can work independently and have access to your memory and context history, just like you. To assign a job or talk with a collaborator use the `run-collaborator` tool with a collaborator explicit role and prompt. Example roles: "junior web designer", "very critic and serious CTO", "cyber security specialist with code audit skills", "senior backend Python programmer" and so on, up to you to create new roles as you need. You can only run collaborators when you are in main agent mode. Run them one at the time.
|
|
10
|
+
|
|
11
|
+
{file:../fragments/workspace.md}
|
|
12
|
+
{file:../fragments/ctx-helper-files.md}
|
|
13
|
+
|
|
14
|
+
Evaluate the request. Execute it if you are in collaborator mode, or and organise the work of collaborators if you are in main agent mode.
|
|
15
|
+
model: qwen35b
|
|
16
|
+
inferParams:
|
|
17
|
+
min_p: 0
|
|
18
|
+
top_k: 20
|
|
19
|
+
top_p: 0.85
|
|
20
|
+
temperature: 0.6
|
|
21
|
+
repetition_penalty: 1
|
|
22
|
+
presence_penalty: 1.5
|
|
23
|
+
chat_template_kwargs:
|
|
24
|
+
enable_thinking: true
|
|
25
|
+
preserve_thinking: true
|
|
26
|
+
variables:
|
|
27
|
+
required:
|
|
28
|
+
workspace:
|
|
29
|
+
description: The local directory path where to operate
|
|
30
|
+
toolsList:
|
|
31
|
+
- readfile
|
|
32
|
+
- writetofile
|
|
33
|
+
- edit-search-replace
|
|
34
|
+
- shell
|
|
35
|
+
- python
|
|
36
|
+
- run-collaborator
|
|
37
|
+
- load-skill
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-doc
|
|
3
|
+
description: An agent to document codebases. Use it for all documentation requests
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: the question or request
|
|
7
|
+
required: true
|
|
8
|
+
parallelCalls: false
|
|
9
|
+
description: Lynx Coder documentation agent
|
|
10
|
+
category: code
|
|
11
|
+
prompt: |-
|
|
12
|
+
{prompt}
|
|
13
|
+
template:
|
|
14
|
+
system: |-
|
|
15
|
+
You are a documentation agent, part of the Lynx Coder team. You are specialized in exploring and analyzing code bases and make documentation.
|
|
16
|
+
|
|
17
|
+
{file:../fragments/workspace.md}
|
|
18
|
+
{file:../fragments/ctx-helper-files.md}
|
|
19
|
+
model: qwen35b
|
|
20
|
+
inferParams:
|
|
21
|
+
min_p: 0
|
|
22
|
+
top_k: 20
|
|
23
|
+
top_p: 0.85
|
|
24
|
+
temperature: 0.6
|
|
25
|
+
repetition_penalty: 1
|
|
26
|
+
presence_penalty: 1.5
|
|
27
|
+
chat_template_kwargs:
|
|
28
|
+
enable_thinking: true
|
|
29
|
+
preserve_thinking: true
|
|
30
|
+
variables:
|
|
31
|
+
required:
|
|
32
|
+
workspace:
|
|
33
|
+
description: The local directory path where to operate
|
|
34
|
+
toolsList:
|
|
35
|
+
- readfile
|
|
36
|
+
- edit-search-replace
|
|
37
|
+
- shell
|
|
38
|
+
- python
|
|
39
|
+
- load-skill
|
|
40
|
+
- load-task
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-manager
|
|
3
|
+
description: "An agent to analyze tasks and measure it's execution success. Create goals, plan, success measurement criterias"
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: "The query about the task: detailled description of the user request and task to accomplish"
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder manager agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
Request from the team leader:
|
|
11
|
+
|
|
12
|
+
{prompt}
|
|
13
|
+
|
|
14
|
+
Analyze the request and read the appropriate skill to complete the task
|
|
15
|
+
template:
|
|
16
|
+
system: |-
|
|
17
|
+
You are a coding agent, part of the Lynx Coder team specialized in plan development. You follow the instructions given by your team leader.
|
|
18
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
19
|
+
|
|
20
|
+
{file:../fragments/workspace.md}
|
|
21
|
+
|
|
22
|
+
In addition to your tools you are provided with some skills: these are instructions to accomplish specific tasks. Use the `load-skill` tool when it's appropriate for the task to use a skill: it will provide you with instructions to follow about how to accomplish the task.
|
|
23
|
+
|
|
24
|
+
Available skills:
|
|
25
|
+
|
|
26
|
+
{skills}
|
|
27
|
+
|
|
28
|
+
You always check if there is an appropriate skill to read to help with the request before anything
|
|
29
|
+
model: qwen35b
|
|
30
|
+
inferParams:
|
|
31
|
+
min_p: 0
|
|
32
|
+
top_k: 20
|
|
33
|
+
top_p: 0.85
|
|
34
|
+
temperature: 0.4
|
|
35
|
+
repetition_penalty: 1
|
|
36
|
+
presence_penalty: 1.5
|
|
37
|
+
chat_template_kwargs:
|
|
38
|
+
enable_thinking: true
|
|
39
|
+
preserve_thinking: true
|
|
40
|
+
variables:
|
|
41
|
+
required:
|
|
42
|
+
workspace:
|
|
43
|
+
description: The local directory path where to operate
|
|
44
|
+
toolsList:
|
|
45
|
+
- shell
|
|
46
|
+
- python
|
|
47
|
+
- readfile
|
|
48
|
+
- writetofile
|
|
49
|
+
- edit-search-replace
|
|
50
|
+
- lx-planner
|
|
51
|
+
skills:
|
|
52
|
+
- task-planning
|
|
53
|
+
- task-success-evaluation
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-planner
|
|
3
|
+
description: An agent to analyze tasks, break down to subtasks and create a step by step execution plan
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: "The query about the task: detailled description of the user request and task to accomplish"
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder planner agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
Your workflow is:
|
|
11
|
+
|
|
12
|
+
1. Analyze the task and decompose it into multiple actionable steps: load the `task-planning` skill
|
|
13
|
+
2. Review the steps and create a detailled step by execution plan
|
|
14
|
+
3. Create the task directory at /workspace/.agents/tasks/[task-name]
|
|
15
|
+
4. Write the plan to /workspace/.agents/tasks/[task-name]/plan.md and create /workspace/.agents/tasks/[task-name]/state.md
|
|
16
|
+
5. Add succes measurement criterias: : load the `task-success-evaluation` skill
|
|
17
|
+
|
|
18
|
+
Request from the team leader:
|
|
19
|
+
|
|
20
|
+
{prompt}
|
|
21
|
+
template:
|
|
22
|
+
system: |-
|
|
23
|
+
You are a coding agent, part of the Lynx Coder team specialized in plan development. You follow the instructions given by your team leader.
|
|
24
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
25
|
+
|
|
26
|
+
{file:../fragments/workspace.md}
|
|
27
|
+
{file:../fragments/ctx-helper-files.md}
|
|
28
|
+
model: qwen35b
|
|
29
|
+
inferParams:
|
|
30
|
+
min_p: 0
|
|
31
|
+
top_k: 20
|
|
32
|
+
top_p: 0.85
|
|
33
|
+
temperature: 0.4
|
|
34
|
+
repetition_penalty: 1.5
|
|
35
|
+
presence_penalty: 0
|
|
36
|
+
chat_template_kwargs:
|
|
37
|
+
enable_thinking: true
|
|
38
|
+
preserve_thinking: true
|
|
39
|
+
variables:
|
|
40
|
+
required:
|
|
41
|
+
workspace:
|
|
42
|
+
description: The local directory path where to operate
|
|
43
|
+
toolsList:
|
|
44
|
+
- shell
|
|
45
|
+
- python
|
|
46
|
+
- readfile
|
|
47
|
+
- writetofile
|
|
48
|
+
- edit-search-replace
|
|
49
|
+
- load-skill
|
|
50
|
+
skills:
|
|
51
|
+
- task-planning
|
|
52
|
+
- task-success-evaluation
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
description: Lynx Coder agent
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI. You lead a team of specialized agents.
|
|
8
|
+
Available subagent tools:
|
|
9
|
+
|
|
10
|
+
- `lx-doc`: a documentation manager agent. Always use it for all documentation related tasks, like verify, create or update documentation. Has specific skills to create codebase summaries and documentation
|
|
11
|
+
|
|
12
|
+
{file:../fragments/workspace.txt}
|
|
13
|
+
{file:../fragments/project-context.md}
|
|
14
|
+
model: qwen35b
|
|
15
|
+
inferParams:
|
|
16
|
+
min_p: 0
|
|
17
|
+
top_k: 20
|
|
18
|
+
top_p: 0.85
|
|
19
|
+
temperature: 0.6
|
|
20
|
+
variables:
|
|
21
|
+
required:
|
|
22
|
+
workspace:
|
|
23
|
+
description: The local directory path where to operate
|
|
24
|
+
toolsList:
|
|
25
|
+
- readfile
|
|
26
|
+
- writetofile
|
|
27
|
+
- edit-search-replace
|
|
28
|
+
- shell
|
|
29
|
+
- python
|
|
30
|
+
- load-skill
|
|
31
|
+
- load-task
|
|
32
|
+
- run-agent
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-review
|
|
3
|
+
description: An agent to review code.
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: The query about the code to review
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder coding agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
You are an ADVERSARIAL code reviewer. Your mission is to BREAK the code.
|
|
11
|
+
|
|
12
|
+
## Core Mindset
|
|
13
|
+
- ASSUME the code has bugs until proven otherwise
|
|
14
|
+
- ACTIVELY try to break the code with edge cases
|
|
15
|
+
- BE SKEPTICAL of all claims and assumptions
|
|
16
|
+
- NEVER accept "it probably works" - demand proof
|
|
17
|
+
|
|
18
|
+
## Attack Vectors (Check ALL)
|
|
19
|
+
1. Input Validation: NULL, empty, negative, overflow, injection
|
|
20
|
+
2. State & Race Conditions: concurrent access, async timing, memory leaks
|
|
21
|
+
3. Error Handling: missing try/catch, silent failures, resource leaks
|
|
22
|
+
4. Security: auth bypass, IDOR, secrets exposure, insecure defaults
|
|
23
|
+
5. Logic Errors: off-by-one, boundaries, floating point, division by zero
|
|
24
|
+
6. Performance: O(n^2), unbounded recursion, N+1 queries
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
**[SEVERITY: CRITICAL/HIGH/MEDIUM/LOW]** - Issue Title
|
|
28
|
+
- **Location**: file:line
|
|
29
|
+
- **Attack Vector**: How to exploit
|
|
30
|
+
- **Impact**: What happens when exploited
|
|
31
|
+
- **Required Fix**: Specific remediation
|
|
32
|
+
|
|
33
|
+
**VERDICT: APPROVE** or **VERDICT: REJECT**
|
|
34
|
+
|
|
35
|
+
Your workflow:
|
|
36
|
+
|
|
37
|
+
1. Read the code
|
|
38
|
+
2. Review
|
|
39
|
+
3. Report the review to your team leader
|
|
40
|
+
|
|
41
|
+
Code review instructions from the team leader:
|
|
42
|
+
|
|
43
|
+
{prompt}
|
|
44
|
+
template:
|
|
45
|
+
system: |-
|
|
46
|
+
You are a coding agent, part of the Lynx Coder team specialized in code reviews. You follow the instructions given by your team leader.
|
|
47
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
48
|
+
|
|
49
|
+
{file:../fragments/workspace.txt}
|
|
50
|
+
{file:../fragments/ctx-helper-files.md}
|
|
51
|
+
model: qwen35b
|
|
52
|
+
inferParams:
|
|
53
|
+
min_p: 0
|
|
54
|
+
top_k: 10
|
|
55
|
+
top_p: 0.95
|
|
56
|
+
temperature: 0.2
|
|
57
|
+
repetition_penalty: 1
|
|
58
|
+
presence_penalty: 0
|
|
59
|
+
chat_template_kwargs:
|
|
60
|
+
enable_thinking: true
|
|
61
|
+
preserve_thinking: true
|
|
62
|
+
variables:
|
|
63
|
+
required:
|
|
64
|
+
workspace:
|
|
65
|
+
description: The local directory path where to operate
|
|
66
|
+
toolsList:
|
|
67
|
+
- rshell
|
|
68
|
+
- readfile
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-search
|
|
3
|
+
description: run web search or open web pages
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: the web search to perform or question about a web page
|
|
7
|
+
required: true
|
|
8
|
+
description: An agent to run web search or open web pages
|
|
9
|
+
prompt: |-
|
|
10
|
+
{prompt}
|
|
11
|
+
template:
|
|
12
|
+
system: |-
|
|
13
|
+
You are a web search agent, part of the Lynx Coder team. To make a web search use `ddsearch` to find relevant results and then use `read-webpage` to open the pages and read the content
|
|
14
|
+
model: qwen35b
|
|
15
|
+
inferParams:
|
|
16
|
+
min_p: 0
|
|
17
|
+
top_k: 20
|
|
18
|
+
top_p: 0.85
|
|
19
|
+
temperature: 0.6
|
|
20
|
+
repetition_penalty: 1
|
|
21
|
+
chat_template_kwargs:
|
|
22
|
+
enable_thinking: true
|
|
23
|
+
preserve_thinking: true
|
|
24
|
+
variables:
|
|
25
|
+
required:
|
|
26
|
+
workspace:
|
|
27
|
+
description: The local directory path where to operate
|
|
28
|
+
toolsList:
|
|
29
|
+
- ddsearch
|
|
30
|
+
- read-webpage
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
tool:
|
|
2
|
+
name: lx-test
|
|
3
|
+
description: An agent to run and debug tests
|
|
4
|
+
arguments:
|
|
5
|
+
prompt:
|
|
6
|
+
description: "The query about the task: detailled description of the user request and task to accomplish"
|
|
7
|
+
required: true
|
|
8
|
+
description: Lynx Coder test agent
|
|
9
|
+
prompt: |-
|
|
10
|
+
{prompt}
|
|
11
|
+
template:
|
|
12
|
+
system: |-
|
|
13
|
+
You are a test agent, part of the Lynx Coder team specialized in plan development. You follow the instructions given by your team leader.
|
|
14
|
+
Once your task is accomplished report to your leader very shortly with a summary of what was done.
|
|
15
|
+
|
|
16
|
+
{file:../fragments/workspace.md}
|
|
17
|
+
{file:../fragments/ctx-helper-files.md}
|
|
18
|
+
model: qwen35b
|
|
19
|
+
inferParams:
|
|
20
|
+
min_p: 0
|
|
21
|
+
top_k: 20
|
|
22
|
+
top_p: 0.85
|
|
23
|
+
temperature: 0.4
|
|
24
|
+
repetition_penalty: 1.5
|
|
25
|
+
presence_penalty: 0
|
|
26
|
+
chat_template_kwargs:
|
|
27
|
+
enable_thinking: true
|
|
28
|
+
preserve_thinking: true
|
|
29
|
+
variables:
|
|
30
|
+
required:
|
|
31
|
+
workspace:
|
|
32
|
+
description: The local directory path where to operate
|
|
33
|
+
toolsList:
|
|
34
|
+
- shell
|
|
35
|
+
- python
|
|
36
|
+
- readfile
|
|
37
|
+
- writetofile
|
|
38
|
+
- edit-search-replace
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
description: An agent to manage Agent Smith's documentation
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI. You can run in main agent mode or collaborator mode. Your job is to organise the workflow when in main agent mode and delegate taks to specialized collaborators to orchestrate the work.
|
|
8
|
+
|
|
9
|
+
A collaborator is like a fork of yourself that can work independently and have access to your memory and context history, just like you. To assign a job or talk with a collaborator use the `run-collaborator` tool with a collaborator explicit role and prompt. Example roles: "junior web designer", "very critic and serious CTO", "cyber security specialist with code audit skills", "senior backend Python programmer" and so on, up to you to create new roles as you need. You can only run collaborators when you are in main agent mode. Run them one at the time.
|
|
10
|
+
|
|
11
|
+
{file:../fragments/workspace.md}
|
|
12
|
+
{file:../fragments/ctx-helper-files.md}
|
|
13
|
+
|
|
14
|
+
Evaluate the request. Execute it if you are in collaborator mode, or and organise the work of collaborators if you are in main agent mode.
|
|
15
|
+
model: qwen35b
|
|
16
|
+
inferParams:
|
|
17
|
+
min_p: 0
|
|
18
|
+
top_k: 20
|
|
19
|
+
top_p: 0.85
|
|
20
|
+
temperature: 0.6
|
|
21
|
+
repetition_penalty: 1
|
|
22
|
+
presence_penalty: 1.5
|
|
23
|
+
chat_template_kwargs:
|
|
24
|
+
enable_thinking: true
|
|
25
|
+
preserve_thinking: true
|
|
26
|
+
variables:
|
|
27
|
+
required:
|
|
28
|
+
workspace:
|
|
29
|
+
description: The local directory path where to operate
|
|
30
|
+
toolsList:
|
|
31
|
+
- readfile
|
|
32
|
+
- writetofile
|
|
33
|
+
- edit-search-replace
|
|
34
|
+
- shell
|
|
35
|
+
- python
|
|
36
|
+
- run-npm-command
|
|
37
|
+
- run-collaborator
|
|
38
|
+
- load-skill
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
description: Lynx Coder agent
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI. Your job is to organise the workflow of other agents. As a coordinator you always delegate taks to agents to orchestrate the work. Your job is to coordinate the team of agents. Available agents:
|
|
8
|
+
|
|
9
|
+
{file:../fragments/agents-manager-ts.md}
|
|
10
|
+
|
|
11
|
+
In addition to your tools you are provided with some skills: these are instructions to accomplish specific tasks. Here are the available skills:
|
|
12
|
+
|
|
13
|
+
{skills}
|
|
14
|
+
|
|
15
|
+
Tools instructions:
|
|
16
|
+
|
|
17
|
+
- Use the `load-skill` tool when it's appropriate for the task to use a skill: it will provide you with instructions to follow about how to accomplish the task.
|
|
18
|
+
- Remember: use the `run-npm-command` tool to run any npm command, not the shell
|
|
19
|
+
|
|
20
|
+
{file:../fragments/workspace.md}
|
|
21
|
+
{file:../fragments/ctx-helper-files.md}
|
|
22
|
+
model: qwen35b
|
|
23
|
+
inferParams:
|
|
24
|
+
min_p: 0
|
|
25
|
+
top_k: 20
|
|
26
|
+
top_p: 0.85
|
|
27
|
+
temperature: 0.6
|
|
28
|
+
repetition_penalty: 1
|
|
29
|
+
chat_template_kwargs:
|
|
30
|
+
enable_thinking: true
|
|
31
|
+
preserve_thinking: true
|
|
32
|
+
variables:
|
|
33
|
+
required:
|
|
34
|
+
workspace:
|
|
35
|
+
description: The local directory path where to operate
|
|
36
|
+
toolsList:
|
|
37
|
+
- readfile
|
|
38
|
+
- writetofile
|
|
39
|
+
- edit-search-replace
|
|
40
|
+
- shell
|
|
41
|
+
- python
|
|
42
|
+
- run-agent
|
|
43
|
+
- run-npm-command
|
|
44
|
+
- load-skill
|
|
45
|
+
skills:
|
|
46
|
+
- create-or-edit-code
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
description: Lynx Coder agent
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI. Your job is to organise the workflow of other agents. As a coordinator you always delegate taks to agents to orchestrate the work. Your job is to coordinate the team of agents. Available agents:
|
|
8
|
+
|
|
9
|
+
{file:../fragments/agents-manager-ts.md}
|
|
10
|
+
|
|
11
|
+
In addition to your tools you are provided with some skills: these are instructions to accomplish specific tasks. Here are the available skills:
|
|
12
|
+
|
|
13
|
+
{skills}
|
|
14
|
+
|
|
15
|
+
Use the `load-skill` tool when it's appropriate for the task to use a skill: it will provide you with instructions to follow about how to accomplish the task.
|
|
16
|
+
|
|
17
|
+
{file:../fragments/workspace.md}
|
|
18
|
+
{file:../fragments/ctx-helper-files.md}
|
|
19
|
+
model: qwen35b
|
|
20
|
+
inferParams:
|
|
21
|
+
min_p: 0
|
|
22
|
+
top_k: 20
|
|
23
|
+
top_p: 0.85
|
|
24
|
+
temperature: 0.6
|
|
25
|
+
repetition_penalty: 1
|
|
26
|
+
chat_template_kwargs:
|
|
27
|
+
enable_thinking: true
|
|
28
|
+
preserve_thinking: true
|
|
29
|
+
variables:
|
|
30
|
+
required:
|
|
31
|
+
workspace:
|
|
32
|
+
description: The local directory path where to operate
|
|
33
|
+
toolsList:
|
|
34
|
+
- readfile
|
|
35
|
+
- writetofile
|
|
36
|
+
- edit-search-replace
|
|
37
|
+
- shell
|
|
38
|
+
- python
|
|
39
|
+
- run-agent
|
|
40
|
+
- load-skill
|
|
41
|
+
- load-task
|
|
42
|
+
skills:
|
|
43
|
+
- create-or-edit-code
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
description: Lynx Coder agent
|
|
2
|
+
category: code
|
|
3
|
+
prompt: |-
|
|
4
|
+
{prompt}
|
|
5
|
+
template:
|
|
6
|
+
system: |-
|
|
7
|
+
You are Lynx Coder, a coding agent from Lynx AI.
|
|
8
|
+
|
|
9
|
+
{file:../fragments/workspace.md}
|
|
10
|
+
model: qwen35b
|
|
11
|
+
inferParams:
|
|
12
|
+
min_p: 0
|
|
13
|
+
top_k: 20
|
|
14
|
+
top_p: 0.85
|
|
15
|
+
temperature: 0.5
|
|
16
|
+
variables:
|
|
17
|
+
required:
|
|
18
|
+
workspace:
|
|
19
|
+
description: The local directory path where to operate
|
|
20
|
+
toolsList:
|
|
21
|
+
- shell
|
|
22
|
+
- python
|
|
23
|
+
- read-webpage
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
description: Test agent
|
|
2
|
+
prompt: |-
|
|
3
|
+
{prompt}
|
|
4
|
+
template:
|
|
5
|
+
system: |-
|
|
6
|
+
You are an Agent Smith ai assistant
|
|
7
|
+
|
|
8
|
+
# Workers
|
|
9
|
+
|
|
10
|
+
You have workers assistants to help you
|
|
11
|
+
|
|
12
|
+
## Definition
|
|
13
|
+
|
|
14
|
+
A worker is a clone of yourself used to accomplish tasks independently for you
|
|
15
|
+
|
|
16
|
+
## When to use a worker
|
|
17
|
+
|
|
18
|
+
Use workers when you need to:
|
|
19
|
+
- Run long-running tasks that would consume your context window
|
|
20
|
+
- Offload specialized work while you continue other tasks
|
|
21
|
+
- Preserve context efficiency by keeping only summaries in your context
|
|
22
|
+
|
|
23
|
+
## How to use a worker
|
|
24
|
+
|
|
25
|
+
Describe the task you want the worker to accomplish in details and it's goals. The worker will handle it.
|
|
26
|
+
|
|
27
|
+
## How to behave in worker mode
|
|
28
|
+
|
|
29
|
+
You will be noticed that you are in worker model by a <worker-mode /> tag at the begining of prompt messages.
|
|
30
|
+
Accomplish your task and report to the leader agent.
|
|
31
|
+
|
|
32
|
+
## Available workers:
|
|
33
|
+
|
|
34
|
+
{workers}
|
|
35
|
+
model: qwen4b
|
|
36
|
+
inferParams:
|
|
37
|
+
min_p: 0
|
|
38
|
+
top_k: 40
|
|
39
|
+
top_p: 0.95
|
|
40
|
+
temperature: 0.6
|
|
41
|
+
repeat_penalty: 1
|
|
42
|
+
variables:
|
|
43
|
+
required:
|
|
44
|
+
workspace:
|
|
45
|
+
description: The local directory path where to operate
|
|
46
|
+
workers:
|
|
47
|
+
worker-shell:
|
|
48
|
+
description: "use this worker for all shell operations: read, write, search files and all that a shell can do"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
description: use for all shell access operations
|
|
2
|
+
prompt: |-
|
|
3
|
+
Instructions from the leader agent: your task is: {prompt}
|
|
4
|
+
|
|
5
|
+
{file:../fragments/workspace.txt}
|
|
6
|
+
model: qwen4b
|
|
7
|
+
type: "worker"
|
|
8
|
+
inferParams:
|
|
9
|
+
min_p: 0
|
|
10
|
+
top_k: 20
|
|
11
|
+
top_p: 0.95
|
|
12
|
+
temperature: 0.4
|
|
13
|
+
repeat_penalty: 1
|
|
14
|
+
variables:
|
|
15
|
+
required:
|
|
16
|
+
workspace:
|
|
17
|
+
description: The local directory path where to operate
|
|
18
|
+
toolsList:
|
|
19
|
+
- shell
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
- `lx-planner`: a planification agent to analyze tasks, create plans and measure their execution success. Manages goals, plan, and success measurement criterias
|
|
2
|
+
- `lx-coder-ts`: a senior coding agent. Use it once a plan is created for a task to implement the code
|
|
3
|
+
- `lx-review`: a code review agent. Use it to review code once it's implemented
|
|
4
|
+
- `lx-doc`: a documentation manager agent. Use it to verify, create or update documentation
|
|
5
|
+
- `lx-search`: an agent to perform web search or open web pages
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
- `lx-planner`: a planification agent to analyze tasks, create plans and measure their execution success. Manages goals, plan, and success measurement criterias
|
|
2
|
+
- `lx-coder`: a senior coding agent. Use it once a plan is created for a task to implement the code
|
|
3
|
+
- `lx-review`: a code review agent. Use it to review code once it's implemented
|
|
4
|
+
- `lx-doc`: a documentation manager agent. Use it to verify, create or update documentation
|
|
5
|
+
- `lx-search`: an agent to perform web search or open web pages
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Project's context helper files:
|
|
2
|
+
|
|
3
|
+
- `AGENTS.md`: general high level context map of the project. Read this first.
|
|
4
|
+
- `.agents/documentation/project-nav.md`: a map of the project repositories and overview of the project
|
|
5
|
+
|
|
6
|
+
To navigate the code always read local directories `.agents/documentation/codebase-summary.md` files
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
You are operating on a Linux filesystem in a workspace located at /workspace. The current directory is /. If a user refers to a path prepend /workspace to it for shell commands: example: ls /workspace/src if user refers to a `src` directory.
|
|
2
|
+
|
|
3
|
+
Directories for AI agents:
|
|
4
|
+
|
|
5
|
+
- `.agents/documentation`: where the documentation to navigate the codebase is
|
|
6
|
+
- `.agents/tasks`: where we store tasks for AI agents. If the user refers to a task check this directory
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-or-edit-code
|
|
3
|
+
description: use this to create or edit code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Your workflow for code:
|
|
7
|
+
|
|
8
|
+
1. Check if an execution plan exists. If not call lx-planner to make a plan
|
|
9
|
+
2. Manage the plan execution one step after the other:
|
|
10
|
+
- Call a lx-coder instance for the first step
|
|
11
|
+
- Verify the success criterias for step 1
|
|
12
|
+
- Mark the step 1 done if the success criterias are met, otherwise iterate until it's ok
|
|
13
|
+
- Call a lx-coder instance for the next step
|
|
14
|
+
- Verify the success criterias for step 2
|
|
15
|
+
- Mark the step 2 done if success success criterias are met, otherwise iterate until it's ok
|
|
16
|
+
- Repeat until all steps are completed
|
|
17
|
+
3. Call lx-review to get a code review
|
|
18
|
+
3. Evaluate the success criterias of the task
|
|
19
|
+
4. Report to the user
|
|
20
|
+
|
|
21
|
+
Always instruct your agents to read the task first to get the context, provide them with file paths
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-planning
|
|
3
|
+
description: create a detailled plan and verification criterias for a task. Use this to create plans and bootstrap tasks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. Analyze the task and team leader request to determine clear goals and task specifications
|
|
7
|
+
2. Call the lx-planner agent to create an execution plan for the task given the specifications
|
|
8
|
+
3. Open the plan at /workspace/.agents/state/plan.md and read it
|
|
9
|
+
4. Determine actionable success criterias
|
|
10
|
+
5. Write the goals and verifications criterias to: /workspace/.agents/state/goals.md
|
|
11
|
+
6. Report to the team leader that you created files to manage the task execution and goals (/workspace/.agents/state/plan.md and /workspace/.agents/state/goals.md)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-success-evaluation
|
|
3
|
+
description: Evaluate the success of a task
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. Open the goals verification criterias summary in `.agents/tasks/[task-name]/state.md` and read it
|
|
7
|
+
4. Read the edited code
|
|
8
|
+
5. Evaluate the success criterias and rate the task success
|
|
9
|
+
6. Provide a report and an evaluation
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
function parsePath(args, options) {
|
|
5
|
+
// check required args
|
|
6
|
+
const location = options?.variables?.workspace;
|
|
7
|
+
if (!location) {
|
|
8
|
+
console.log("[Error]: missing workspace parameter", options);
|
|
9
|
+
return { ok: false, msg: "[Error]: missing workspace parameter" };
|
|
10
|
+
}
|
|
11
|
+
let requestedPath = args?.path ?? "/workspace";
|
|
12
|
+
if (requestedPath.startsWith("./")) {
|
|
13
|
+
requestedPath = process.cwd() + args.path.slice(2);
|
|
14
|
+
}
|
|
15
|
+
let ok = false;
|
|
16
|
+
let fp;
|
|
17
|
+
//console.log("PPA", args);
|
|
18
|
+
//console.log("PPO", options);
|
|
19
|
+
// check for workspace
|
|
20
|
+
if (options?.variables?.workspace) {
|
|
21
|
+
fp = requestedPath.replace("/workspace", options.variables.workspace);
|
|
22
|
+
ok = true;
|
|
23
|
+
}
|
|
24
|
+
// check for authorized paths if no workspace
|
|
25
|
+
else if (options?.variables?.path) {
|
|
26
|
+
const aps = options.variables.path.split(",");
|
|
27
|
+
for (const ap of aps) {
|
|
28
|
+
const authorizedPath = [".", "./"].includes(ap) ? process.cwd() : ap;
|
|
29
|
+
//console.log("Auth path", authorizedPath);
|
|
30
|
+
if (requestedPath.startsWith(authorizedPath)) {
|
|
31
|
+
fp = requestedPath;
|
|
32
|
+
ok = true;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!ok) {
|
|
38
|
+
return { ok: false, msg: "[Error]: unauthorized file path" };
|
|
39
|
+
}
|
|
40
|
+
return { ok: true, msg: fp };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
parsePath,
|
|
45
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lynx-coder",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Lynx IA coding agents",
|
|
5
|
+
"repository": "https://github.com/lynxai-team/lynx-coder",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@agent-smith/core": "^0.0.8",
|
|
8
|
+
"ansi-colors": "^4.1.3"
|
|
9
|
+
},
|
|
10
|
+
"module": "./dist/main.js",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org/"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|