@eightmedia/flightcheck 0.1.0 → 1.0.1

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 CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## [0.1.0] — 2026-10-27
3
+ ## [1.0.1] — 2026-10-28
4
+
5
+ ### Added
6
+
7
+ - Reports record `flightcheckVersion` and CLI `flags` in `*-report.json` and the Markdown header
8
+
9
+ ## [1.0.0] — 2026-10-27
4
10
 
5
11
  ### Added
6
12
 
@@ -9,6 +15,7 @@
9
15
  Markdown rendered from the same model
10
16
  - Crawl + Tier 1 checks: security headers, DNS, robots.txt, sitemap, agent readiness
11
17
  - CLI binaries: `flightcheck`, `flightcheck-analyze`
18
+ - README guidance for installing and running inside a Node.js project
12
19
 
13
20
  ### Changed
14
21
 
package/README.md CHANGED
@@ -12,18 +12,77 @@ mismatches, exposed secrets, and more. Every run produces:
12
12
 
13
13
  ## Install
14
14
 
15
+ In a Node.js project (recommended):
16
+
15
17
  ```bash
16
- pnpm add -g @eightmedia/flightcheck
17
- # or: npm install -g @eightmedia/flightcheck
18
+ npm install @eightmedia/flightcheck
19
+ # or: pnpm add @eightmedia/flightcheck
20
+ # or: yarn add @eightmedia/flightcheck
21
+ ```
22
+
23
+ Requires Node.js 22+. The package is ESM-only (`"type": "module"`).
24
+
25
+ ## Use in a Node project
26
+
27
+ ### CLI via npm scripts
28
+
29
+ Add scripts to your `package.json`:
30
+
31
+ ```json
32
+ {
33
+ "scripts": {
34
+ "flightcheck": "flightcheck",
35
+ "flightcheck:analyze": "flightcheck-analyze"
36
+ }
37
+ }
18
38
  ```
19
39
 
20
- Or run without installing:
40
+ Then:
21
41
 
22
42
  ```bash
23
- pnpm dlx @eightmedia/flightcheck https://example.com
24
- # or: npx @eightmedia/flightcheck https://example.com
43
+ npm run flightcheck -- https://example.com
44
+ npm run flightcheck:analyze -- ./flightcheck/20260618.1413-example.com-raw.json
45
+ ```
46
+
47
+ Or call the binaries directly after install:
48
+
49
+ ```bash
50
+ npx flightcheck https://example.com
51
+ npx flightcheck-analyze ./flightcheck/20260618.1413-example.com-raw.json
52
+ ```
53
+
54
+ Without adding it to a project:
55
+
56
+ ```bash
57
+ npx @eightmedia/flightcheck https://example.com
58
+ ```
59
+
60
+ ### Programmatic API
61
+
62
+ ```js
63
+ import { runChecks } from "@eightmedia/flightcheck";
64
+
65
+ const { outputs, results } = await runChecks({
66
+ startUrl: "https://example.com",
67
+ });
68
+
69
+ const report = outputs.analyze?.report;
70
+ console.log(report?.analysis.pagesAnalyzed, report?.findings.length);
71
+
72
+ // Write paths (when analyze ran):
73
+ console.log(outputs.analyze?.reportPath);
74
+ console.log(outputs.analyze?.reportJsonPath);
25
75
  ```
26
76
 
77
+ Lower-level entry points:
78
+
79
+ ```js
80
+ import { runCrawlCheck, runAnalyzeCheck } from "@eightmedia/flightcheck";
81
+ import { listChecks } from "@eightmedia/flightcheck/checks";
82
+ ```
83
+
84
+ See [docs/check-api.md](docs/check-api.md) for the modular check API.
85
+
27
86
  ## How it works
28
87
 
