@fermindi/pwn-cli 0.1.1 ā 0.3.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 -21
- package/README.md +265 -251
- package/cli/batch.js +333 -333
- package/cli/codespaces.js +303 -303
- package/cli/index.js +112 -91
- package/cli/inject.js +90 -67
- package/cli/knowledge.js +531 -531
- package/cli/migrate.js +466 -0
- package/cli/notify.js +135 -135
- package/cli/patterns.js +665 -665
- package/cli/save.js +206 -0
- package/cli/status.js +91 -91
- package/cli/update.js +189 -0
- package/cli/validate.js +61 -61
- package/package.json +70 -70
- package/src/core/inject.js +300 -204
- package/src/core/state.js +91 -91
- package/src/core/validate.js +202 -202
- package/src/core/workspace.js +176 -176
- package/src/index.js +20 -20
- package/src/knowledge/gc.js +308 -308
- package/src/knowledge/lifecycle.js +401 -401
- package/src/knowledge/promote.js +364 -364
- package/src/knowledge/references.js +342 -342
- package/src/patterns/matcher.js +218 -218
- package/src/patterns/registry.js +375 -375
- package/src/patterns/triggers.js +423 -423
- package/src/services/batch-service.js +849 -849
- package/src/services/notification-service.js +342 -342
- package/templates/codespaces/devcontainer.json +52 -52
- package/templates/codespaces/setup.sh +70 -70
- package/templates/workspace/.ai/README.md +164 -164
- package/templates/workspace/.ai/agents/README.md +204 -204
- package/templates/workspace/.ai/agents/claude.md +625 -625
- package/templates/workspace/.ai/config/README.md +79 -79
- package/templates/workspace/.ai/config/notifications.template.json +20 -20
- package/templates/workspace/.ai/memory/deadends.md +79 -79
- package/templates/workspace/.ai/memory/decisions.md +58 -58
- package/templates/workspace/.ai/memory/patterns.md +65 -65
- package/templates/workspace/.ai/patterns/backend/README.md +126 -126
- package/templates/workspace/.ai/patterns/frontend/README.md +103 -103
- package/templates/workspace/.ai/patterns/index.md +256 -256
- package/templates/workspace/.ai/patterns/triggers.json +1087 -1087
- package/templates/workspace/.ai/patterns/universal/README.md +141 -141
- package/templates/workspace/.ai/state.template.json +8 -8
- package/templates/workspace/.ai/tasks/active.md +77 -77
- package/templates/workspace/.ai/tasks/backlog.md +95 -95
- package/templates/workspace/.ai/workflows/batch-task.md +356 -356
package/cli/validate.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { validate, getStructureReport } from '../src/core/validate.js';
|
|
3
|
-
|
|
4
|
-
export default async function validateCommand(args = []) {
|
|
5
|
-
const verbose = args.includes('--verbose') || args.includes('-v');
|
|
6
|
-
|
|
7
|
-
console.log('š Validating PWN workspace...\n');
|
|
8
|
-
|
|
9
|
-
const result = validate();
|
|
10
|
-
|
|
11
|
-
if (verbose) {
|
|
12
|
-
const report = getStructureReport();
|
|
13
|
-
console.log('š Structure Report:\n');
|
|
14
|
-
|
|
15
|
-
console.log(' Directories:');
|
|
16
|
-
for (const [dir, exists] of Object.entries(report.directories)) {
|
|
17
|
-
const icon = exists ? 'ā' : 'ā';
|
|
18
|
-
console.log(` ${icon} .ai/${dir}/`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
console.log('\n Files:');
|
|
22
|
-
for (const [file, exists] of Object.entries(report.files)) {
|
|
23
|
-
const icon = exists ? 'ā' : 'ā';
|
|
24
|
-
console.log(` ${icon} .ai/${file}`);
|
|
25
|
-
}
|
|
26
|
-
console.log();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (result.valid) {
|
|
30
|
-
console.log('ā
Workspace is valid\n');
|
|
31
|
-
|
|
32
|
-
if (result.warnings.length > 0) {
|
|
33
|
-
console.log('ā ļø Warnings:');
|
|
34
|
-
for (const warning of result.warnings) {
|
|
35
|
-
console.log(` - ${warning}`);
|
|
36
|
-
}
|
|
37
|
-
console.log();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
process.exit(0);
|
|
41
|
-
} else {
|
|
42
|
-
console.log('ā Workspace has issues:\n');
|
|
43
|
-
|
|
44
|
-
for (const issue of result.issues) {
|
|
45
|
-
console.log(` ā ${issue}`);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (result.warnings.length > 0) {
|
|
49
|
-
console.log('\nā ļø Warnings:');
|
|
50
|
-
for (const warning of result.warnings) {
|
|
51
|
-
console.log(` - ${warning}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
console.log('\nš” To fix, try:');
|
|
56
|
-
console.log(' pwn inject --force (recreate workspace)');
|
|
57
|
-
console.log();
|
|
58
|
-
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { validate, getStructureReport } from '../src/core/validate.js';
|
|
3
|
+
|
|
4
|
+
export default async function validateCommand(args = []) {
|
|
5
|
+
const verbose = args.includes('--verbose') || args.includes('-v');
|
|
6
|
+
|
|
7
|
+
console.log('š Validating PWN workspace...\n');
|
|
8
|
+
|
|
9
|
+
const result = validate();
|
|
10
|
+
|
|
11
|
+
if (verbose) {
|
|
12
|
+
const report = getStructureReport();
|
|
13
|
+
console.log('š Structure Report:\n');
|
|
14
|
+
|
|
15
|
+
console.log(' Directories:');
|
|
16
|
+
for (const [dir, exists] of Object.entries(report.directories)) {
|
|
17
|
+
const icon = exists ? 'ā' : 'ā';
|
|
18
|
+
console.log(` ${icon} .ai/${dir}/`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
console.log('\n Files:');
|
|
22
|
+
for (const [file, exists] of Object.entries(report.files)) {
|
|
23
|
+
const icon = exists ? 'ā' : 'ā';
|
|
24
|
+
console.log(` ${icon} .ai/${file}`);
|
|
25
|
+
}
|
|
26
|
+
console.log();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (result.valid) {
|
|
30
|
+
console.log('ā
Workspace is valid\n');
|
|
31
|
+
|
|
32
|
+
if (result.warnings.length > 0) {
|
|
33
|
+
console.log('ā ļø Warnings:');
|
|
34
|
+
for (const warning of result.warnings) {
|
|
35
|
+
console.log(` - ${warning}`);
|
|
36
|
+
}
|
|
37
|
+
console.log();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
process.exit(0);
|
|
41
|
+
} else {
|
|
42
|
+
console.log('ā Workspace has issues:\n');
|
|
43
|
+
|
|
44
|
+
for (const issue of result.issues) {
|
|
45
|
+
console.log(` ā ${issue}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (result.warnings.length > 0) {
|
|
49
|
+
console.log('\nā ļø Warnings:');
|
|
50
|
+
for (const warning of result.warnings) {
|
|
51
|
+
console.log(` - ${warning}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
console.log('\nš” To fix, try:');
|
|
56
|
+
console.log(' pwn inject --force (recreate workspace)');
|
|
57
|
+
console.log();
|
|
58
|
+
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fermindi/pwn-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Professional AI Workspace - Inject structured memory and automation into any project for AI-powered development",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"pwn": "./cli/index.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "./src/index.js",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": "./src/index.js",
|
|
12
|
-
"./core/state": "./src/core/state.js",
|
|
13
|
-
"./core/inject": "./src/core/inject.js",
|
|
14
|
-
"./core/validate": "./src/core/validate.js",
|
|
15
|
-
"./core/workspace": "./src/core/workspace.js",
|
|
16
|
-
"./services/batch": "./src/services/batch-service.js",
|
|
17
|
-
"./services/notifications": "./src/services/notification-service.js",
|
|
18
|
-
"./patterns/registry": "./src/patterns/registry.js",
|
|
19
|
-
"./patterns/triggers": "./src/patterns/triggers.js",
|
|
20
|
-
"./knowledge/lifecycle": "./src/knowledge/lifecycle.js",
|
|
21
|
-
"./knowledge/references": "./src/knowledge/references.js",
|
|
22
|
-
"./knowledge/gc": "./src/knowledge/gc.js",
|
|
23
|
-
"./knowledge/promote": "./src/knowledge/promote.js"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"cli/",
|
|
27
|
-
"src/",
|
|
28
|
-
"templates/",
|
|
29
|
-
"README.md",
|
|
30
|
-
"LICENSE"
|
|
31
|
-
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"start": "node cli/index.js",
|
|
34
|
-
"dev": "node --watch cli/index.js",
|
|
35
|
-
"test": "vitest run",
|
|
36
|
-
"test:watch": "vitest",
|
|
37
|
-
"test:coverage": "vitest run --coverage",
|
|
38
|
-
"prepublishOnly": "npm test"
|
|
39
|
-
},
|
|
40
|
-
"keywords": [
|
|
41
|
-
"ai",
|
|
42
|
-
"cli",
|
|
43
|
-
"workspace",
|
|
44
|
-
"automation",
|
|
45
|
-
"claude",
|
|
46
|
-
"patterns",
|
|
47
|
-
"memory",
|
|
48
|
-
"decisions",
|
|
49
|
-
"batch",
|
|
50
|
-
"codespaces",
|
|
51
|
-
"developer-tools",
|
|
52
|
-
"productivity"
|
|
53
|
-
],
|
|
54
|
-
"author": "Diego Fernandes",
|
|
55
|
-
"license": "MIT",
|
|
56
|
-
"repository": {
|
|
57
|
-
"type": "git",
|
|
58
|
-
"url": "git+https://github.com/fermindi/pwn.git"
|
|
59
|
-
},
|
|
60
|
-
"bugs": {
|
|
61
|
-
"url": "https://github.com/fermindi/pwn/issues"
|
|
62
|
-
},
|
|
63
|
-
"homepage": "https://github.com/fermindi/pwn#readme",
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=18.0.0"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"vitest": "^2.0.0"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fermindi/pwn-cli",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Professional AI Workspace - Inject structured memory and automation into any project for AI-powered development",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"pwn": "./cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./src/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./src/index.js",
|
|
12
|
+
"./core/state": "./src/core/state.js",
|
|
13
|
+
"./core/inject": "./src/core/inject.js",
|
|
14
|
+
"./core/validate": "./src/core/validate.js",
|
|
15
|
+
"./core/workspace": "./src/core/workspace.js",
|
|
16
|
+
"./services/batch": "./src/services/batch-service.js",
|
|
17
|
+
"./services/notifications": "./src/services/notification-service.js",
|
|
18
|
+
"./patterns/registry": "./src/patterns/registry.js",
|
|
19
|
+
"./patterns/triggers": "./src/patterns/triggers.js",
|
|
20
|
+
"./knowledge/lifecycle": "./src/knowledge/lifecycle.js",
|
|
21
|
+
"./knowledge/references": "./src/knowledge/references.js",
|
|
22
|
+
"./knowledge/gc": "./src/knowledge/gc.js",
|
|
23
|
+
"./knowledge/promote": "./src/knowledge/promote.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"cli/",
|
|
27
|
+
"src/",
|
|
28
|
+
"templates/",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"start": "node cli/index.js",
|
|
34
|
+
"dev": "node --watch cli/index.js",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"test:coverage": "vitest run --coverage",
|
|
38
|
+
"prepublishOnly": "npm test"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"cli",
|
|
43
|
+
"workspace",
|
|
44
|
+
"automation",
|
|
45
|
+
"claude",
|
|
46
|
+
"patterns",
|
|
47
|
+
"memory",
|
|
48
|
+
"decisions",
|
|
49
|
+
"batch",
|
|
50
|
+
"codespaces",
|
|
51
|
+
"developer-tools",
|
|
52
|
+
"productivity"
|
|
53
|
+
],
|
|
54
|
+
"author": "Diego Fernandes",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/fermindi/pwn.git"
|
|
59
|
+
},
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/fermindi/pwn/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/fermindi/pwn#readme",
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=18.0.0"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"vitest": "^2.0.0"
|
|
69
|
+
}
|
|
70
|
+
}
|