@metasession.co/devaudit-cli 0.1.1 → 0.1.2
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 +13 -10
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
- package/scripts/upload-evidence.sh +225 -0
- package/sdlc/.claude/settings.local.json +11 -0
- package/sdlc/CLAUDE.md +73 -0
- package/sdlc/HOST_ADAPTER.md +127 -0
- package/sdlc/SKILLS.md +137 -0
- package/sdlc/STACK_ADAPTER.md +130 -0
- package/sdlc/ai-rules/INSTRUCTIONS-SDLC.md +172 -0
- package/sdlc/ai-rules/README.md +103 -0
- package/sdlc/ai-rules/SDLC_RULES.md +584 -0
- package/sdlc/ai-rules/claude/CLAUDE.md +192 -0
- package/sdlc/ai-rules/cursor/.cursorrules +167 -0
- package/sdlc/ai-rules/windsurf/.windsurfrules +167 -0
- package/sdlc/article.md +219 -0
- package/sdlc/files/_common/0-project-setup.md +410 -0
- package/sdlc/files/_common/1-plan-requirement.md +381 -0
- package/sdlc/files/_common/2-implement-and-test.md +276 -0
- package/sdlc/files/_common/3-compile-evidence.md +603 -0
- package/sdlc/files/_common/4-submit-for-review.md +362 -0
- package/sdlc/files/_common/5-deploy-main.md +251 -0
- package/sdlc/files/_common/Periodic_Security_Review_Schedule.md +169 -0
- package/sdlc/files/_common/README_TEMPLATE.md +441 -0
- package/sdlc/files/_common/Test_Architecture.md +461 -0
- package/sdlc/files/_common/Test_Plan_TEMPLATE.md +311 -0
- package/sdlc/files/_common/Test_Policy.md +277 -0
- package/sdlc/files/_common/Test_Strategy.md +359 -0
- package/sdlc/files/_common/github/ISSUE_TEMPLATE/bug.yml +75 -0
- package/sdlc/files/_common/github/ISSUE_TEMPLATE/config.yml +11 -0
- package/sdlc/files/_common/github/ISSUE_TEMPLATE/requirement.yml +75 -0
- package/sdlc/files/_common/github/ISSUE_TEMPLATE/task.yml +48 -0
- package/sdlc/files/_common/github/pull_request_template.md +69 -0
- package/sdlc/files/_common/implementing-an-sdlc-issue.md +413 -0
- package/sdlc/files/_common/scripts/derive-release-version.sh +40 -0
- package/sdlc/files/_common/scripts/derive-release-version.test.sh +98 -0
- package/sdlc/files/_common/scripts/submit-for-uat-review.sh +162 -0
- package/sdlc/files/_common/scripts/validate-commits.sh +83 -0
- package/sdlc/files/_common/scripts/validate-compliance-artifacts.sh +202 -0
- package/sdlc/files/_common/scripts/validate-compliance-artifacts.test.sh +202 -0
- package/sdlc/files/_common/skills/_schema/skill.schema.json +36 -0
- package/sdlc/files/_common/skills/e2e-test-engineer/SKILL.md +254 -0
- package/sdlc/files/_common/skills/e2e-test-engineer/references/bootstrap.md +244 -0
- package/sdlc/files/_common/skills/e2e-test-engineer/references/evidence.ts +40 -0
- package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +189 -0
- package/sdlc/files/_common/skills/sdlc-implementer/references/call-graph.md +64 -0
- package/sdlc/files/_common/skills/sdlc-implementer/references/change-request-loop.md +192 -0
- package/sdlc/files/_common/skills/sdlc-implementer/references/compliance-constraints.md +81 -0
- package/sdlc/files/ci/check-release-approval.yml.template +201 -0
- package/sdlc/files/ci/ci-status-fallback.yml.template +41 -0
- package/sdlc/files/ci/ci.yml.template +390 -0
- package/sdlc/files/ci/compliance-evidence.yml.template +161 -0
- package/sdlc/files/ci/compliance-validation.yml.template +34 -0
- package/sdlc/files/ci/post-deploy-prod.yml.template +159 -0
- package/sdlc/files/ci/python/ci.yml.template +335 -0
- package/sdlc/files/hosts/_schema/adapter.schema.json +103 -0
- package/sdlc/files/hosts/railway/adapter.json +32 -0
- package/sdlc/files/sdlc-config.example.json +74 -0
- package/sdlc/files/stacks/_schema/adapter.schema.json +151 -0
- package/sdlc/files/stacks/node/adapter.json +54 -0
- package/sdlc/files/stacks/node/hooks/.prettierrc.json +9 -0
- package/sdlc/files/stacks/node/hooks/commit-msg +7 -0
- package/sdlc/files/stacks/node/hooks/commitlint.config.mjs +64 -0
- package/sdlc/files/stacks/node/hooks/lint-staged.config.mjs +16 -0
- package/sdlc/files/stacks/node/hooks/pre-commit +13 -0
- package/sdlc/files/stacks/node/hooks/pre-push +15 -0
- package/sdlc/files/stacks/node/scripts/check-requirement-jsdoc.sh +54 -0
- package/sdlc/files/stacks/python/adapter.json +36 -0
- package/sdlc/files/stacks/python/hooks/.pre-commit-config.yaml +51 -0
package/README.md
CHANGED
|
@@ -20,23 +20,26 @@ Requires Node ≥ 22. Native binaries (no Node runtime needed) are on the roadma
|
|
|
20
20
|
- `devaudit --help` / `--version`
|
|
21
21
|
- `devaudit doctor` — checks `node` (>=22), `git`, `gh`, `jq`, `curl` are on PATH
|
|
22
22
|
- `devaudit status [path]` — reads `sdlc-config.json` from a consumer project, prints stack/host/slug/source-dirs, and reports which framework files are present
|
|
23
|
+
- `devaudit install [path]` — **native TS, 11-step interactive onboarding** under `src/install/` (auth-probe → detect-stack → prompts → write-config → project → api-key → github → hooks-bootstrap → branch-protection → sync-templates → done-report). Replaces the former `scripts/sdlc-onboard.sh` (removed); no shell-out.
|
|
24
|
+
- `devaudit update <version> <paths...>` — **native TS, multi-project template sync** under `src/update/`. Reads each consumer's `sdlc-config.json`, copies framework files, fires `beforeSync` / `afterSync` plugin hooks. Replaces the former `scripts/sync-sdlc.sh` (removed); no shell-out.
|
|
25
|
+
- `devaudit push <slug> <req-id> <type> <file>` — uploads evidence to the portal (port of `upload-evidence.sh`; file or directory; retries on 429/5xx with backoff)
|
|
23
26
|
- `devaudit auth login` — interactive PAT paste flow; validates against the portal; stores at `~/.config/devaudit/auth.json` (mode 0600)
|
|
24
27
|
- `devaudit auth logout` — wipes the cached token
|
|
25
28
|
- `devaudit auth status` — verifies the cached token (or `DEVAUDIT_USER_TOKEN` env var) by calling `GET /api/projects`
|
|
26
|
-
- `devaudit
|
|
27
|
-
- `devaudit install
|
|
28
|
-
- `devaudit
|
|
29
|
+
- `devaudit plugin list` — discovers plugins in `~/.config/devaudit/plugins/`, validates manifests, reports load state
|
|
30
|
+
- `devaudit plugin install <source>` — npm-name or Git URL; clones / installs / validates / registers
|
|
31
|
+
- `devaudit plugin remove <name>` — deregisters and rm-rfs the plugin directory
|
|
32
|
+
- `devaudit plugin update` — git-pulls each plugin directory
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
40 vitest tests across 8 test files; all green on Linux + macOS + Windows.
|
|
31
35
|
|
|
32
36
|
### Stubbed (exit code 1 + helpful pointer)
|
|
33
37
|
|
|
34
|
-
These need workstream B (portal-side) prereqs
|
|
38
|
+
These need workstream B (portal-side) prereqs before they can do anything real:
|
|
35
39
|
|
|
36
|
-
- `devaudit org list / switch / policy list|apply / report`
|
|
37
|
-
- `devaudit
|
|
38
|
-
- `devaudit
|
|
39
|
-
- `devaudit upgrade` (self-update — needs distribution channel established first)
|
|
40
|
+
- `devaudit org list / switch / policy list|apply / report` — needs portal RBAC + org endpoints
|
|
41
|
+
- `devaudit config get / set / list` — config file already exists, just no CLI surface yet
|
|
42
|
+
- `devaudit upgrade` — self-update; needs distribution channel established first (Step 2 of trajectory — native binaries via brew/scoop/curl)
|
|
40
43
|
|
|
41
44
|
## Develop locally
|
|
42
45
|
|
|
@@ -70,7 +73,7 @@ cli/
|
|
|
70
73
|
|
|
71
74
|
Future structure (per [build-plan.md](../docs/devaudit-cli/build-plan.md)): `src/commands/{install,update,push,auth/*,org/*,plugin/*,config/*,status,upgrade}.ts` and `src/lib/{adapter,devaudit-api,sdlc-config,auth,git-provider,policy,plugin,report,prompts,paths,stack-detect}.ts`.
|
|
72
75
|
|
|
73
|
-
## Why a CLI
|
|
76
|
+
## Why a CLI (it replaced the original bash scripts)
|
|
74
77
|
|
|
75
78
|
- Cross-platform native (Linux/macOS/Windows; no WSL requirement)
|
|
76
79
|
- JSON output mode on every command for CI
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function emitJsonResult(payload) {
|
|
|
54
54
|
|
|
55
55
|
// package.json
|
|
56
56
|
var package_default = {
|
|
57
|
-
version: "0.1.
|
|
57
|
+
version: "0.1.2"};
|
|
58
58
|
|
|
59
59
|
// src/lib/version.ts
|
|
60
60
|
var CLI_VERSION = package_default.version;
|
|
@@ -532,7 +532,7 @@ async function runStatus(options) {
|
|
|
532
532
|
if (missingFiles.length === 0) {
|
|
533
533
|
log.success("All checked framework files are present.");
|
|
534
534
|
} else {
|
|
535
|
-
log.warn(`${missingFiles.length} framework file(s) missing. Re-sync
|
|
535
|
+
log.warn(`${missingFiles.length} framework file(s) missing. Re-sync with \`devaudit update <version> <path>\` to refresh.`);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
var RETRYABLE_STATUSES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
|
|
@@ -708,9 +708,21 @@ async function resolveInstallerRoot() {
|
|
|
708
708
|
const override = process.env["DEVAUDIT_INSTALLER_ROOT"];
|
|
709
709
|
if (override) return resolve(override);
|
|
710
710
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
const candidates = [resolve(here, ".."), resolve(here, "..", "..")];
|
|
712
|
+
for (const candidate of candidates) {
|
|
713
|
+
if (await hasTemplates(candidate)) return candidate;
|
|
714
|
+
}
|
|
715
|
+
throw new Error(
|
|
716
|
+
"Could not locate the SDLC templates (sdlc/files). Reinstall @metasession.co/devaudit-cli, or set DEVAUDIT_INSTALLER_ROOT to a DevAudit-Installer checkout."
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
async function hasTemplates(root) {
|
|
720
|
+
try {
|
|
721
|
+
await promises.access(resolve(root, "sdlc", "files"));
|
|
722
|
+
return true;
|
|
723
|
+
} catch {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
714
726
|
}
|
|
715
727
|
async function ensureDir(dir, mode = 493) {
|
|
716
728
|
await promises.mkdir(dir, { recursive: true, mode });
|