consigliere

command module
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 3 Imported by: 0

README ยถ

Consigliere

Your trusted advisor for managing knowledge, projects, and ideas โ€” powered by AI.

Release CI Go Report Card License Go


๐Ÿ‡ฎ๐Ÿ‡น In Italian, a consigliere (kon-seel-YEH-reh) is a trusted counselor โ€” the person you turn to before making a decision. Consigliere plays that role for your AI-assisted workflow: it organizes your thinking, tracks your projects, remembers what you've learned, and makes sure nothing falls through the cracks.


๐Ÿค” Why Consigliere?

Most developers accumulate knowledge across dozens of tools โ€” Notion pages, Slack threads, scattered markdown files, browser bookmarks, mental notes. When you sit down with an AI coding assistant, all that context is invisible to it.

Consigliere solves this by giving your AI assistant a structured knowledge base it can actually read:

  • ๐Ÿง  Start a session and your AI already knows your active projects, open decisions, and areas of responsibility
  • ๐Ÿ’ก Capture ideas on the fly โ€” they flow through a lifecycle from raw thought to active project
  • ๐Ÿ“ Never lose context โ€” session notes, technical findings, and gotchas are preserved and indexed
  • ๐Ÿ—‚๏ธ Stay organized without overhead โ€” the framework does the filing, you do the thinking

๐Ÿ“ฆ Installation

Homebrew (macOS / Linux)

brew install mnemcik/tap/cg

Upgrades follow the standard brew upgrade flow.

One-liner (Linux / macOS)

curl -fsSL https://raw.githubusercontent.com/mnemcik/consigliere/main/install.sh | bash

Downloads the latest release, verifies its SHA-256 against checksums.txt, and installs cg to ~/.local/bin. Pin a specific version with | bash -s -- --tag v1.2.3, install elsewhere with CG_INSTALL_DIR=/usr/local/bin, or see install.sh --help for all flags.

Manual download

Grab the archive for your platform from Releases and extract the cg binary anywhere on your $PATH. It's a single executable, no runtime needed โ€” Windows builds ship as .zip, everything else as .tar.gz.

Windows

cg itself needs nothing else, but the hooks and status line it sets up for Claude Code are bash scripts. On Windows, Claude Code runs them in Git Bash, so install Git for Windows; without it, Claude Code runs them in PowerShell, where they don't run. cg init and cg sync warn when they can't find Git Bash. If it is installed somewhere cg and Claude Code don't look, set CLAUDE_CODE_GIT_BASH_PATH to its bash.exe in the env block of .claude/settings.json, which cg reads too, or as an environment variable (Claude Code on Windows).

Build from source

go install github.com/mnemcik/consigliere@latest

Claude Code slash commands

cg init installs /cg-init and /match-project into the workspace's .claude/commands/ directory. No separate plugin install step.

๐Ÿš€ Quick Start

mkdir my-workspace && cd my-workspace
cg init
git init && git add -A && git commit -m "Initialize workspace"

That's it. You now have a complete workspace:

my-workspace/
โ”œโ”€โ”€ ๐Ÿ”ง .cg.json              # Workspace identity
โ”œโ”€โ”€ ๐Ÿ“œ CLAUDE.md              # AI governance rules
โ”œโ”€โ”€ ๐Ÿ‘ค PROFILE.md             # Your role and context
โ”œโ”€โ”€ ๐Ÿ›๏ธ areas/                 # Domains of knowledge
โ”œโ”€โ”€ ๐Ÿ“ projects/              # Active work
โ”œโ”€โ”€ ๐Ÿ’ก ideas/                 # Idea backlog
โ”œโ”€โ”€ ๐Ÿ“ notes/                 # Findings & reference
โ”œโ”€โ”€ ๐Ÿ” insights/              # Work style observations
โ””โ”€โ”€ ๐Ÿ“‹ templates/             # Templates for all items