29
88
  1. **Crawl & checks** — pages are scanned and modular checks run (SEO, a11y, security,
@@ -45,8 +104,8 @@ See [docs/analyze.md](docs/analyze.md) for the report schema.
45
104
  ## Quick start
46
105
 
47
106
  ```bash
48
- pnpm add -D @eightmedia/flightcheck
49
- pnpm exec flightcheck https://example.com
107
+ npm install @eightmedia/flightcheck
108
+ npx flightcheck https://example.com
50
109
  ```
51
110
 
52
111
  This writes timestamped files in `./flightcheck/`, for example:
@@ -63,7 +122,7 @@ redirect domains. Use `--checks` for a subset, or `--json-only` for crawl JSON o
63
122
  Re-analyze an existing crawl without re-crawling:
64
123
 
65
124
  ```bash
66
- pnpm exec flightcheck-analyze ./flightcheck/20260618.1413-example.com-raw.json
125
+ npx flightcheck-analyze ./flightcheck/20260618.1413-example.com-raw.json
67
126
  ```
68
127
 
69
128
  ## Documentation
@@ -77,19 +136,6 @@ pnpm exec flightcheck-analyze ./flightcheck/20260618.1413-example.com-raw.json
77
136
  - [QC checks plan](docs/qc-checks-plan.md) — roadmap
78
137
  - [Docs index](docs/index.md) · [Changelog](CHANGELOG.md)
79
138
 
80
- ## Programmatic API
81
-
82
- ```typescript
83
- import { runChecks } from "@eightmedia/flightcheck";
84
-
85
- const { outputs } = await runChecks({
86
- startUrl: "https://example.com",
87
- });
88
-
89
- const report = outputs.analyze?.report;
90
- // report.analysis.stack, report.findings, …
91
- ```
92
-
93
139
  ## Development
94
140
 
95
141
  ```bash
@@ -46,7 +46,12 @@ export type FlightcheckReportAnalysis = {
46
46
  reviewPages: ReportReviewPage[];
47
47
  };
48
48
  export type FlightcheckReport = {
49
+ /** Report JSON schema version (not the npm package version). */
49
50
  version: typeof FLIGHTCHECK_REPORT_VERSION;
51
+ /** npm package version of Flightcheck that produced this report. */
52
+ flightcheckVersion: string;
53
+ /** CLI argv flags used for this run (after node/script); empty when programmatic without flags. */
54
+ flags: string[];
50
55
  generatedAt: string;
51
56
  source: string;
52
57
  redirectOnly: boolean;
@@ -55,6 +60,8 @@ export type FlightcheckReport = {
55
60
  };
56
61
  export type BuildStructuredReportOptions = BuildMarkdownOptions & {
57
62
  generatedAt?: string;
63
+ flightcheckVersion?: string;
64
+ flags?: string[];
58
65
  };
59
66
  export declare function buildStructuredReport(sourcePath: string, records: ReportRecord[], tier1?: Tier1ReportData, options?: BuildStructuredReportOptions): Promise<FlightcheckReport>;
60
67
  /** Human-friendly Markdown rendered from the structured report (single source of truth). */
@@ -1 +1 @@
1
- {"version":3,"file":"structuredReport.d.ts","sourceRoot":"","sources":["../../src/analyze/structuredReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,0BAA0B,EAAG,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AAC;QACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,WAAW,EAAE,gBAAgB,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gEAAgE;IAChE,OAAO,EAAE,OAAO,0BAA0B,CAAC;IAC3C,oEAAoE;IACpE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mGAAmG;IACnG,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,yBAAyB,CAAC;IACpC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAidF,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,GAAG;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,YAAY,EAAE,EACvB,KAAK,GAAE,eAAoB,EAC3B,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,iBAAiB,CAAC,CAa5B;AAgCD,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAuFtE"}
@@ -1,3 +1,4 @@
1
+ import { formatCliFlags, getPackageVersion } from "../version.js";
1
2
  import { buildReportAnalysis, } from "./report.js";
2
3
  export const FLIGHTCHECK_REPORT_VERSION = 1;
3
4
  const A11Y_IDS = new Set([
@@ -409,6 +410,8 @@ export async function buildStructuredReport(sourcePath, records, tier1 = {}, opt
409
410
  const findings = buildFindings(analysis, tier1);
410
411
  return {
411
412
  version: FLIGHTCHECK_REPORT_VERSION,
413
+ flightcheckVersion: options.flightcheckVersion ?? getPackageVersion(),
414
+ flags: options.flags ?? [],
412
415
  generatedAt: options.generatedAt ?? new Date().toISOString(),
413
416
  source: sourcePath,
414
417
  redirectOnly: analysis.redirectOnly,
@@ -457,6 +460,8 @@ export function renderReportMarkdown(report) {
457
460
  "# Flightcheck report",
458
461
  "",
459
462
  `Generated: ${report.generatedAt}`,
463
+ `Flightcheck: ${report.flightcheckVersion}`,
464
+ `Flags: \`${formatCliFlags(report.flags)}\``,
460
465
  `Source: \`${report.source}\``,
461
466
  "",
462
467
  "## At a glance",
package/dist/analyze.js CHANGED
@@ -3,15 +3,19 @@ import { basename, resolve } from "node:path";
3
3
  import { Command } from "commander";
4
4
  import { runAnalyzeCheck } from "./checks/analyze.js";
5
5
  import { defaultReportPathForInput } from "./crawler/outputPaths.js";
6
+ import { cliFlagsFromArgv, getPackageVersion } from "./version.js";
6
7
  async function main() {
7
8
  const sanitizedArgv = [...process.argv];
8
9
  const separatorIndex = sanitizedArgv.indexOf("--");
9
10
  if (separatorIndex >= 2) {
10
11
  sanitizedArgv.splice(separatorIndex, 1);
11
12
  }
13
+ const runFlags = cliFlagsFromArgv(sanitizedArgv);
14
+ const flightcheckVersion = getPackageVersion();
12
15
  const program = new Command();
13
16
  program
14
17
  .name("flightcheck-analyze")
18
+ .version(flightcheckVersion)
15
19
  .description("Analyze crawl JSON and generate structured JSON + Markdown reports.")
16
20
  .argument("<input>", "Input JSON report file path")
17
21
  .option("--output <file>", "Output Markdown file path")
@@ -22,6 +26,8 @@ async function main() {
22
26
  inputPath,
23
27
  reportPath: resolve(options.output ?? defaultReportPathForInput(inputPath)),
24
28
  errorsOnly: options.errorsOnly,
29
+ flightcheckVersion,
30
+ flags: runFlags,
25
31
  });
26
32
  process.stdout.write(`${JSON.stringify({
27
33
  message: "Report generated",
@@ -10,6 +10,10 @@ export type AnalyzeCheckOptions = {
10
10
  writeReport?: boolean;
11
11
  redirectOnly?: boolean;
12
12
  tier1?: Tier1ReportData;
13
+ /** npm package version recorded in the report (defaults to installed package). */
14
+ flightcheckVersion?: string;
15
+ /** CLI flags recorded in the report. */
16
+ flags?: string[];
13
17
  };
14
18
  export declare function runAnalyzeCheck(options: AnalyzeCheckOptions): Promise<AnalyzeCheckResult>;
15
19
  //# sourceMappingURL=analyze.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/checks/analyze.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAW5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC;AAuBF,wBAAsB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA4C/F"}
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/checks/analyze.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAW5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAuBF,wBAAsB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA8C/F"}
@@ -37,6 +37,8 @@ export async function runAnalyzeCheck(options) {
37
37
  const report = await buildStructuredReport(inputPath, records, options.tier1, {
38
38
  redirectOnly,
39
39
  stackProfile,
40
+ flightcheckVersion: options.flightcheckVersion,
41
+ flags: options.flags,
40
42
  });
41
43
  // errorsOnly currently filters only the Markdown presentation of page-level noise;
42
44
  // the structured JSON keeps the full finding set for machine consumers.
package/dist/cli.js CHANGED
@@ -5,15 +5,19 @@ import { DEFAULT_CHECK_IDS } from "./checks/types.js";
5
5
  import { DEFAULT_BURST_DELAY_MS, DEFAULT_CONCURRENCY, DEFAULT_DELAY_MS, DEFAULT_MAX_PAGES, DEFAULT_TIMEOUT_MS, } from "./crawler/defaults.js";
6
6
  import { buildDefaultOutputPaths } from "./crawler/outputPaths.js";
7
7
  import { isHttpUrl, normalizeUrl, parseExcludePatterns } from "./crawler/urlUtils.js";
8
+ import { cliFlagsFromArgv, getPackageVersion } from "./version.js";
8
9
  async function main() {
9
10
  const sanitizedArgv = [...process.argv];
10
11
  const separatorIndex = sanitizedArgv.indexOf("--");
11
12
  if (separatorIndex >= 2) {
12
13
  sanitizedArgv.splice(separatorIndex, 1);
13
14
  }
15
+ const runFlags = cliFlagsFromArgv(sanitizedArgv);
16
+ const flightcheckVersion = getPackageVersion();
14
17
  const program = new Command();
15
18
  program
16
19
  .name("flightcheck")
20
+ .version(flightcheckVersion)
17
21
  .description("Crawl a website and generate crawl JSON plus structured report JSON/Markdown.")
18
22
  .argument("<startUrl>", "Start URL for the crawl")
19
23
  .option("--output <file>", "Output crawl JSON file path")
@@ -79,6 +83,8 @@ async function main() {
79
83
  reportJsonPath: defaultPaths.reportJson,
80
84
  errorsOnly,
81
85
  siteUrl: normalizedStartUrl,
86
+ flightcheckVersion,
87
+ flags: runFlags,
82
88
  },
83
89
  });
84
90
  const crawlResult = outputs.crawl;
@@ -0,0 +1,9 @@
1
+ /** Installed package version from package.json (works from src/ and dist/). */
2
+ export declare function getPackageVersion(): string;
3
+ /**
4
+ * CLI flags as passed on the command line (everything after node + script path).
5
+ * Example: `["https://example.com", "--quiet", "--max-pages", "50"]`
6
+ */
7
+ export declare function cliFlagsFromArgv(argv?: string[]): string[];
8
+ export declare function formatCliFlags(flags: string[]): string;
9
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA,+EAA+E;AAC/E,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,MAAM,EAAE,CAExE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAGtD"}
@@ -0,0 +1,24 @@
1
+ import { createRequire } from "node:module";
2
+ const require = createRequire(import.meta.url);
3
+ /** Installed package version from package.json (works from src/ and dist/). */
4
+ export function getPackageVersion() {
5
+ try {
6
+ const pkg = require("../package.json");
7
+ return pkg.version ?? "unknown";
8
+ }
9
+ catch {
10
+ return "unknown";
11
+ }
12
+ }
13
+ /**
14
+ * CLI flags as passed on the command line (everything after node + script path).
15
+ * Example: `["https://example.com", "--quiet", "--max-pages", "50"]`
16
+ */
17
+ export function cliFlagsFromArgv(argv = process.argv) {
18
+ return argv.slice(2);
19
+ }
20
+ export function formatCliFlags(flags) {
21
+ if (flags.length === 0)
22
+ return "(defaults)";
23
+ return flags.map((flag) => (/\s/.test(flag) ? JSON.stringify(flag) : flag)).join(" ");
24
+ }
@@ -3,15 +3,13 @@
3
3
  **Status:** deprecated. Analyze no longer writes `*-fix-manifest.json` or
4
4
  `*-agent-jobs/`.
5
5
 
6
- Use the structured report instead:
7
-
8
- - [Analyze reports](./analyze.md) — `*-report.json` + `*-report.md`
9
- - [Design](./superpowers/specs/2026-10-27-structured-report-design.md)
6
+ Use the structured report instead: [Analyze reports](./analyze.md)
7
+ (`*-report.json` + `*-report.md`).
10
8
 
11
9
  The previous agent-jobs / fix-manifest workflow (work packages, `prompt.md` per
12
- package, `flightcheck-orchestrate`) remains in the repo for transitional imports
13
- but is not part of the default output. Prefer building any new agent automation
14
- on `findings[]` in `*-report.json`.
10
+ package, orchestrate helpers) may still exist in the source tree for reference, but
11
+ it is not part of the published package or default CLI output. Prefer building any
12
+ new agent automation on `findings[]` in `*-report.json`.
15
13
 
16
14
  Stack detection still feeds the report `analysis.stack` block. See
17
15
  [stack.md](./stack.md).
@@ -25,8 +25,8 @@ robots.txt existence and sitemaps remain in the existing `robots-txt` and `sitem
25
25
  - Network runner: `runAgentReadyCheck()` — parallel fetches of robots, llms.txt, homepage
26
26
  (HTML + markdown Accept), and well-known endpoints
27
27
  - Wave 1 (parallel with crawl / DNS / headers / robots)
28
- - Report section: `## Agent readiness` via `buildAgentReadySection()` in `reportTier1.ts`
29
- - Fix package: `agent-ready` → `prompts/fix/agent-ready.md`
28
+ - Report: issues land in `findings[]` (`category: "infra"`) in `*-report.json`; the
29
+ Markdown report lists them under **Findings**
30
30
 
31
31
  ## CLI
32
32
 
package/docs/analyze.md CHANGED
@@ -36,6 +36,8 @@ Without `--output`, paths are derived from the input: `-raw.json` becomes
36
36
  ```json
37
37
  {
38
38
  "version": 1,
39
+ "flightcheckVersion": "1.0.1",
40
+ "flags": ["https://example.com", "--quiet"],
39
41
  "generatedAt": "2026-10-27T12:00:00.000Z",
40
42
  "source": "./flightcheck/example-raw.json",
41
43
  "redirectOnly": false,
@@ -86,18 +88,26 @@ includes metadata so consumers can filter or regroup.
86
88
  | `template` | Present when `scope` is `template` |
87
89
  | `urls` / `count` | Affected pages when relevant |
88
90
 
91
+ Header fields:
92
+
93
+ | Field | Meaning |
94
+ | --- | --- |
95
+ | `version` | Report JSON schema version |
96
+ | `flightcheckVersion` | npm package version that produced the report |
97
+ | `flags` | CLI arguments used for this run (empty when not invoked via CLI) |
98
+
89
99
  ### `*-report.md`
90
100
 
91
101
  Generated from the JSON. Structure:
92
102
 
93
- 1. **At a glance** — page counts and finding totals
94
- 2. **Stack / DNS / redirect** — factual context when available
95
- 3. **Findings** — grouped by severity for reading order, with plain-language titles
103
+ 1. Header — generated time, Flightcheck version, flags, source path
104
+ 2. **At a glance** — page counts and finding totals
105
+ 3. **Stack / DNS / redirect** — factual context when available
106
+ 4. **Findings** — grouped by severity for reading order, with plain-language titles
96
107
 
97
108
  ## Notes
98
109
 
99
110
  - The script validates crawl input against the expected flightcheck report schema.
100
111
  - On schema errors, the script stops with a clear error message.
101
112
  - Fix-manifest and agent-jobs output are no longer generated. Prefer `*-report.json`
102
- for machine consumers. See the design note in
103
- [superpowers/specs/2026-10-27-structured-report-design.md](./superpowers/specs/2026-10-27-structured-report-design.md).
113
+ for machine consumers.
package/docs/index.md CHANGED
@@ -11,14 +11,11 @@
11
11
  - [QC checks plan](./qc-checks-plan.md)
12
12
  - [Agent fixes (deprecated)](./agent-fixes.md)
13
13
 
14
- ## Specs
15
-
16
- - [Structured report](./superpowers/specs/2026-10-27-structured-report-design.md)
17
-
18
14
  ## Changelog
19
15
 
20
16
  - Package releases: [CHANGELOG.md](../CHANGELOG.md)
21
17
  - Branch notes: [changelog/](./changelog/)
18
+ - [2026-10-28 — report-version-flags](./changelog/2026-10-28--report-version-flags.md)
22
19
  - [2026-10-27 — npm-public-package](./changelog/2026-10-27--npm-public-package.md)
23
20
  - [2026-10-27 — structured-report-json](./changelog/2026-10-27--structured-report-json.md)
24
21
  - [2026-09-28 — agent-ready-check](./changelog/2026-09-28--agent-ready-check.md)
@@ -6,7 +6,7 @@ image alt text, broken links, accessibility, security headers, DNS, and optional
6
6
  performance auditing.
7
7
 
8
8
  **Status:** in progress — Phase 1 shipped, Phase 2 mostly shipped
9
- **Last updated:** 2026-09-28
9
+ **Last updated:** 2026-10-27
10
10
 
11
11
  ---
12
12
 
@@ -18,8 +18,9 @@ Add the checks below as modular, exportable functions (see `docs/check-api.md`)
18
18
  - Run independently via API endpoints in a consuming project
19
19
  - Execute in parallel where dependencies allow
20
20
 
21
- Each check produces structured JSON output and feeds into the Markdown TODO report via
22
- `analyze`.
21
+ Each check produces structured JSON output and feeds into analyze, which writes
22
+ `*-report.json` (`analysis` + `findings[]`) and a plain-language `*-report.md` from that
23
+ model.
23
24
 
24
25
  ---
25
26
 
@@ -126,7 +127,7 @@ Wave 3 (optional, after crawl):
126
127
  performance (Lighthouse or PageSpeed API on same URL sample)
127
128
 
128
129
  Wave 4:
129
- analyze (merges all check outputs into TODO report)
130
+ analyze (merges check outputs into *-report.json + *-report.md)
130
131
  ```
131
132
 
132
133
  Wave 2 and 3 share a URL sampler (`src/checks/sampleUrls.ts`):
package/docs/stack.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Stack detection
2
2
 
3
- Flightcheck fingerprints the technology stack of a crawled site for handover docs and agent
4
- routing. Results appear in `analysis.stack` in `*-report.json` and under **Stack** in the Markdown report.
3
+ Flightcheck fingerprints the technology stack of a crawled site for handover docs and tooling.
4
+ Results appear in `analysis.stack` in `*-report.json` and under **Stack** in the Markdown report.
5
5
 
6
6
  Detection uses **curated flightcheck rules** in `src/crawler/stackDetect.ts` — not the full
7
7
  Wappalyzer / webappanalyzer database. Rules only fire on strong signals (script URLs, distinctive
@@ -49,26 +49,19 @@ during analyze.
49
49
 
50
50
  ## Analyze output
51
51
 
52
- ```markdown
53
- ## Stack
54
-
55
- ### Platform
56
- - **Node.js** (medium, site-wide)
57
- - implied by Next.js
58
-
59
- ### Framework
60
- - **Next.js** (high, site-wide)
61
- - html: `data-next-head`
52
+ In `*-report.json`, stack detections live under `analysis.stack` (name, categories,
53
+ confidence, evidence, pageCount). The Markdown report renders them as:
62
54
 
63
- ### Hosting
64
- - **Vercel** (high, origin)
65
- - header: x-vercel-id
55
+ ```markdown
56
+ ### Stack
66
57
 
67
- ### Tracking (flightcheck crawl)
68
- - Tag managers:
69
- - Google Tag Manager: `GTM-XXXX`
58
+ - **Next.js** (JavaScript frameworks, high) — Next.js runtime markers in HTML
59
+ - **Vercel** (Hosting, high) — header: x-vercel-id
70
60
  ```
71
61
 
62
+ Tracking IDs from the crawl are still aggregated in the stack profile for tooling; the
63
+ human Markdown report focuses on stack detections in the **At a glance** section.
64
+
72
65
  Run with infra checks for the fullest picture:
73
66
 
74
67
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightmedia/flightcheck",
3
- "version": "0.1.0",
3
+ "version": "1.0.1",
4
4
  "description": "Pre-launch website audit: crawl SEO/a11y/security checks and emit structured JSON + Markdown reports.",
5
5
  "license": "GPL-3.0",
6
6
  "type": "module",