Skip to content

Commit 6b7a71f

Browse files
schaconcursoragent
andauthored
Label AI-written blog posts, add authorship page, and add a blog style guide (#10)
* Label AI-written blog posts and add authorship policy page Co-authored-by: Scott Chacon <schacon@gmail.com> * Add blog style guide derived from the book's voice; rewrite posts to match Co-authored-by: Scott Chacon <schacon@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent f896b2c commit 6b7a71f

10 files changed

Lines changed: 331 additions & 47 deletions

File tree

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ researching, or planning around prose that a human wrote, that's fair game.
3838

3939
When in doubt, treat it as prose and hand it to a human.
4040

41+
## Blog posts are the exception — but read the style guide first
42+
43+
The site's blog (`site/src/content/blog/`) is not the book. Agents may write and edit
44+
blog posts when asked — automated posts exist precisely to communicate project updates.
45+
Two hard requirements:
46+
47+
1. **Before writing or editing any blog post, read `site/BLOG_STYLE.md` and follow
48+
it.** The blog is written in the book's voice, and that guide defines it. Do not
49+
write a post without loading it first.
50+
2. **Set `automated: true` in the frontmatter of every agent-written post.** That
51+
renders the "written by AI" disclosure banner; unlabeled machine writing is never
52+
published.
53+
4154
## Cursor Cloud specific instructions
4255

4356
This repo is the **Pro Git** book (source in AsciiDoc). "Building" means converting

site/BLOG_STYLE.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Blog writing style guide
2+
3+
Blog posts on the Pro Git site are written in the same voice as the book.
4+
This guide describes that voice, derived from the book's own text, so that posts read
5+
like they were written by the book's authors — because stylistically, they are.
6+
7+
**Anyone (human or agent) writing or editing a post in `src/content/blog/` must read
8+
this guide first and follow it.**
9+
10+
Every trait below is illustrated with a real sentence from the book.
11+
12+
## Voice and person
13+
14+
**Address the reader as "you"; the authors are "we".**
15+
The book talks directly to one reader and speaks as its authors, never in an
16+
impersonal third person.
17+
18+
> You're about to spend several hours of your life reading about Git.
19+
> Let's take a minute to explain what we have in store for you.
20+
> *Introduction*
21+
22+
**Use "Let's" to start a walkthrough or a worked example.**
23+
24+
> To visualize this, let's assume that you have a directory containing three files,
25+
> and you stage them all and commit.
26+
> *Branches in a Nutshell*
27+
28+
**Use contractions.**
29+
"You'll", "it's", "don't", "can't", "we're". The book is conversational, not formal.
30+
31+
## Openers
32+
33+
**Get to the point in the first sentence.**
34+
Posts open with the fact, then explain. No throat-clearing, no scene-setting.
35+
36+
> So, what is Git in a nutshell?
37+
> *What is Git?*
38+
39+
**Rhetorical questions are welcome — but answer them immediately.**
40+
41+
> What happens when you create a new branch?
42+
> Well, doing so creates a new pointer for you to move around.
43+
> *Creating a New Branch*
44+
45+
## Tone
46+
47+
**Plain, concrete, and direct.** Explain *why* before *how*.
48+
49+
> This is an important section to absorb, because if you understand what Git is and
50+
> the fundamentals of how it works, then using Git effectively will probably be much
51+
> easier for you.
52+
> *What is Git?*
53+
54+
**No hype and no marketing language.**
55+
Never "excited to announce", "seamless", "robust", "leverage", "delve", "game-changing".
56+
When the book praises something, it says specifically what is good about it.
57+
58+
**Dry, understated humor — sparingly.** At most one flourish per post, and only when
59+
it lands naturally.
60+
61+
> If the book spontaneously combusts at this point, you should already be pretty
62+
> useful wielding Git in the time it takes you to go pick up another copy.
63+
> *Introduction*
64+
65+
**Tell the reader when something matters.**
66+
67+
> Pay attention now — here is the main thing to remember about Git if you want the
68+
> rest of your learning process to go smoothly.
69+
> *The Three States*
70+
71+
## Structure
72+
73+
**Short paragraphs, one point each.** One to four sentences is typical.
74+
75+
**Signpost what's coming, and end with a bridge.**
76+
The book constantly tells you where you are going next and closes sections by pointing
77+
forward. Posts should end the same way: where to follow along, what happens next, or
78+
where to pitch in.
79+
80+
> Let's get started.
81+
> *Introduction*
82+
83+
**Lists are for enumerable facts; numbered lists are for step sequences.**
84+
The book uses bullets for parallel facts (the three states) and numbers for workflows
85+
(the basic Git workflow). Everything else is prose.
86+
87+
## Sentences and punctuation
88+
89+
**Mostly short and medium declarative sentences.** Vary the rhythm; don't stack three
90+
long sentences in a row.
91+
92+
**Em dashes for asides**, surrounded by spaces (the book's ` -- ` renders as an
93+
em dash; in MDX write `` directly).
94+
95+
> Most operations in Git need only local files and resources to operate — generally
96+
> no information is needed from another computer on your network.
97+
> *Nearly Every Operation Is Local*
98+
99+
**Parentheses for quick side remarks.**
100+
101+
> …you can commit happily (to your _local_ copy, remember?) until you get to a
102+
> network connection to upload.
103+
> *Nearly Every Operation Is Local*
104+
105+
**No exclamation points. No emoji.**
106+
107+
## Formatting conventions
108+
109+
- `monospace` for commands, branch names, file names, config keys: `git branch`,
110+
`main`, `AGENTS.md`.
111+
- _Italics_ for a new term at first use, the way the book introduces _snapshots_
112+
and _blobs_. Also for book titles: _Pro Git_.
113+
- **Bold** sparingly, for the one key phrase in a paragraph — the book bolds
114+
*stream of snapshots*, not whole sentences.
115+
- Headings only when a post is long enough to need them; short posts are just prose.
116+
117+
## Source formatting
118+
119+
**One sentence per line.**
120+
The book's AsciiDoc sources put each sentence on its own line (semantic line breaks),
121+
which keeps diffs reviewable. Do the same in post MDX; Markdown joins the lines when
122+
rendering.
123+
124+
## Frontmatter
125+
126+
- `description` is one plain sentence, in the same voice.
127+
- Agent-written posts must set `automated: true` (see `README.md`); this renders the
128+
"written by AI" banner and is non-negotiable.

site/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ because Pagefind indexes the generated HTML.
4141

4242
## Writing a blog post
4343

44+
**Read [`BLOG_STYLE.md`](./BLOG_STYLE.md) first** — posts are written in the book's
45+
voice, and that guide defines it.
46+
4447
Add an `.mdx` file to `src/content/blog/` with this frontmatter:
4548

4649
```mdx
@@ -49,13 +52,20 @@ title: 'Post title'
4952
description: 'One-sentence summary shown in lists and search results.'
5053
date: 2026-08-02
5154
author: 'Your Name' # optional
55+
automated: true # optional; set when the post is generated by an AI agent
5256
---
5357

5458
Post body in MDX…
5559
```
5660

5761
The file name (without `.mdx`) becomes the URL: `/blog/<file-name>/`.
5862

63+
Posts with `automated: true` get a "This post was written by AI" banner at the top
64+
(and a "Written by AI" tag in the post list) linking to `/authorship/`, the page
65+
that explains the project's authorship policy. Human-written posts get a
66+
"Written by a human" banner instead. **Always set `automated: true` on
67+
agent-generated posts.**
68+
5969
## Deployment
6070

6171
`.github/workflows/deploy-site.yml` builds the site on every push to `main` and

site/package-lock.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/content.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const blog = defineCollection({
88
description: z.string(),
99
date: z.coerce.date(),
1010
author: z.string().default('The Pro Git project'),
11+
/** True when the post was generated by an AI agent rather than written by a human. */
12+
automated: z.boolean().default(false),
1113
}),
1214
});
1315

