flamerjs 0.0.0-stage → 0.1.5

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +189 -2
  3. package/dist/cli.js +3308 -0
  4. package/package.json +49 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sagittarius
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,190 @@
1
- # Temporary Holding Version
1
+ # Flamer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **A fast sanity checker for AI-assisted codebases.**
4
+
5
+ [![CI](https://github.com/dummy3ye/flamer/actions/workflows/ci.yml/badge.svg)](https://github.com/dummy3ye/flamer/actions/workflows/ci.yml)
6
+ [![codecov](https://codecov.io/gh/dummy3ye/flamer/branch/master/graph/badge.svg)](https://codecov.io/gh/dummy3ye/flamer)
7
+ [![npm](https://img.shields.io/npm/v/flamerjs)](https://www.npmjs.com/package/flamerjs)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
9
+
10
+ Flamer scans a repository for the common mistakes that appear when software is
11
+ assembled quickly with AI or other “vibe coding” workflows: unfinished
12
+ implementation, broken project wiring, missing tests, inconsistent tooling,
13
+ repository hygiene problems, and maintainability traps.
14
+
15
+ It is designed to answer:
16
+
17
+ > **What is obviously unfinished, disconnected, inconsistent, or likely to
18
+ > break in this repository?**
19
+
20
+ Flamer is **not a deep security scanner**. It includes a small credential check
21
+ so accidentally committed keys are not ignored; injection, authentication,
22
+ cryptography, infrastructure security, and supply-chain analysis belong in a
23
+ dedicated security tool.
24
+
25
+ ## Why Flamer?
26
+
27
+ AI-generated code can look complete while still containing:
28
+
29
+ - placeholder implementations and empty error handlers;
30
+ - routes, scripts, or configuration that do not connect;
31
+ - tests that exist but provide little confidence;
32
+ - duplicate, generated, oversized, or abandoned files;
33
+ - dependency and runtime configuration that differs between environments.
34
+
35
+ Flamer turns these signals into a prioritized, machine-readable report that
36
+ can be used locally, in pull requests, or in CI.
37
+
38
+ ## Features
39
+
40
+ - **Unfinished implementation:** explicit “not implemented” paths and empty
41
+ error handlers.
42
+ - **Project health:** missing README, license, CI, environment templates,
43
+ editor configuration, and ecosystem scaffolding.
44
+ - **Testing signals:** test presence and source-to-test balance by language.
45
+ - **Dependency hygiene:** lockfiles, version constraints, and manifest checks.
46
+ - **Repository hygiene:** conflict markers, work-item markers, missing
47
+ newlines, mixed line endings, generated/vendor bloat, and deep paths.
48
+ - **Language-aware checks:** JavaScript/TypeScript, Python, Rust, Go, C/C++,
49
+ C#, Zig, SQL, notebooks, and additional language profiles.
50
+ - **Stable JSON output:** suitable for CI annotations and other automation.
51
+ - **Single-pass scanning:** files are walked once and content is read once.
52
+
53
+ ## Requirements
54
+
55
+ - Node.js 18 or newer
56
+ - npm
57
+
58
+ ## Quick start
59
+
60
+ Run Flamer from a checkout:
61
+
62
+ ```bash
63
+ npm ci
64
+ npm run build
65
+ node dist/cli.js .
66
+ ```
67
+
68
+ After publishing, install the CLI globally:
69
+
70
+ ```bash
71
+ npm install --global flamerjs
72
+ flamerjs .
73
+ ```
74
+
75
+ During development, `npm run dev` watches and rebuilds `dist/cli.js`.
76
+ The default output is a colorized terminal summary when run interactively.
77
+ Use `--format json` for automation and machine-readable output.
78
+
79
+ For a human-readable report:
80
+
81
+ ```bash
82
+ node dist/cli.js . --format summary
83
+ ```
84
+
85
+ Analyze another repository:
86
+
87
+ ```bash
88
+ node dist/cli.js /path/to/repository --format summary
89
+ ```
90
+
91
+ ## CLI
92
+
93
+ ```text
94
+ node dist/cli.js [path] [options]
95
+ ```
96
+
97
+ | Option | Description |
98
+ | --------------------------- | ----------------------------------------------------------------------------- |
99
+ | `--package, --scope <name>` | Analyze only a named sub-project |
100
+ | `--path <dir>` | Set the repository root; defaults to the current directory |
101
+ | `--format <json\|summary>` | Select JSON or human-readable output; summary is the default |
102
+ | `--out <file>` | Also write the JSON report to a file |
103
+ | `--fail-on <SEVERITY>` | Exit with status 1 at or above `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, or `INFO` |
104
+ | `--max-files <n>` | Limit the number of files scanned |
105
+ | `--commit-limit <n>` | Limit commits inspected by Git checks |
106
+ | `--no-git` | Skip Git analysis |
107
+ | `--no-lockfile-warning` | Suppress the missing-lockfile suggestion |
108
+ | `--ignore-dir <name>` | Ignore an additional directory name; repeatable |
109
+ | `--quiet` | Suppress the human summary |
110
+ | `--color` | Force ANSI colors |
111
+ | `--no-color` | Disable ANSI colors |
112
+ | `--list-languages` | List recognized language profiles |
113
+ | `--help` | Show command help |
114
+
115
+ Exit status `0` means the scan completed; findings may still exist. Status `1`
116
+ means `--fail-on` was reached, and status `2` indicates invalid usage or a
117
+ missing path.
118
+
119
+ ## Example report
120
+
121
+ ```json
122
+ {
123
+ "project": {
124
+ "name": "example-app",
125
+ "kind": ["node"],
126
+ "layout": "single"
127
+ },
128
+ "findings": [
129
+ {
130
+ "category": "unfinished",
131
+ "severity": "HIGH",
132
+ "title": "2 source file(s) contain unfinished implementation",
133
+ "detail": "Not-implemented errors and empty error handlers were detected.",
134
+ "files": ["src/api.ts", "src/jobs.ts"],
135
+ "count": 2
136
+ }
137
+ ]
138
+ }
139
+ ```
140
+
141
+ Findings are sorted by severity. Credential values are always redacted.
142
+
143
+ ## Development
144
+
145
+ ```bash
146
+ npm ci
147
+ npm run dev # rebuild on source changes
148
+ npm test # run the test suite
149
+ npm run lint
150
+ npm run format:check
151
+ npm run build
152
+ ```
153
+
154
+ The project uses Node.js and npm as its supported development toolchain.
155
+ `package-lock.json` is the canonical dependency lockfile.
156
+ The current test suite contains **175 tests**.
157
+
158
+ ## How it works
159
+
160
+ 1. Detect the repository layout, languages, and ecosystems.
161
+ 2. Walk the tree once and collect file metadata and content-derived signals.
162
+ 3. Run isolated analyzers against the collected records.
163
+ 4. Sort findings and emit JSON or a concise summary.
164
+
165
+ Analyzers are intentionally factual and conservative. A finding should identify
166
+ something actionable rather than merely express a preference.
167
+
168
+ ## Scope and non-goals
169
+
170
+ Flamer focuses on **codebase completeness and engineering health**, not
171
+ penetration testing. It does not attempt to prove that an application is
172
+ secure, correct, performant, or production-ready. Static signals always need
173
+ human review, especially when a project uses deliberate stubs, generated code,
174
+ or unusual architecture.
175
+
176
+ ## Contributing
177
+
178
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow and
179
+ guidelines for adding analyzers, language profiles, and tests.
180
+
181
+ When adding a check:
182
+
183
+ 1. Prefer a high-confidence signal with a concrete fix.
184
+ 2. Add a focused regression test.
185
+ 3. Keep false positives low and explain unavoidable uncertainty.
186
+ 4. Update the README when user-visible behavior changes.
187
+
188
+ ## License
189
+
190
+ This project is licensed under the [MIT License](LICENSE).