Initialize and manage the Architect three-layer context framework for any project
From architectnpx claudepluginhub jabberlockie/the-human-stack-plugins-public --plugin architectThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Bootstrap and manage a unified AI context system using the three-layer model: Product (stable reference), Project (current build cycle), and Task (subagent capabilities).
Bootstrap the Architect framework in the current project.
Collects via AskUserQuestion:
PROJECT_NAME - Human-readable name (e.g., "My Awesome App")PROJECT_DESCRIPTION - 2-3 sentence domain descriptionTECH_STACK - Primary language/framework (TypeScript, Python, Go, etc.)DEPLOYMENT - Target platform (Replit, Vercel, Local, AWS, etc.)Creates:
docs/architect/ directory with three-layer structuredocs/architect/Master_Context.md - Hub file, single source of truthdocs/architect/product/ - Stable reference (architecture, design, domain)docs/architect/project/ - Current build cycle (active, decisions, state)docs/plans/ - Task documentation and backlog (at docs/ level)docs/architect/subagents/ - Specialized agent capabilitiesdocs/architect/hooks/ - Automation scriptsdocs/architect/sessions/ - Exported conversation history.claude/settings.json - Hook configuration.claude/agents/architect.md - Project-specific orchestratorCLAUDE.md, replit.md, .cursorrules, .github/copilot-instructions.mdImplementation Steps:
docs/architect/ and docs/plans/templates/ directory (use ${CLAUDE_PLUGIN_ROOT}/templates/){{VARIABLE}} placeholders with collected valuesCheck context health and report any issues.
Checks:
Reports:
Archive current project context and prepare for next cycle.
Actions:
docs/architect/archive/{feature-name}/ directoryproject/active.md, project/decisions.md, project/state.md to archiveplans/*.md files to archiveproject/ files from templatesMaster_Context.md to reflect cleared stateUsage:
/architect archive auth-system
Initialize the pgvector context system in the project's database.
Prerequisites:
DATABASE_URL environment variable setOPENAI_API_KEY environment variable set (for embeddings)ANTHROPIC_API_KEY environment variable set (for classification)Actions:
session_embeddings table with vector columndocs/architect/context/Usage:
/architect setup-context
Manually ingest the current or specified session into the context database.
Actions:
sessions/ (if not already exported)Usage:
/architect log # Log current session
/architect log sessions/my-session.md # Log specific session file
Query the context database for relevant information.
Modes:
project - Query based on current project/active.md (default)layer <layer> [sublayer] - Query specific layersearch <query> - Free-text semantic searchUsage:
/architect context # Auto-query based on current work
/architect context layer user patterns # Query user patterns
/architect context search "auth flow" # Semantic search
Manage named sessions for better context organization.
Actions:
start <name> - Start a named session (writes to .current-session)end - End current named sessionUsage:
/architect session start auth-refactor # Start named session
/architect session # Show current session
/architect session end # End session
When a named session is active, all /compact exports append to the same session file instead of creating new timestamped files.
The Architect system organizes knowledge into five retrieval layers, each with sublayers:
| Layer | Sublayers | What it captures |
|---|---|---|
| USER | patterns, preferences, learnings, mistakes | How you work, recurring approaches, lessons learned |
| PRODUCT | architecture, design, domain | System knowledge that persists across features |
| PROJECT | active, decisions, state | Current feature context and choices |
| PLAN | strategy, steps, backlog | Implementation approaches and future work |
| TASK | implementation, debugging, verification | How specific work was executed |
PRODUCT (Architecture Agent) - What is this? How does it work?
| Stable reference, rarely changes
v
PROJECT (Build Agent) - What are we building right now?
| Current cycle, cleared when done
v
TASK (Subagents) - How do specific things work?
Capabilities for specialized work
| Layer | Folder | Purpose | Changes |
|---|---|---|---|
| PRODUCT | docs/architect/product/ | Stable reference (architecture, design, domain knowledge) | Rarely |
| PROJECT | docs/architect/project/ | Current build cycle (active work, decisions, state) | Each feature |
| TASK | docs/architect/subagents/ | Specialized capabilities (domain experts) | As needed |
project/active.mdstate.md, log decisions/architect archive {feature}product/The skill includes an optional SessionStart hook that detects uninitialized projects.
What it does:
docs/architect/ folder exists in the project/architect initInstallation:
cd $CLAUDE_PLUGIN_ROOT
./install-hook.sh
This installs a user-level hook to ~/.claude/settings.json that runs for all projects.
The framework includes automation hooks for session management and context retrieval.
| Hook | Trigger | Action |
|---|---|---|
| PreCompact | Before /compact | Export session, then ingest into pgvector |
| ExitPlanMode | Plan approved | Commit, export session, ingest with plan metadata |
| post-commit | After git commit | Ingest recent session with commit hash |
| Hook | Trigger | Action |
|---|---|---|
| SessionStart | Opening project | Query relevant context, inject into system prompt |
| Hook | Trigger | Action |
|---|---|---|
| post-commit | After git commit | Update project/state.md and Master_Context.md Recent Activity |
PreCompact (export-session.sh)
sessions/{timestamp}-session.md or sessions/{session-name}.mdExitPlanMode (plan-approved.sh)
plans/plan_approved trigger and commit hashSessionStart (session-start-context.sh)
project/active.md<architect-context> tagsAll AI tools read the same context via symlinks to Master_Context.md:
| File | Tool |
|---|---|
CLAUDE.md | Claude Code |
replit.md | Replit AI |
.cursorrules | Cursor |
.github/copilot-instructions.md | GitHub Copilot |
.windsurfrules | Windsurf |
One file to edit, all tools updated.
Templates use {{VARIABLE}} syntax:
| Variable | Example | Description |
|---|---|---|
{{PROJECT_NAME}} | "Brain Pinecone Manager" | Human-readable name |
{{PROJECT_SLUG}} | "brain-pinecone-manager" | URL-safe lowercase |
{{PROJECT_DESCRIPTION}} | "A vector database management app..." | Brief description |
{{TECH_STACK}} | "TypeScript" | Primary language/framework |
{{DEPLOYMENT}} | "Replit" | Target platform |
{{DATE}} | "2026-01-17" | Current date |
Optional specialized agents available in catalog/:
| Agent | Focus |
|---|---|
ui-agent.md | Frontend components, styling, UX |
api-agent.md | Backend endpoints, services, data flow |
db-agent.md | Database schema, queries, migrations |
Domain-specific agents can be added based on project needs.