site/src/content/blog/a-new-home-for-pro-git.mdx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,22 @@
22
title: 'A new home on the web for Pro Git'
33
description: 'The Pro Git project now has its own site: read the book online, search it, and follow progress on the third edition.'
44
date: 2026-08-02
5+
automated: true
56
---
67

7-
The _Pro Git_ project now has a website of its own, and you are looking at it.
8+
The _Pro Git_ project now has a website of its own, and you're looking at it.
9+
Let's take a minute to walk through what's here.
810

9-
Here is what you will find:
11+
First, [the book itself](../../book/), readable online.
12+
Every section is rendered straight from the AsciiDoc sources in the repository, one page per section, with a sidebar table of contents and previous/next links — so you can read it front to back or jump around as you please.
1013

11-
- **[The book, readable online](../../book/)** — the full text of _Pro Git_, rendered
12-
straight from the AsciiDoc sources in the repository, one page per section with
13-
a sidebar table of contents and previous/next navigation.
14-
- **[Full-text search](../../search/)** — every section of the book (and every post
15-
on this blog) is indexed, so you can jump straight to the material you need.
16-
- **[This blog](../../blog/)** — updates and progress reports as work on the third
17-
edition moves along.
18-
- **[A history of the book](../../history/)** — how _Pro Git_ went from a 2009
19-
Apress title to one of the most widely read open source books in the world.
14+
Second, [full-text search](../../search/) over the whole book and this blog.
15+
If you want to know where we cover `git rebase` or the reflog, you can jump straight there instead of scanning the table of contents and hoping.
2016

