Skip to content

oOSomnus/4pi

Repository files navigation

4pi

Personal pi coding agent bundle — extensions, skills, themes in one install.

中文

Skills

All skills adapted from mattpocock/skills, localized and adapted for .somnus/-based file workflows.

Plan & Design

Skill Description
domain-model DDD-style grilling with inline CONTEXT.md / ADR updates
grill-me Stress-test ideas through relentless questioning
zoom-out Get a high-level map of unfamiliar code
improve-codebase-architecture Find deepening opportunities (shallow → deep modules)
design-an-interface Generate radically different interfaces via parallel sub-agents

Produce Artifacts

Skill Description
to-prd Convert conversation context into a PRD → .somnus/prd/
to-issues Break plans into tracer-bullet vertical slices → .somnus/issues/
request-refactor-plan Plan safe incremental refactors → .somnus/refactor/

Implement

Skill Description
tdd Red-green-refactor test-driven development
prototype Throwaway logic TUI or UI variant switcher
annotate-code Add Chinese annotations to public interfaces

Track & Fix

Skill Description
qa Interactive bug reporting → .somnus/issues/
triage-issue State-machine triage (needs-triage → needs-info → ready-for-agent → wontfix)
diagnose Systematic debugging: reproduce → hypothesize → instrument → fix → regression-test

Review

Skill Description
staged-review Code review on git staged changes → .somnus/reviews/

Capture Knowledge

Skill Description
to-knowledge Extract implicit project knowledge → .somnus/knowledge/
to-worklog Record conversation as daily worklog → .somnus/worklog/
organize-worklog Archive worklogs into weekly summaries
ubiquitous-language Extract DDD glossary → UBIQUITOUS_LANGUAGE.md
handoff Compress conversation for the next agent

Productivity

Skill Description
caveman Ultra-compressed mode (~75% token savings)
websearch DuckDuckGo search via ddgr
edit-article Edit and improve article drafts
obsidian-vault Search & manage Obsidian notes

Setup & Tools

Skill Description
init Initialize AGENTS.md and project preferences
setup-pre-commit Husky + lint-staged + type-check hooks
git-guardrails-pi Block dangerous git commands
migrate-to-shoehorn Migrate as assertions to @total-typescript/shoehorn
scaffold-exercises Scaffold exercise directories
browser-tools Interactive browser automation via CDP
write-a-skill Create new pi skills

.somnus/ Layout

All artifacts produced by skills live under .somnus/:

.somnus/
├── issues/              ← qa bug reports + to-issues task breakdowns + triage-issue managed files
│   └── {slug}.md
├── triage/
│   ├── briefs/          ← agent briefs (ready-for-agent state)
│   │   └── {slug}.md
│   └── out-of-scope/    ← rejected feature requests
│       └── {concept}.md
├── prd/                 ← product requirement docs
│   └── {slug}.md
├── refactor/            ← refactor plans
│   └── {slug}.md
├── reviews/             ← code review reports
│   └── {date}.md
├── knowledge/           ← implicit project knowledge
│   └── {topic}.md
└── worklog/             ← daily work logs
    ├── YYYY-MM-DD.md
    ├── organize/        ← weekly summaries
    └── archive/         ← archived raw logs

Skill Workflow

Plan ────→ Produce ────→ Implement ────→ Track ────→ Capture
  │           │              │               │            │
  │      to-prd          tdd            qa           to-knowledge
  │      to-issues       prototype      triage-issue to-worklog
  │      request-        annotate-code  diagnose     ubiquitous-language
  │      refactor-plan                              handoff
  │
  └── domain-model / grill-me / zoom-out / improve-codebase-architecture

Typical full loop:

domain-model → to-prd → to-issues → prototype → tdd → annotate-code
                                                       │
                                            qa → triage-issue → diagnose
                                                       │
                                               staged-review
                                                       │
                                          to-knowledge + to-worklog → handoff

Extensions

Extension Description
block-dangerous-git Blocks destructive git commands (push, reset --hard, clean -f, branch -D)
rtk-rewrite Auto-rewrites shell commands via rtk for 60-90% token savings

Themes

Theme Description
oosomnus-dark Dark theme with red accents
oosomnus-light Light theme with red accents, blue highlights
gruvbox-dark Retro warm tones from Gruvbox palette

Install

bash install.sh           # or: bash install.sh --project

Manual:

pi install git:github.com/oOSomnus/4pi
npm install -g context-mode
pi install npm:context-mode

License

MIT — see LICENSE

About

Personal pi coding agent bundle — extensions, skills, themes in one install.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors