selftalk

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package selftalk finds first-person claims about what the writer of a text permanently IS or permanently CANNOT do, and classifies each as a dated record or a standing claim.

WHY IT MEASURES A CONSTRUCT AND NOT GRAMMAR. Its predecessor counted negation words and called the ratio "negative self talk". That measured SYNTAX: a rule document is a list of things that must not happen, so it scored worst of anything in the repo it was written for, and improving its score meant deleting a prohibition. That output was acted on: five rules were weakened, one of them floor-level, before a cold reader caught every one. Restoring them made the score worse.

THE KERNEL GOT STRONGER AND THE TOOL GOT REDDER.
"Never" is not negative self talk. "I am fallible" is.

So this measures the construct instead: a prohibition is only a rule; the sentences worth looking at are the ones that say what their writer IS.

WHAT IT MISSES, AND THE MISS IS PERMANENT BY DESIGN: trait claims built from neutral words carry no first-person marker and no negative vocabulary. Widening the pattern to reach them flags half of any file, so the two classes cannot be one tool. A green from this package means ONE CLASS IS CLEAR, never that the file is — and the CLI says so on every run.

It is NOT obsoleted by the register improving. A falling score means the input got better, which is the tool working, not the tool finishing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base

func Base(p string) string

Base returns the basename of a path using forward slashes, for --skip matching. Kept here rather than in the CLI so the skip decision and the name it is made on cannot drift apart.

func Flatten

func Flatten(text string) string

Flatten strips markdown and collapses all whitespace to single spaces. Exported because a text check that matches against unflattened text is blind to any claim spanning a hard wrap, and a shared implementation is one true source for that fix.

Types

type Claim

type Claim struct {
	Verdict Verdict
	Text    string
}

Claim is one classified sentence.

func Scan

func Scan(text string) []Claim

Scan classifies every negative self/capability claim in text.

WHAT IT MISSES, AND THE MISS IS PERMANENT BY DESIGN: trait claims built from neutral words carry no first-person marker and no negative vocabulary. Widening the pattern to reach them flags half of any file. A green from this means ONE CLASS IS CLEAR, never that the file is.

type Verdict

type Verdict string

Verdict is the classification of a claim.

The one distinction that decides every case: a capability denial is a MEASUREMENT WITH A DATE, never a remembered property. A dated observation is a record and is welcome; a standing claim says what the writer permanently IS, and that is the thing to look at.

const (
	// Standing — says what the writer permanently is. Date it, cut it, or keep it
	// on purpose; the judgment is the writer's, never this package's.
	Standing Verdict = "STANDING"
	// Dated — a record of something that happened. Welcome.
	Dated Verdict = "DATED"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL