Skip to content

CORE CLI Workflows

This guide explains how to perform common end‑to‑end workflows using the core-admin CLI.

Where the CLI Reference lists all commands, this document shows how they fit together into real development flows under the Mind–Body–Will architecture.

All workflows reflect the actual functionality of the current 2025 CORE codebase.


1. Add a New Feature (Autonomous Development)

This is the most common workflow: using governed autonomy to create new functionality.

πŸ”· Step 1 β€” Ask CORE to generate a feature

poetry run core-admin develop feature "Add health endpoint"

This triggers:

  • crate creation
  • context building
  • agent planning & coding
  • validation
  • constitutional audit

A crate is created under:

.core/crates/<id>/

πŸ”· Step 2 β€” Inspect the crate

Review:

  • generated code
  • generated tests
  • validation output
  • audit report

Crates are never applied automatically.

πŸ”· Step 3 β€” Manually integrate the changes

Copy changes into src/.

πŸ”· Step 4 β€” Run self-healing tools

poetry run core-admin fix ids --write
poetry run core-admin fix code-style --write

πŸ”· Step 5 β€” Update CORE's knowledge

poetry run core-admin manage database sync-knowledge

πŸ”· Step 6 β€” Run the constitutional audit

poetry run core-admin check audit

Only when audit passes, commit and push.


2. Refactor Existing Code (Manual Developer Flow)

This workflow is 100% manual (A1 autonomy does not refactor code by itself).

πŸ”· Step 1 β€” Make changes normally

Modify code under src/.

πŸ”· Step 2 β€” Fix metadata

poetry run core-admin fix ids --write
poetry run core-admin fix headers --write

πŸ”· Step 3 β€” Run style & linting

poetry run core-admin fix code-style --write

πŸ”· Step 4 β€” Sync knowledge

poetry run core-admin manage database sync-knowledge

πŸ”· Step 5 β€” Audit

poetry run core-admin check audit

Commit only when clean.


3. Fix Audit Violations

This workflow applies when the Constitutional Auditor rejects a change.

πŸ”· Step 1 β€” Run audit

poetry run core-admin check audit

πŸ”· Step 2 β€” Read findings

Violations include:

  • domain placement
  • import rules
  • security checks
  • ID/capability hygiene
  • missing headers
  • drift
  • schema issues

πŸ”· Step 3 β€” Apply targeted remediations

Some examples:

poetry run core-admin fix ids --write
poetry run core-admin fix headers --write
poetry run core-admin fix docstrings --write

πŸ”· Step 4 β€” Re‑audit

poetry run core-admin check audit

Repeat until clean.


4. Sync Knowledge Graph After Structural Changes

CORE uses a Knowledge Graph to understand:

  • symbols
  • capabilities
  • linkages
  • boundaries
  • drift

Whenever adding or removing modules, functions, or capabilities:

πŸ”· Step 1 β€” Make changes

πŸ”· Step 2 β€” Fix IDs

poetry run core-admin fix ids --write

πŸ”· Step 3 β€” Sync knowledge

poetry run core-admin manage database sync-knowledge

πŸ”· Step 4 β€” Audit

poetry run core-admin check audit

5. Update or Add Documentation Metadata

Documentation improvements are also governed.

πŸ”· Step 1 β€” Edit files normally

πŸ”· Step 2 β€” Fix headers (ensures file path metadata)

poetry run core-admin fix headers --write

πŸ”· Step 3 β€” Audit

poetry run core-admin check audit

6. Submit a Constitutional Proposal (for .intent/ changes)

Only use this workflow when changing:

  • policies
  • schemas
  • governance domains
  • capability taxonomy
  • constitutional rules

πŸ”· Step 1 β€” Create a proposal

poetry run core-admin manage proposals new "Reason for change"

πŸ”· Step 2 β€” Sign it

poetry run core-admin keys keygen "your.email@example.com"

πŸ”· Step 3 β€” Canary audit (automatic)

CORE applies the proposal to a temporary clone and audits it.

πŸ”· Step 4 β€” Submit to approvers

Depending on your governance model.


7. Investigate Structural Problems

If something seems off (drift, missing capabilities, inconsistent imports):

πŸ”· Step 1 β€” Inspect project

poetry run core-admin inspect project

πŸ”· Step 2 β€” Search capabilities or symbols

poetry run core-admin search capability "vector"
poetry run core-admin search symbol "builder"

πŸ”· Step 3 β€” Use self-healing tools

poetry run core-admin fix all --dry-run

πŸ”· Step 4 β€” Sync knowledge & re-audit

poetry run core-admin manage database sync-knowledge
poetry run core-admin check audit

8. Full End‑to‑End Example

This is the canonical CORE workflow for contributors.

# 1. Make changes or generate a crate
poetry run core-admin develop feature "Add capability docs"

# 2. Review crate manually
ls .core/crates/

# 3. Integrate accepted crate
cp -r .core/crates/<id>/changes/* src/

# 4. Self-heal
poetry run core-admin fix ids --write
poetry run core-admin fix code-style --write

# 5. Sync knowledge
a:poetry run core-admin manage database sync-knowledge

# 6. Run audit
poetry run core-admin check audit

# 7. Commit & push

9. Mental Model

CORE workflows always follow the same pattern:

Write β†’ Self‑Heal β†’ Sync Knowledge β†’ Audit β†’ Commit

For autonomous workflows:

Intent β†’ Crate β†’ Validate β†’ Audit β†’ Integrate β†’ Commit

These cycles enforce CORE’s governed evolution and prevent drift.


10. When In Doubt

Run:

poetry run core-admin inspect command-tree

Or:

poetry run core-admin check audit

These two commands give you immediate clarity about the system’s state.