21-
The site is rebuilt automatically from the [`progit3` repository](https://github.com/progit/progit3)
22-
every time a change lands on `main`, so what you read here always matches the
23-
latest state of the manuscript.
17+
Third, [this blog](../../blog/), where we'll post updates and progress reports as work on the third edition moves along.
2418

25-
If you spot a problem — in the book or on the site — [issues and pull requests
26-
are welcome](https://github.com/progit/progit3/blob/main/CONTRIBUTING.md).
19+
And finally, [a history of the book](../../history/) — how _Pro Git_ went from a 2009 Apress title to one of the most widely read (and most widely translated) open source books in the world.
20+
21+
How does the site stay current?
22+
It's rebuilt automatically from the [`progit3` repository](https://github.com/progit/progit3) every time a change lands on `main`, so what you read here always matches the latest state of the manuscript.
23+
If you spot a problem — in the book or on the site — [issues and pull requests are welcome](https://github.com/progit/progit3/blob/main/CONTRIBUTING.md).
Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
---
22
title: 'Planning the third edition'
3-
description: 'Git 3.0 is coming, and Pro Git is getting its first full revision since 2014. Here is what is changing and why.'
3+
description: "Git 3.0 is coming, and Pro Git is getting its first full revision since 2014. Here's what's changing and why."
44
date: 2026-08-02
5+
automated: true
56
---
67

7-
Work has started on the third edition of _Pro Git_ — the first full revision of
8-
the book since the second edition shipped in 2014.
8+
Work has started on the third edition of _Pro Git_ — the first full revision of the book since the second edition shipped in 2014.
9+
Let's take a minute to explain why now, and what's going to change.
910

10-
The trigger is **Git 3.0**. After more than a decade of careful backward
11-
compatibility, Git's maintainers have queued up a set of genuine breaking
12-
changes, and several of them cut straight through material the book teaches
13-
today:
11+
So, why a third edition?
12+
The short answer is **Git 3.0**.
13+
After more than a decade of careful backward compatibility, Git's maintainers have queued up a set of genuine breaking changes, and several of them cut straight through material the book teaches today:
1414

15-
- **`main` becomes the real default branch name.** The book currently teaches
16-
`master` first and treats `main` as an opt-in override. That flips: the
17-
inventory counts roughly **600 renames** across the text, plus the diagrams
18-
and screenshots that show branch names.
19-
- **SHA-256 becomes the default object hash** for new repositories. The famous
20-
"40-character SHA-1 string" passage — and every example hash in the book —
21-
needs a rethink.
22-
- **`reftable` replaces the `files` backend** as the default ref storage, which
23-
reshapes parts of the Git Internals chapter.
24-
- **Rust becomes a mandatory build dependency**, so "installing from source"
25-
gets a new prerequisite.
26-
- **New security defaults** like `safe.bareRepository` and `safe.directory`
27-
aren't covered by the current text at all.
15+
- **`main` becomes the real default branch name.** The book currently teaches `master` first and treats `main` as an opt-in override. That flips — and the inventory counts roughly 600 renames across the text, plus the diagrams and screenshots that show branch names.
16+
- **SHA-256 becomes the default object hash** for new repositories. You may remember the "40-character SHA-1 string" from the book; that passage — and every example hash in the book — needs a rethink.
17+
- **`reftable` replaces the `files` backend** as the default ref storage, which reshapes parts of the Git Internals chapter.
18+
- **Rust becomes a mandatory build dependency**, so "installing from source" gets a new prerequisite.
19+
- **New security defaults** like `safe.bareRepository` and `safe.directory` aren't covered by the current text at all.
2820

29-
Beyond the 3.0-specific work there is a decade of general staleness to clear
30-
out: version framing ("this book was written using Git version 2"), long-stable
31-
features still described as new, and forge screenshots from another era.
21+
Beyond the 3.0 work, there's a decade of general staleness to clear out: the book still tells you it was written using Git version 2, describes long-stable features as new, and shows forge screenshots from another era.
3222

33-
The full chapter-by-chapter inventory lives in
34-
[`REVISION_PLAN.md`](https://github.com/progit/progit3/blob/main/REVISION_PLAN.md)
35-
in the repository, with the `master``main` breakdown in
36-
[`book_master_to_main_inventory.md`](https://github.com/progit/progit3/blob/main/book_master_to_main_inventory.md).
23+
If you want the details, the full chapter-by-chapter inventory lives in [`REVISION_PLAN.md`](https://github.com/progit/progit3/blob/main/REVISION_PLAN.md) in the repository, with the `master``main` breakdown in [`book_master_to_main_inventory.md`](https://github.com/progit/progit3/blob/main/book_master_to_main_inventory.md).
3724

38-
Progress will be posted here as chapters get revised. As always, the book is
39-
being written in the open — follow along or pitch in at
40-
[github.com/progit/progit3](https://github.com/progit/progit3).
25+
We'll post progress here as chapters get revised.
26+
As always, the book is being written in the open — follow along or pitch in at [github.com/progit/progit3](https://github.com/progit/progit3).
27+
Let's get started.

site/src/pages/authorship.astro

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
import Base from '../layouts/Base.astro';
3+
import { url } from '../lib/url';
4+
---
5+
6+
<Base
7+
title="Humans, AI, and this project · Pro Git"
8+
description="The Pro Git book is written entirely by humans. Some blog posts are automated to communicate project updates — and they are always labeled."
9+
>
10+
<main class="container narrow" data-pagefind-body data-pagefind-meta="title:Humans, AI, and this project">
11+
<h1 class="page-title">Humans, AI, and this project</h1>
12+
<p class="page-lede">Who writes what around here — and how you can always tell.</p>
13+
14+
<div class="prose">
15+
<h2>The book is written entirely by humans</h2>
16+
<p>
17+
Every sentence of <em>Pro Git</em> — the chapters, sections, sidebars, and captions —
18+
is written by its human authors. That is a firm rule of this project, not a
19+
preference: the book has named authors and a voice, and the writing is the work.
20+
AI agents never compose, rewrite, paraphrase, or "polish" the book's prose.
21+
</p>
22+
<p>
23+
Agents do help with the mechanical work around the book: search-and-replace fixes
24+
(like renaming <code>master</code> to <code>main</code> in examples), generating and
25+
wiring up figures, building tooling, research, and planning. The full policy lives in
26+
<a href="https://github.com/progit/progit3/blob/main/AGENTS.md" rel="noopener"><code>AGENTS.md</code></a>
27+
in the repository.
28+
</p>
29+
30+
<h2>Some blog posts are automated</h2>
31+
<p>
32+
The blog is different. Some posts there exist to communicate project updates —
33+
progress reports, site changes, revision milestones — and those are generated by
34+
automated agents working on the project.
35+
</p>
36+
<p>
37+
When a post was written by AI, we make that clear: it carries a
38+
<strong>"This post was written by AI"</strong> banner at the top of the post and a
39+
<strong>"Written by AI"</strong> tag in the post list. Posts written by a human say so
40+
too. There is no ambiguity, and no unlabeled machine writing anywhere on this site.
41+
</p>
42+
43+
<h2>In short</h2>
44+
<ul>
45+
<li><strong>The book:</strong> humans, always.</li>
46+
<li><strong>The blog:</strong> humans or AI — always labeled at the top of the post.</li>
47+
</ul>
48+
</div>
49+
50+
<p class="back"><a href={url('/blog/')}>← Back to the blog</a></p>
51+
</main>
52+
</Base>
53+
54+
<style>
55+
.back {
56+
margin: 3rem 0;
57+
}
58+
</style>

0 commit comments

Comments
 (0)