Next steps:

  1. โœ๏ธ Edit PROFILE.md โ€” tell your AI assistant who you are
  2. ๐Ÿ›๏ธ Define your first area (a domain you're responsible for)
  3. ๐Ÿ’ก Create your first project or capture an idea

โš™๏ธ How It Works

The workspace is your AI's memory

When you open Claude Code in a Consigliere workspace, it reads CLAUDE.md and immediately understands the workspace structure, conventions, and how to keep things organized. No setup, no prompting โ€” it just works.

Everything flows through a lifecycle

  ๐Ÿ’ก Idea                              ๐Ÿ“ Project
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ raw โ†’ exploring โ†’ ready โ”€โ”€โ†’ defining โ†’ in-progress โ†’ done โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚
                            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                            โ”‚  ๐Ÿ“ Notes & Decisions  โ”‚
                            โ”‚  ๐Ÿ›๏ธ Areas (ref hubs)   โ”‚
                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Ideas are lightweight captures. When they mature, they become projects with structured folders. Areas are the connective tissue โ€” domains of knowledge that everything links to.

Your AI keeps things current

The CLAUDE.md rules instruct AI assistants to:

  • โœ… Update project files after every session
  • ๐Ÿ”„ Propagate information to related areas and projects
  • ๐Ÿ“ Capture technical findings as searchable notes
  • ๐Ÿ” Draft work style observations (you review before they become rules)

๐Ÿ› ๏ธ CLI Commands

Command Description
cg init ๐Ÿ—๏ธ Bootstrap a new workspace
cg init --force ๐Ÿ”„ Re-initialize (preserves CLAUDE.md and PROFILE.md)
cg match <prompt> ๐Ÿ” Find a project matching your description
cg status ๐Ÿ“Š Workspace overview
cg migrate [--apply] ๐Ÿ—‚๏ธ Convert items from ## Meta blocks to YAML frontmatter; dry run unless --apply, and refreshes unedited item templates
cg version โ„น๏ธ Print installed version
cg update check ๐Ÿ”Ž Check whether a newer cg release is available
cg update upgrade โฌ†๏ธ Download, verify, and install the latest release in place
cg share export <slug> --out <dir> ๐Ÿ“ค Render a project into a read-only copy that can leave the workspace, after a confidentiality scan (docs)
cg share status [<audience>] ๐Ÿ”ญ Compare each shared project with what its audience's share repo holds (docs)
cg share publish [<audience>] ๐Ÿš€ Publish each audience's projects to its private share repo, with a terminal review for a first publish or added files (docs)

Examples

$ cg match "OAuth identity provider"
MATCH: OAuth & Identity Provider Strategy
SLUG: oauth-idp-strategy
PATH: projects/oauth-idp-strategy/
STATUS: In Progress
$ cg status
Consigliere workspace (v1.0.0)

Projects: 11 total, 9 active, 2 standing
Areas:    10
Ideas:    4
Notes:    12

๐Ÿ”„ Staying up to date

cg keeps itself current. Run cg update check any time, or cg update upgrade to install the latest release in place (the binary is downloaded from GitHub and SHA-256-verified before it replaces itself). Installs done via install.sh also auto-update in the background โ€” a detached, debounced check that installs new minor/patch releases and prints โœ… cg updated to vX on your next run. Major (breaking) releases are never auto-installed; you get a heads-up and choose when.

Homebrew installs aren't self-replaced โ€” cg points you at brew upgrade --cask cg.

Opt out with --no-auto-update (one run), CONSIGLIERE_AUTO_UPDATE=0 (disable the background check), or CONSIGLIERE_NO_UPDATE_NOTICE=1 (silence notices). Full design + state-file reference: docs/auto-update.md.

๐Ÿ“š Core Concepts

๐Ÿ›๏ธ Areas

Reference hubs โ€” the single source of truth for a domain's systems, contacts, constraints, and current state. Think: "Identity & Auth", "API Management", "DevOps & Release". Every project, idea, and note links to an area instead of duplicating context.

๐Ÿ“ Projects

Each project is a folder with a standard structure:

File Purpose
README.md ๐ŸŽฏ Current state, goals, scope โ€” the source of truth
decisions.md โš–๏ธ Append-only log with status tracking
todo.md โœ… What's next
log.md ๐Ÿ““ What happened โ€” session summaries, newest first

A project's README carries ## Goals when it terminates, or ## Standard to Maintain when it is a recurring duty with no finish line. Standing projects sit in their own ## Standing Commitments table in projects/TODO.md, are never offered as the next thing to work on, and cg status counts them apart from the active ones.

๐Ÿ’ก Ideas

Lightweight captures: raw โ†’ exploring โ†’ ready โ†’ project (or parked / rejected). Low friction to capture, structured enough to act on.

๐Ÿ“ Notes

Session findings organized by category: tool gotchas, workflow patterns, architecture decisions, research, troubleshooting.

๐Ÿ” Insights

Draft observations about how you work with AI. Created automatically at session end, but never applied as rules until you explicitly promote them. You stay in control.

๐Ÿ”ง CLAUDE.md: Framework + Your Rules

The generated CLAUDE.md cleanly separates what Consigliere manages from what you customize:

<!-- cg:section:start=X -->     โ† ๐Ÿ”’ Framework sections (updated by Consigliere)
<!-- user:section:start=X -->   โ† โœ๏ธ Your sections (never touched)

๐Ÿ—๏ธ Building from Source

git clone https://github.com/mnemcik/consigliere.git
cd consigliere
make build    # โ†’ ./cg binary
make test     # ๐Ÿงช Run tests
make lint     # ๐Ÿ” Run linters
make check    # โœ… Everything

See CONTRIBUTING.md for development details.

๐Ÿ“Š Status

Beta โ€” small user base. The CLI surface (init, match, status, version, update) is stable and covered by tests. Framework conventions (sentinel-delimited sections, .cg.json, template set) are in active evolution and may change between minor releases; migrations will be documented in CHANGELOG.md.

๐Ÿ“– Project docs

  • Auto-update โ€” cg update, the background worker, the major-version gate, and every state file
  • Workspace sync โ€” how cg sync reconciles a workspace's content with the framework
  • Extensions (design) โ€” the cg-extension.json manifest, registry, cg extension, and contribution points
  • Authoring an extension โ€” tutorial for writing a cg extension
  • Contributing โ€” setup, common tasks, release process, commit conventions
  • Security policy โ€” how to report vulnerabilities privately
  • Code of conduct โ€” Contributor Covenant 2.1
  • Changelog โ€” Keep a Changelog format, semver

๐Ÿ“„ License

MIT

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
audit
Package audit implements the read-only workspace scanners promoted from the shell helpers: area-tag counting and badge-color duplicate detection.
Package audit implements the read-only workspace scanners promoted from the shell helpers: area-tag counting and badge-color duplicate detection.
autoupdate
Package autoupdate implements cg's binary self-update subsystem: discovering newer releases on GitHub, replacing the running binary in place, a detached background freshness check, and a warn-only gate for major (breaking) bumps.
Package autoupdate implements cg's binary self-update subsystem: discovering newer releases on GitHub, replacing the running binary in place, a detached background freshness check, and a warn-only gate for major (breaking) bumps.
cgerr
Package cgerr provides errors that carry a process exit code, so command handlers can preserve the exit-code contract the shell helpers established (callers such as the wrap skill branch on these codes).
Package cgerr provides errors that carry a process exit code, so command handlers can preserve the exit-code contract the shell helpers established (callers such as the wrap skill branch on these codes).
extension
Package extension implements the cg extension system: the cg-extension.json manifest, the per-workspace install ledger, the on-disk install layout, and the logic backing the `cg extension` subcommands.
Package extension implements the cg extension system: the cg-extension.json manifest, the per-workspace install ledger, the on-disk install layout, and the logic backing the `cg extension` subcommands.
gitbash
Package gitbash finds Git Bash, the bash that Claude Code runs cg's hooks and status line with on Windows.
Package gitbash finds Git Bash, the bash that Claude Code runs cg's hooks and status line with on Windows.
githooks
Package githooks installs the git hooks that extensions contribute.
Package githooks installs the git hooks that extensions contribute.
gitx
Package gitx is a thin, cross-platform wrapper around the git CLI.
Package gitx is a thin, cross-platform wrapper around the git CLI.
manifest
Package manifest tracks the framework-managed artifacts in a Consigliere workspace โ€” the CLAUDE.md sections, framework notes and .claude/ files that `cg` owns โ€” so `cg sync` can distinguish what `cg` last wrote from what the user has since changed.
Package manifest tracks the framework-managed artifacts in a Consigliere workspace โ€” the CLAUDE.md sections, framework notes and .claude/ files that `cg` owns โ€” so `cg sync` can distinguish what `cg` last wrote from what the user has since changed.
meta
Package meta reads the structured metadata attached to a workspace item.
Package meta reads the structured metadata attached to a workspace item.
migrate
Package migrate converts workspace items from a `## Meta` bullet block to YAML frontmatter.
Package migrate converts workspace items from a `## Meta` bullet block to YAML frontmatter.
pushpolicy
Package pushpolicy implements the external-repo push-policy lookup and the PreToolUse gate promoted from lookup-push-policy.sh and external-repo-push-policy.sh.
Package pushpolicy implements the external-repo push-policy lookup and the PreToolUse gate promoted from lookup-push-policy.sh and external-repo-push-policy.sh.
session
Package session implements the Claude Code hook bodies promoted from the personal-workspace shell hooks: the session-start gate, the dirty-flag marker, the pull-latest-main refresh, and the status-line renderer.
Package session implements the Claude Code hook bodies promoted from the personal-workspace shell hooks: the session-start gate, the dirty-flag marker, the pull-latest-main refresh, and the status-line renderer.
share
Package share implements the export core for read-only project sharing: it renders one workspace project into a self-contained copy that can leave the workspace.
Package share implements the export core for read-only project sharing: it renders one workspace project into a self-contained copy that can leave the workspace.
sync
Package sync implements the deterministic half of workspace-content reconciliation (`cg sync`): given the content hashes of the framework-managed artifacts as they are on disk, as the manifest last recorded them, and as the current binary's embedded framework ships them, it classifies each artifact so the caller can decide what to do.
Package sync implements the deterministic half of workspace-content reconciliation (`cg sync`): given the content hashes of the framework-managed artifacts as they are on disk, as the manifest last recorded them, and as the current binary's embedded framework ships them, it classifies each artifact so the caller can decide what to do.
wizard
Package wizard implements the interactive `cg init --wizard` flow.
Package wizard implements the interactive `cg init --wizard` flow.
worktree
Package worktree implements the per-session git-worktree mechanics promoted from the personal-workspace bash helpers (create-session-worktree.sh and friends).
Package worktree implements the per-session git-worktree mechanics promoted from the personal-workspace bash helpers (create-session-worktree.sh and friends).
scripts
claudefilehistory command
Command claudefilehistory writes cmd/claude_file_history_gen.go: the SHA-256 of every version of every framework .claude/ file that any cg release has shipped, plus the version in the working tree.
Command claudefilehistory writes cmd/claude_file_history_gen.go: the SHA-256 of every version of every framework .claude/ file that any cg release has shipped, plus the version in the working tree.
Package templates holds the framework content that cg ships: workspace templates, framework notes, the workspace CLAUDE.md, slash commands, skills and hooks.
Package templates holds the framework content that cg ships: workspace templates, framework notes, the workspace CLAUDE.md, slash commands, skills and hooks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL