Skip to content

Commit 74ab589

Browse files
committed
Sync repo-template contract with current upstream wording
timestamp: 2026-04-12 09-23-10 KST changes: - restored the governed repo-template surfaces to the current upstream wording - kept Markfops-only material in explicit local-divergence sections and local enforcement extensions - synchronized the commit standards hook, range checker, hook installer, and CI workflow with the current template contract rationale: - the repo should match the upstream contract verbatim where the template governs the wording - explicit local divergence keeps Markfops-specific commands and stronger checks visible without rewriting the template text checks: - git diff --check - sh -n .githooks/commit-msg scripts/check-commit-standards.sh scripts/check-commit-range.sh scripts/install-hooks.sh - ruby -e 'require "yaml"; YAML.load_file(".github/workflows/commit-standards.yml")' notes: - commit history remains the canonical execution record via commit-backed LOG ids project: markfops agent: codex-markfops-upsync role: orchestrator commit: LOG-20260412-092310-upsync artifacts: DEC-20260412-001
1 parent 2d596db commit 74ab589

9 files changed

Lines changed: 121 additions & 77 deletions

File tree

.github/workflows/commit-standards.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Commit Standards
33
on:
44
pull_request:
55
push:
6-
branches:
7-
- "**"
86

97
jobs:
108
commit-standards:
@@ -16,7 +14,7 @@ jobs:
1614
fetch-depth: 0
1715

1816
- name: Make scripts executable
19-
run: chmod +x .githooks/commit-msg scripts/check-commit-standards.sh scripts/check-commit-range.sh scripts/install-hooks.sh
17+
run: chmod +x scripts/check-commit-standards.sh scripts/check-commit-range.sh
2018

2119
- name: Validate pull request commits
2220
if: github.event_name == 'pull_request'

