#1492 Draft: Use Cursor AI to convert everything to Semantic Line Breaks
Opened by churchyard. Modified
churchyard/packaging-committee sembr  into  master

Download 1492.patch

Using the claude-4-sonnet-1m model.

Prompt:

Get familiar with the Semantic Line Braks principle @https://sembr.org/

For every adoc document in the project, perform the following 2 steps:

  1. remove all the nonsemantic line wraps
  2. add new line breaks as defined by @https://sembr.org/

Never change any code examples within the documents, only prose.

You must not ever change anything else than newlines and spaces.
Particularly, do not replace any other characters, such as apostrophes or quotes.

As the AI created a regex based Python script to break lines after certain characters, I followed with:

Go trough all the adoc files once again and manually inspect them for correctness,
adding more semantic newlines where the script did not do that.

Then I used git diff --word-diff to locate some undesired changes in apostrophes and quotes
(the AI insisted on replacing the Unicode ones with ASCII ones, but only in some of the files).

The overall diff is quite horrible to review.
I propose this as is for consideration, but it was not yet completely reviewed by me.
Overall, I think this is not worth it.

rebased onto a612abd62278c5a86aa112fa6ffa09fa94d27d7b

rebased onto a612abd62278c5a86aa112fa6ffa09fa94d27d7b

Hm ... it looks like in some cases like here, it even converted stuff that was already SemBR back into really long lines? (and also introduced other formatting changes that don't look like valid AsciiDoc any longer)?

Yeah this doesn't seem great.

At least limit it to the files which haven't already been converted. But even then, I don't have a lot of confidence that this approach is reasonable. We'd be far better off with just breaking lines after sentences because that's at least half the job.

Can you please hold off on converting the Golang pages? I'm working on updating them, and this will create conflicts.

Can you please hold off on converting the Golang pages? I'm working on updating them, and this will create conflicts.

Don't worry, we are probably not going to merge this anyway.

rebased onto a612abd62278c5a86aa112fa6ffa09fa94d27d7b

I have changed the model and continued adding more and more instructions until it kinda made sense. The changes look mostly good to me.

(If we want this, I can exclude the Golang pages from the commit.)

Todo fixes identified by the AI that I manually removed to limit the scope:

  • Lua: sufficient. e.g.
  • JavaScript: Bundling Guidelines. MUST still be followed.
  • Node.js: Additional Provides: bundled() line is added for e (missing end of the sentence)

It doesn't look terrible now ... but it's a lot and some of the changes seem random.

Would probably be much happier if it was limited just splitting lines that were over 100 characters or something.

Metadata