readyrepo 0.0.0-stage → 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/CHANGELOG.md +61 -0
- package/CLI.md +259 -0
- package/LICENSE +184 -0
- package/NOTICE +5 -0
- package/README.md +147 -2
- package/dist/cli.js +7319 -0
- package/dist/cli.js.map +1 -0
- package/dist/generate-schema.js +219 -0
- package/dist/generate-schema.js.map +1 -0
- package/package.json +58 -4
- package/schema/findings.schema.json +712 -0
- package/schema/index.schema.json +232 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to readyrepo are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow Semantic Versioning.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - Unreleased
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Add a tester-feedback issue form with optional plan feedback and privacy guidance.
|
|
10
|
+
- Add engineering work plans with ordered tasks, implementation steps, acceptance criteria, prerequisites, and validation commands checked against documented command provenance.
|
|
11
|
+
- Add `plan --from` for a matching clean saved scan, retaining finding IDs and recording input provenance without rescanning.
|
|
12
|
+
- Add optional finding assessments with legacy 1.0 compatibility; explicit false-positive and not-applicable verdicts are excluded from gates and actionable counts.
|
|
13
|
+
- Record bounded, redacted provider warnings in agent, onboarding, and plan generation records without forcing a sampling parameter.
|
|
14
|
+
|
|
15
|
+
- Read-only scans for one or more repositories using harness-score, with evidence-based findings, summaries, notes, verification rows, and cross-repository results.
|
|
16
|
+
- Deterministic starter agent files and optional provider-assisted onboarding docs and agent files.
|
|
17
|
+
- Pinned public repository examples and a script to replay their verification evidence.
|
|
18
|
+
- JSON Schemas for findings and multi-repository indexes.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Make engineering tasks the default `plan` style; use `--style roadmap` for the existing 30/60/90-day consulting format.
|
|
23
|
+
- Lead public documentation with npm/npx installation, a scan → explain → plan walkthrough, multi-repository examples, and a visual self-scan showcase.
|
|
24
|
+
- Print resolved output files and a next action after successful commands.
|
|
25
|
+
- Supply only supported suggested fixes to onboarding generation; retain uncertain and rejected findings as triage context.
|
|
26
|
+
|
|
27
|
+
- Standardize docs output at `<out>/<repository>/docs/onboarding/`, matching the output-root convention of other generators. Remove a manually appended repository name from docs `--out`; existing outputs are not moved.
|
|
28
|
+
- Reject unsupported `excludedPaths` configuration instead of silently ignoring it. `sendAllowlist` continues to restrict AI input only.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Keep Windows target-error paths relative or named, and wait for all Git metadata reads before reporting a failure so cleanup does not race active processes.
|
|
33
|
+
- Run the package-content check through Windows' npm command shim and allow integration-fixture setup time without weakening the ten-second scan assertion.
|
|
34
|
+
- Use `npm run` for discovered custom package scripts so generated validation recipes do not suggest unsupported commands such as `npm build` or `npm lint`.
|
|
35
|
+
- Stop treating explicit package executors as missing package scripts, and keep showcase source files out of application reading context.
|
|
36
|
+
- Resolve checked-in CLI source for declared package binaries and treat first-run guides as orientation rather than architecture specs.
|
|
37
|
+
|
|
38
|
+
- Quote Mermaid edge labels so HTTP heuristic counts render as text instead of invalid flowchart syntax.
|
|
39
|
+
|
|
40
|
+
- Budget planning context against the final delivery prompt, including command provenance, and skip files that do not fit.
|
|
41
|
+
- Prefer documentation for the selected runtime and bound graph metadata so it cannot crowd out core reading files.
|
|
42
|
+
|
|
43
|
+
- Redact command-derived CI evidence and deterministic drafts before persistence.
|
|
44
|
+
- Keep shell text and missing nested hook scripts from incorrectly dismissing real findings.
|
|
45
|
+
- Discover shell-fenced commands and setup tasks, and distinguish full-suite commands from single-test recipes.
|
|
46
|
+
- Correct missing-CI leads when checked-in configuration exists without treating file presence as proof of test execution.
|
|
47
|
+
|
|
48
|
+
- Remove stale report files for unselected formats when refreshing repository and aggregate scan outputs; preserve unrelated files.
|
|
49
|
+
- Exclude generated `readyrepo-out/` reports from lint and format checks.
|
|
50
|
+
|
|
51
|
+
- Include cross-repository findings in scan severity gates.
|
|
52
|
+
- Reject incompatible raw-scan flags and unsupported provider/write/decisions options in coding-agent delivery.
|
|
53
|
+
- Allow API dry-runs without credentials while keeping key validation for live generation.
|
|
54
|
+
- Refresh README and CLI documentation to describe current workflows and output paths.
|
|
55
|
+
|
|
56
|
+
- Launch the CLI correctly through npm's symlinked `readyrepo` executable.
|
|
57
|
+
- Use a failure title for harness-score's `CTX-01` check when no root agent context file is found.
|
|
58
|
+
|
|
59
|
+
### Schema compatibility policy
|
|
60
|
+
|
|
61
|
+
`schemaVersion` follows semver: add fields only in minor schema versions; renames or removals require a major version. Every schema change is described in the changelog. The package version and `schemaVersion` are versioned independently.
|
package/CLI.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# CLI reference
|
|
2
|
+
|
|
3
|
+
For a guided first run, start with [Getting started](docs/getting-started.md). This reference covers every command and option. Examples use the installed `readyrepo` command (`npm install --global readyrepo`), or prefix it with `npx` for a one-off invocation. Requires Node.js 20 or newer. See [source setup](CONTRIBUTING.md#develop-locally) for development.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
readyrepo --version
|
|
7
|
+
readyrepo --help
|
|
8
|
+
readyrepo <command> --help
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Choose a command
|
|
12
|
+
|
|
13
|
+
| Task | Command |
|
|
14
|
+
| ---------------------------------------- | ---------------------------------------------------- |
|
|
15
|
+
| Assess readiness and collect evidence | `scan <paths...>` or `scan --targets <file>` |
|
|
16
|
+
| Inspect a saved finding | `explain <finding-id> --out <scan-output-directory>` |
|
|
17
|
+
| Prepare an engineering task plan | `plan <target> --via api` or `--via agent` |
|
|
18
|
+
| Draft agent instructions without AI | `agents <target> --no-llm` |
|
|
19
|
+
| Draft agent instructions with AI | `agents <target> --via api` or `--via agent` |
|
|
20
|
+
| Prepare onboarding and architecture docs | `docs <target> --via api` or `--via agent` |
|
|
21
|
+
|
|
22
|
+
## Output paths and configuration
|
|
23
|
+
|
|
24
|
+
Let **root** be `--out`, otherwise `outputDir` from configuration, otherwise `readyrepo-out`. Relative output paths resolve from the invocation directory. **repo** is the target directory's basename, or its configured targets-file name for scans.
|
|
25
|
+
|
|
26
|
+
| Command / mode | Destination |
|
|
27
|
+
| -------------------------------- | -------------------------------- |
|
|
28
|
+
| `scan` | `<root>/<repo>/scan-output/` |
|
|
29
|
+
| Multi-repository scan aggregates | `<root>/` |
|
|
30
|
+
| `agents` (all modes) | `<root>/<repo>/agents/` |
|
|
31
|
+
| `plan` (all modes) | `<root>/<repo>/work-plan/` |
|
|
32
|
+
| `docs` (all modes) | `<root>/<repo>/docs/onboarding/` |
|
|
33
|
+
|
|
34
|
+
Successful commands print resolved artifact paths and a next step. Raw scans keep stdout as JSON, and dry-runs describe previews without claiming files were written.
|
|
35
|
+
|
|
36
|
+
All generators treat `--out` and configured `outputDir` as an output root and append the repository name. **Migration:** docs previously treated explicit/configured output as the repository directory. Remove a manually appended repository name from `--out` to avoid double nesting; existing reports are not moved.
|
|
37
|
+
|
|
38
|
+
readyrepo reads `readyrepo.config.yaml` from the invocation directory, not automatically from the scanned target:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
outputDir: /tmp/readyrepo-report
|
|
42
|
+
severityOverrides:
|
|
43
|
+
CTX-01: High
|
|
44
|
+
sendAllowlist:
|
|
45
|
+
- README.md
|
|
46
|
+
- package.json
|
|
47
|
+
- src/**
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Configuration rejects unknown keys. `severityOverrides` maps harness-score check IDs to `Critical`, `High`, `Medium`, or `Low`; overrides do not apply to supplementary checks. Finding IDs are reassigned after overrides, so use IDs from the current report. `sendAllowlist` uses relative forward-slash glob patterns and only restricts AI input, not scanning. `excludedPaths` is not supported and is rejected rather than silently ignored. Use `sendAllowlist` to restrict AI input; it does not exclude files from scans.
|
|
51
|
+
|
|
52
|
+
## `scan [paths...]`
|
|
53
|
+
|
|
54
|
+
Read Git repositories and write evidence-based reports. No target code, tests, install scripts, or provider requests are executed. Supply at least one path or a targets file; there is no implicit current-directory target.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
readyrepo scan ./service --out /tmp/reports --format json,md,notes,verification
|
|
58
|
+
readyrepo scan ./api ./web --out /tmp/reports --fail-on high
|
|
59
|
+
readyrepo scan --targets targets.yaml --out /tmp/reports
|
|
60
|
+
readyrepo scan ./service --raw
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
| Option | Behavior |
|
|
64
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `--targets <file>` | YAML or JSON target document; cannot be combined with positional paths. |
|
|
66
|
+
| `--out <directory>` | Output root; see path table above. |
|
|
67
|
+
| `--format <formats>` | Comma-separated `json`, `md`, `notes`, `verification`. Default: `json,md`. |
|
|
68
|
+
| `--raw` | Print harness-score JSON to stdout for exactly one positional path. Does not write normal reports or apply severity overrides. Cannot be combined with `--out`, `--format`, or `--fail-on`. |
|
|
69
|
+
| `--fail-on <severity>` | `critical`: exit 1 for Critical repository findings. `high`: exit 1 for Critical or High repository findings. |
|
|
70
|
+
|
|
71
|
+
When refreshing a repository report, readyrepo removes its known report files for formats no longer selected (`findings.json`, `summary.md`, `notes.txt`, `verification.md`). Multi-repository runs also remove unselected aggregate reports. A successful single-repository scan also removes old aggregate reports when the root contains a valid readyrepo index. Unrelated files and generated drafts are preserved. Failed targets may retain older reports; consult the current `index.json` before using them.
|
|
72
|
+
|
|
73
|
+
Normal scans always write `raw/harness-score.json`. Selected formats add `findings.json`, `summary.md`, `notes.txt`, and `verification.md` under each repository's `scan-output/`.
|
|
74
|
+
|
|
75
|
+
Findings JSON uses schema version 1.1 and can include a verdict of `supported`, `unverified`, `false-positive`, or `not-applicable`, a short reason, and repository-safe assessment evidence. Missing assessments on older 1.0 reports mean unverified. Dismissed findings remain in JSON and are shown separately in human reports; they do not count toward actionable severity totals or `--fail-on` gates. Unverified findings are review tasks. A supported assessment means static repository evidence corroborates a fact; it does not mean a command was run or a policy decision was made.
|
|
76
|
+
|
|
77
|
+
The raw `harness-score` JSON and score preserve that scanner's own scope. readyrepo applies its separate bounded repository inventory to local evidence and does not claim that the upstream scan was recomputed. Evidence outside the scoped inventory is presented as a scope review instead of a root-level defect.
|
|
78
|
+
|
|
79
|
+
Multi-repository scans always write `index.json`, including failed targets. Selected formats add root-level `cross-repo.json`, combined `summary.md`, `notes.txt`, and `verification.md`. Successful targets continue when another fails. The severity gate considers both repository and cross-repository findings; target failures take exit-code precedence. Current cross-repository checks emit only Medium/Low findings, but High findings are covered by the gate.
|
|
80
|
+
|
|
81
|
+
### Targets file
|
|
82
|
+
|
|
83
|
+
JSON example (targets.json):
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"company": "acme",
|
|
88
|
+
"targets": [
|
|
89
|
+
{
|
|
90
|
+
"name": "api",
|
|
91
|
+
"path": "../repos/acme-api",
|
|
92
|
+
"role": "api",
|
|
93
|
+
"commit": "0123456789abcdef0123456789abcdef01234567"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "web",
|
|
97
|
+
"path": "../repos/acme-web",
|
|
98
|
+
"role": "web"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
YAML example (targets.yml):
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
company: acme
|
|
108
|
+
targets:
|
|
109
|
+
- name: api
|
|
110
|
+
path: ../repos/acme-api
|
|
111
|
+
role: api
|
|
112
|
+
commit: 0123456789abcdef0123456789abcdef01234567
|
|
113
|
+
- name: web
|
|
114
|
+
path: ../repos/acme-web
|
|
115
|
+
role: web
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Path behavior:
|
|
119
|
+
|
|
120
|
+
The commit above is illustrative; replace it with the target repository's `HEAD` commit at scan time. The scanner compares the supplied commit exactly.
|
|
121
|
+
|
|
122
|
+
`.json` selects JSON parsing; other extensions use YAML. Paths resolve relative to the targets file. Optional `commit` must exactly match the repository's current `HEAD`; it does not check out a commit. Targets-file mode produces aggregates even with one target.
|
|
123
|
+
|
|
124
|
+
Names must be unique and match `[a-z0-9._-]+`; `cross-repo` is reserved. Positional paths derive names from directory basenames and must also be unique. Roles are `api`, `web`, `mobile`, `infra`, `lib`, `shared`, `contracts`, `schema`, `sdk`, or `other`.
|
|
125
|
+
|
|
126
|
+
## `explain <finding-id>`
|
|
127
|
+
|
|
128
|
+
Print a saved finding's title, observation, assessment reason and counterevidence (when present), original evidence, reproduction command, and remediation. This does not rescan or call a provider. Findings written with schema 1.0 and no assessment remain explainable and are treated as unverified by human report consumers.
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
readyrepo explain AIR-M1 --out /tmp/reports/service/scan-output
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`--out <directory>` is required and must directly contain `findings.json`. Generate a scan with the `json` format first. Unknown IDs or invalid/missing reports return 2. IDs refer to that report and should not be assumed stable across scans.
|
|
135
|
+
|
|
136
|
+
## Shared AI delivery options
|
|
137
|
+
|
|
138
|
+
These options apply to `agents` (unless `--no-llm`), `docs`, and `plan`.
|
|
139
|
+
|
|
140
|
+
| Option | Behavior |
|
|
141
|
+
| ----------------------- | -------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `--via <api\|agent>` | `api` sends selected context to a provider; `agent` writes a prompt without a provider call. |
|
|
143
|
+
| `--provider <provider>` | API provider: `openai`, `anthropic`, or `xai`. |
|
|
144
|
+
| `--model <id>` | Explicit API model ID; no automatic model selection. |
|
|
145
|
+
| `--dry-run` | Preview selection without sending or writing generation files. Detail varies by mode below. |
|
|
146
|
+
| `--yes` | Authorize API sending without the interactive confirmation. |
|
|
147
|
+
| `--out <directory>` | Output destination; see command-specific path rules. |
|
|
148
|
+
|
|
149
|
+
In a terminal, missing delivery mode, provider, and model can be requested interactively. Non-interactive use must supply them. Live API generation requires the matching environment key, checked before scanning. Dry-runs do not require credentials:
|
|
150
|
+
|
|
151
|
+
| Provider | Environment variable |
|
|
152
|
+
| ----------- | -------------------- |
|
|
153
|
+
| `openai` | `OPENAI_API_KEY` |
|
|
154
|
+
| `anthropic` | `ANTHROPIC_API_KEY` |
|
|
155
|
+
| `xai` | `XAI_API_KEY` |
|
|
156
|
+
|
|
157
|
+
API generation asks before sending unless `--yes` is present; non-interactive generation without it exits 2. Declining confirmation exits 0 without sending. Agent mode needs no provider credentials. Agent mode rejects `--provider`, `--model`, `--yes`, `--write`, `--force`, and `--decisions` rather than ignoring them.
|
|
158
|
+
|
|
159
|
+
These commands rescan the target by default. `plan --from` can reuse a matching clean saved scan. Deterministic `agents --no-llm` derives facts directly without a readiness scan.
|
|
160
|
+
|
|
161
|
+
## `agents <target>`
|
|
162
|
+
|
|
163
|
+
Draft concise `AGENTS.md` and `CLAUDE.md`. Choose deterministic local generation, provider additions to deterministic drafts, or a prompt for a coding agent.
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
readyrepo agents ./service --no-llm --out /tmp/reports
|
|
167
|
+
readyrepo agents ./service --via agent --dry-run --out /tmp/reports
|
|
168
|
+
readyrepo agents ./service --via api --provider openai --model YOUR_MODEL_ID --dry-run
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
| Additional option | Behavior |
|
|
172
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
173
|
+
| `--no-llm` | Local deterministic drafts. Cannot be combined with `--via`, `--provider`, `--model`, `--dry-run`, or `--yes`. |
|
|
174
|
+
| `--write` | In deterministic/API mode, also copy drafts to the target and print diffs. |
|
|
175
|
+
| `--force` | Allow existing target files to be replaced; requires `--write` in deterministic/API mode. |
|
|
176
|
+
|
|
177
|
+
Deterministic mode writes `AGENTS.md` and `CLAUDE.md` under `<root>/<repo>/agents/`. API mode adds `GENERATED.md` with input files, usage, normalized provider warnings, and dropped claims. Warning messages are redacted, capped at 20 entries and 500 characters each; request bodies are not recorded. Its prompt is bounded to 32,000 characters; dry-run lists selected files, prompt size, and approximate input tokens.
|
|
178
|
+
|
|
179
|
+
Agent mode writes only `AGENT_PROMPT.md` in the same directory. It includes deterministic drafts, findings, and selected context; selection uses a 20,000-character budget. Dry-run lists included files, prompt size, and destination. `--write`/`--force` are rejected in this mode; review the prompt and let the coding agent draft externally.
|
|
180
|
+
|
|
181
|
+
## `docs <target>`
|
|
182
|
+
|
|
183
|
+
Prepare onboarding and architecture documentation through an API or coding agent. No deterministic `--no-llm` mode is available.
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
readyrepo docs ./service --via agent --out /tmp/service-docs
|
|
187
|
+
readyrepo docs ./service --via api --provider openai --model YOUR_MODEL_ID \
|
|
188
|
+
--dry-run --out /tmp/service-docs
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
| Additional option | Behavior |
|
|
192
|
+
| ----------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
193
|
+
| `--decisions` | API mode requests 3–6 inferred decision records in `DECISIONS.md`; fewer than three verified records fail generation. |
|
|
194
|
+
| `--write` | API mode also copies generated documents into the target and prints diffs. |
|
|
195
|
+
| `--force` | Permit replacement of existing target files; requires `--write`. |
|
|
196
|
+
|
|
197
|
+
API mode uses a reading pack: root guide, docs entry, runtime entry, and optional composition root, service guide, and primary spec when available. Graph metadata has its own bounded budget. To fit the 32,000-character prompt limit, it shortens the spec, service guide, docs entry, composition root, runtime entry, then root guide. Optional entries may be omitted if needed. Dry-run shows roles, complete/truncated status, prompt size, and estimated tokens. Repository graph information supplies the local module map and service candidates.
|
|
198
|
+
|
|
199
|
+
API output includes (finished drafts, not an agent prompt):
|
|
200
|
+
|
|
201
|
+
- `ONBOARDING.md`: audience, setup commands, reading path, Mermaid module map, and finding-backed fixes.
|
|
202
|
+
- `ARCHITECTURE.md`: purpose, components, main flows, and evidence-backed external integration candidates.
|
|
203
|
+
- `GENERATED.md`: generation record at `<root>/<repo>/GENERATED.md`, alongside the `docs/` directory, with provider warnings kept separate from dropped claims.
|
|
204
|
+
- `DECISIONS.md`: optional inferred records with `--decisions`.
|
|
205
|
+
|
|
206
|
+
Only deterministically supported findings are supplied as suggested-fix candidates; uncertain and dismissed findings remain triage context. An empty suggested-fix list is valid. The final assessment filter still checks provider suggestions.
|
|
207
|
+
|
|
208
|
+
Local import relationships inform diagram arrows; HTTP API relationships are heuristics and need review.
|
|
209
|
+
|
|
210
|
+
Agent mode writes only `<root>/<repo>/docs/onboarding/AGENT_PROMPT.md`. It does not create finished documents; give the prompt to your coding agent to generate them. It names reading paths and findings rather than inlining source contents, and tells the coding agent to draft both documents in its own workspace. The prompt includes the local repository location. Dry-run lists reading order and prompt destination, without a token estimate or API-style truncation report. `--decisions`, `--write`, and `--force` are rejected in this mode.
|
|
211
|
+
|
|
212
|
+
## `plan <target>`
|
|
213
|
+
|
|
214
|
+
Generate a repository-specific engineering work plan, or choose an explicit consulting roadmap. This command takes one target; after a multi-repository scan, invoke it separately for each repository that needs a plan. It does not produce a combined multi-repository plan. The deterministic work order in a scan summary remains available without AI.
|
|
215
|
+
|
|
216
|
+
```sh
|
|
217
|
+
readyrepo plan ./service --via agent --out /tmp/reports
|
|
218
|
+
readyrepo plan ./service --via api --provider openai --model YOUR_MODEL_ID \
|
|
219
|
+
--dry-run --out /tmp/reports
|
|
220
|
+
readyrepo plan ./service --from /tmp/reports/service/scan-output \
|
|
221
|
+
--via agent --out /tmp/reports
|
|
222
|
+
readyrepo plan ./service --style roadmap --via agent --out /tmp/reports
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
| Option | Meaning |
|
|
226
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
227
|
+
| `--style engineering` | Default. Ordered tasks with steps, acceptance criteria, effort, dependencies, citations, and documented validation commands. |
|
|
228
|
+
| `--style roadmap` | Existing 30/60/90-day consulting roadmap. Later windows require a scheduling reason and may remain empty. |
|
|
229
|
+
| `--from <report>` | Read a per-repository `findings.json` or its `scan-output` directory without invoking the scanner. |
|
|
230
|
+
|
|
231
|
+
Engineering output starts with up to three tasks, followed by the full backlog (at most 20 tasks). Tasks are ordered by prerequisites, then linked severity and estimated effort. Every task has a stable ID within that plan (`TASK-1`, etc.); IDs are not guaranteed across generations. Unknown finding IDs, duplicate task IDs, unknown prerequisites, and cycles fail generation. Tasks with no valid supplied-file citations are dropped; tasks depending on dropped tasks are also dropped. Unscheduled findings remain visible in triage.
|
|
232
|
+
|
|
233
|
+
Validation commands are retained only when command text and working directory exactly match the supplied documented command inventory. Provenance is attached locally. Unsupported commands are omitted and recorded; no command is executed. Implementation steps and acceptance criteria are model-generated recommendations and still need review.
|
|
234
|
+
|
|
235
|
+
Saved input supports findings schema 1.0 and 1.1; combined `index.json` and `cross-repo.json` are not accepted. The saved repository name and commit must match the target, and both recorded and current checkouts must be clean. Reports do not fingerprint dirty contents, so matching a commit alone is insufficient. Commit or stash changes, scan to an external output folder, and then use `--from`; alternatively omit `--from` to plan from a fresh scan. Saved severity overrides and finding IDs are retained rather than recalculated. Current input restrictions still apply: assessments whose evidence cannot be supplied are treated as unverified for planning. Input provenance records the scan timestamp, commit, and a SHA-256 digest of the saved file without embedding its absolute location.
|
|
236
|
+
|
|
237
|
+
Selection prioritizes cited files, project manifests, and CI configuration. API prompts are capped at 48,000 characters. Both modes list included files, current findings, and approximate input tokens; dry-run produces no files. Agent dry-run also shows the destination.
|
|
238
|
+
|
|
239
|
+
API mode writes `work-plan.md` and `WORK_PLAN_GENERATED.md` under `<root>/<repo>/work-plan/`. It verifies citations, drops unsupported evidence claims, and rejects unknown finding IDs. False-positive and not-applicable findings cannot become tasks; unverified findings can be assigned verification tasks, while remediation requires supported findings. The generation record lists provider/model, commit, usage, sent files, provider warnings, and dropped claims or tasks; usage falls back to estimates if not supplied by the provider.
|
|
240
|
+
|
|
241
|
+
Agent mode writes only `AGENT_PROMPT.md` with selected context and findings in the same directory. Give it to your coding agent to create the finished plan; a prompt file is not an API-generated work plan. Plans have no `--write`, `--force`, or deterministic generation option. Review proposed tasks and effort estimates before scheduling them.
|
|
242
|
+
|
|
243
|
+
## Privacy and target writes
|
|
244
|
+
|
|
245
|
+
Local scans, explanations, deterministic drafts, dry-runs, and agent-prompt delivery make no provider calls. API input selection excludes `.env*`, credential paths, ignored files, and credential-finding paths before reading their contents. Binary/unreadable content is omitted; selected text and model output pass through redaction. `sendAllowlist` can restrict input further. Generated claims are checked against repository paths, lines, finding IDs, and documented commands.
|
|
246
|
+
|
|
247
|
+
Use an output directory outside the target to keep generation artifacts external. In deterministic/API generation, `agents --write` and API `docs --write` copy generated files into the target; existing files require `--force`. Agent delivery writes only a prompt, and does not perform target writes. See [privacy details](docs/privacy.md).
|
|
248
|
+
|
|
249
|
+
## Exit codes
|
|
250
|
+
|
|
251
|
+
| Code | Meaning |
|
|
252
|
+
| ---- | --------------------------------------------------------------------------------------------------------------------- |
|
|
253
|
+
| `0` | Completed successfully, previewed, or cancelled interactively before sending. |
|
|
254
|
+
| `1` | Scan severity threshold reached. Commander usage/parse errors can also return 1. |
|
|
255
|
+
| `2` | Validation/configuration/generation error, missing credentials or confirmation, invalid report, or overwrite refusal. |
|
|
256
|
+
| `3` | Single-target scan failure; repository read errors also use 3 in `scan`/`plan`. |
|
|
257
|
+
| `4` | Multi-target scan had one or more target failures; inspect `index.json`. |
|
|
258
|
+
|
|
259
|
+
Error handling is not yet uniform: `agents` and `docs` map caught runtime errors to 2. Scripts should treat any nonzero code as failure and inspect stderr or the scan index.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
|
13
|
+
owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
|
16
|
+
that control, are controlled by, or are under common control with that entity.
|
|
17
|
+
For the purposes of this definition, "control" means (i) the power, direct or
|
|
18
|
+
indirect, to cause the direction or management of such entity, whether by
|
|
19
|
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
23
|
+
permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications, including
|
|
26
|
+
but not limited to software source code, documentation source, and configuration
|
|
27
|
+
files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
30
|
+
translation of a Source form, including but not limited to compiled object code,
|
|
31
|
+
generated documentation, and conversions to other media types.
|
|
32
|
+
|
|
33
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
34
|
+
made available under the License, as indicated by a copyright notice that is
|
|
35
|
+
included in or attached to the work (an example is provided in the Appendix
|
|
36
|
+
below).
|
|
37
|
+
|
|
38
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
|
39
|
+
is based on (or derived from) the Work and for which the editorial revisions,
|
|
40
|
+
annotations, elaborations, or other modifications represent, as a whole, an
|
|
41
|
+
original work of authorship. For the purposes of this License, Derivative Works
|
|
42
|
+
shall not include works that remain separable from, or merely link (or bind by
|
|
43
|
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
|
44
|
+
|
|
45
|
+
"Contribution" shall mean any work of authorship, including the original
|
|
46
|
+
version of the Work and any modifications or additions to that Work or
|
|
47
|
+
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
48
|
+
inclusion in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes of this
|
|
50
|
+
definition, "submitted" means any form of electronic, verbal, or written
|
|
51
|
+
communication sent to the Licensor or its representatives, including but not
|
|
52
|
+
limited to communication on electronic mailing lists, source code control
|
|
53
|
+
systems, and issue tracking systems that are managed by, or on behalf of, the
|
|
54
|
+
Licensor for the purpose of discussing and improving the Work, but excluding
|
|
55
|
+
communication that is conspicuously marked or otherwise designated in writing
|
|
56
|
+
by the copyright owner as "Not a Contribution."
|
|
57
|
+
|
|
58
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
|
59
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
60
|
+
incorporated within the Work.
|
|
61
|
+
|
|
62
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
63
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
64
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
65
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
66
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
67
|
+
Object form.
|
|
68
|
+
|
|
69
|
+
3. Grant of Patent License. Subject to the terms and conditions of this
|
|
70
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
71
|
+
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
|
|
72
|
+
section) patent license to make, have made, use, offer to sell, sell, import,
|
|
73
|
+
and otherwise transfer the Work, where such license applies only to those patent
|
|
74
|
+
claims licensable by such Contributor that are necessarily infringed by their
|
|
75
|
+
Contribution(s) alone or by combination of their Contribution(s) with the Work
|
|
76
|
+
to which such Contribution(s) was submitted. If You institute patent litigation
|
|
77
|
+
against any entity (including a cross-claim or counterclaim in a lawsuit)
|
|
78
|
+
alleging that the Work or a Contribution incorporated within the Work
|
|
79
|
+
constitutes direct or contributory patent infringement, then any patent licenses
|
|
80
|
+
granted to You under this License for that Work shall terminate as of the date
|
|
81
|
+
such litigation is filed.
|
|
82
|
+
|
|
83
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
84
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
85
|
+
Source or Object form, provided that You meet the following conditions:
|
|
86
|
+
|
|
87
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of
|
|
88
|
+
this License; and
|
|
89
|
+
|
|
90
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
91
|
+
You changed the files; and
|
|
92
|
+
|
|
93
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
94
|
+
distribute, all copyright, patent, trademark, and attribution notices from the
|
|
95
|
+
Source form of the Work, excluding those notices that do not pertain to any part
|
|
96
|
+
of the Derivative Works; and
|
|
97
|
+
|
|
98
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then
|
|
99
|
+
any Derivative Works that You distribute must include a readable copy of the
|
|
100
|
+
attribution notices contained within such NOTICE file, excluding those notices
|
|
101
|
+
that do not pertain to any part of the Derivative Works, in at least one of the
|
|
102
|
+
following places: within a NOTICE text file distributed as part of the
|
|
103
|
+
Derivative Works; within the Source form or documentation, if provided along
|
|
104
|
+
with the Derivative Works; or, within a display generated by the Derivative
|
|
105
|
+
Works, if and wherever such third-party notices normally appear. The contents
|
|
106
|
+
of the NOTICE file are for informational purposes only and do not modify the
|
|
107
|
+
License. You may add Your own attribution notices within Derivative Works that
|
|
108
|
+
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
|
109
|
+
provided that such additional attribution notices cannot be construed as
|
|
110
|
+
modifying the License.
|
|
111
|
+
|
|
112
|
+
You may add Your own copyright statement to Your modifications and may provide
|
|
113
|
+
additional or different license terms and conditions for use, reproduction, or
|
|
114
|
+
distribution of Your modifications, or for any such Derivative Works as a
|
|
115
|
+
whole, provided Your use, reproduction, and distribution of the Work otherwise
|
|
116
|
+
complies with the conditions stated in this License.
|
|
117
|
+
|
|
118
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
119
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
120
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
121
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
122
|
+
supersede or modify the terms of any separate license agreement you may have
|
|
123
|
+
executed with Licensor regarding such Contributions.
|
|
124
|
+
|
|
125
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
126
|
+
trademarks, service marks, or product names of the Licensor, except as required
|
|
127
|
+
for reasonable and customary use in describing the origin of the Work and
|
|
128
|
+
reproducing the content of the NOTICE file.
|
|
129
|
+
|
|
130
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
131
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
132
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
133
|
+
KIND, either express or implied, including, without limitation, any warranties
|
|
134
|
+
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
135
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
136
|
+
appropriateness of using or redistributing the Work and assume any risks
|
|
137
|
+
associated with Your exercise of permissions under this License.
|
|
138
|
+
|
|
139
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
140
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
141
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to in
|
|
142
|
+
writing, shall any Contributor be liable to You for damages, including any
|
|
143
|
+
direct, indirect, special, incidental, or consequential damages of any
|
|
144
|
+
character arising as a result of this License or out of the use or inability to
|
|
145
|
+
use the Work (including but not limited to damages for loss of goodwill, work
|
|
146
|
+
stoppage, computer failure or malfunction, or any and all other commercial
|
|
147
|
+
damages or losses), even if such Contributor has been advised of the possibility
|
|
148
|
+
of such damages.
|
|
149
|
+
|
|
150
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
151
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
152
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
153
|
+
and/or rights consistent with this License. However, in accepting such
|
|
154
|
+
obligations, You may act only on Your own behalf and on Your sole responsibility,
|
|
155
|
+
not on behalf of any other Contributor, and only if You agree to indemnify,
|
|
156
|
+
defend, and hold each Contributor harmless for any liability incurred by, or
|
|
157
|
+
claims asserted against, such Contributor by reason of your accepting any such
|
|
158
|
+
warranty or additional liability.
|
|
159
|
+
|
|
160
|
+
END OF TERMS AND CONDITIONS
|
|
161
|
+
|
|
162
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
163
|
+
|
|
164
|
+
To apply the Apache License to your work, attach the following boilerplate
|
|
165
|
+
notice, with the fields enclosed by brackets "[]" replaced with your own
|
|
166
|
+
identifying information. (Don't include the brackets!) The text should be
|
|
167
|
+
enclosed in the appropriate comment syntax for the file format. We also
|
|
168
|
+
recommend that a file or class name and description of purpose be included on
|
|
169
|
+
the same "printed page" as the copyright notice for easier identification
|
|
170
|
+
within third-party archives.
|
|
171
|
+
|
|
172
|
+
Copyright 2026 Cristian Calabro
|
|
173
|
+
|
|
174
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
175
|
+
you may not use this file except in compliance with the License.
|
|
176
|
+
You may obtain a copy of the License at
|
|
177
|
+
|
|
178
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
179
|
+
|
|
180
|
+
Unless required by applicable law or agreed to in writing, software
|
|
181
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
182
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
183
|
+
See the License for the specific language governing permissions and
|
|
184
|
+
limitations under the License.
|