weyaw 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 +124 -0
- package/bin/aw.js +82 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jasonzwu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Weyaw
|
|
2
|
+
|
|
3
|
+
Weyaw is a local, artifact-backed workflow for agent work.
|
|
4
|
+
|
|
5
|
+
It exists for projects where agent work should be resumable, inspectable, and grounded in project files rather than scattered across chat history. Weyaw keeps the work loop small: define the intention, record the plan, execute with evidence, verify the result, and preserve useful knowledge for future agents.
|
|
6
|
+
|
|
7
|
+
## Motivation
|
|
8
|
+
|
|
9
|
+
Agent sessions are good at local reasoning, but they are easy to interrupt and hard to audit after the fact. Weyaw treats agent work as a project artifact:
|
|
10
|
+
|
|
11
|
+
- Tasks have durable state and lifecycle.
|
|
12
|
+
- Plans, execution notes, verification, and summaries are written down.
|
|
13
|
+
- Project guidance stays close to the code.
|
|
14
|
+
- Work can be resumed without reconstructing context from memory.
|
|
15
|
+
|
|
16
|
+
The goal is not to replace human judgment or turn every change into process. The goal is to make non-trivial agent work easier to continue, review, and trust.
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
Weyaw supports today:
|
|
21
|
+
|
|
22
|
+
- Local project onboarding and task routing.
|
|
23
|
+
- Persistent task artifacts for plan, execution, verification, review, and consolidation.
|
|
24
|
+
- Project-scoped agent skills for common workflow actions.
|
|
25
|
+
- Roadmap and blueprint notes for project direction and design decisions.
|
|
26
|
+
- Health checks for workflow artifact consistency.
|
|
27
|
+
- Local management for incremental todo work through the project workflow workspace, normally `.aw`, plus constraints, process records, and task state.
|
|
28
|
+
|
|
29
|
+
Weyaw has growing support for:
|
|
30
|
+
|
|
31
|
+
- A read-only dashboard for inspecting workflow state.
|
|
32
|
+
- Agent coordination and longer main/worker flows when they fit the artifact-backed workflow.
|
|
33
|
+
|
|
34
|
+
Weyaw is planned to support:
|
|
35
|
+
|
|
36
|
+
- Local indexing or retrieval over existing code, specs, roadmap, and retained knowledge outside the active task loop.
|
|
37
|
+
- Project-management views over retained project artifacts beyond the current task loop.
|
|
38
|
+
|
|
39
|
+
Weyaw does not try to be:
|
|
40
|
+
|
|
41
|
+
- A replacement for Git history or normal source-control practice.
|
|
42
|
+
|
|
43
|
+
## Common Skills
|
|
44
|
+
|
|
45
|
+
Use these prompts from an agent session in a Weyaw project:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
$aw-init <project context>
|
|
49
|
+
$aw <task intention>
|
|
50
|
+
$aw-resume <task-id>
|
|
51
|
+
$aw-status
|
|
52
|
+
$aw-help
|
|
53
|
+
$aw-health
|
|
54
|
+
$aw-blueprint <design or standards update>
|
|
55
|
+
$aw-roadmap <roadmap update>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Typical use:
|
|
59
|
+
|
|
60
|
+
- `$aw-init` establishes or reconciles project context.
|
|
61
|
+
- `$aw` starts scoped task work from an intention.
|
|
62
|
+
- `$aw-resume` continues recorded work.
|
|
63
|
+
- `$aw-status` reports current workflow state.
|
|
64
|
+
- `$aw-help` suggests the next useful Weyaw action.
|
|
65
|
+
- `$aw-health` checks or repairs workflow consistency.
|
|
66
|
+
- `$aw-blueprint` updates durable design language or standards.
|
|
67
|
+
- `$aw-roadmap` updates project direction without starting implementation.
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
Requires [Node.js](https://nodejs.org/) 18+.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm install -g weyaw
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The correct pre-built binary for your platform is installed automatically.
|
|
78
|
+
No Rust toolchain needed. Verify with `aw --help`.
|
|
79
|
+
|
|
80
|
+
See [Getting Started](docs/getting-started.md) for full details and first
|
|
81
|
+
steps.
|
|
82
|
+
|
|
83
|
+
## Documentation
|
|
84
|
+
|
|
85
|
+
- [Getting Started](docs/getting-started.md)
|
|
86
|
+
- [Concepts](docs/concepts.md)
|
|
87
|
+
- [CLI](docs/cli.md)
|
|
88
|
+
- [Skills](docs/skills.md)
|
|
89
|
+
- [Artifacts](docs/artifacts.md)
|
|
90
|
+
- [Dashboard](docs/dashboard.md)
|
|
91
|
+
- [Release](docs/release.md)
|
|
92
|
+
|
|
93
|
+
## Design Principles
|
|
94
|
+
|
|
95
|
+
- Keep workflow state local to the project.
|
|
96
|
+
- Prefer small, explicit task steps over hidden agent memory.
|
|
97
|
+
- Record evidence for changes that matter.
|
|
98
|
+
- Keep human decisions visible.
|
|
99
|
+
- Treat generated and runtime artifacts as separate from source design.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
This repository uses Rust 1.96.0. When `rustup` is installed, it reads
|
|
104
|
+
`rust-toolchain.toml` and selects the project toolchain automatically.
|
|
105
|
+
|
|
106
|
+
Run the focused local checks before handing off Rust changes:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
cargo fmt --check
|
|
110
|
+
cargo test --locked --all-targets
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Npm Package
|
|
114
|
+
|
|
115
|
+
The npm metadata in this repository exposes the Rust command as `aw`. The
|
|
116
|
+
package remains private/local at this stage and can be linked globally for
|
|
117
|
+
local use.
|
|
118
|
+
|
|
119
|
+
Run the focused package checks with:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
npm run package:metadata-test
|
|
123
|
+
npm run package:smoke
|
|
124
|
+
```
|
package/bin/aw.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const { spawnSync } = require('node:child_process');
|
|
7
|
+
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
const exeSuffix = process.platform === 'win32' ? '.exe' : '';
|
|
10
|
+
|
|
11
|
+
// Map (platform, arch) to the platform package name
|
|
12
|
+
const PLATFORM_PACKAGES = {
|
|
13
|
+
'linux-x64': 'weyaw-linux-x64',
|
|
14
|
+
'darwin-arm64': 'weyaw-darwin-arm64',
|
|
15
|
+
'win32-x64': 'weyaw-win32-x64',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function resolvePlatformBinary() {
|
|
19
|
+
const key = `${process.platform}-${process.arch}`;
|
|
20
|
+
const pkgName = PLATFORM_PACKAGES[key];
|
|
21
|
+
if (!pkgName) return null;
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
// require.resolve follows Node's module resolution into node_modules
|
|
25
|
+
const pkgJson = require.resolve(`${pkgName}/package.json`);
|
|
26
|
+
return path.join(path.dirname(pkgJson), `aw${exeSuffix}`);
|
|
27
|
+
} catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Dev-mode fallback: look for a locally-built binary in the source tree
|
|
33
|
+
function resolveLocalBinary() {
|
|
34
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
35
|
+
const candidates = [
|
|
36
|
+
process.env.WEYAW_RS_BIN,
|
|
37
|
+
path.join(packageRoot, 'target', 'release', `aw${exeSuffix}`),
|
|
38
|
+
path.join(packageRoot, 'target', 'debug', `aw${exeSuffix}`),
|
|
39
|
+
].filter(Boolean);
|
|
40
|
+
|
|
41
|
+
return candidates.find((p) => fs.existsSync(p)) || null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function run(command, childArgs, options = {}) {
|
|
45
|
+
const result = spawnSync(command, childArgs, { stdio: 'inherit', ...options });
|
|
46
|
+
|
|
47
|
+
if (result.error) {
|
|
48
|
+
console.error(`aw: failed to launch ${command}: ${result.error.message}`);
|
|
49
|
+
if (result.error.code === 'ENOENT' && command === 'cargo') {
|
|
50
|
+
console.error('aw: install Rust/Cargo or set WEYAW_RS_BIN to an aw executable.');
|
|
51
|
+
}
|
|
52
|
+
process.exit(result.error.code === 'ENOENT' ? 127 : 1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (result.signal) {
|
|
56
|
+
try { process.kill(process.pid, result.signal); } catch { /* noop */ }
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 1. Try platform package
|
|
64
|
+
const platformBin = resolvePlatformBinary();
|
|
65
|
+
if (platformBin && fs.existsSync(platformBin)) {
|
|
66
|
+
run(platformBin, args);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 2. Try local build (dev mode)
|
|
70
|
+
const localBin = resolveLocalBinary();
|
|
71
|
+
if (localBin) {
|
|
72
|
+
run(localBin, args);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 3. Fall back to cargo run (dev mode without pre-built binary)
|
|
76
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
77
|
+
if (fs.existsSync(path.join(packageRoot, 'Cargo.toml'))) {
|
|
78
|
+
run('cargo', ['run', '--locked', '--bin', 'aw', '--', ...args], { cwd: packageRoot });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
console.error('aw: no binary found. Install with: npm install -g weyaw');
|
|
82
|
+
process.exit(1);
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "weyaw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Weyaw artifact-backed workflow CLI and local server",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/jsnzwu/weyaw.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/jsnzwu/weyaw/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/jsnzwu/weyaw#readme",
|
|
14
|
+
"bin": {
|
|
15
|
+
"aw": "bin/aw.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"bin",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"weyaw-linux-x64": "0.1.0",
|
|
24
|
+
"weyaw-darwin-arm64": "0.1.0",
|
|
25
|
+
"weyaw-win32-x64": "0.1.0"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"package:metadata-test": "node tests/package_metadata.test.js",
|
|
29
|
+
"package:smoke": "node bin/aw.js --help || test $? -eq 2"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"workflow",
|
|
36
|
+
"agents",
|
|
37
|
+
"cli",
|
|
38
|
+
"rust"
|
|
39
|
+
]
|
|
40
|
+
}
|