@wkronmiller/lisa 0.1.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/LICENSE +21 -0
- package/README.md +407 -0
- package/bin/lisa-runtime.js +8797 -0
- package/bin/lisa.js +21 -0
- package/completion.ts +58 -0
- package/install.ps1 +51 -0
- package/install.sh +93 -0
- package/lisa.ts +6 -0
- package/package.json +66 -0
- package/skills/README.md +28 -0
- package/skills/claude-code/CLAUDE.md +151 -0
- package/skills/codex/AGENTS.md +151 -0
- package/skills/gemini/GEMINI.md +151 -0
- package/skills/opencode/AGENTS.md +152 -0
- package/src/cli.ts +85 -0
- package/src/harness/base-adapter.ts +47 -0
- package/src/harness/claude-code.ts +106 -0
- package/src/harness/codex.ts +80 -0
- package/src/harness/command.ts +173 -0
- package/src/harness/gemini.ts +74 -0
- package/src/harness/opencode.ts +84 -0
- package/src/harness/registry.ts +29 -0
- package/src/harness/runner.ts +19 -0
- package/src/harness/types.ts +73 -0
- package/src/output-mode.ts +32 -0
- package/src/skill/artifacts.ts +174 -0
- package/src/skill/cli.ts +29 -0
- package/src/skill/install.ts +317 -0
- package/src/spec/agent-guidance.ts +466 -0
- package/src/spec/cli.ts +151 -0
- package/src/spec/commands/check.ts +1 -0
- package/src/spec/commands/config.ts +146 -0
- package/src/spec/commands/diff.ts +1 -0
- package/src/spec/commands/generate.ts +1 -0
- package/src/spec/commands/guide.ts +1 -0
- package/src/spec/commands/harness-list.ts +36 -0
- package/src/spec/commands/implement.ts +1 -0
- package/src/spec/commands/import.ts +1 -0
- package/src/spec/commands/init.ts +1 -0
- package/src/spec/commands/status.ts +87 -0
- package/src/spec/config.ts +63 -0
- package/src/spec/diff.ts +791 -0
- package/src/spec/extensions/benchmark.ts +347 -0
- package/src/spec/extensions/registry.ts +59 -0
- package/src/spec/extensions/types.ts +56 -0
- package/src/spec/grammar/index.ts +14 -0
- package/src/spec/grammar/parser.ts +443 -0
- package/src/spec/grammar/types.ts +70 -0
- package/src/spec/grammar/validator.ts +104 -0
- package/src/spec/loader.ts +174 -0
- package/src/spec/local-config.ts +59 -0
- package/src/spec/parser.ts +226 -0
- package/src/spec/path-utils.ts +73 -0
- package/src/spec/planner.ts +299 -0
- package/src/spec/prompt-renderer.ts +318 -0
- package/src/spec/skill-content.ts +119 -0
- package/src/spec/types.ts +239 -0
- package/src/spec/validator.ts +443 -0
- package/src/spec/workflows/check.ts +1534 -0
- package/src/spec/workflows/diff.ts +209 -0
- package/src/spec/workflows/generate.ts +1270 -0
- package/src/spec/workflows/guide.ts +190 -0
- package/src/spec/workflows/implement.ts +797 -0
- package/src/spec/workflows/import.ts +986 -0
- package/src/spec/workflows/init.ts +548 -0
- package/src/spec/workflows/status.ts +22 -0
- package/src/spec/workspace.ts +541 -0
- package/uninstall.ps1 +21 -0
- package/uninstall.sh +22 -0
package/bin/lisa.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require("node:child_process");
|
|
3
|
+
const { existsSync } = require("node:fs");
|
|
4
|
+
const { resolve } = require("node:path");
|
|
5
|
+
|
|
6
|
+
const runtimePath = resolve(__dirname, "lisa-runtime.js");
|
|
7
|
+
const sourcePath = resolve(__dirname, "..", "lisa.ts");
|
|
8
|
+
const useBuiltRuntime = existsSync(runtimePath);
|
|
9
|
+
|
|
10
|
+
const result = useBuiltRuntime
|
|
11
|
+
? spawnSync("bun", [runtimePath, ...process.argv.slice(2)], { stdio: "inherit" })
|
|
12
|
+
: spawnSync("bun", [sourcePath, ...process.argv.slice(2)], { stdio: "inherit" });
|
|
13
|
+
|
|
14
|
+
if (result.error) {
|
|
15
|
+
console.error(useBuiltRuntime
|
|
16
|
+
? `Error: Unable to run built lisa runtime at ${runtimePath}`
|
|
17
|
+
: "Error: Bun is required to run lisa. Install Bun: https://bun.sh");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
process.exit(result.status ?? 1);
|
package/completion.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion detection helpers used by the Lisa CLI.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const ANSI_PATTERN = /\u001b\[[0-9;]*m/g;
|
|
6
|
+
|
|
7
|
+
export function stripAnsi(input: string): string {
|
|
8
|
+
return input.replace(ANSI_PATTERN, "");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function escapeRegex(str: string): string {
|
|
12
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns the last non-empty line of output, after ANSI stripping.
|
|
17
|
+
*/
|
|
18
|
+
export function getLastNonEmptyLine(output: string): string | null {
|
|
19
|
+
const lines = stripAnsi(output)
|
|
20
|
+
.replace(/\r\n/g, "\n")
|
|
21
|
+
.split("\n")
|
|
22
|
+
.map(line => line.trim())
|
|
23
|
+
.filter(Boolean);
|
|
24
|
+
|
|
25
|
+
return lines.length > 0 ? lines[lines.length - 1] : null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Checks whether the exact promise tag appears as the final non-empty line.
|
|
30
|
+
*/
|
|
31
|
+
export function checkTerminalPromise(output: string, promise: string): boolean {
|
|
32
|
+
const lastLine = getLastNonEmptyLine(output);
|
|
33
|
+
if (!lastLine) return false;
|
|
34
|
+
|
|
35
|
+
const escapedPromise = escapeRegex(promise);
|
|
36
|
+
const pattern = new RegExp(`^<promise>\\s*${escapedPromise}\\s*</promise>$`, "i");
|
|
37
|
+
return pattern.test(lastLine);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Returns true only when there is at least one task checkbox and all checkboxes are complete.
|
|
42
|
+
*/
|
|
43
|
+
export function tasksMarkdownAllComplete(tasksMarkdown: string): boolean {
|
|
44
|
+
const lines = tasksMarkdown.split(/\r?\n/);
|
|
45
|
+
let sawTask = false;
|
|
46
|
+
|
|
47
|
+
for (const line of lines) {
|
|
48
|
+
const match = line.match(/^\s*-\s+\[([ xX\/])\]\s+/);
|
|
49
|
+
if (!match) continue;
|
|
50
|
+
|
|
51
|
+
sawTask = true;
|
|
52
|
+
if (match[1].toLowerCase() !== "x") {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return sawTask;
|
|
58
|
+
}
|
package/install.ps1
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Install script for Lisa CLI (Windows)
|
|
2
|
+
|
|
3
|
+
$ErrorActionPreference = "Stop"
|
|
4
|
+
|
|
5
|
+
Write-Host "Installing Lisa CLI..."
|
|
6
|
+
|
|
7
|
+
# Check for Bun
|
|
8
|
+
if (-not (Get-Command bun -ErrorAction SilentlyContinue)) {
|
|
9
|
+
Write-Error "Bun is required but not installed. Install Bun: https://bun.sh"
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
# Check for optional harness CLIs used by spec generation/import/implementation.
|
|
14
|
+
$hasOpenCode = Get-Command opencode -ErrorAction SilentlyContinue
|
|
15
|
+
$hasClaude = Get-Command claude -ErrorAction SilentlyContinue
|
|
16
|
+
$hasCodex = Get-Command codex -ErrorAction SilentlyContinue
|
|
17
|
+
if (-not $hasOpenCode -and -not $hasClaude -and -not $hasCodex) {
|
|
18
|
+
Write-Warning "No supported harness CLI found."
|
|
19
|
+
Write-Host "You can still use lisa spec init, lisa spec status, and lisa spec harness list."
|
|
20
|
+
Write-Host "To enable agent-backed workflows, install one of:"
|
|
21
|
+
Write-Host " OpenCode: npm install -g opencode-ai"
|
|
22
|
+
Write-Host " Claude Code: https://claude.ai/code"
|
|
23
|
+
Write-Host " Codex: https://developers.openai.com/codex/"
|
|
24
|
+
} elseif (-not $hasOpenCode) {
|
|
25
|
+
Write-Warning "OpenCode not found. Agent-backed workflows can still use the installed Claude Code or Codex harness."
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# Get script directory
|
|
29
|
+
$scriptDir = $PSScriptRoot
|
|
30
|
+
|
|
31
|
+
# Install dependencies
|
|
32
|
+
Write-Host "Installing dependencies..."
|
|
33
|
+
Push-Location $scriptDir
|
|
34
|
+
bun install
|
|
35
|
+
|
|
36
|
+
# Link the package (makes 'lisa' command available)
|
|
37
|
+
Write-Host "Linking lisa command..."
|
|
38
|
+
bun link
|
|
39
|
+
|
|
40
|
+
Pop-Location
|
|
41
|
+
|
|
42
|
+
Write-Host ""
|
|
43
|
+
Write-Host "Installation complete!"
|
|
44
|
+
Write-Host ""
|
|
45
|
+
Write-Host "Usage:"
|
|
46
|
+
Write-Host ""
|
|
47
|
+
Write-Host " Lisa Spec CLI:"
|
|
48
|
+
Write-Host " lisa spec status"
|
|
49
|
+
Write-Host " lisa spec harness list"
|
|
50
|
+
Write-Host ""
|
|
51
|
+
Write-Host "Learn more: https://github.com/wkronmiller/lisa"
|
package/install.sh
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Install script for Lisa CLI
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
resolve_output_mode() {
|
|
7
|
+
local normalized_mode
|
|
8
|
+
normalized_mode="${LISA_OUTPUT_MODE:-}"
|
|
9
|
+
normalized_mode="${normalized_mode#"${normalized_mode%%[![:space:]]*}"}"
|
|
10
|
+
normalized_mode="${normalized_mode%"${normalized_mode##*[![:space:]]}"}"
|
|
11
|
+
normalized_mode="$(printf '%s' "$normalized_mode" | tr '[:upper:]' '[:lower:]')"
|
|
12
|
+
|
|
13
|
+
case "$normalized_mode" in
|
|
14
|
+
interactive)
|
|
15
|
+
printf '%s' 'interactive'
|
|
16
|
+
;;
|
|
17
|
+
concise)
|
|
18
|
+
printf '%s' 'concise'
|
|
19
|
+
;;
|
|
20
|
+
*)
|
|
21
|
+
if [ -t 1 ]; then
|
|
22
|
+
printf '%s' 'interactive'
|
|
23
|
+
else
|
|
24
|
+
printf '%s' 'concise'
|
|
25
|
+
fi
|
|
26
|
+
;;
|
|
27
|
+
esac
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
OUTPUT_MODE="$(resolve_output_mode)"
|
|
31
|
+
|
|
32
|
+
echo "Installing Lisa CLI..."
|
|
33
|
+
|
|
34
|
+
# Check for Bun
|
|
35
|
+
if ! command -v bun &> /dev/null; then
|
|
36
|
+
echo "Error: Bun is required but not installed."
|
|
37
|
+
echo "Install Bun: curl -fsSL https://bun.sh/install | bash"
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Check for optional harness CLIs used by spec generation/import/implementation.
|
|
42
|
+
if ! command -v opencode &> /dev/null && ! command -v claude &> /dev/null && ! command -v codex &> /dev/null && ! command -v gemini &> /dev/null; then
|
|
43
|
+
echo "Warning: No supported harness CLI found."
|
|
44
|
+
echo "You can still use lisa spec init, lisa spec status, and lisa spec harness list."
|
|
45
|
+
echo "To enable agent-backed workflows, install one of:"
|
|
46
|
+
echo " OpenCode: npm install -g opencode-ai"
|
|
47
|
+
echo " Claude Code: https://claude.ai/code"
|
|
48
|
+
echo " Codex: https://developers.openai.com/codex/"
|
|
49
|
+
echo " Gemini CLI: https://github.com/google-gemini/gemini-cli"
|
|
50
|
+
elif ! command -v opencode &> /dev/null; then
|
|
51
|
+
echo "Warning: OpenCode not found."
|
|
52
|
+
echo "Agent-backed workflows can still use the installed Claude Code, Codex, or Gemini CLI harness."
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Get script directory
|
|
56
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
57
|
+
|
|
58
|
+
# Install dependencies
|
|
59
|
+
echo "Installing dependencies..."
|
|
60
|
+
cd "$SCRIPT_DIR"
|
|
61
|
+
bun install
|
|
62
|
+
|
|
63
|
+
# Link the package (makes 'lisa' command available)
|
|
64
|
+
echo "Linking lisa command..."
|
|
65
|
+
bun link
|
|
66
|
+
|
|
67
|
+
echo ""
|
|
68
|
+
echo "Installation complete!"
|
|
69
|
+
echo ""
|
|
70
|
+
|
|
71
|
+
if [ "$OUTPUT_MODE" = "interactive" ]; then
|
|
72
|
+
echo "Quick start:"
|
|
73
|
+
echo ""
|
|
74
|
+
echo " 1. lisa spec init"
|
|
75
|
+
echo " Create the .specs workspace for this repo."
|
|
76
|
+
echo " 2. lisa skill install --local"
|
|
77
|
+
echo " Optionally install repo-local Lisa guidance for supported harnesses."
|
|
78
|
+
echo " 3. lisa spec generate backend <name>"
|
|
79
|
+
echo " Draft a new spec before implementation work starts."
|
|
80
|
+
echo " or lisa spec import <path...>"
|
|
81
|
+
echo " Draft specs from existing code when you are retrofitting coverage."
|
|
82
|
+
echo " 4. lisa spec implement"
|
|
83
|
+
echo " Turn changed specs into code and test updates."
|
|
84
|
+
echo " 5. lisa spec check --changed"
|
|
85
|
+
echo " Verify the changed specs against code, tests, and benchmarks."
|
|
86
|
+
echo ""
|
|
87
|
+
echo "Need the full command list? Run 'lisa spec --help'."
|
|
88
|
+
else
|
|
89
|
+
echo "Next: run 'lisa spec --help' for available commands."
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
echo ""
|
|
93
|
+
echo "Learn more: https://github.com/wkronmiller/lisa"
|
package/lisa.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wkronmiller/lisa",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Lisa, a spec-driven coding agent orchestration framework",
|
|
5
|
+
"main": "bin/lisa.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"lisa": "bin/lisa.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "bun lisa.ts",
|
|
11
|
+
"build": "bun build lisa.ts --outfile bin/lisa-runtime.js --target bun",
|
|
12
|
+
"test": "bun test ./tests",
|
|
13
|
+
"install-local": "bun link"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/lisa-runtime.js",
|
|
17
|
+
"bin/lisa.js",
|
|
18
|
+
"lisa.ts",
|
|
19
|
+
"src",
|
|
20
|
+
"skills",
|
|
21
|
+
"completion.ts",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"install.sh",
|
|
25
|
+
"install.ps1",
|
|
26
|
+
"uninstall.sh",
|
|
27
|
+
"uninstall.ps1"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"opencode",
|
|
31
|
+
"ai",
|
|
32
|
+
"lisa",
|
|
33
|
+
"spec-driven",
|
|
34
|
+
"iterative-development",
|
|
35
|
+
"automation",
|
|
36
|
+
"ai-agent",
|
|
37
|
+
"coding-assistant",
|
|
38
|
+
"llm",
|
|
39
|
+
"claude",
|
|
40
|
+
"claude-code",
|
|
41
|
+
"codex",
|
|
42
|
+
"gpt",
|
|
43
|
+
"self-correcting",
|
|
44
|
+
"autonomous",
|
|
45
|
+
"developer-tools",
|
|
46
|
+
"cli",
|
|
47
|
+
"bun",
|
|
48
|
+
"typescript"
|
|
49
|
+
],
|
|
50
|
+
"author": "wkronmiller",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git@github.com:wkronmiller/lisa.git"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/wkronmiller/lisa/issues"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/wkronmiller/lisa/blob/master/README.md",
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/bun": "^1.3.5"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/skills/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Lisa Coding Agent Skills
|
|
2
|
+
|
|
3
|
+
Checked-in Lisa skill artifacts live under `skills/`.
|
|
4
|
+
|
|
5
|
+
Supported harness artifacts:
|
|
6
|
+
|
|
7
|
+
- `skills/codex/AGENTS.md`
|
|
8
|
+
- `skills/opencode/AGENTS.md`
|
|
9
|
+
- `skills/claude-code/CLAUDE.md`
|
|
10
|
+
- `skills/gemini/GEMINI.md`
|
|
11
|
+
|
|
12
|
+
Install with:
|
|
13
|
+
|
|
14
|
+
- `lisa skill install --local`
|
|
15
|
+
- `lisa skill install --global`
|
|
16
|
+
|
|
17
|
+
Install targets:
|
|
18
|
+
|
|
19
|
+
- local: `AGENTS.md` for Codex, `.opencode/skills/lisa/SKILL.md` for OpenCode, `CLAUDE.md` for Claude Code, `GEMINI.md` for Gemini CLI
|
|
20
|
+
- global: `${CODEX_HOME:-~/.codex}/AGENTS.md`, `${XDG_CONFIG_HOME:-~/.config}/opencode/skills/lisa/SKILL.md`, `~/.claude/CLAUDE.md`, `~/.gemini/GEMINI.md`
|
|
21
|
+
|
|
22
|
+
Keep these files aligned with:
|
|
23
|
+
|
|
24
|
+
- the top-level `lisa skill install --global|--local` command surface
|
|
25
|
+
- the user-facing `lisa spec ...` command surface
|
|
26
|
+
- the built-in harness registry in `src/harness/registry.ts`
|
|
27
|
+
- the required `.specs/` layout and active spec structure
|
|
28
|
+
- the `lisa spec guide` seed-authoring workflow and its next-step commands
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Lisa for Claude Code
|
|
2
|
+
|
|
3
|
+
Use this skill when working on Lisa from a Claude Code session.
|
|
4
|
+
|
|
5
|
+
## What Lisa is
|
|
6
|
+
|
|
7
|
+
Lisa is a spec-driven agent orchestration CLI. Treat `.specs/` as the source of truth for intended behavior.
|
|
8
|
+
|
|
9
|
+
Core workflow:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
specs -> git diff -> structured deltas -> plan -> single writer harness -> tests/benchmarks -> parallel read-only verification -> reports
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Working in this repo
|
|
16
|
+
|
|
17
|
+
- Start with `lisa spec status` to inspect the workspace and harness availability.
|
|
18
|
+
- Review active specs in `.specs/backend/` and `.specs/frontend/` before changing behavior.
|
|
19
|
+
- Prefer repo-local Lisa commands over ad hoc workflows that bypass the spec-first model.
|
|
20
|
+
- When behavior changes, update the relevant spec, code, tests, and checked-in docs or skills together.
|
|
21
|
+
|
|
22
|
+
If the local `lisa` command is not installed yet, run the same workflows from the checkout with `bun run lisa.ts spec ...`.
|
|
23
|
+
|
|
24
|
+
## Current CLI surface
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
lisa skill install --global|--local
|
|
28
|
+
lisa spec init
|
|
29
|
+
lisa spec config [options]
|
|
30
|
+
lisa spec status
|
|
31
|
+
lisa spec harness list
|
|
32
|
+
lisa spec guide [backend|frontend] [name] [options]
|
|
33
|
+
lisa spec generate [backend|frontend] [name] [options]
|
|
34
|
+
lisa spec implement [options]
|
|
35
|
+
lisa spec check --changed|--all [options]
|
|
36
|
+
lisa spec import <path...> [options]
|
|
37
|
+
lisa spec diff [options]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Common repo-local commands:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
lisa skill install --local
|
|
44
|
+
lisa skill install --global
|
|
45
|
+
lisa spec config --harness claude-code
|
|
46
|
+
lisa spec status
|
|
47
|
+
lisa spec harness list
|
|
48
|
+
lisa spec guide backend checkout-flow
|
|
49
|
+
lisa spec generate backend checkout-flow
|
|
50
|
+
lisa spec diff
|
|
51
|
+
lisa spec implement
|
|
52
|
+
lisa spec check --changed
|
|
53
|
+
lisa spec check --all
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Installing Lisa guidance
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
lisa skill install --local
|
|
60
|
+
lisa skill install --global
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- Local install target: `CLAUDE.md`
|
|
64
|
+
- Global install target: `~/.claude/CLAUDE.md`
|
|
65
|
+
|
|
66
|
+
## Seed guide workflow
|
|
67
|
+
|
|
68
|
+
- Run `lisa spec guide backend checkout-flow` when you want Lisa to create or reuse a draft seed spec and point you at the right harness-specific skill artifact.
|
|
69
|
+
- Keep editing the seed spec in `.specs/backend/` or `.specs/frontend/` until the placeholders are replaced with real Summary, Use Cases, Invariants, Failure Modes, Acceptance Criteria, and Out of Scope content.
|
|
70
|
+
- After the spec is ready, return to `lisa spec diff`, `lisa spec implement`, and `lisa spec check --changed`.
|
|
71
|
+
|
|
72
|
+
## Spec layout
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
.specs/
|
|
76
|
+
backend/
|
|
77
|
+
<spec-name>.md
|
|
78
|
+
<spec-name>.bench.<environment>.md
|
|
79
|
+
frontend/
|
|
80
|
+
<spec-name>.md
|
|
81
|
+
<spec-name>.bench.<environment>.md
|
|
82
|
+
environments/
|
|
83
|
+
<environment>.yaml
|
|
84
|
+
config.yaml
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Create backend specs in `.specs/backend/` and frontend specs in `.specs/frontend/`.
|
|
88
|
+
Keep environment definitions in `.specs/environments/` and workspace harness settings in `.specs/config.yaml`.
|
|
89
|
+
|
|
90
|
+
## Spec editing rules
|
|
91
|
+
|
|
92
|
+
Preserve YAML frontmatter and required sections when creating or updating an active base spec.
|
|
93
|
+
|
|
94
|
+
```md
|
|
95
|
+
---
|
|
96
|
+
id: backend.example-spec
|
|
97
|
+
status: active
|
|
98
|
+
code_paths:
|
|
99
|
+
- src/example/**
|
|
100
|
+
test_paths:
|
|
101
|
+
- tests/example/**
|
|
102
|
+
test_commands:
|
|
103
|
+
- bun test ./tests
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
# Summary
|
|
107
|
+
|
|
108
|
+
## Use Cases
|
|
109
|
+
|
|
110
|
+
## Invariants
|
|
111
|
+
|
|
112
|
+
## Failure Modes
|
|
113
|
+
|
|
114
|
+
## Acceptance Criteria
|
|
115
|
+
|
|
116
|
+
## Out of Scope
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Notes:
|
|
120
|
+
|
|
121
|
+
- `id`, `status`, and `code_paths` are required in frontmatter.
|
|
122
|
+
- Include at least one of `test_paths` or `test_commands`.
|
|
123
|
+
- `# Summary`, `## Use Cases`, `## Invariants`, `## Acceptance Criteria`, and `## Out of Scope` are required for active base specs.
|
|
124
|
+
- `lisa spec generate` also emits `## Failure Modes`, and planning uses it, so keep that section intact when present.
|
|
125
|
+
- Benchmark sidecars belong next to the base spec as `<spec-name>.bench.<environment>.md`.
|
|
126
|
+
|
|
127
|
+
## Guardrails
|
|
128
|
+
|
|
129
|
+
- Do not treat spec deletion as permission to remove code silently.
|
|
130
|
+
- Keep edits inside the mapped repo paths unless a small supporting change is required.
|
|
131
|
+
- Prefer the checked-in workflow in this repository over global harness-specific shortcuts.
|
|
132
|
+
|
|
133
|
+
## Aborting Operations
|
|
134
|
+
|
|
135
|
+
If you detect that you cannot complete a task due to missing tools or capabilities (e.g., no web browser for UI changes, no file system access for file modifications), you should abort gracefully rather than looping on a task you cannot complete.
|
|
136
|
+
|
|
137
|
+
To abort, output one of these formats as your final response:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
LISA_ABORT: <reason>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Or for multi-line reasons:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
LISA_ABORT_START
|
|
147
|
+
<reason>
|
|
148
|
+
LISA_ABORT_END
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The workflow will detect the abort signal, stop execution, and report the reason to the user. This prevents wasted time and provides clear feedback about why the operation could not be completed.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Lisa for Codex
|
|
2
|
+
|
|
3
|
+
Use this skill when working on Lisa from a Codex session.
|
|
4
|
+
|
|
5
|
+
## What Lisa is
|
|
6
|
+
|
|
7
|
+
Lisa is a spec-driven agent orchestration CLI. Treat `.specs/` as the source of truth for intended behavior.
|
|
8
|
+
|
|
9
|
+
Core workflow:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
specs -> git diff -> structured deltas -> plan -> single writer harness -> tests/benchmarks -> parallel read-only verification -> reports
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Working in this repo
|
|
16
|
+
|
|
17
|
+
- Start with `lisa spec status` to inspect the workspace and harness availability.
|
|
18
|
+
- Review active specs in `.specs/backend/` and `.specs/frontend/` before changing behavior.
|
|
19
|
+
- Prefer repo-local Lisa commands over ad hoc workflows that bypass the spec-first model.
|
|
20
|
+
- When behavior changes, update the relevant spec, code, tests, and checked-in docs or skills together.
|
|
21
|
+
|
|
22
|
+
If the local `lisa` command is not installed yet, run the same workflows from the checkout with `bun run lisa.ts spec ...`.
|
|
23
|
+
|
|
24
|
+
## Current CLI surface
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
lisa skill install --global|--local
|
|
28
|
+
lisa spec init
|
|
29
|
+
lisa spec config [options]
|
|
30
|
+
lisa spec status
|
|
31
|
+
lisa spec harness list
|
|
32
|
+
lisa spec guide [backend|frontend] [name] [options]
|
|
33
|
+
lisa spec generate [backend|frontend] [name] [options]
|
|
34
|
+
lisa spec implement [options]
|
|
35
|
+
lisa spec check --changed|--all [options]
|
|
36
|
+
lisa spec import <path...> [options]
|
|
37
|
+
lisa spec diff [options]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Common repo-local commands:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
lisa skill install --local
|
|
44
|
+
lisa skill install --global
|
|
45
|
+
lisa spec config --harness codex
|
|
46
|
+
lisa spec status
|
|
47
|
+
lisa spec harness list
|
|
48
|
+
lisa spec guide backend checkout-flow
|
|
49
|
+
lisa spec generate backend checkout-flow
|
|
50
|
+
lisa spec diff
|
|
51
|
+
lisa spec implement
|
|
52
|
+
lisa spec check --changed
|
|
53
|
+
lisa spec check --all
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Installing Lisa guidance
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
lisa skill install --local
|
|
60
|
+
lisa skill install --global
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- Local install target: `AGENTS.md`
|
|
64
|
+
- Global install target: `${CODEX_HOME:-~/.codex}/AGENTS.md`
|
|
65
|
+
|
|
66
|
+
## Seed guide workflow
|
|
67
|
+
|
|
68
|
+
- Run `lisa spec guide backend checkout-flow` when you want Lisa to create or reuse a draft seed spec and point you at the right harness-specific skill artifact.
|
|
69
|
+
- Keep editing the seed spec in `.specs/backend/` or `.specs/frontend/` until the placeholders are replaced with real Summary, Use Cases, Invariants, Failure Modes, Acceptance Criteria, and Out of Scope content.
|
|
70
|
+
- After the spec is ready, return to `lisa spec diff`, `lisa spec implement`, and `lisa spec check --changed`.
|
|
71
|
+
|
|
72
|
+
## Spec layout
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
.specs/
|
|
76
|
+
backend/
|
|
77
|
+
<spec-name>.md
|
|
78
|
+
<spec-name>.bench.<environment>.md
|
|
79
|
+
frontend/
|
|
80
|
+
<spec-name>.md
|
|
81
|
+
<spec-name>.bench.<environment>.md
|
|
82
|
+
environments/
|
|
83
|
+
<environment>.yaml
|
|
84
|
+
config.yaml
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Create backend specs in `.specs/backend/` and frontend specs in `.specs/frontend/`.
|
|
88
|
+
Keep environment definitions in `.specs/environments/` and workspace harness settings in `.specs/config.yaml`.
|
|
89
|
+
|
|
90
|
+
## Spec editing rules
|
|
91
|
+
|
|
92
|
+
Preserve YAML frontmatter and required sections when creating or updating an active base spec.
|
|
93
|
+
|
|
94
|
+
```md
|
|
95
|
+
---
|
|
96
|
+
id: backend.example-spec
|
|
97
|
+
status: active
|
|
98
|
+
code_paths:
|
|
99
|
+
- src/example/**
|
|
100
|
+
test_paths:
|
|
101
|
+
- tests/example/**
|
|
102
|
+
test_commands:
|
|
103
|
+
- bun test ./tests
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
# Summary
|
|
107
|
+
|
|
108
|
+
## Use Cases
|
|
109
|
+
|
|
110
|
+
## Invariants
|
|
111
|
+
|
|
112
|
+
## Failure Modes
|
|
113
|
+
|
|
114
|
+
## Acceptance Criteria
|
|
115
|
+
|
|
116
|
+
## Out of Scope
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Notes:
|
|
120
|
+
|
|
121
|
+
- `id`, `status`, and `code_paths` are required in frontmatter.
|
|
122
|
+
- Include at least one of `test_paths` or `test_commands`.
|
|
123
|
+
- `# Summary`, `## Use Cases`, `## Invariants`, `## Acceptance Criteria`, and `## Out of Scope` are required for active base specs.
|
|
124
|
+
- `lisa spec generate` also emits `## Failure Modes`, and planning uses it, so keep that section intact when present.
|
|
125
|
+
- Benchmark sidecars belong next to the base spec as `<spec-name>.bench.<environment>.md`.
|
|
126
|
+
|
|
127
|
+
## Guardrails
|
|
128
|
+
|
|
129
|
+
- Do not treat spec deletion as permission to remove code silently.
|
|
130
|
+
- Keep edits inside the mapped repo paths unless a small supporting change is required.
|
|
131
|
+
- Prefer the checked-in workflow in this repository over global harness-specific shortcuts.
|
|
132
|
+
|
|
133
|
+
## Aborting Operations
|
|
134
|
+
|
|
135
|
+
If you detect that you cannot complete a task due to missing tools or capabilities (e.g., no web browser for UI changes, no file system access for file modifications), you should abort gracefully rather than looping on a task you cannot complete.
|
|
136
|
+
|
|
137
|
+
To abort, output one of these formats as your final response:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
LISA_ABORT: <reason>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Or for multi-line reasons:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
LISA_ABORT_START
|
|
147
|
+
<reason>
|
|
148
|
+
LISA_ABORT_END
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The workflow will detect the abort signal, stop execution, and report the reason to the user. This prevents wasted time and provides clear feedback about why the operation could not be completed.
|