pakhale 0.3.0 → 0.5.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/README.md +13 -0
- package/assets/instructions/AGENTS.md +9 -1
- package/dist/cli.js +13 -3
- package/package.json +1 -1
- package/skills/think-from-first-principles/SKILL.md +114 -0
- package/skills/sitedrop/SKILL.md +0 -40
package/README.md
CHANGED
|
@@ -38,6 +38,19 @@ Agents package things differently, so each capability says how it reaches each a
|
|
|
38
38
|
Leaving an agent undeclared is an error rather than a silent skip, so adding a new agent tells
|
|
39
39
|
me about every gap at once.
|
|
40
40
|
|
|
41
|
+
## Just the skills
|
|
42
|
+
|
|
43
|
+
The skills in [`skills/`](skills/) are plain `SKILL.md` files, so they need neither this CLI
|
|
44
|
+
nor my settings. Any agent that reads skills can install them straight from this repo:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx skills add pratikpakhale/pakhale -g # all of them
|
|
48
|
+
npx skills add pratikpakhale/pakhale -g -s deslop stackup # or pick
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`npx pakhale setup agents` stays the full path — the same skills plus plugins, MCP servers,
|
|
52
|
+
instructions and settings.
|
|
53
|
+
|
|
41
54
|
## Options
|
|
42
55
|
|
|
43
56
|
- `plan` or `-n, --dry-run` — show every change, write nothing
|
|
@@ -26,4 +26,12 @@ Use conventional commit messages (https://www.conventionalcommits.org/):
|
|
|
26
26
|
|
|
27
27
|
2. Dont use any kind of browser agent unless explicitly told you to do so. Even to test something, do not try to operate a browser.
|
|
28
28
|
|
|
29
|
-
3. NEVER push changes to outward-facing/shared surfaces directly — ALWAYS show me the drafted change and wait for my explicit confirmation first. This covers PR titles/descriptions/comments, issue titles/descriptions/comments, commit messages, and anything written to GitHub, Linear, Slack, or any external service. "Update the PR description" (or similar) is a request to DRAFT it, not to apply it live. Prepare the change locally, show it to me, then apply only after I say go.
|
|
29
|
+
3. NEVER push changes to outward-facing/shared surfaces directly — ALWAYS show me the drafted change and wait for my explicit confirmation first. This covers PR titles/descriptions/comments, issue titles/descriptions/comments, commit messages, and anything written to GitHub, Linear, Slack, or any external service. "Update the PR description" (or similar) is a request to DRAFT it, not to apply it live. Prepare the change locally, show it to me, then apply only after I say go.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Misc :
|
|
34
|
+
|
|
35
|
+
1. Whenever you are writing a report, asking questions in grilling session, or presenting text that needs visibility, user input - do the following.
|
|
36
|
+
- write the text output to a tmp file
|
|
37
|
+
- use plannotator cli to open that file - `plannotator annotate {file_path}.md`
|
package/dist/cli.js
CHANGED
|
@@ -196,6 +196,14 @@ const config = {
|
|
|
196
196
|
repo: "github/gh-stack",
|
|
197
197
|
skills: ["gh-stack"]
|
|
198
198
|
} }
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: "sitedrop",
|
|
202
|
+
deliver: { all: {
|
|
203
|
+
via: "skills",
|
|
204
|
+
repo: "pratikpakhale/sitedrop",
|
|
205
|
+
skills: ["sitedrop"]
|
|
206
|
+
} }
|
|
199
207
|
}
|
|
200
208
|
],
|
|
201
209
|
authoredSkillsDir: "skills",
|
|
@@ -1370,8 +1378,10 @@ function claudePluginInstalls(config$1, home) {
|
|
|
1370
1378
|
return out;
|
|
1371
1379
|
}
|
|
1372
1380
|
/**
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1381
|
+
* `linkDir` is where *this* agent expects to find each skill afterwards — the shared store
|
|
1382
|
+
* itself for agents that read it directly. Always pass it: `.skill-lock.json` is one
|
|
1383
|
+
* agent-agnostic file, so a name-only probe is satisfied by whichever agent installed first
|
|
1384
|
+
* and every later agent's install is skipped forever, silently reporting `unchanged`.
|
|
1375
1385
|
*/
|
|
1376
1386
|
function skillInstalls(config$1, agent, home, linkDir) {
|
|
1377
1387
|
return skillDeliveries(config$1, agent).map((delivery) => {
|
|
@@ -1607,7 +1617,7 @@ async function buildPlan(ctx) {
|
|
|
1607
1617
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
1608
1618
|
const groups = [{
|
|
1609
1619
|
section: "Skills (remote)",
|
|
1610
|
-
artifacts: skillInstalls(ctx.config, "opencode", ctx.home)
|
|
1620
|
+
artifacts: skillInstalls(ctx.config, "opencode", ctx.home, join(ctx.home, AGENTS_STORE))
|
|
1611
1621
|
}, {
|
|
1612
1622
|
section: "Instructions",
|
|
1613
1623
|
artifacts: [{
|
package/package.json
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: think-from-first-principles
|
|
3
|
+
description: "Engage this skill fully on any request involving: - Design, architecture, invention, or optimization - Cost, efficiency, scalability, or “why is this expensive/slow?” - Challenging industry norms or “best practices” - Questions of the form “How should we…?”, “What’s the best way…?”, “Is X possible?"
|
|
4
|
+
metadata:
|
|
5
|
+
author: pratikpakhale
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Think from First Principles
|
|
10
|
+
|
|
11
|
+
## Skill Overview
|
|
12
|
+
This skill forces rigorous first-principles reasoning on every problem, design decision, optimization, architecture, cost analysis, or invention task.
|
|
13
|
+
It is the antidote to “that’s how it’s always been done,” industry consensus, historical precedent, and analogical thinking.
|
|
14
|
+
|
|
15
|
+
You must treat every accepted constraint, cost, process, or “best practice” as a hypothesis to be stress-tested against fundamental truths (physics, mathematics, logic, raw material realities, causality) rather than social or historical convention.
|
|
16
|
+
|
|
17
|
+
## Philosophical & Historical Foundation
|
|
18
|
+
Aristotle defined a first principle (ἀρχή / archē) as “the first basis from which a thing is known” — the irreducible starting point of knowledge that cannot itself be deduced from anything prior.
|
|
19
|
+
In physics and science this became “ab initio” reasoning: start from established laws and axioms, never from empirical models or fitted parameters that hide assumptions.
|
|
20
|
+
|
|
21
|
+
Elon Musk revived and operationalized this for engineering and entrepreneurship as a “physics way of looking at the world”:
|
|
22
|
+
|
|
23
|
+
> “Boil things down to the most fundamental truths and say, ‘OK, what are we sure is true, or as sure as possible is true?’ And then reason up from there.”
|
|
24
|
+
> — Elon Musk
|
|
25
|
+
|
|
26
|
+
> “First principles is kind of a physics way of looking at the world… you boil things down to the most fundamental truths… and then reason up from there. That takes a lot more mental energy.”
|
|
27
|
+
|
|
28
|
+
Most people reason by analogy: “This is how it has always been done” or “slight iterations on what others are doing.” First-principles thinking rejects that shortcut when novelty or breakthrough performance is required.
|
|
29
|
+
|
|
30
|
+
## Canonical Real-World Examples (Internalize These)
|
|
31
|
+
**SpaceX rockets**
|
|
32
|
+
Industry price ≈ $65 million.
|
|
33
|
+
First-principles decomposition:
|
|
34
|
+
What is a rocket made of? Aerospace-grade aluminum alloys, titanium, copper, carbon fiber.
|
|
35
|
+
Commodity market value of those materials ≈ 2 % of the finished rocket price.
|
|
36
|
+
Conclusion: 98 % of the cost is process inefficiency, overhead, and legacy manufacturing. Therefore build vertically, reuse stages, and redesign around the material floor.
|
|
37
|
+
|
|
38
|
+
**Tesla / battery packs (2012 analysis)**
|
|
39
|
+
Industry consensus: “Batteries cost ~$600/kWh and always will.”
|
|
40
|
+
First-principles:
|
|
41
|
+
Material constituents = cobalt, nickel, aluminum, carbon, polymers, steel can.
|
|
42
|
+
London Metal Exchange spot prices summed to ≈ $80/kWh.
|
|
43
|
+
Conclusion: The gap is pure manufacturing and process inefficiency, not a law of physics. Clever combination of the same atoms can collapse the cost.
|
|
44
|
+
|
|
45
|
+
These examples reveal the recurring pattern: the “idiot index” (finished cost ÷ raw-material cost). High idiot index = high opportunity.
|
|
46
|
+
|
|
47
|
+
## Mandatory Reasoning Protocol
|
|
48
|
+
You must execute these steps explicitly (show your work) for every non-trivial task:
|
|
49
|
+
|
|
50
|
+
### 1. Surface and List All Assumptions
|
|
51
|
+
Write down every belief, constraint, “requirement,” historical price, process step, or conventional wisdom currently accepted about the problem.
|
|
52
|
+
Ask of each: “Is this a law of nature or merely an inherited habit?”
|
|
53
|
+
|
|
54
|
+
### 2. Reduce to Fundamental Truths / Axioms
|
|
55
|
+
Strip the problem until only irreducible realities remain:
|
|
56
|
+
- Laws of physics (conservation of energy/mass, thermodynamics, Maxwell’s equations, material strength limits, etc.)
|
|
57
|
+
- Mathematical identities and logical necessities
|
|
58
|
+
- Commodity / raw-material prices and physical properties
|
|
59
|
+
- Causal chains that cannot be shortened further
|
|
60
|
+
- Empirical measurements that have been repeatedly verified and cannot be reduced
|
|
61
|
+
|
|
62
|
+
Discard everything else as provisional.
|
|
63
|
+
|
|
64
|
+
### 3. Compute the Theoretical Floor (Magic-Wand / Raw-Material Limit)
|
|
65
|
+
Ask: “If I could magically reassemble the fundamental constituents with perfect efficiency and zero overhead, what is the absolute lower bound?”
|
|
66
|
+
This is the “magic-wand number.” Everything above it is process waste or design inefficiency.
|
|
67
|
+
|
|
68
|
+
### 4. Rebuild from the Ground Up
|
|
69
|
+
Construct the solution using only the axioms from Step 2.
|
|
70
|
+
Prefer the simplest architecture that satisfies the physics.
|
|
71
|
+
Vertical integration, deletion of steps, radical simplification, and novel geometries are default tools when the idiot index is high.
|
|
72
|
+
|
|
73
|
+
### 5. Stress-Test & Iterate
|
|
74
|
+
- Attempt to disprove your own conclusion (Musk’s scientific-method step).
|
|
75
|
+
- Scale variables to extremes (“thinking in the limit”) to expose hidden constraints.
|
|
76
|
+
- Assign rough probabilities of truth to each axiom.
|
|
77
|
+
- If a conventional tool or library survives the test, use it — but only after proving it is the optimal expression of the fundamentals, never as a default.
|
|
78
|
+
|
|
79
|
+
## Operational Heuristics Drawn from Musk’s Practice
|
|
80
|
+
- **Idiot Index** = finished cost / raw-material cost. Target dramatic reductions.
|
|
81
|
+
- **Make requirements less dumb** before optimizing them.
|
|
82
|
+
- **Delete** before simplifying; simplify before accelerating; accelerate before automating (the Algorithm order).
|
|
83
|
+
- Prefer physics and first-order effects over second-order social or historical arguments.
|
|
84
|
+
- “All designs are wrong; it’s just a matter of how wrong.” Continuously question.
|
|
85
|
+
|
|
86
|
+
## Behavioral Rules for This Skill
|
|
87
|
+
- Default mode for any invention, cost reduction, architecture, system design, process redesign, or “how should we…?” question is first-principles.
|
|
88
|
+
- For routine, low-stakes tasks you may reason by analogy after a quick first-principles check confirms no breakthrough opportunity exists.
|
|
89
|
+
- Never accept “nobody has done it” or “it’s always been this expensive” as evidence.
|
|
90
|
+
- When code or tools are involved: derive the minimal correct approach from fundamentals first; only then reach for packages.
|
|
91
|
+
- Explicitly flag any remaining assumptions or places where better fundamental data would change the answer.
|
|
92
|
+
- Mental energy is high; do not apply full rigor to trivial queries, but always be ready to escalate.
|
|
93
|
+
|
|
94
|
+
## Preferred Output Structure (when useful)
|
|
95
|
+
**Assumptions challenged**
|
|
96
|
+
- …
|
|
97
|
+
|
|
98
|
+
**Fundamental truths / axioms identified**
|
|
99
|
+
- …
|
|
100
|
+
|
|
101
|
+
**Theoretical floor / magic-wand number**
|
|
102
|
+
- …
|
|
103
|
+
|
|
104
|
+
**Rebuilt solution from first principles**
|
|
105
|
+
- …
|
|
106
|
+
|
|
107
|
+
**Why this is superior (or identical) to conventional approaches**
|
|
108
|
+
- …
|
|
109
|
+
|
|
110
|
+
**Remaining uncertainties or tests needed**
|
|
111
|
+
- …
|
|
112
|
+
|
|
113
|
+
You may still deliver the final answer in clean, natural prose, but the internal reasoning trace must follow the protocol above.
|
|
114
|
+
|
package/skills/sitedrop/SKILL.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sitedrop
|
|
3
|
-
description: Deploy static HTML pages or sites to the user's personal sitedrop service for easy sharing, then open the returned URL. Use when the user asks to deploy, publish, share, or "put up" an HTML page, artifact, prototype, or static site — or after building one, when they want a shareable link use this one instead of default confiured for you.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# sitedrop
|
|
7
|
-
|
|
8
|
-
Publish static files to a subdomain using the `sitedrop` CLI. The endpoint and password are already configured via `SITEDROP_ENDPOINT` and `SITEDROP_PASSWORD` env vars — never ask the user for them and never pass `-e`/`-p` manually.
|
|
9
|
-
|
|
10
|
-
## Quick start
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
sitedrop <path...> [-n <subdomain>]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- A path may be a folder, a `.zip`, or a file; mix them freely.
|
|
17
|
-
- Folder/archive contents land at the site root (a single wrapper directory is stripped).
|
|
18
|
-
- A lone `.html` file is renamed to `index.html` automatically.
|
|
19
|
-
- `-n, --name <subdomain>` sets the site name; omitted → random subdomain.
|
|
20
|
-
- `-f, --force` publishes without an `index.html` (root will 404) — only use when intentional.
|
|
21
|
-
|
|
22
|
-
## Workflow
|
|
23
|
-
|
|
24
|
-
1. Make sure the site is self-contained (inline or relative assets — no paths outside the deployed folder).
|
|
25
|
-
2. Pick a short, descriptive kebab-case name from the page's purpose (e.g. `-n perf-dashboard`). Omit `-n` if the user wants something unguessable/private.
|
|
26
|
-
3. Deploy and capture output:
|
|
27
|
-
```bash
|
|
28
|
-
out=$(sitedrop ./path -n my-page); echo "$out"
|
|
29
|
-
```
|
|
30
|
-
4. Extract the site URL from the output and open it in the browser:
|
|
31
|
-
```bash
|
|
32
|
-
open "$(echo "$out" | grep -Eo 'https?://[^[:space:]]+' | tail -1)"
|
|
33
|
-
```
|
|
34
|
-
5. Tell the user the URL in your reply so they can copy/share it.
|
|
35
|
-
|
|
36
|
-
## Notes
|
|
37
|
-
|
|
38
|
-
- Deploying a single HTML file works directly: `sitedrop page.html -n demo`.
|
|
39
|
-
- Redeploying with the same `-n` name updates the same site — reuse the name for iterations.
|
|
40
|
-
- If the deploy fails with an auth/endpoint error, report it and suggest the user verify `SITEDROP_ENDPOINT`/`SITEDROP_PASSWORD` in their shell profile — do not guess values.
|