agora.git.commit

Agent-attributed commits with structured commit messages.

Commit message format:

[<agent-name>] <task description>

Task: <task-id>
Phase: <project-phase>
Contract: <specification-fingerprint>

Functions

format_message(meta)

Classes

CommitMetadata

CommitMetadata(agent_name: 'str', task_id: 'str', task_description: 'str', phase: 'str' = '', fingerprint: 'str' = '', email_domain: 'str' = 'agora.local')

CommitStrategy

Create structured, attributed commits on the current branch.

class agora.git.commit.CommitMetadata[source]

Bases: object

CommitMetadata(agent_name: ‘str’, task_id: ‘str’, task_description: ‘str’, phase: ‘str’ = ‘’, fingerprint: ‘str’ = ‘’, email_domain: ‘str’ = ‘agora.local’)

agent_name: str
task_id: str
task_description: str
phase: str = ''
fingerprint: str = ''
email_domain: str = 'agora.local'
__init__(agent_name, task_id, task_description, phase='', fingerprint='', email_domain='agora.local')
agora.git.commit.format_message(meta)[source]
class agora.git.commit.CommitStrategy[source]

Bases: object

Create structured, attributed commits on the current branch.

__init__(repo)[source]
static agent_author(agent_name, email_domain='agora.local')[source]
commit(meta, files=None)[source]

Stage the given files (or all changes) and commit. Returns commit SHA.