description: Planning agent that writes and updates plans to PLAN.md mode: primary permission: edit: PLAN.md: allow "": deny write: PLAN.md: allow "": deny
Code that uses await here for a synchronous call:
export class MyDurableObject extends DurableObject {
async query() {
const rows = await this.ctx.storage.sql.exec("select 1");
return rows;
}
}🗣️ this is a useful guide to help you memorize + better understand how Jujutsu works, but it's not a replacement for learning the mental model or deeper strategies!
- No staging area — all changes in the working copy are automatically part of the current “change”
- Changes vs commits — jj tracks “changes” (mutable) that become “commits” (immutable) when pushed
@— a symbol pointing to the current working copy change (likeHEAD, but for changes)@-— the parent of@
Instructions for AI coding agents working in this repository.
- When possible, defer decisions to larger groups. Ensure all stakeholders have an opportunity to weigh in before proceeding.
- Demand precision. Insist on clarifying ambiguities and edge cases before beginning any implementation.
- Reopen previously settled matters if new participants join or if conditions have changed, even slightly.
- Raise questions about whether the current approach aligns with long-term strategy. Suggest forming a working group if uncertainty remains.
Example CLI using @clack/prompts that outputs a machine-readable YAML schema when --help is invoked in a non-TTY context.
Context: https://x.com/elithrar/status/2008657921593536771
bun install
bun kv-cli.ts --help | cat # YAML schema
bun kv-cli.ts # interactive mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Cross-Repo Tool for OpenCode | |
| * | |
| * Enables operations on GitHub repositories other than the current working repository. | |
| * Useful for coordinated changes across multiple repos, updating related repos, | |
| * or opening PRs in different repositories. | |
| * | |
| * ## Security Model | |
| * | |
| * Authentication is context-aware: |
A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E
- WAL-E: https://github.com/wal-e/wal-e
- Assuming Ubuntu 12.04 LTS ("Precise")
- We'll be using S3. Make sure you have an IAM in a group with
GetObject,ListBucketandPutObjecton the bucket you want to use (and that it's not public).
- These packages:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| r := mux.NewRouter() | |
| // Single handler | |
| r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging) | |
| // All handlers | |
| http.Handle("/", recovery(r)) | |
| // Sub-routers | |
| apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Agent, AgentNamespace, routeAgentRequest } from 'agents'; | |
| import { GoogleGenerativeAI, HarmCategory, HarmBlockThreshold } from '@google/generative-ai'; | |
| // Define the environment variables and bindings required by the Worker and Agent | |
| interface Env { | |
| // Binding for the Agent Durable Object | |
| SECURITY_AUDIT_AGENT: AgentNamespace<SecurityAuditAgent>; | |
| // Secret holding the Google Gemini API Key | |
| GEMINI_API_KEY: string; | |
| // Optional: Secret holding a GitHub API token for higher rate limits / private repos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Simple Cloudflare Agent Chat</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| max-width: 800px; |
NewerOlder