autonomous-sdlc-harness 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 +201 -0
- package/NOTICE +7 -0
- package/README.md +24 -0
- package/dist/cli.js +194 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/config.js +561 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/daemon.js +791 -0
- package/dist/commands/daemon.js.map +1 -0
- package/dist/commands/doctor.js +336 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.js +2023 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/registry.js +42 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/config/check.js +505 -0
- package/dist/config/check.js.map +1 -0
- package/dist/config/io.js +177 -0
- package/dist/config/io.js.map +1 -0
- package/dist/config/model.js +406 -0
- package/dist/config/model.js.map +1 -0
- package/dist/core/errors.js +71 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/git.js +537 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/json.js +125 -0
- package/dist/core/json.js.map +1 -0
- package/dist/core/layerCoverage.js +141 -0
- package/dist/core/layerCoverage.js.map +1 -0
- package/dist/core/layerGapRemedy.js +62 -0
- package/dist/core/layerGapRemedy.js.map +1 -0
- package/dist/core/nameList.js +23 -0
- package/dist/core/nameList.js.map +1 -0
- package/dist/core/paths.js +153 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/prompt.js +206 -0
- package/dist/core/prompt.js.map +1 -0
- package/dist/core/repoPaths.js +55 -0
- package/dist/core/repoPaths.js.map +1 -0
- package/dist/core/report.js +150 -0
- package/dist/core/report.js.map +1 -0
- package/dist/core/templating.js +88 -0
- package/dist/core/templating.js.map +1 -0
- package/dist/core/writer.js +479 -0
- package/dist/core/writer.js.map +1 -0
- package/dist/daemon/backend.js +180 -0
- package/dist/daemon/backend.js.map +1 -0
- package/dist/daemon/units.js +380 -0
- package/dist/daemon/units.js.map +1 -0
- package/dist/detect/nestedApplication.js +79 -0
- package/dist/detect/nestedApplication.js.map +1 -0
- package/dist/detect/presets.js +2033 -0
- package/dist/detect/presets.js.map +1 -0
- package/dist/detect/signals.js +1368 -0
- package/dist/detect/signals.js.map +1 -0
- package/dist/doctor/checks.js +3530 -0
- package/dist/doctor/checks.js.map +1 -0
- package/dist/generators/claudeContext.js +588 -0
- package/dist/generators/claudeContext.js.map +1 -0
- package/dist/generators/githooks.js +446 -0
- package/dist/generators/githooks.js.map +1 -0
- package/dist/generators/harnessConfig.js +632 -0
- package/dist/generators/harnessConfig.js.map +1 -0
- package/dist/generators/notifications.js +191 -0
- package/dist/generators/notifications.js.map +1 -0
- package/dist/generators/outerLoopScripts.js +165 -0
- package/dist/generators/outerLoopScripts.js.map +1 -0
- package/dist/generators/permissionProfile.js +1172 -0
- package/dist/generators/permissionProfile.js.map +1 -0
- package/dist/generators/projectSettings.js +322 -0
- package/dist/generators/projectSettings.js.map +1 -0
- package/dist/generators/repoRoot.js +417 -0
- package/dist/generators/repoRoot.js.map +1 -0
- package/dist/generators/scripts.js +557 -0
- package/dist/generators/scripts.js.map +1 -0
- package/dist/generators/stateDir.js +221 -0
- package/dist/generators/stateDir.js.map +1 -0
- package/dist/machine/paths.js +111 -0
- package/dist/machine/paths.js.map +1 -0
- package/dist/machine/plugins.js +224 -0
- package/dist/machine/plugins.js.map +1 -0
- package/dist/machine/registry.js +330 -0
- package/dist/machine/registry.js.map +1 -0
- package/package.json +23 -0
- package/scripts/README.md +13 -0
- package/scripts/daemon/launchd.plist.template +59 -0
- package/scripts/daemon/systemd.service.template +58 -0
- package/templates/README.md +15 -0
- package/templates/claude/CLAUDE.md +54 -0
- package/templates/claude/README.md +5 -0
- package/templates/claude/context/api.md +29 -0
- package/templates/claude/context/conventions.md +23 -0
- package/templates/claude/context/data-layer.md +28 -0
- package/templates/claude/context/data-storage.md +29 -0
- package/templates/claude/context/docs-catalog.md +29 -0
- package/templates/claude/context/domain.md +28 -0
- package/templates/claude/context/layer.md +20 -0
- package/templates/claude/context/module.md +30 -0
- package/templates/claude/context/package.md +29 -0
- package/templates/claude/context/presentation.md +32 -0
- package/templates/claude/context/state-slices.md +28 -0
- package/templates/claude/context/tests.md +28 -0
- package/templates/claude/harness-task-offer.md +58 -0
- package/templates/claude/push-notify.env.example +21 -0
- package/templates/claude/qa-accounts.env.example +38 -0
- package/templates/claude/qa_test_scenarios.md +110 -0
- package/templates/claude/settings.autonomous.json +93 -0
- package/templates/claude/settings.autonomous.qa.json +36 -0
- package/templates/githooks/README.md +3 -0
- package/templates/githooks/pre-push +72 -0
- package/templates/repo/README.md +3 -0
- package/templates/repo/gitattributes +16 -0
- package/templates/repo/gitignore +61 -0
- package/templates/repo/gitignore.qa +25 -0
- package/templates/repo/mcp.json +17 -0
- package/templates/scripts/README.md +5 -0
- package/templates/scripts/autonomous-format-stream.sh +95 -0
- package/templates/scripts/autonomous-notify.sh +337 -0
- package/templates/scripts/autonomous-watcher.sh +3087 -0
- package/templates/scripts/cleanup-merged-worktrees.sh +327 -0
- package/templates/scripts/commit-on-branch.sh +288 -0
- package/templates/scripts/create-worktree.sh +360 -0
- package/templates/scripts/deploy.sh +47 -0
- package/templates/scripts/lib/harness-run-lib.sh +1481 -0
- package/templates/scripts/push-branch.sh +140 -0
- package/templates/scripts/refresh-branch.sh +244 -0
- package/templates/scripts/restart-watcher.sh +401 -0
- package/templates/scripts/scratch-run.sh +302 -0
- package/templates/scripts/setup-worktree.sh +262 -0
- package/templates/scripts/start-dev-server.sh +99 -0
- package/templates/scripts/test.sh +50 -0
- package/templates/scripts/typecheck.sh +50 -0
- package/templates/state-dir/README-root.md +13 -0
- package/templates/state-dir/README.md +9 -0
- package/templates/state-dir/architecture_branch_review_point_reviews/README.md +9 -0
- package/templates/state-dir/architecture_branch_reviews/README.md +9 -0
- package/templates/state-dir/architecture_reviews/README.md +9 -0
- package/templates/state-dir/architecture_user_review_reviews/README.md +9 -0
- package/templates/state-dir/autonomous_inbox/README.md +9 -0
- package/templates/state-dir/autonomous_logs/README.md +9 -0
- package/templates/state-dir/branch_statistics/README.md +9 -0
- package/templates/state-dir/business_parity_branch_review_point_reviews/README.md +9 -0
- package/templates/state-dir/business_parity_branch_reviews/README.md +9 -0
- package/templates/state-dir/business_parity_reviews/README.md +9 -0
- package/templates/state-dir/business_parity_user_review_reviews/README.md +9 -0
- package/templates/state-dir/clarification_digests/README.md +9 -0
- package/templates/state-dir/clarifications/README.md +9 -0
- package/templates/state-dir/code_reviews/README.md +9 -0
- package/templates/state-dir/dispatch_additions/README.md +19 -0
- package/templates/state-dir/docs_catalog/README.md +9 -0
- package/templates/state-dir/flow_progress/README.md +9 -0
- package/templates/state-dir/improvement_observations/README.md +19 -0
- package/templates/state-dir/improvement_suggestions.md +29 -0
- package/templates/state-dir/lessons.md +23 -0
- package/templates/state-dir/qa_review_point_reviews/README.md +9 -0
- package/templates/state-dir/qa_reviews/README.md +9 -0
- package/templates/state-dir/review_plan_point_reviews/README.md +9 -0
- package/templates/state-dir/review_plan_reviews/README.md +9 -0
- package/templates/state-dir/scratch/README.md +11 -0
- package/templates/state-dir/skeptic_review_plan_reviews/README.md +9 -0
- package/templates/state-dir/skeptic_review_point_reviews/README.md +9 -0
- package/templates/state-dir/skeptic_reviews/README.md +9 -0
- package/templates/state-dir/story_plans/README.md +9 -0
- package/templates/state-dir/task_plan_point_reviews/README.md +9 -0
- package/templates/state-dir/task_plan_reviews/README.md +9 -0
- package/templates/state-dir/task_plans/README.md +9 -0
- package/templates/state-dir/task_prompts/README.md +9 -0
- package/templates/state-dir/ui_test_plan_reviews/README.md +9 -0
- package/templates/state-dir/ui_test_plans/README.md +9 -0
- package/templates/state-dir/user_review_fix_plan_point_reviews/README.md +9 -0
- package/templates/state-dir/user_reviews/README.md +9 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One question, asked nowhere else: **does a direct subdirectory of the repository root look like the
|
|
3
|
+
* application?**
|
|
4
|
+
*
|
|
5
|
+
* It is a module of its own rather than a widening of `detect/signals.ts` or `detect/presets.ts`
|
|
6
|
+
* because it is a new responsibility with a hard boundary: **nothing is derived from what it finds.**
|
|
7
|
+
* No preset, no layer, no command line and no config value may ever be taken from this answer. Its one
|
|
8
|
+
* consumer is a note `init` prints — the directory it found, the manifest it found there, and the
|
|
9
|
+
* `--app-dir` re-run that would point detection at that tree — and the adopter decides.
|
|
10
|
+
*
|
|
11
|
+
* A **single** hit or nothing. Zero hits is silence for the obvious reason; two or more is silence
|
|
12
|
+
* because a repository holding several applications is undefined here, and naming one of them would be
|
|
13
|
+
* a recommendation this module has no basis for making.
|
|
14
|
+
*/
|
|
15
|
+
import { DetectContext, findAnyReadManifest } from './signals.js';
|
|
16
|
+
/**
|
|
17
|
+
* Direct subdirectories never treated as the application, skipped before a probe is spent on them.
|
|
18
|
+
*
|
|
19
|
+
* **This module's own list, deliberately not `detect/signals.ts`'s `NON_PACKAGE_DIR_NAMES`.** That one
|
|
20
|
+
* answers a different question — which child is the importable Python package — and this one has an
|
|
21
|
+
* exclusion that question does not need: a build-output or dependency tree legitimately contains a
|
|
22
|
+
* manifest (a dependency's own `package.json`, a vendored module, a staged `dist/`), and that is precisely
|
|
23
|
+
* where a false *single* hit would come from. Sharing a list would tie each question's exclusions to
|
|
24
|
+
* the other's.
|
|
25
|
+
*/
|
|
26
|
+
const NON_APPLICATION_DIR_NAMES = new Set([
|
|
27
|
+
'build',
|
|
28
|
+
'dist',
|
|
29
|
+
'docs',
|
|
30
|
+
'examples',
|
|
31
|
+
'node_modules',
|
|
32
|
+
'out',
|
|
33
|
+
'target',
|
|
34
|
+
'test',
|
|
35
|
+
'tests',
|
|
36
|
+
'vendor',
|
|
37
|
+
'venv',
|
|
38
|
+
]);
|
|
39
|
+
/**
|
|
40
|
+
* The one direct subdirectory of `repoRoot` that carries a manifest `init` reads, or `undefined`.
|
|
41
|
+
*
|
|
42
|
+
* The probe is `findAnyReadManifest` over a `DetectContext(repoRoot, child)` — the same manifest table
|
|
43
|
+
* detection itself uses, so a directory named here is one a re-run with `--app-dir` would actually
|
|
44
|
+
* detect. Children come from `DetectContext.childDirNames`, which is sorted and excludes
|
|
45
|
+
* dot-directories, so the scan is deterministic regardless of directory order on disk.
|
|
46
|
+
*
|
|
47
|
+
* **The residual, and the gate that removes it.** A child context's `manifestRoots` is
|
|
48
|
+
* `[child, '.']`, and `findAnyReadManifest` walks its locator list **locator-first**, each locator
|
|
49
|
+
* over both entries, answering the first hit. So a locator answering from the `.` leg — a manifest at
|
|
50
|
+
* the root, or one a locator finds under a root subdirectory it scans of its own — pre-empts a later
|
|
51
|
+
* locator's genuine hit inside `<child>/`, and a real nested application would read as no hit. The
|
|
52
|
+
* locator list is not exported and the module holding it is fenced, so it cannot be walked here.
|
|
53
|
+
* Instead the root is probed **once, before the children**: if `findAnyReadManifest` answers anything
|
|
54
|
+
* for `DetectContext(repoRoot, '.')`, this probe is **inconclusive** and the function answers
|
|
55
|
+
* `undefined` — printing nothing is the conservative failure, never a wrong note. If it answers
|
|
56
|
+
* `undefined`, no locator can answer from the `.` leg of any child context either, and the per-child
|
|
57
|
+
* prefix test below is provably sound.
|
|
58
|
+
*/
|
|
59
|
+
export function findNestedApplicationDir(repoRoot) {
|
|
60
|
+
const root = new DetectContext(repoRoot);
|
|
61
|
+
if (findAnyReadManifest(root) !== undefined)
|
|
62
|
+
return undefined;
|
|
63
|
+
let found;
|
|
64
|
+
for (const dir of root.childDirNames('.')) {
|
|
65
|
+
if (NON_APPLICATION_DIR_NAMES.has(dir))
|
|
66
|
+
continue;
|
|
67
|
+
const manifest = findAnyReadManifest(new DetectContext(repoRoot, dir));
|
|
68
|
+
// A manifest reached through the `.` leg is the repository's, not this directory's — and the gate
|
|
69
|
+
// above has already established that no such manifest exists, which is what makes the prefix test
|
|
70
|
+
// an exact statement about `<dir>/` rather than a guess.
|
|
71
|
+
if (manifest === undefined || !manifest.startsWith(`${dir}/`))
|
|
72
|
+
continue;
|
|
73
|
+
if (found !== undefined)
|
|
74
|
+
return undefined;
|
|
75
|
+
found = { dir, manifest };
|
|
76
|
+
}
|
|
77
|
+
return found;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=nestedApplication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestedApplication.js","sourceRoot":"","sources":["../../src/detect/nestedApplication.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAUlE;;;;;;;;;GASG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,OAAO;IACP,MAAM;IACN,MAAM;IACN,UAAU;IACV,cAAc;IACd,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;CACP,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE9D,IAAI,KAAoC,CAAC;IACzC,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1C,IAAI,yBAAyB,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QACjD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;QACvE,kGAAkG;QAClG,kGAAkG;QAClG,yDAAyD;QACzD,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;YAAE,SAAS;QACxE,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC1C,KAAK,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|