@amrishkhan05/frankly 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.
Files changed (123) hide show
  1. package/.claude-plugin/marketplace.json +27 -0
  2. package/.claude-plugin/plugin.json +11 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  4. package/.github/ISSUE_TEMPLATE/documentation.md +15 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
  6. package/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  7. package/.github/copilot-instructions.md +12 -0
  8. package/.github/plugin/marketplace.json +20 -0
  9. package/.github/plugin/plugin.json +16 -0
  10. package/.mcp.json +10 -0
  11. package/LICENSE +21 -0
  12. package/README.md +394 -0
  13. package/commands/frankly-help.toml +2 -0
  14. package/commands/frankly-plan.toml +2 -0
  15. package/commands/frankly-review.toml +2 -0
  16. package/commands/frankly-verify.toml +2 -0
  17. package/commands/frankly.toml +2 -0
  18. package/dist/analysis/change-classifier.d.ts +65 -0
  19. package/dist/analysis/change-classifier.d.ts.map +1 -0
  20. package/dist/analysis/change-classifier.js +241 -0
  21. package/dist/analysis/change-classifier.js.map +1 -0
  22. package/dist/analysis/repository-intelligence.d.ts +15 -0
  23. package/dist/analysis/repository-intelligence.d.ts.map +1 -0
  24. package/dist/analysis/repository-intelligence.js +179 -0
  25. package/dist/analysis/repository-intelligence.js.map +1 -0
  26. package/dist/core/config.d.ts +393 -0
  27. package/dist/core/config.d.ts.map +1 -0
  28. package/dist/core/config.js +130 -0
  29. package/dist/core/config.js.map +1 -0
  30. package/dist/core/engine.d.ts +20 -0
  31. package/dist/core/engine.d.ts.map +1 -0
  32. package/dist/core/engine.js +117 -0
  33. package/dist/core/engine.js.map +1 -0
  34. package/dist/core/errors.d.ts +27 -0
  35. package/dist/core/errors.d.ts.map +1 -0
  36. package/dist/core/errors.js +48 -0
  37. package/dist/core/errors.js.map +1 -0
  38. package/dist/core/index.d.ts +8 -0
  39. package/dist/core/index.d.ts.map +1 -0
  40. package/dist/core/index.js +8 -0
  41. package/dist/core/index.js.map +1 -0
  42. package/dist/core/models.d.ts +155 -0
  43. package/dist/core/models.d.ts.map +1 -0
  44. package/dist/core/models.js +6 -0
  45. package/dist/core/models.js.map +1 -0
  46. package/dist/git/index.d.ts +7 -0
  47. package/dist/git/index.d.ts.map +1 -0
  48. package/dist/git/index.js +6 -0
  49. package/dist/git/index.js.map +1 -0
  50. package/dist/git/repository.d.ts +44 -0
  51. package/dist/git/repository.d.ts.map +1 -0
  52. package/dist/git/repository.js +198 -0
  53. package/dist/git/repository.js.map +1 -0
  54. package/dist/graph/symbols.d.ts +45 -0
  55. package/dist/graph/symbols.d.ts.map +1 -0
  56. package/dist/graph/symbols.js +204 -0
  57. package/dist/graph/symbols.js.map +1 -0
  58. package/dist/integrations/claude/checkpoint.d.ts +2 -0
  59. package/dist/integrations/claude/checkpoint.d.ts.map +1 -0
  60. package/dist/integrations/claude/checkpoint.js +33 -0
  61. package/dist/integrations/claude/checkpoint.js.map +1 -0
  62. package/dist/integrations/cli/demo.d.ts +3 -0
  63. package/dist/integrations/cli/demo.d.ts.map +1 -0
  64. package/dist/integrations/cli/demo.js +31 -0
  65. package/dist/integrations/cli/demo.js.map +1 -0
  66. package/dist/integrations/cli/index.d.ts +7 -0
  67. package/dist/integrations/cli/index.d.ts.map +1 -0
  68. package/dist/integrations/cli/index.js +181 -0
  69. package/dist/integrations/cli/index.js.map +1 -0
  70. package/dist/integrations/mcp/index.d.ts +3 -0
  71. package/dist/integrations/mcp/index.d.ts.map +1 -0
  72. package/dist/integrations/mcp/index.js +7 -0
  73. package/dist/integrations/mcp/index.js.map +1 -0
  74. package/dist/integrations/mcp/server.d.ts +14 -0
  75. package/dist/integrations/mcp/server.d.ts.map +1 -0
  76. package/dist/integrations/mcp/server.js +232 -0
  77. package/dist/integrations/mcp/server.js.map +1 -0
  78. package/dist/project/detector.d.ts +70 -0
  79. package/dist/project/detector.d.ts.map +1 -0
  80. package/dist/project/detector.js +214 -0
  81. package/dist/project/detector.js.map +1 -0
  82. package/dist/report/json.d.ts +26 -0
  83. package/dist/report/json.d.ts.map +1 -0
  84. package/dist/report/json.js +148 -0
  85. package/dist/report/json.js.map +1 -0
  86. package/dist/review/red-ink-review.d.ts +26 -0
  87. package/dist/review/red-ink-review.d.ts.map +1 -0
  88. package/dist/review/red-ink-review.js +103 -0
  89. package/dist/review/red-ink-review.js.map +1 -0
  90. package/fixtures/retry-429/README.md +8 -0
  91. package/fixtures/retry-429/baseline/package.json +4 -0
  92. package/fixtures/retry-429/baseline/src/client.test.ts +8 -0
  93. package/fixtures/retry-429/baseline/src/client.ts +3 -0
  94. package/fixtures/retry-429/baseline/src/retry-policy.ts +1 -0
  95. package/fixtures/retry-429/baseline/tsconfig.json +7 -0
  96. package/fixtures/retry-429/candidate/src/client.ts +5 -0
  97. package/fixtures/retry-429/candidate/src/retry-strategy.ts +9 -0
  98. package/fixtures/retry-429/candidate/src/unrelated-format.ts +1 -0
  99. package/hooks/copilot-activate.js +9 -0
  100. package/hooks/copilot-hooks.json +13 -0
  101. package/hooks/hooks.json +13 -0
  102. package/package.json +70 -0
  103. package/scripts/run.cjs +32 -0
  104. package/skills/frankly/SKILL.md +12 -0
  105. package/src/analysis/change-classifier.ts +285 -0
  106. package/src/analysis/repository-intelligence.ts +236 -0
  107. package/src/core/config.ts +149 -0
  108. package/src/core/engine.ts +143 -0
  109. package/src/core/errors.ts +56 -0
  110. package/src/core/index.ts +8 -0
  111. package/src/core/models.ts +280 -0
  112. package/src/git/index.ts +7 -0
  113. package/src/git/repository.ts +207 -0
  114. package/src/graph/symbols.ts +254 -0
  115. package/src/integrations/claude/checkpoint.ts +40 -0
  116. package/src/integrations/cli/demo.ts +34 -0
  117. package/src/integrations/cli/index.ts +211 -0
  118. package/src/integrations/mcp/index.ts +7 -0
  119. package/src/integrations/mcp/server.ts +257 -0
  120. package/src/project/detector.ts +242 -0
  121. package/src/report/json.ts +175 -0
  122. package/src/review/red-ink-review.ts +125 -0
  123. package/src/tests/phase1.test.ts +57 -0
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-marketplace.json",
3
+ "name": "frankly",
4
+ "description": "Local-first change intelligence plugins for coding agents.",
5
+ "owner": {
6
+ "name": "Amrishkhan Sheik Abdullah",
7
+ "url": "https://github.com/amrishkhan05"
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "frankly",
12
+ "source": "./",
13
+ "description": "Keeps AI-generated code changes proportional to the task.",
14
+ "version": "0.1.0",
15
+ "author": {
16
+ "name": "Amrishkhan Sheik Abdullah",
17
+ "url": "https://github.com/amrishkhan05"
18
+ },
19
+ "homepage": "https://github.com/amrishkhan05/frankly",
20
+ "repository": "https://github.com/amrishkhan05/frankly",
21
+ "license": "MIT",
22
+ "keywords": ["change-intelligence", "code-review", "local-first", "mcp"],
23
+ "category": "productivity",
24
+ "tags": ["code-review", "local-first", "mcp"]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
+ "name": "frankly",
4
+ "displayName": "Frankly",
5
+ "version": "0.1.0",
6
+ "description": "Local-first change intelligence for AI coding agents.",
7
+ "author": { "name": "Amrishkhan Sheik Abdullah", "url": "https://github.com/amrishkhan05" },
8
+ "repository": "https://github.com/amrishkhan05/frankly",
9
+ "license": "MIT",
10
+ "keywords": ["change-intelligence", "code-review", "local-first", "mcp"]
11
+ }
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Create a report to help us improve
4
+ title: "[BUG] ..."
5
+ labels: bug
6
+ ---
7
+
8
+ **Describe the bug**
9
+ A clear and concise description of what the bug is.
10
+
11
+ **Steps to reproduce**
12
+ 1. Go to '...'
13
+ 2. Click on '...'
14
+ 3. See error
15
+
16
+ **Expected behavior**
17
+ A clear and concise description of what you expected to happen.
18
+
19
+ **Relevant logs / screenshots**
20
+ Add any relevant logs or screenshots.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Documentation Improvement
3
+ about: Propose enhancements to project documentation
4
+ title: "[DOC] ..."
5
+ labels: documentation
6
+ ---
7
+
8
+ **What documentation needs improvement?**
9
+ Provide a clear description of the documentation area that should be updated.
10
+
11
+ **Proposed changes**
12
+ Outline the suggested modifications or additions.
13
+
14
+ **Additional context**
15
+ Add any relevant links, screenshots, or examples.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE] ..."
5
+ labels: enhancement
6
+ ---
7
+
8
+ **Describe the solution**
9
+ A clear and concise description of what you want to happen.
10
+
11
+ **Motivation**
12
+ Why is this feature needed? What problem does it solve?
13
+
14
+ **Alternatives considered**
15
+ Any alternative approaches you considered.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Pull Request
3
+ about: Submit a pull request for review
4
+ labels: ''
5
+ ---
6
+
7
+ ## Description
8
+ Please describe the changes made in this PR.
9
+
10
+ ## Related Issue(s)
11
+ Link any related issue(s) (e.g., `Closes #123`).
12
+
13
+ ## Testing
14
+ List the steps you took to test your changes.
15
+
16
+ ## Checklist
17
+ - [ ] Code follows the style guidelines
18
+ - [ ] All tests pass
19
+ - [ ] Documentation updated (if applicable)
20
+ - [ ] No new lint errors
@@ -0,0 +1,12 @@
1
+ <!-- @format -->
2
+
3
+ # Frankly
4
+
5
+ Use Frankly to challenge a code change with local repository evidence.
6
+
7
+ Before editing a task with uncertain scope, call `plan_change`. At a meaningful
8
+ completion checkpoint, call `analyze_change`. If it recommends a correction,
9
+ call `minimize_change`, make at most one evidence-backed correction, then call
10
+ `verify_change` with only tests actually executed.
11
+
12
+ Do not treat predicted tests as executed. Do not repeat a correction pass.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "frankly",
3
+ "description": "Local-first change intelligence for coding agents.",
4
+ "owner": {
5
+ "name": "Amrishkhan Sheik Abdullah",
6
+ "url": "https://github.com/amrishkhan05"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "frankly",
11
+ "description": "Challenge code changes with deterministic local repository evidence.",
12
+ "source": "./",
13
+ "category": "productivity",
14
+ "tags": ["code-review", "mcp", "local-first"],
15
+ "commands": "commands/",
16
+ "skills": "skills/",
17
+ "hooks": "hooks/copilot-hooks.json"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "frankly",
3
+ "description": "Local-first change intelligence for coding agents.",
4
+ "version": "0.1.0",
5
+ "author": {
6
+ "name": "Amrishkhan Sheik Abdullah",
7
+ "url": "https://github.com/amrishkhan05"
8
+ },
9
+ "homepage": "https://github.com/amrishkhan05/frankly",
10
+ "repository": "https://github.com/amrishkhan05/frankly",
11
+ "license": "MIT",
12
+ "keywords": ["change-intelligence", "code-review", "local-first", "mcp"],
13
+ "commands": "commands/",
14
+ "skills": "skills/",
15
+ "hooks": "hooks/copilot-hooks.json"
16
+ }
package/.mcp.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "frankly": {
4
+ "command": "node",
5
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/run.cjs", "mcp"],
6
+ "cwd": "${CLAUDE_PROJECT_DIR}",
7
+ "env": { "FRANKLY_PLUGIN_DATA": "${CLAUDE_PLUGIN_DATA}" }
8
+ }
9
+ }
10
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Amrishkhan Sheik Abdullah
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 ADDED
@@ -0,0 +1,394 @@
1
+ # <img src="assets/banner.jpg" alt="Frankly Banner" width="800"/>
2
+
3
+ # Frankly
4
+
5
+ <details open>
6
+ <summary><strong>🚀 Tagline</strong></summary>
7
+
8
+ > **Your AI writes code. Frankly reviews it, frankly.**
9
+
10
+ </details>
11
+
12
+ ---
13
+
14
+ <div align="center">
15
+
16
+ [![GitHub stars](https://img.shields.io/github/stars/amrishkhan05/frankly?style=for-the-badge)](https://github.com/amrishkhan05/frankly/stargazers)
17
+ [![License](https://img.shields.io/github/license/amrishkhan05/frankly?style=for-the-badge)](LICENSE)
18
+ [![npm version](https://img.shields.io/npm/v/frankly?style=for-the-badge)](https://www.npmjs.com/package/frankly)
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## 🎯 What is Frankly?
25
+
26
+ Frankly is a **local‑first change‑intelligence engine** for coding agents. It inspects the current Git diff and your TypeScript/JavaScript project, then asks whether **every changed file and symbol earned its place**. No hidden LLM calls, no cloud dependencies – everything runs deterministically on your machine.
27
+
28
+ ---
29
+
30
+ ## 📖 Table of Contents
31
+
32
+ - [🚀 Quick Start](#-quick-start)
33
+ - [🔎 The Ten‑Second Demo](#-the-ten-second-demo)
34
+ - [✨ Features](#-features)
35
+ - [⚙️ Installation & Usage](#-installation--usage)
36
+ - [🧩 Plugins & MCP Integration](#-plugins--mcp-integration)
37
+ - [🛠️ CLI Reference](#-cli-reference)
38
+ - [🔧 Configuration](#-configuration)
39
+ - [📊 Benchmarks & Scoring](#-benchmarks--scoring)
40
+ - [🔐 Privacy & Security](#-privacy--security)
41
+ - [🚧 Roadmap](#-roadmap)
42
+ - [🤝 Contributing](#-contributing)
43
+ - [👤 Author](#-author)
44
+
45
+ ---
46
+
47
+ ## 🚀 Quick Start
48
+
49
+ ```bash
50
+ # Clone the repo
51
+ git clone https://github.com/amrishkhan05/frankly.git
52
+ cd frankly
53
+
54
+ # Install dependencies (Node.js 20+ required)
55
+ npm install
56
+
57
+ # Run the test suite
58
+ npm test
59
+
60
+ # Build the project
61
+ npm run build
62
+ ```
63
+ ![Frankly demo](file:///Users/AmrishMacBookPro/.gemini/antigravity-ide/brain/5dabddf1-502f-43d8-b12a-719035d77b27/demo.gif)
64
+ > **Note:** The package is not yet published on npm. Until then, install directly from the source.
65
+
66
+ ---
67
+
68
+ ## 🔎 The Ten‑Second Demo
69
+
70
+ ```text
71
+ Task: Retry HTTP 429 responses
72
+
73
+ FRANKLY · RED INK REVIEW
74
+ {{ ... }}
75
+
76
+ CORRECTION PASS (1/1)
77
+ Preserve behavior and safety; remove or justify the red marks, then verify once.
78
+ ```
79
+
80
+ ```bash
81
+ git clone https://github.com/amrishkhan05/frankly.git
82
+ cd frankly
83
+ npm install
84
+ npm test
85
+ npm run build
86
+ ```
87
+
88
+ The repository has not claimed an npm release yet, so this README does not pretend `npm install -g frankly` is available.
89
+
90
+ ## Claude Code plugin
91
+
92
+ Frankly's public GitHub repository is also its Claude Code marketplace. Install Frankly directly from GitHub:
93
+
94
+ ```bash
95
+ claude plugin marketplace add amrishkhan05/frankly
96
+ claude plugin install frankly@frankly
97
+ ```
98
+
99
+ The marketplace catalog is [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json). It installs the plugin from this repository root (`"source": "./"`), which contains its manifest, MCP configuration, hooks, and skills. The plugin's explicit version is `0.1.0`; users receive future marketplace updates when that version changes.
100
+
101
+ After an update, refresh the marketplace and plugin:
102
+
103
+ ```bash
104
+ claude plugin marketplace update frankly
105
+ claude plugin update frankly@frankly
106
+ ```
107
+
108
+ For local development, validate and install the checkout as a marketplace:
109
+
110
+ ```bash
111
+ claude plugin validate .
112
+ claude plugin marketplace add ./
113
+ claude plugin install frankly@frankly
114
+ ```
115
+
116
+ Run `/reload-plugins` when Claude Code asks for activation after installation or an update. `claude plugin list` shows the installed plugin and version.
117
+
118
+ For a one-session local checkout without marketplace installation:
119
+
120
+ ```bash
121
+ claude --plugin-dir /absolute/path/to/frankly
122
+ ```
123
+
124
+ The plugin bundles Frankly's MCP server and a `Stop` hook. At task completion it runs a Red Ink Review; when correction is warranted it returns exactly one constrained correction request. The second stop is allowed, preventing loops. Claude Code's current plugin layout and hook behavior are documented in the [official plugin reference](https://code.claude.com/docs/en/plugins-reference) and [hooks reference](https://code.claude.com/docs/en/hooks).
125
+
126
+ The first plugin run installs the package's declared runtime dependencies into Claude's plugin data directory. Repository analysis remains local and makes no external requests.
127
+
128
+ ## Generic MCP
129
+
130
+ After building, start the stdio server with:
131
+
132
+ ```bash
133
+ node /absolute/path/to/frankly/dist/integrations/mcp/index.js
134
+ ```
135
+
136
+ Use that command anywhere an MCP client accepts a local stdio server.
137
+
138
+ ### Codex
139
+
140
+ ```bash
141
+ codex mcp add frankly -- node /absolute/path/to/frankly/dist/integrations/mcp/index.js
142
+ ```
143
+
144
+ Codex stores MCP settings in `~/.codex/config.toml` or trusted project `.codex/config.toml`, and its CLI, IDE extension, and desktop app share the configuration. See the [official OpenAI MCP documentation](https://developers.openai.com/codex/mcp).
145
+
146
+ Codex does not expose Claude's Stop-hook lifecycle. Use the four MCP tools at plan, review, correction, and verification checkpoints.
147
+
148
+ ### Cursor
149
+
150
+ Create `.cursor/mcp.json`:
151
+
152
+ ```json
153
+ {
154
+ "mcpServers": {
155
+ "frankly": {
156
+ "command": "node",
157
+ "args": ["/absolute/path/to/frankly/dist/integrations/mcp/index.js"]
158
+ }
159
+ }
160
+ }
161
+ ```
162
+
163
+ Cursor's [current MCP documentation](https://docs.cursor.com/context/model-context-protocol) confirms project configuration at `.cursor/mcp.json`. Automatic lifecycle hooks are not assumed; invoke Frankly's tools from Agent mode.
164
+
165
+ ### GitHub Copilot
166
+
167
+ Frankly includes a native Copilot plugin with `/frankly`, `/frankly-plan`, `/frankly-review`, `/frankly-verify`, and `/frankly-help` commands. Its manifest is at `.github/plugin/plugin.json`, with a marketplace descriptor at `.github/plugin/marketplace.json`.
168
+
169
+ For local development, build this checkout and install the repository directory with VS Code's Copilot plugin flow. The plugin registers a session-start instruction, its Frankly skill, and the slash commands. Reopen VS Code after installing or updating the plugin.
170
+
171
+ ```bash
172
+ npm install
173
+ npm run build
174
+ ```
175
+
176
+ This repository also includes `.vscode/mcp.json`. Copilot starts the local MCP server from `dist/integrations/mcp/index.js`, so the plugin can call `plan_change`, `analyze_change`, `minimize_change`, and `verify_change` against the current workspace.
177
+
178
+ Use `/frankly-plan` before a change when scope is unclear. Use `/frankly-review` when implementation is complete, then `/frankly-verify` after the single permitted correction pass and any relevant tests.
179
+
180
+ #### Copilot command reference
181
+
182
+ All commands accept a task description after the command. Give Frankly a concrete description of the requested behavior; a task such as `review` is too broad to produce useful intent evidence.
183
+
184
+ | Command | Use | What Copilot does |
185
+ | --- | --- | --- |
186
+ | `/frankly <task>` | Run the complete change workflow. | Plans uncertain work, reviews the completed diff, permits one evidence-backed correction, and verifies the result. |
187
+ | `/frankly-plan <task>` | Before editing when the expected scope is unclear. | Calls `plan_change` and reports likely touched areas, reusable code, expected scope, tests, and constraints. |
188
+ | `/frankly-review <task>` | Review the current working-tree diff without changing it. | Calls `analyze_change` and reports the Red Ink verdict, findings, impact, contracts, and predicted tests. |
189
+ | `/frankly-verify <task>` | Check the final diff after tests or a correction pass. | Calls `verify_change` and reports unresolved evidence-backed concerns. |
190
+ | `/frankly-help` | View Frankly's workflow without reviewing or modifying the patch. | Explains the commands, the single-correction limit, and the difference between predicted and executed tests. |
191
+
192
+ Typical Copilot session:
193
+
194
+ ```text
195
+ /frankly-plan Retry HTTP 429 responses
196
+
197
+ # Implement the requested change and run its relevant tests.
198
+
199
+ /frankly-review Retry HTTP 429 responses
200
+
201
+ # Only when the review has evidence-backed simplification findings:
202
+ # make one correction pass, preserving behavior and safety.
203
+
204
+ /frankly-verify Retry HTTP 429 responses
205
+ ```
206
+
207
+ `/frankly-review` does not modify files. When it recommends a correction, Copilot calls `minimize_change` to obtain a constrained instruction. Frankly permits one correction pass only; it does not loop review and correction indefinitely.
208
+
209
+ Frankly keeps predictions and results separate. Its related-test output identifies `LIKELY_AFFECTED` and `POSSIBLY_AFFECTED` tests. Tests are only reported as `PASSED`, `FAILED`, `SKIPPED`, or `NOT_RUN` when Copilot or the CLI supplies an actual execution result.
210
+
211
+ Copilot's verified local plugin hook surface provides session-start and prompt lifecycle hooks, not a task-completion hook. Frankly therefore does not yet trigger a final review automatically in Copilot; use the slash command or have Copilot follow its session instruction. Claude Code's plugin retains its automatic Stop-hook checkpoint.
212
+
213
+ If you configure a different workspace manually, add `.vscode/mcp.json`:
214
+
215
+ ```json
216
+ {
217
+ "servers": {
218
+ "frankly": {
219
+ "command": "node",
220
+ "args": ["/absolute/path/to/frankly/dist/integrations/mcp/index.js"]
221
+ }
222
+ }
223
+ }
224
+ ```
225
+
226
+ See GitHub's [MCP setup documentation](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp-in-your-ide/extend-copilot-chat-with-mcp). Availability can depend on IDE and organization policy.
227
+
228
+ ### Kilo Code
229
+
230
+ Add to `.kilo/kilo.json`:
231
+
232
+ ```json
233
+ {
234
+ "mcp": {
235
+ "frankly": {
236
+ "type": "local",
237
+ "command": ["node", "/absolute/path/to/frankly/dist/integrations/mcp/index.js"],
238
+ "enabled": true
239
+ }
240
+ }
241
+ }
242
+ ```
243
+
244
+ See Kilo's [current MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).
245
+
246
+ ## CLI fallback
247
+
248
+ The published `frankly` executable and the source checkout support the same subcommands. Run commands from the repository you want to analyze. The CLI reads its working-tree diff and its `frankly.config.json`.
249
+
250
+ ```bash
251
+ # From a source checkout
252
+ npm run dev -- <command> [options]
253
+
254
+ # After building, through the package executable
255
+ frankly <command> [options]
256
+ ```
257
+
258
+ ### CLI command reference
259
+
260
+ | Command | Description | Supported options |
261
+ | --- | --- | --- |
262
+ | `frankly help` | Prints the CLI command and option reference. Running `frankly` with no subcommand has the same result. | None. |
263
+ | `frankly plan` | Produces a pre-change plan from the task text and local repository evidence. It estimates affected areas, reusable code, expected scope, and likely test needs. | `--task <text>` |
264
+ | `frankly review` | Analyzes the current working-tree diff and prints a Red Ink Review. It does not modify the patch. | `--task <text>`, `--intensity <lite\|full\|ultra\|off>`, `--personality <conservative\|senior\|witty>`, `--run-tests`, `--json`, `--markdown`, `--ci` |
265
+ | `frankly verify` | Re-analyzes the current working-tree diff as a final verification. It exits nonzero when the verdict is not `CLEAN`. | `--task <text>`, `--intensity <lite\|full\|ultra\|off>`, `--personality <conservative\|senior\|witty>`, `--run-tests` |
266
+ | `frankly config` | Prints the active workspace path and Frankly's default configuration. `frankly config show` is equivalent. | `show` |
267
+ | `frankly mcp` | Starts the stdio MCP server for an MCP-compatible client. It remains running until the client closes the connection. | None. |
268
+
269
+ `--task` defaults to a generic task when omitted. Provide a concrete task description for meaningful intent matching. `--run-tests` runs the repository's `pnpm test`, `yarn test`, or `npm test` command and records that one real result. `--ci` emits CI JSON and exits nonzero unless the verdict is `CLEAN`. `--json` and `--markdown` apply to `review`; terminal output is the default.
270
+
271
+ Examples:
272
+
273
+ ```bash
274
+ npm run dev -- plan --task "Retry HTTP 429 responses"
275
+ npm run review -- --task "Retry HTTP 429 responses"
276
+ npm run review -- --task "Retry HTTP 429 responses" --run-tests
277
+ npm run review -- --task "Retry HTTP 429 responses" --json
278
+ npm run review -- --task "Retry HTTP 429 responses" --markdown
279
+ npm run review -- --task "Retry HTTP 429 responses" --ci
280
+ npm run verify -- --task "Retry HTTP 429 responses" --run-tests
281
+ npm run dev -- config show
282
+ npm run dev -- help
283
+ ```
284
+
285
+ CLI review is advisory by default. `--ci` exits non-zero for a non-clean verdict.
286
+
287
+ ### npm scripts
288
+
289
+ | Script | Description |
290
+ | --- | --- |
291
+ | `npm run dev -- <command>` | Runs the CLI directly from TypeScript without building `dist/`. |
292
+ | `npm run build` | Compiles TypeScript into `dist/`. Required before the bundled MCP configuration can start the server. |
293
+ | `npm test` | Runs the full Vitest suite. |
294
+ | `npm run test:watch` | Runs Vitest in watch mode. |
295
+ | `npm run mcp` | Starts the MCP server directly from TypeScript. |
296
+ | `npm run review -- [options]` | Shorthand for `frankly review`. |
297
+ | `npm run verify -- [options]` | Shorthand for `frankly verify`. |
298
+ | `npm run demo` | Creates and analyzes the bundled retry-429 fixture in a temporary Git repository. |
299
+ | `npm run benchmark` | Runs the local benchmark harness using `benchmarks/tasks.example.json`. |
300
+
301
+ ## MCP tool reference
302
+
303
+ The MCP server exposes four tools. `task` is required for every tool. `repositoryRoot` is optional and defaults to the server's current working directory.
304
+
305
+ | Tool | Use | Inputs | Output |
306
+ | --- | --- | --- | --- |
307
+ | `plan_change` | Before editing when scope is uncertain. | `task`, optional `repositoryRoot` | Expected scope, likely areas, reuse candidates, confidence, and concerns. |
308
+ | `analyze_change` | Review the current diff. | `task`, optional `repositoryRoot`, `intensity`, `personality`, `executedTests` | Full Red Ink Review, findings, impact, contracts, predicted tests, and any correction guidance. |
309
+ | `minimize_change` | Obtain the one permitted evidence-backed correction instruction after a review recommends it. | `task`, optional `repositoryRoot` | One correction instruction, or confirmation that no correction is warranted. |
310
+ | `verify_change` | Verify the final diff after the correction pass and relevant tests. | `task`, optional `repositoryRoot`, `executedTests` | `CLEAN` confirmation or unresolved concerns. |
311
+
312
+ For `analyze_change` and `verify_change`, `executedTests` is an optional list of `{ path, name, status, duration? }` objects. Valid statuses are `PASSED`, `FAILED`, `SKIPPED`, and `NOT_RUN`.
313
+
314
+ The normal sequence is `plan_change` (when needed), `analyze_change`, one optional `minimize_change` correction, then `verify_change`.
315
+
316
+ Predicted tests are `LIKELY_AFFECTED` or `POSSIBLY_AFFECTED`. Executed tests are only `PASSED`, `FAILED`, `SKIPPED`, or `NOT_RUN` when the caller supplies or the CLI records an actual run.
317
+
318
+ ## Configuration
319
+
320
+ Frankly reads one repository format: `frankly.config.json`.
321
+
322
+ ```json
323
+ {
324
+ "trigger": "checkpoint",
325
+ "action": "correct",
326
+ "intensity": "full",
327
+ "personality": "senior",
328
+ "maxCorrectionPasses": 1
329
+ }
330
+ ```
331
+
332
+ Invocation options override repository settings, which override defaults. Personality changes wording only; it does not change findings or severity.
333
+
334
+ ## Scoring
335
+
336
+ Change Necessity is the percentage of classified changes with direct, supporting, test, or generated evidence, minus five points for each visible medium/high-confidence finding. Change Surface combines non-generated files, changed symbols, exported contracts, and cross-package impact. Scope Drift is the share of changed files classified as suspicious.
337
+
338
+ These are explainable heuristics, not universal measures. Read the findings and evidence before the number.
339
+
340
+ ## Test impact and false positives
341
+
342
+ Frankly predicts related tests from import edges, changed-symbol references, and naming proximity. It does not claim coverage or failure without an executed result. Low-confidence guesses are not promoted to hard conclusions.
343
+
344
+ The v0.1 graph follows relative TypeScript/JavaScript imports. Package-alias resolution, runtime route graphs, coverage ingestion, and historical co-change weighting are future work; add them when fixtures demonstrate a credible improvement.
345
+
346
+ ## Benchmarks
347
+
348
+ ```bash
349
+ npm run benchmark
350
+ ```
351
+
352
+ The harness records measured files, changed lines, symbols, findings, drift, verdict, and duration for cases in `benchmarks/tasks.example.json`. No improvement percentage is claimed until agent-alone and agent-plus-Frankly runs are reproducibly measured.
353
+
354
+ `npm run demo` executes the deliberately broad retry-429 candidate in [fixtures/retry-429](fixtures/retry-429) and shows the evidence Frankly reports.
355
+
356
+ ## Privacy and security
357
+
358
+ - no account, telemetry, embeddings, vector database, code upload, or external AI API
359
+ - Git commands use argument arrays rather than interpolated shell commands
360
+ - optional `--run-tests` executes the repository's own test script
361
+ - plugin bootstrap contacts npm only to install declared runtime dependencies
362
+
363
+ See [SECURITY.md](SECURITY.md).
364
+
365
+ ## Architecture
366
+
367
+ ```mermaid
368
+ graph LR
369
+ A[Git diff + task + TS/JS source] --> B[Deterministic engine]
370
+ B --> C[Evidence‑backed review]
371
+ C --> D1[Claude]
372
+ C --> D2[Generic MCP]
373
+ C --> D3[CLI/CI]
374
+ ```
375
+
376
+ One engine, thin adapters, no daemon, no database, no hidden model.
377
+
378
+ ## Roadmap
379
+
380
+ - validate package aliases and framework-specific runtime boundaries with fixtures
381
+ - ingest Jest/Vitest/Nx related-test output instead of only the repository test script
382
+ - add historical before/after benchmark cases
383
+ - publish the npm package and Claude marketplace listing
384
+
385
+ ## Contributing
386
+
387
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Frankly is MIT licensed.
388
+
389
+ ## Author
390
+
391
+ Frankly is created by Amrishkhan Sheik Abdullah.
392
+
393
+ - GitHub: [@amrishkhan05](https://github.com/amrishkhan05)
394
+ - Website: [amrishkhan.dev](https://amrishkhan.dev)
@@ -0,0 +1,2 @@
1
+ description = "Show Frankly's Copilot workflow and command reference"
2
+ prompt = "Show the Frankly quick reference. Do not analyze or modify the current patch. Explain: /frankly <task> runs the full workflow; /frankly-plan <task> plans uncertain work; /frankly-review <task> analyzes the current diff without editing; /frankly-verify <task> checks the final diff; and minimize_change permits one evidence-backed correction pass only. State that predicted tests are not executed test results."
@@ -0,0 +1,2 @@
1
+ description = "Plan a change with Frankly's local repository evidence"
2
+ prompt = "Use Frankly plan_change for this task: {{args}}. Report the likely files, reuse candidates, expected tests, and constraints before editing."
@@ -0,0 +1,2 @@
1
+ description = "Run Frankly's Red Ink Review on the current change"
2
+ prompt = "Use Frankly analyze_change for this task: {{args}}. Report the verdict and evidence-backed findings. Do not modify files unless the user asks for correction."
@@ -0,0 +1,2 @@
1
+ description = "Verify the current change with Frankly"
2
+ prompt = "Use Frankly verify_change for this task: {{args}}. Keep predicted tests distinct from tests actually executed."
@@ -0,0 +1,2 @@
1
+ description = "Use Frankly throughout a change: plan, analyze, one correction, and verify"
2
+ prompt = "Use Frankly for this task: {{args}}. Call plan_change before editing if scope is uncertain. At completion, call analyze_change. If it recommends correction, use minimize_change once, preserve behavior and safety, then call verify_change with only tests that were actually run."