Pack · source-control
scm.forge
A service that hosts repositories and the work around them: change requests, checks and the roles principals hold on it. A forge is registered, may be retired, and a retired forge hosts no new repository. A principal's role on a forge is a membership: granted by a principal, changed, revoked. A role says what the forge lets the principal do; what the system lets an agent do is still an authority grant (agentic.authority). Which product plays the forge is a binding, not this block.
Depends on
Used by
- scm.repository · pack source-control · 7 references
Entities
Forge
One hosting service for repositories.
Identified by forge_id (ForgeId).
| field | type |
|---|---|
name | Name |
registered_by | PrincipalId |
registered_at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
registrarreferences Principal of principal (one, byregistered_by)membershipsowns Membership (many, byforge_id)
Lifecycle of Forge
Retired.Membership
One principal's role on one forge. A human, a service and an agent hold a role the same way; an agent's role is that of its principal.
Identified by membership_id (MembershipId).
| field | type |
|---|---|
forge_id | ForgeId |
principal_id | PrincipalId |
role | ForgeRole |
granted_by | PrincipalId |
granted_at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
memberreferences Principal of principal (one, byprincipal_id)grantorreferences Principal of principal (one, bygranted_by)
Lifecycle of Membership
Revoked.Commands
ChangeRole
Change a principal's role on a forge.
Called by: Forge administrator.
| field | type |
|---|---|
membership_id | MembershipId |
role | ForgeRole |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-membership refused | no such Membership | Membership: No membership of this identity exists. |
revoked refused | state == Revoked | Membership: The membership is revoked. |
changed | otherwise | updates the Membership; emits Role |
More columns: swipe horizontally, or focus the table and use the arrow keys.
GrantRole
Grant a principal a role on a forge.
Called by: Forge administrator.
| field | type |
|---|---|
membership_id | MembershipId |
forge_id | ForgeId |
principal_id | PrincipalId |
role | ForgeRole |
granted_by | PrincipalId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-forge refused | no Forge for forge_ | Forge: No forge of this identity is registered. |
unknown-principal refused | no Principal for principal_ | Unknown: No principal of this identity is registered. |
unknown-grantor refused | no Principal for granted_ | Unknown: No principal of this identity is registered. |
forge-retired refused | the Forge of forge_ has state == Retired | Forge: The forge is retired; it takes no new membership. |
principal-retired refused | the Principal of principal_ has state == Retired | Principal: The principal is retired; it takes no new role. |
granted | otherwise | creates a Membership in Active; emits Role |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RegisterForge
Register a forge.
Called by: Forge administrator.
| field | type |
|---|---|
forge_id | ForgeId |
name | Name |
registered_by | PrincipalId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-principal refused | no Principal for registered_ | Unknown: No principal of this identity is registered. |
registered | otherwise | creates a Forge in Active; emits Forge |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RetireForge
Retire a forge.
Called by: Forge administrator.
| field | type |
|---|---|
forge_id | ForgeId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-forge refused | no such Forge | Forge: No forge of this identity is registered. |
retired | otherwise | moves the Forge Active → Retired; emits Forge |
wrong-state refused | the Forge is in a state that does not allow it | Forge: The forge is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RevokeRole
Revoke a principal's role on a forge.
Called by: Forge administrator.
| field | type |
|---|---|
membership_id | MembershipId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-membership refused | no such Membership | Membership: No membership of this identity exists. |
revoked | otherwise | moves the Membership Active → Revoked; emits Role |
wrong-state refused | the Membership is in a state that does not allow it | Membership: The membership is revoked. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
ForgeRegistered | forge_ ForgeId, name Name, registered_ PrincipalId, at timestamp | Register |
ForgeRetiredEvent | forge_ ForgeId, at timestamp | Retire |
RoleChanged | membership_ MembershipId, from ForgeRole, to ForgeRole, at timestamp | Change |
RoleGranted | membership_ MembershipId, forge_ ForgeId, principal_ PrincipalId, role ForgeRole, granted_ PrincipalId, at timestamp | Grant |
RoleRevoked | membership_ MembershipId, at timestamp | Revoke |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
ForgesForges | each Forge | forge_ ForgeId, name Name, registered_ PrincipalId, registered_ timestamp, state State |
MembershipsMemberships | each Membership | membership_ MembershipId, forge_ ForgeId, principal_ PrincipalId, role ForgeRole, granted_ PrincipalId, granted_ timestamp, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
ForgeId | an identifier or value | uuid |
ForgeRoleWhat the forge lets a principal do on it. Reader reads repositories, Writer also pushes references and opens change requests, Maintainer also merges and approves, Administrator also manages memberships. | one of | Reader, Writer, Maintainer, Administrator |
MembershipId | an identifier or value | uuid |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
2 KPIs from the pack's catalogue, packs/source-control/kpis.yaml. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
retired_forge_writesRepositories created or roles granted on a forge after it was retired. How: RepositoryCreated and RoleGranted events of a forge timestamped after its ForgeRetiredEvent. Must be 0. | count | lower | gate | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
agent_maintainer_shareShare of forge memberships at Maintainer or Administrator held by agent principals. How: Live RoleGranted and RoleChanged memberships whose role is Maintainer or Administrator and whose principal is registered with kind Agent, divided by all such memberships. By work mode: autonomous: ignore, pairing: lower, review: lower | share | lower | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part scm.forge:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.