AGENTS.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ Before running a repeatable repo workflow, read the relevant `skills/<name>/SKIL
1818

1919
When writing into an artifact directory, read that directory's `README.md` first. If it includes a prescriptive shape, follow it. If it is intentionally lightweight, keep the output lightweight too.
2020

21-
## Repo-Specific Notes
22-
23-
- `docs/` is for Sparkle and GitHub Pages assets, not canonical project truth.
24-
- `ref/` contains research specimens and reference repos, not production dependencies.
25-
- Generate the Xcode project with `xcodegen generate` when needed.
26-
- Preferred local verification commands:
27-
- `xcodebuild build -project Markfops.xcodeproj -scheme Markfops -destination 'platform=macOS' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO`
28-
- `xcodebuild test -project Markfops.xcodeproj -scheme MarkfopsTests -destination 'platform=macOS' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO`
29-
3021
## Operating Rules
3122

3223
- Keep durable truth in repo files, not only in external tools.
@@ -35,10 +26,11 @@ When writing into an artifact directory, read that directory's `README.md` first
3526
- Worker agents should prefer evidence, proposals, and compliant commit-backed execution records. The orchestrator or operator owns truth-doc updates unless the operator explicitly allows a different flow.
3627
- Treat `INBOX.md` as pressure, not a backlog. During inbox review, cluster capture and promote only survived triage.
3728
- Promote sparsely. Do not mirror one evolving thought into research, decisions, plans, spec, status, upstream records, and execution records.
29+
- If the repo tracks upstream on a cadence, use `upstream-intake/` instead of inventing a parallel workflow.
3830
- When creating artifacts or commits, follow the stable-ID and provenance rules in `REPO.md`.
3931
- Prefer the local `README.md` shape over ad hoc formatting when it defines one.
40-
- If hooks are installed with `scripts/install-hooks.sh`, your commit message must satisfy the local provenance check before the commit is allowed.
41-
- If CI commit checks are enabled, your pushed commits must satisfy the same provenance rules remotely.
32+
- Your commit message must satisfy the local repo provenance check before the commit is allowed.
33+
- Your pushed commits must satisfy the same provenance rules remotely in CI.
4234
- Treat each committed change as a canonical execution record through `commit: LOG-*`.
4335
- Normal commits must use the structured body keys `timestamp:`, `changes:`, `rationale:`, and `checks:` with `notes:` optional.
4436

@@ -52,15 +44,25 @@ When you write or update repo artifacts, adherence to the repo's ruleset is requ
5244
- Do not turn an inbox review into a giant digest of every low-confidence idea. Report counts or clusters when full detail does not protect focus.
5345
- Do not write chatty transcripts where the repo expects normalized records.
5446
- If an artifact guide is intentionally lightweight, do not over-structure the document just to make it look uniform.
47+
- If the repo guidance and the requested output appear to conflict, follow the repo rules and explain the tension in the artifact or handoff.
5548
- Do not bypass commit provenance checks by omitting required trailers unless the commit is an explicit bootstrap or migration exception.
5649
- Do not put `LOG-*` ids inside `artifacts:`.
57-
- If a request pressures you to break the ruleset, keep the repo artifact compliant and surface the mismatch explicitly.
5850

5951
## Skills
6052

6153
`skills/<name>/SKILL.md` files are reusable procedures for bounded workflows.
6254

63-
- Read `skills/README.md` and the relevant skill before executing a repeatable repo workflow.
64-
- Keep skills procedural.
55+
- Keep them procedural.
6556
- Do not duplicate canonical repo policy inside them.
6657
- Use them to standardize repeatable tasks, escalation triggers, and output shape.
58+
59+
## Local Divergence
60+
61+
Markfops-specific repo notes:
62+
63+
- `docs/` is for Sparkle and GitHub Pages assets, not canonical project truth.
64+
- `ref/` contains research specimens and reference repos, not production dependencies.
65+
- Generate the Xcode project with `xcodegen generate` when needed.
66+
- Preferred local verification commands:
67+
- `xcodebuild build -project Markfops.xcodeproj -scheme Markfops -destination 'platform=macOS' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO`
68+
- `xcodebuild test -project Markfops.xcodeproj -scheme MarkfopsTests -destination 'platform=macOS' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO`

REPO.md

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,58 @@
1-
# REPO
1+
# Repo Operating Model
22

3-
This file is the canonical repo contract for Markfops.
4-
5-
This document is the instruction layer for Markfops.
3+
This document is the canonical repo contract for repo-template-style repos.
64

75
## Purpose
86

9-
Use this model to keep Markfops legible as a repo managed through durable product docs, research artifacts, decisions, and implementation history.
7+
Use this model when a repo is managed by one operator plus many agents and you want the repo itself to remain legible over time.
108

11-
Markfops is a native macOS Markdown app with an active research and implementation program around a future native WYSIWYG engine. This repo uses a repo-native operating model so that product truth, accepted future direction, reusable research, and execution history do not collapse into external transcripts or one-off notes.
9+
The goal is simple:
1210

13-
The goals are:
11+
- keep canonical truth in-repo
12+
- keep noisy activity out of truth docs
13+
- keep provenance explicit
14+
- let the orchestrator route work without inventing new storage rules each time
1415

15-
- keep canonical truth in repo-root documents
16-
- keep research reusable and separate from commit-backed execution records
17-
- keep decisions durable and append-only
18-
- make provenance visible through stable artifact ids and commit trailers
19-
- reserve `docs/` for Sparkle and GitHub Pages assets rather than canonical project truth
16+
This file is part of the ready-to-copy scaffold for adopted repos.
2017

2118
## Core Surfaces
2219

20+
Every repo using this system should separate these surfaces:
21+
2322
| Surface | Role | Mutability |
2423
| --- | --- | --- |
25-
| `SPEC.md` | Durable statement of what Markfops is supposed to be. | rewritten |
26-
| `STATUS.md` | Current accepted operational truth. | rewritten |
27-
| `PLANS.md` | Accepted future direction that is not true yet. | rewritten |
24+
| `SPEC.md` | Durable statement of what the project is supposed to be. | rewritten |
25+
| `STATUS.md` | What is true right now operationally. | rewritten |
26+
| `PLANS.md` | Accepted future direction that is not current truth yet. | rewritten |
2827
| `INBOX.md` | Ephemeral capture waiting for triage. | append then purge |
2928
| `research/` | Curated research memos worth keeping. | append by new file |
3029
| `records/decisions/` | Durable decision records with rationale. | append-only by new file |
3130
| `git commit history` | Canonical execution history through structured commit-backed `LOG-*` records. | append-only by new commit |
3231
| `skills/` | Required procedural workflows for repeatable agent tasks. | edit by skill |
33-
| `upstream-intake/` | Optional upstream review subsystem if Markfops later needs recurring upstream intake. | append by cadence |
34-
35-
Markfops-specific repo notes:
36-
37-
- `docs/` is for Sparkle appcast, release notes publishing, and GitHub Pages assets.
38-
- `ref/` is for reference repositories and local specimens used for research.
39-
- `upstream-intake/` is intentionally omitted until Markfops has a real upstream-review cadence to manage.
32+
| `upstream-intake/` | Optional upstream review subsystem for repos that track an upstream. | append by cadence |
4033

4134
## Agent Compatibility Files
4235

4336
Some coding agents look for repo-root instruction files such as `AGENTS.md` or `CLAUDE.md`.
4437

45-
When this repo includes them:
38+
When a repo using this model includes them:
4639

47-
- they act as entrypoints into the canonical rules, not competing policy documents
48-
- they stay short enough that they do not drift from `REPO.md`
49-
- they point writers to the correct canonical surface and local `README.md` guide before drafting
50-
- `skills/<name>/SKILL.md` stays separate because it defines a bounded reusable procedure, not repo-wide policy
51-
- `skills/` ships with Markfops as repo-native procedural documentation, even when the agent runtime does not auto-load skills
40+
- they should act as entrypoints into the canonical rules, not competing policy documents
41+
- they should stay short enough that they do not drift from `REPO.md`
42+
- `AGENTS.md` should be the main editable agent-instructions file when both files exist
43+
- `CLAUDE.md` should be a thin shim that points to `AGENTS.md` when the tool supports it
44+
- `SKILL.md` stays separate because it defines a bounded reusable procedure, not repo-wide policy
45+
- `skills/` should ship with adopted repos as repo-native procedural documentation, even when the agent runtime does not auto-load skills
46+
- optional repo subsystems may have optional companion skills
5247

5348
Recommended split:
5449

5550
- `REPO.md`
5651
- canonical rules
5752
- `AGENTS.md`
58-
- tool-facing summary plus read order
53+
- canonical editable agent-instructions file
5954
- `CLAUDE.md`
60-
- Claude-facing shim into the same rules
55+
- Claude Code shim that points to `AGENTS.md`
6156
- `skills/<name>/SKILL.md`
6257
- procedure for one repeatable workflow
6358

@@ -67,13 +62,20 @@ Macro structure is not enough on its own. Agents should not improvise document s
6762

6863
When writing repo files or commit-backed execution records:
6964

70-
- read the nearest canonical surface, local directory `README.md`, and any explicit template before drafting
65+
- read the nearest canonical surface, directory `README.md`, and any explicit template before drafting
7166
- if the local `README.md` includes a default shape or canonical example, follow it by default
7267
- use the established section order only when the surface actually defines one and it helps the repo stay legible
7368
- write normalized repo records, not external transcripts or stream-of-consciousness notes
7469
- keep facts, decisions, open questions, and next steps clearly separated
7570
- summarize evidence and outcomes instead of pasting raw command output unless the literal output is the artifact
76-
- prefer short declarative bullets or paragraphs over filler
71+
- prefer short declarative bullets or paragraphs over vague filler
72+
73+
When a directory exists to store a durable artifact type, it should ideally include:
74+
75+
- a `README.md` that explains what belongs there
76+
- a default shape or canonical example inside that same `README.md` when that artifact type benefits from it
77+
78+
That single guide helps future agents copy a house style instead of inventing one.
7779

7880
## Separation Rules
7981

@@ -85,13 +87,13 @@ These boundaries are mandatory:
8587
- `INBOX.md` is not durable truth.
8688
- `research/` is not raw execution history.
8789
- `records/decisions/` is not the same as commit-backed execution history.
88-
- `docs/` is not a substitute for the canonical repo operating surfaces.
90+
- Off-Git memory is not a substitute for repo-local canonical docs.
8991

90-
That separation keeps common questions fast to answer:
92+
That separation gives future operators and future agents fast answers to different questions:
9193

92-
- What is the product supposed to be? -> `SPEC.md`
94+
- What is the project? -> `SPEC.md`
9395
- What is true right now? -> `STATUS.md`
94-
- What future direction is already accepted? -> `PLANS.md`
96+
- What future work is actually accepted? -> `PLANS.md`
9597
- What did we learn from exploration? -> `research/`
9698
- What did we decide and why? -> `records/decisions/`
9799
- What actually happened during execution? -> git commit history via `commit: LOG-*`
@@ -100,7 +102,7 @@ That separation keeps common questions fast to answer:
100102

101103
### Operator
102104

103-
The operator is the final authority for product direction, architecture acceptance, workflow changes, and truth updates.
105+
The operator is the final authority for product direction, escalation outcomes, and acceptance of truth changes.
104106

105107
### Orchestrator Agent
106108

@@ -128,7 +130,7 @@ They may:
128130
- create compliant commit-backed execution records when granted commit authority
129131
- propose truth changes through the orchestrator
130132

131-
They should not update `SPEC.md`, `STATUS.md`, or `PLANS.md` directly unless the operator explicitly chooses that flow.
133+
They should not update `SPEC.md`, `STATUS.md`, or `PLANS.md` directly unless the operator explicitly allows that flow.
132134

133135
### External Capture Surfaces
134136

@@ -244,7 +246,7 @@ One task may legitimately touch multiple layers. For example:
244246
- a product choice can create `DEC-*` and update `PLANS.md`
245247
- implementation progress can create a committed `LOG-*` and update `STATUS.md`
246248

247-
Touch multiple layers only when each touched layer has a distinct job.
249+
Touch multiple layers only when each layer receives distinct information.
248250
Do not copy the same evolving thought into research, decision, plan, spec, status, upstream, and execution surfaces.
249251

250252
## Write Rules
@@ -358,9 +360,9 @@ Body rules:
358360

359361
## Commit-Time Enforcement
360362

361-
If the repo enables commit hooks, every attempted commit should be checked against these provenance rules.
363+
Repos using this system must enforce these provenance rules both locally and remotely.
362364

363-
Recommended minimum enforcement:
365+
Required minimum enforcement:
364366

365367
- reject commits that do not include `project:`, `agent:`, `role:`, and `commit:`
366368
- reject roles outside `orchestrator|worker|subagent|operator`
@@ -373,7 +375,7 @@ Recommended minimum enforcement:
373375

374376
The goal is not perfect policy automation. The goal is to stop obviously non-compliant commits before they land.
375377

376-
Best practice is to use both:
378+
Required enforcement layers:
377379

378380
- local git hooks for fast feedback before the commit is created
379381
- CI for remote re-validation on push or pull request
@@ -400,10 +402,21 @@ The Off-Git runtime should answer:
400402
- which source events produced the artifact
401403
- how execution lineage maps across rebases, cherry-picks, merges, and absorbed `LOG-*` ids
402404

403-
## Markfops Notes
405+
## Scaffold Rule
406+
407+
`scaffold/` is a ready-to-copy repo skeleton, not a loose library of files to cherry-pick casually.
408+
409+
Use it when you want a managed repo to share one canonical layout so humans and agents know exactly where work belongs.
410+
411+
In this template, scaffold files live under `scaffold/`.
412+
After adoption, the scaffold contents belong at the target repo root.
413+
For example, `scaffold/skills/repo-orchestrator/SKILL.md` becomes `skills/repo-orchestrator/SKILL.md` in the adopted repo.
404414

415+
## Local Divergence
416+
417+
Markfops-specific repo notes:
418+
419+
- `project-id` is `markfops`.
405420
- `docs/` is for Sparkle appcast, release notes publishing, and GitHub Pages assets.
406421
- `ref/` is for reference repositories and local specimens used for research.
407422
- `upstream-intake/` is intentionally omitted until Markfops has a real upstream-review cadence to manage.
408-
409-
Keep skills lightweight and procedural. They should point back to this operating model rather than duplicating all of its rules.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# DEC-20260412-001: Current Upstream Repo-Template Contract Sync
2+
Opened: 2026-04-12 09-23-10 KST
3+
Recorded by agent: codex-markfops-upsync
4+
5+
## Metadata
6+
7+
- Status: accepted
8+
- Scope: repo contract, local divergence handling, and commit provenance enforcement
9+
- Related artifacts: `REPO.md`, `AGENTS.md`, `skills/README.md`, `skills/repo-orchestrator/SKILL.md`, `.github/workflows/commit-standards.yml`
10+
11+
## Decision
12+
13+
Markfops will keep the current upstream repo-template contract verbatim in the governed surfaces and keep repo-specific material only in explicit local-divergence sections or local extensions.
14+
15+
## Context
16+
17+
The repo already adopted repo-template, but the governed contract files and enforcement helpers had accumulated local wording and a few local conveniences. The repo needed a clean sync to the current upstream contract without losing the Markfops-specific commands, paths, and project notes that still matter locally.
18+
19+
## Options Considered
20+
21+
- Keep the existing local wording and mixed contract surfaces
22+
- Replace the governed surfaces with the current upstream repo-template wording and isolate local details separately
23+
- Rebuild the repo contract around a new Markfops-only policy layer
24+
25+
## Rationale
26+
27+
Keeping the upstream contract verbatim reduces drift and makes future migrations easier to compare against the source template. Isolating local notes and stronger local checks in explicit divergence sections keeps the repo-specific behavior visible without rewriting the upstream rules in Markfops phrasing.
28+
29+
- governed docs stay aligned with the current template source
30+
- local commands and project notes remain available where they are useful
31+
- stronger local enforcement can remain explicit instead of hidden inside rewritten policy prose
32+
33+
## Consequences
34+
35+
- `REPO.md`, `AGENTS.md`, and the skills layer track the current upstream wording
36+
- Markfops-specific notes live in labeled local-divergence sections
37+
- the commit standards hook and range checker remain active locally
38+
- remote enforcement stays on the same upstream contract through CI

scripts/check-commit-range.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fi
99

1010
base=$1
1111
head=$2
12+
# Local extension: keep zero-SHA handling and duplicate LOG-id scanning for pushed ranges.
1213
zero=0000000000000000000000000000000000000000
1314

1415
repo_root=$(cd "$(dirname "$0")/.." && pwd)

scripts/check-commit-standards.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ check_primary_id_uniqueness() {
248248
if [ -n "$head_sha" ] && [ "$sha" = "$head_sha" ]; then
249249
continue
250250
fi
251-
fail "primary `commit:` id already exists in history: $primary_id"
251+
fail "primary \`commit:\` id already exists in history: $primary_id"
252252
fi
253253
done
254254
done
@@ -275,6 +275,7 @@ commit_value=$(trailer_value "commit")
275275
artifacts_value=$(trailer_value "artifacts" || true)
276276

277277
[ -n "$project" ] || fail "project trailer is empty"
278+
# Local extension: Markfops keeps project-id enforcement pinned to markfops.
278279
[ "$project" = "markfops" ] || fail "project trailer must be markfops"
279280
[ -n "$agent" ] || fail "agent trailer is empty"
280281

@@ -329,7 +330,7 @@ if [ -n "$artifacts_value" ]; then
329330
esac
330331

331332
printf '%s\n' "$artifact_id" | grep -Eq '^[A-Z]{3}-[0-9]{8}-[0-9]{3}$' ||
332-
fail "artifacts trailer must contain only stable ids like DEC-YYYYMMDD-NNN"
333+
fail "artifacts trailer must contain only file-backed ids like DEC-YYYYMMDD-NNN"
333334

334335
case " $seen_artifacts " in
335336
*" $artifact_id "*) fail "duplicate artifact id inside artifacts trailer: $artifact_id" ;;

scripts/install-hooks.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@ set -eu
44

55
repo_root=$(cd "$(dirname "$0")/.." && pwd)
66
git -C "$repo_root" config core.hooksPath .githooks
7-
chmod +x \
8-
"$repo_root/.githooks/commit-msg" \
9-
"$repo_root/scripts/check-commit-standards.sh" \
10-
"$repo_root/scripts/check-commit-range.sh" \
11-
"$repo_root/scripts/install-hooks.sh"
7+
chmod +x "$repo_root/.githooks/commit-msg" "$repo_root/scripts/check-commit-standards.sh"
128

139
echo "Configured git hooks for $repo_root"
1410
echo "Active hooks path: .githooks"
15-
16-
if [ -f "$repo_root/.gitmessage.markfops" ]; then
17-
echo "Optional helper available: .gitmessage.markfops"
18-
echo "Set it manually if desired:"
19-
echo " git config commit.template .gitmessage.markfops"
20-
fi

skills/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Skills
22

3-
This directory is Markfops' repo-native procedure layer.
3+
This directory is part of the repo-template scaffold.
44

5+
Use it as repo-native procedural documentation.
56
Agents should read the relevant workflow even when their runtime does not auto-load skills.
67

78
Each reusable workflow should live at `skills/<name>/SKILL.md`.

0 commit comments

Comments
 (0)