Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

docs: trim generic method guidance, keep project facts and goals

Tw936a3030da1a54
diff --git a/.agents/skills/github-ops/SKILL.md b/.agents/skills/github-ops/SKILL.md
index ac31ff89..26518e39 100644
--- a/.agents/skills/github-ops/SKILL.md
+++ b/.agents/skills/github-ops/SKILL.md
@@ -1,7 +1,7 @@
---
name: github-ops
description: GitHub issue, PR, and release operations via gh CLI. Not for code review or release builds.
-version: 1.2.0
+version: 2.0.0
allowed-tools:
- Bash
- Read
@@ -9,93 +9,19 @@ allowed-tools:
# GitHub Operations Skill
-Use this skill when working with GitHub issues, PRs, and releases for Pake.
+Use this skill when working with GitHub issues, PRs, and releases for Pake. It carries the project facts and boundaries; standard `gh` usage is assumed.
## Golden Rule
-**ALWAYS use `gh` CLI** for GitHub operations. Never use the web UI or make assumptions about state — always query first.
+Always use `gh` CLI and query live state before acting. Never assume state from memory or a previous turn.
-## Issue Operations
+## Project Facts
-```bash
-# View a specific issue
-gh issue view 123
-
-# List open issues
-gh issue list --state open
-
-# List issues with a label
-gh issue list --label bug
-
-# Add a comment (only with explicit user request)
-gh issue comment 123 --body "..."
-
-# Close an issue
-gh issue close 123
-```
-
-## PR Operations
-
-```bash
-# List open PRs
-gh pr list
-
-# View a PR
-gh pr view 456
-
-# Check PR status and CI checks
-gh pr checks 456
-
-# View PR diff
-gh pr diff 456
-
-# Read inline review comments on a PR
-gh api repos/tw93/Pake/pulls/456/comments
-
-# Merge a PR (only with explicit user request)
-gh pr merge 456 --squash
-
-# Create a PR
-gh pr create --title "..." --body "..."
-```
-
-## Release Operations
-
-```bash
-# List releases
-gh release list
-
-# View a specific release
-gh release view V3.10.0
-
-# Check CI runs for a tag
-gh run list --workflow=release.yml
-gh run list --workflow=npm-publish.yml
-
-# Poll a running CI job (structured status; never pipe `gh run watch` to tail/head, pipes swallow the exit code)
-gh run view <run-id> --json status,conclusion
-
-# View CI run logs
-gh run view <run-id> --log
-
-# Verify npm registry state after publish (gitHead ties the package to the intended commit)
-npm view pake-cli@<version> version gitHead dist.tarball --json
-npm view pake-cli version
-```
-
-## CI / Workflow Operations
-
-```bash
-# List recent workflow runs
-gh run list
-
-# Filter by workflow
-gh run list --workflow=release.yml
-gh run list --workflow=quality-and-test.yml
-
-# Re-run failed jobs
-gh run rerun <run-id> --failed-only
-```
+- Repo: `tw93/Pake`. Workflows: `release.yml` (`V*` tag, builds app assets), `npm-publish.yml` (npm Trusted Publishing; also `workflow_dispatch` from `main` for npm-only hotfixes), `quality-and-test.yml` (push CI), `pake-cli.yaml` / `single-app.yaml` (public build surfaces external users trigger from forks).
+- Poll CI with `gh run view <run-id> --json status,conclusion`. Never pipe `gh run watch` or build output through `tail`/`head`; pipes swallow the real exit code and misreport failures as green.
+- Verify npm state with `npm view pake-cli@<version> version gitHead dist.tarball --json`; `gitHead` ties the published package to the intended commit. Check the `latest` pointer separately with `npm view pake-cli version`; it can point at a different commit than the fix under review.
+- Inline PR review comments live at `gh api repos/tw93/Pake/pulls/<n>/comments`; `gh pr view` does not show them.
+- App-release truth is `gh release view <tag> --json assets` (asset count/state), not workflow names or source state.
## Safety Rules
diff --git a/.claude/rules/rust.md b/.claude/rules/rust.md
index 009bf629..bfb213c5 100644
--- a/.claude/rules/rust.md
+++ b/.claude/rules/rust.md
@@ -12,12 +12,6 @@
- In machine mode (`--json`) stdout is reserved for the single JSON result. Never `console.log` / `process.stdout.write` in `bin/`; subprocess stdout is rerouted to stderr by `shellExec`.
- `shellExec` runs subprocesses with `stdio: 'inherit'`, so their output (linuxdeploy, cargo, npm) never reaches `error.message`; only the failed command line does. Do NOT classify a build failure by grepping `error.message`; you would be matching the command, not the diagnostics. Drive failure guidance off a structured fact the caller holds (e.g. `target === 'appimage'`). Owners: `bin/utils/shell.ts` + `bin/builders/BaseBuilder.ts`.
-### IPC
-
-- `#[tauri::command]` handlers validate every input from the renderer. The webview is untrusted.
-- Long work in handlers goes through `tauri::async_runtime::spawn`. Don't block the IPC thread.
-- Don't broaden the allowlist (filesystem, shell, http) past the exact paths and commands needed.
-
### Config types
- No `tauriConf: any` or other untyped config bags. Use `PakeTauriConfig`.
diff --git a/AGENTS.md b/AGENTS.md
index 50d76bde..e49d80bb 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -62,36 +62,13 @@ Keep shared project facts in this file so Codex, Claude Code, and other agents u
- No Chinese comments in any source (Rust / TypeScript / any file). Comments and identifiers in English; follow the existing language of surrounding prose.
-## Task Intake And Investigation
+## Working Principles
-Prefer requests with:
+Goals and project facts only; trust the agent to find its own path.
-- `Goal`: exact bug, feature, refactor, or review target
-- `Scope`: files, directories, or subsystem boundaries to inspect first
-- `Repro`: command, input, fixture, or failing test
-- `Expected`: expected behavior
-- `Actual`: current behavior, error text, or regression note
-- `Constraints`: what must not change
-- `Verify`: minimum command or test that proves the result
-
-When task scope is incomplete, inspect in this order:
-
-1. CLI entry and option parsing under `bin/cli.ts`, `bin/options/`, and `bin/helpers/`
-2. Target TypeScript module under `bin/`
-3. Tauri runtime or packaging files under `src-tauri/src/` and `src-tauri/tauri*.conf.json`
-4. Narrow tests under `tests/unit/` or `tests/integration/`
-5. Release workflow files under `.github/workflows/` only for CI or release issues
-6. Docs only if behavior, ownership, or expected usage is still unclear
-
-Execution rules:
-
-- Start with the smallest plausible file set
-- Prefer targeted search (`rg <symbol|string> <paths>`) over repository-wide scans
-- Ignore generated or output-heavy areas unless the task directly targets them, especially `dist/`, `node_modules/`, `src-tauri/target/`, `.app/`, `src-tauri/icons/`, and `src-tauri/png/`. Exception: `dist/cli.js` is the shipped CLI build artifact (see `package.json` `files`); when you change anything under `bin/`, rebuild it via `pnpm run cli:build` and commit the regenerated `dist/cli.js` alongside the source change
-- If a task touches release status, issue closeout, npm delivery, or GitHub assets, verify live surfaces separately: source commit/tag, workflow run, npm registry, GitHub Release/assets, and issue state. Do not let one passing surface imply another
-- Keep changes local to one subsystem when possible
-- Run the narrowest relevant verification first, expand only if needed
-- If key context is missing, make one reasonable assumption and proceed
+- Deliver the smallest correct diff and prove it with the narrowest real verification; expand only when evidence demands it. If key context is missing, make one reasonable assumption and proceed.
+- Generated areas (`dist/`, `node_modules/`, `src-tauri/target/`, `.app/`, `src-tauri/icons/`, `src-tauri/png/`) are not source. Exception: `dist/cli.js` is the shipped CLI build artifact (see `package.json` `files`); any change under `bin/` rebuilds it via `pnpm run cli:build` and commits the regenerated file alongside the source change.
+- Release status, issue closeout, npm delivery, and GitHub assets are separate truth surfaces. Verify each one live (source commit/tag, workflow run, npm registry, GitHub Release/assets, issue state); never let one passing surface imply another.
## Current Risk Areas
@@ -205,19 +182,6 @@ Sort every community PR into one of three outcomes; never rewrite a contribution
- **Right direction, implementation needs work**: push fixes directly onto the contributor's branch so their authorship is preserved, then merge and reply summarizing what was changed and why.
- **Out of scope**: close as not planned with a one-line apology and the boundary reason (what Pake deliberately does not do). Keep it friendly and leave room for discussion.
-## CLI Usage Example
-
-```bash
-# Install CLI
-pnpm install -g pake-cli
-
-# Basic usage
-pake https://github.com --name GitHub
-
-# Advanced usage
-pake https://weekly.tw93.fun --name Weekly --width 1200 --height 800
-```
-
## Troubleshooting
See `docs/faq.md` for common issues and solutions.