fathom-cli 0.3.0 → 0.3.3
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/README.md +62 -56
- package/dist/data/guardrails/gdpr-basic.yaml +19 -0
- package/dist/data/guardrails/hipaa-basic.yaml +19 -0
- package/dist/data/guardrails/owasp-top-10.yaml +16 -0
- package/dist/data/guardrails/pci-basic.yaml +19 -0
- package/dist/data/guardrails/soc2-basic.yaml +19 -0
- package/dist/data/guardrails/wcag-aa.yaml +16 -0
- package/dist/index.js +993 -223
- package/dist/index.js.map +1 -1
- package/package.json +21 -9
- package/plugins/fathom/.claude-plugin/plugin.json +13 -0
- package/plugins/fathom/.mcp.json +8 -0
- package/plugins/fathom/skills/budget/.gitkeep +0 -0
- package/plugins/fathom/skills/budget/SKILL.md +40 -0
- package/plugins/fathom/skills/budget-warning/.gitkeep +0 -0
- package/plugins/fathom/skills/budget-warning/SKILL.md +52 -0
- package/plugins/fathom/skills/cost-preview/.gitkeep +0 -0
- package/plugins/fathom/skills/cost-preview/SKILL.md +70 -0
- package/plugins/fathom/skills/estimate/.gitkeep +0 -0
- package/plugins/fathom/skills/estimate/SKILL.md +58 -0
- package/plugins/fathom/skills/gsd/SKILL.md +35 -0
- package/plugins/fathom/skills/projections/.gitkeep +0 -0
- package/plugins/fathom/skills/projections/SKILL.md +36 -0
- package/plugins/fathom/skills/recommend-model/.gitkeep +0 -0
- package/plugins/fathom/skills/recommend-model/SKILL.md +53 -0
- package/plugins/fathom/skills/status/.gitkeep +0 -0
- package/plugins/fathom/skills/status/SKILL.md +42 -0
- package/plugins/fathom/tests/integrations.test.ts +66 -0
- package/plugins/fathom/tests/plugin.test.ts +49 -0
- package/plugins/fathom/tests/skills.test.ts +135 -0
package/README.md
CHANGED
|
@@ -1,95 +1,101 @@
|
|
|
1
1
|
# fathom-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/fathom-cli)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Install
|
|
5
|
+
**Know what your AI coding actually costs.** Estimate tokens before you build, track actuals while you build, calibrate so estimates get better over time.
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
8
|
npm install -g fathom-cli
|
|
9
|
+
fathom
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## The Problem
|
|
13
|
+
|
|
14
|
+
You're spending real money on AI coding and have zero visibility into where it goes. You don't know what a feature costs until the bill arrives. Overhead — context resends, tool calls, error recovery — is invisible.
|
|
15
|
+
|
|
16
|
+
## What Fathom Does
|
|
17
|
+
|
|
18
|
+
**Estimate** → token cost per feature, based on task type + complexity + overhead model
|
|
19
|
+
|
|
20
|
+
**Track** → auto-imports sessions from Claude, GPT, Gemini, or any provider. Tags to features automatically.
|
|
21
|
+
|
|
22
|
+
**Calibrate** → compares estimates to actuals, adjusts the model. Gets more accurate every cycle.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
$ fathom estimate "add OAuth login with Google and GitHub"
|
|
26
|
+
~42,000 tokens (~$0.84) — complexity: L, type: integration
|
|
27
|
+
|
|
28
|
+
$ fathom track
|
|
29
|
+
3 sessions imported, 2 auto-tagged (auth-login: 89%, payment: 72%)
|
|
30
|
+
|
|
31
|
+
$ fathom reconcile
|
|
32
|
+
auth-login: estimated 42K, actual 67K (1.6x over — error recovery overhead)
|
|
33
|
+
|
|
34
|
+
$ fathom calibrate
|
|
35
|
+
adjusted integration overhead: 1.8x → 2.4x (based on 12 data points)
|
|
11
36
|
```
|
|
12
37
|
|
|
13
|
-
## One Command
|
|
38
|
+
## One Command Workflow
|
|
14
39
|
|
|
15
40
|
```bash
|
|
16
41
|
fathom
|
|
17
42
|
```
|
|
18
43
|
|
|
19
|
-
|
|
44
|
+
With no arguments, `fathom` runs the full loop:
|
|
20
45
|
|
|
21
|
-
1. **Intent**
|
|
22
|
-
2. **Intake**
|
|
23
|
-
3. **Build**
|
|
24
|
-
4. **Review**
|
|
46
|
+
1. **Intent** — captures what you're building, what matters, your budget and guardrails
|
|
47
|
+
2. **Intake** — extracts work items, estimates tokens and cost
|
|
48
|
+
3. **Build** — launches your AI tool with full context
|
|
49
|
+
4. **Review** — tracks sessions, reconciles, calibrates
|
|
25
50
|
|
|
26
|
-
New project?
|
|
51
|
+
New project? Auto-scaffolds everything. Returning? Shows progress:
|
|
27
52
|
|
|
28
53
|
```
|
|
29
54
|
$ fathom
|
|
30
55
|
|
|
31
|
-
Fathom
|
|
32
|
-
6/12 features complete (50%)
|
|
56
|
+
Fathom — myproject
|
|
57
|
+
6/12 features complete (50%) — $8.40 of $14.20 spent
|
|
33
58
|
|
|
34
|
-
What would you like to do?
|
|
35
59
|
> Continue building (next: payment-integration)
|
|
36
|
-
New intake
|
|
37
|
-
Review
|
|
38
|
-
Status overview
|
|
60
|
+
New intake — add more work
|
|
61
|
+
Review — reconcile recent sessions
|
|
39
62
|
```
|
|
40
63
|
|
|
41
|
-
|
|
64
|
+
## Also Does
|
|
42
65
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
66
|
+
- **Model routing** — recommends Haiku/Sonnet/Opus based on task complexity and budget
|
|
67
|
+
- **Tool config generation** — creates system prompts for Claude, Cursor, Copilot, Windsurf from your project intent
|
|
68
|
+
- **Guardrail templates** — OWASP, WCAG, HIPAA, GDPR, PCI, SOC2 built-in
|
|
69
|
+
- **MCP server** — use Fathom as tools inside any MCP-compatible editor
|
|
70
|
+
- **Velocity benchmarks** — "auth features take 2.3 days and 85K tokens on average"
|
|
47
71
|
|
|
48
72
|
## All Commands
|
|
49
73
|
|
|
50
|
-
| Command |
|
|
74
|
+
| Command | What it does |
|
|
51
75
|
|---------|-------------|
|
|
52
|
-
| `fathom` | Full workflow
|
|
53
|
-
| `fathom
|
|
54
|
-
| `fathom
|
|
55
|
-
| `fathom
|
|
56
|
-
| `fathom
|
|
57
|
-
| `fathom
|
|
58
|
-
| `fathom
|
|
59
|
-
| `fathom
|
|
60
|
-
| `fathom calibrate` | Adjust task profiles from real data |
|
|
61
|
-
| `fathom velocity` | Throughput metrics and benchmarks |
|
|
62
|
-
| `fathom project` | Manage project configuration |
|
|
76
|
+
| `fathom` | Full workflow — intake, build, review |
|
|
77
|
+
| `fathom estimate <desc>` | Quick cost estimate |
|
|
78
|
+
| `fathom intake` | Requirements → estimated spec slices |
|
|
79
|
+
| `fathom analyze <spec>` | Parse spec, estimate features |
|
|
80
|
+
| `fathom track` | Import + auto-tag sessions |
|
|
81
|
+
| `fathom reconcile` | Estimates vs actuals |
|
|
82
|
+
| `fathom calibrate` | Adjust from real data |
|
|
83
|
+
| `fathom velocity` | Throughput metrics |
|
|
63
84
|
| `fathom status` | Project overview |
|
|
64
|
-
| `fathom pricing` |
|
|
65
|
-
| `fathom
|
|
66
|
-
| `fathom rename <name>` | Rename project across config files |
|
|
67
|
-
| `fathom research` | Research tasks with AI assistance |
|
|
68
|
-
| `fathom feedback` | How to report bugs and request features |
|
|
85
|
+
| `fathom pricing` | Model pricing table |
|
|
86
|
+
| `fathom go` | Launch AI tool with context |
|
|
69
87
|
|
|
70
88
|
## Environment Variables
|
|
71
89
|
|
|
72
|
-
Auto-loaded from `.env` in your project directory.
|
|
73
|
-
|
|
74
90
|
| Variable | Purpose |
|
|
75
91
|
|----------|---------|
|
|
76
|
-
| `ANTHROPIC_API_KEY` |
|
|
77
|
-
| `OPENAI_API_KEY` | Alternative provider
|
|
78
|
-
| `CONVEX_URL` | Optional
|
|
79
|
-
|
|
80
|
-
## Feedback
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
fathom feedback
|
|
84
|
-
fathom feedback --bug "description of the issue"
|
|
85
|
-
fathom feedback --feature "description of what you'd like"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
See [FEEDBACK.md](https://github.com/olivelliott/fathom/blob/main/FEEDBACK.md) for details.
|
|
92
|
+
| `ANTHROPIC_API_KEY` | For intake extraction |
|
|
93
|
+
| `OPENAI_API_KEY` | Alternative provider |
|
|
94
|
+
| `CONVEX_URL` | Optional — real-time dashboard |
|
|
89
95
|
|
|
90
|
-
## Part of
|
|
96
|
+
## Part of Fathom
|
|
91
97
|
|
|
92
|
-
`fathom-cli`
|
|
98
|
+
`fathom-cli` wraps the [Fathom](https://github.com/olivelliott/fathom) headless packages into a CLI. Use the packages directly if you're building your own tooling.
|
|
93
99
|
|
|
94
100
|
## License
|
|
95
101
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: gdpr-basic
|
|
2
|
+
description: GDPR Basic Compliance Guidelines
|
|
3
|
+
category: security
|
|
4
|
+
rules:
|
|
5
|
+
- "Collect explicit, informed, and freely given consent before processing personal data — pre-checked boxes are not valid consent"
|
|
6
|
+
- "Practice data minimization — only collect and retain personal data that is strictly necessary for the stated purpose"
|
|
7
|
+
- "Implement right to deletion (right to be forgotten) — users must be able to request complete removal of their personal data"
|
|
8
|
+
- "Implement data portability — provide users a machine-readable export (JSON/CSV) of all their personal data on request"
|
|
9
|
+
- "Implement right of access — users must be able to view all personal data you hold about them within 30 days of request"
|
|
10
|
+
- "Apply privacy by design — build data protection into system architecture from the start, not as an afterthought"
|
|
11
|
+
- "Maintain a Record of Processing Activities (ROPA) documenting what data you collect, why, and how long you keep it"
|
|
12
|
+
- "Implement breach notification — report personal data breaches to the supervisory authority within 72 hours of discovery"
|
|
13
|
+
- "Obtain explicit consent before setting non-essential cookies or tracking — implement a compliant cookie consent banner"
|
|
14
|
+
- "Do not transfer personal data outside the EEA without appropriate safeguards (SCCs, adequacy decisions, or BCRs)"
|
|
15
|
+
- "Define and enforce data retention periods — automatically delete or anonymize personal data when the retention period expires"
|
|
16
|
+
- "Implement granular consent management — users must be able to withdraw consent as easily as they gave it"
|
|
17
|
+
- "Conduct Data Protection Impact Assessments (DPIA) before processing that is likely to result in high risk to individuals"
|
|
18
|
+
- "Pseudonymize personal data wherever possible — separate identifying information from the data being processed"
|
|
19
|
+
- "Never use personal data for purposes beyond what was explicitly communicated at the time of collection without new consent"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: hipaa-basic
|
|
2
|
+
description: HIPAA Basic Compliance Guidelines
|
|
3
|
+
category: security
|
|
4
|
+
rules:
|
|
5
|
+
- "Encrypt all Protected Health Information (PHI) at rest using AES-256 — this includes databases, backups, and file storage"
|
|
6
|
+
- "Encrypt all PHI in transit using TLS 1.2+ — never send health data over unencrypted channels"
|
|
7
|
+
- "Apply the minimum necessary principle — only request, display, and process the specific PHI fields needed for the task"
|
|
8
|
+
- "Implement role-based access control (RBAC) so users only see PHI relevant to their job function"
|
|
9
|
+
- "Log all access to PHI with immutable audit trails — record who accessed what, when, and why"
|
|
10
|
+
- "Retain audit logs for at least six years as required by HIPAA retention rules"
|
|
11
|
+
- "Never include PHI in URLs, query parameters, client-side storage, or application logs"
|
|
12
|
+
- "Require unique user IDs and enforce multi-factor authentication for all systems containing PHI"
|
|
13
|
+
- "Implement automatic session timeout (15 minutes or less of inactivity) for applications accessing PHI"
|
|
14
|
+
- "Verify that all third-party services handling PHI have signed a Business Associate Agreement (BAA) before integration"
|
|
15
|
+
- "Implement a breach notification mechanism — HIPAA requires notification within 60 days of discovering a breach"
|
|
16
|
+
- "Provide a mechanism for patients to request access to, amendment of, and an accounting of disclosures of their PHI"
|
|
17
|
+
- "Run regular risk assessments on all systems that store, process, or transmit PHI — document findings and remediation"
|
|
18
|
+
- "Ensure PHI is completely and irreversibly deleted when no longer needed — including backups and replicas"
|
|
19
|
+
- "De-identify data according to HIPAA Safe Harbor (remove all 18 identifiers) before using it for analytics or testing"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: owasp-top-10
|
|
2
|
+
description: OWASP Top 10 Web Application Security Risks
|
|
3
|
+
category: security
|
|
4
|
+
rules:
|
|
5
|
+
- "Validate and sanitize all user input server-side — never trust client-side validation alone"
|
|
6
|
+
- "Use parameterized queries or prepared statements — never concatenate user input into SQL"
|
|
7
|
+
- "Implement proper authentication with secure password hashing (bcrypt/argon2) and session management"
|
|
8
|
+
- "Apply principle of least privilege — users and services should only access what they need"
|
|
9
|
+
- "Never expose sensitive data in error messages, logs, or API responses"
|
|
10
|
+
- "Use HTTPS everywhere — never transmit sensitive data over unencrypted connections"
|
|
11
|
+
- "Validate Content-Type headers and reject unexpected content types"
|
|
12
|
+
- "Implement rate limiting on authentication endpoints and sensitive operations"
|
|
13
|
+
- "Keep dependencies updated and audit for known vulnerabilities regularly"
|
|
14
|
+
- "Encode output contextually (HTML, URL, JavaScript) to prevent XSS"
|
|
15
|
+
- "Use CSRF tokens for state-changing operations"
|
|
16
|
+
- "Never store secrets, API keys, or credentials in source code or client-side storage"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: pci-basic
|
|
2
|
+
description: PCI DSS Basic Compliance Guidelines
|
|
3
|
+
category: security
|
|
4
|
+
rules:
|
|
5
|
+
- "Never store full card numbers (PAN) in plaintext — use tokenization or truncation (first 6/last 4 only)"
|
|
6
|
+
- "Never log, print, or include in error messages: full PAN, CVV/CVC, PIN, or magnetic stripe data"
|
|
7
|
+
- "Encrypt cardholder data at rest using AES-256 or equivalent — manage keys separately from encrypted data"
|
|
8
|
+
- "Transmit cardholder data only over TLS 1.2+ — reject connections using older protocols"
|
|
9
|
+
- "Isolate payment processing systems from the general application network — use dedicated subnets or services"
|
|
10
|
+
- "Restrict access to cardholder data to only the services and personnel that absolutely need it"
|
|
11
|
+
- "Use unique credentials for every user and service account that accesses payment systems — no shared accounts"
|
|
12
|
+
- "Enforce multi-factor authentication for all administrative access to payment processing environments"
|
|
13
|
+
- "Log all access to cardholder data and payment systems — include who, what, when, and from where"
|
|
14
|
+
- "Retain audit logs for at least one year, with a minimum of three months immediately available for analysis"
|
|
15
|
+
- "Run vulnerability scans on all payment-facing systems quarterly and after any significant change"
|
|
16
|
+
- "Never use vendor-supplied default passwords or settings on any system in the cardholder data environment"
|
|
17
|
+
- "Mask PAN when displayed — show no more than first 6 and last 4 digits unless there is a legitimate business need"
|
|
18
|
+
- "Implement a web application firewall (WAF) or rigorous code review for all public-facing payment applications"
|
|
19
|
+
- "Maintain an inventory of all system components in scope for PCI DSS and review scope annually"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: soc2-basic
|
|
2
|
+
description: SOC 2 Basic Compliance Guidelines
|
|
3
|
+
category: security
|
|
4
|
+
rules:
|
|
5
|
+
- "Enforce multi-factor authentication (MFA) for all user and administrative access to production systems"
|
|
6
|
+
- "Implement role-based access control (RBAC) with least-privilege — review and recertify access quarterly"
|
|
7
|
+
- "Log all system access, configuration changes, and data operations to a centralized, tamper-evident logging system"
|
|
8
|
+
- "Establish a formal change management process — all production changes require review, approval, and rollback plans"
|
|
9
|
+
- "Conduct regular vulnerability scans and penetration tests — remediate critical findings within defined SLAs"
|
|
10
|
+
- "Implement automated monitoring and alerting for system availability, performance anomalies, and security events"
|
|
11
|
+
- "Maintain and test an incident response plan — define roles, escalation paths, communication templates, and post-mortem processes"
|
|
12
|
+
- "Encrypt sensitive data at rest (AES-256) and in transit (TLS 1.2+) across all system components"
|
|
13
|
+
- "Perform vendor security assessments before onboarding third-party services that process or store customer data"
|
|
14
|
+
- "Implement automated backups with defined RPO/RTO targets and test restoration procedures at least annually"
|
|
15
|
+
- "Enforce separation of duties — no single person should be able to deploy code, approve changes, and access production data"
|
|
16
|
+
- "Revoke access to all systems within 24 hours of employee termination or role change"
|
|
17
|
+
- "Maintain a documented and enforced data classification policy — label data as public, internal, confidential, or restricted"
|
|
18
|
+
- "Implement network segmentation — isolate production, staging, and development environments from each other"
|
|
19
|
+
- "Require security awareness training for all employees and contractors with access to customer data at least annually"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: wcag-aa
|
|
2
|
+
description: WCAG 2.1 Level AA Accessibility Guidelines
|
|
3
|
+
category: quality
|
|
4
|
+
rules:
|
|
5
|
+
- "All images must have descriptive alt text (or empty alt for decorative images)"
|
|
6
|
+
- "Ensure color contrast ratio of at least 4.5:1 for normal text, 3:1 for large text"
|
|
7
|
+
- "All interactive elements must be keyboard accessible with visible focus indicators"
|
|
8
|
+
- "Form inputs must have associated labels — use htmlFor/id or aria-label"
|
|
9
|
+
- "Use semantic HTML elements (nav, main, header, footer, article, section) for document structure"
|
|
10
|
+
- "Provide skip navigation links for keyboard users"
|
|
11
|
+
- "Ensure all content is readable and functional at 200% zoom"
|
|
12
|
+
- "Use aria-live regions for dynamic content updates that should be announced to screen readers"
|
|
13
|
+
- "Never use color alone to convey information — supplement with text, icons, or patterns"
|
|
14
|
+
- "Provide text alternatives for all non-text content (video captions, audio transcripts)"
|
|
15
|
+
- "Ensure touch targets are at least 44x44px on mobile"
|
|
16
|
+
- "Support reduced-motion preferences via prefers-reduced-motion media query"
|