Skip to content

docs: clarify no-mistakes init setup - #15

Merged
kunchenguid merged 2 commits into
mainfrom
docs/nm-init-no-vendor
Jun 14, 2026
Merged

kunchenguid merged 2 commits into
mainfrom
docs/nm-init-no-vendor

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Update firstmate AGENTS.md section 6 to reflect that the no-mistakes skill is now user-level. Previously the Initialize step said 'no-mistakes init writes skill files into the project (.claude/skills/, .agents/skills/)' that crewmates needed committed - that is no longer true. Per 'no-mistakes init --help', init now sets up the local gate (a bare repo + post-receive hook, the no-mistakes git remote, and a DB record; needs an origin remote) and vendors no skill. This is part (a) of the nm-skill-devendor work; part (b) (removing the already-vendored skills from the 6 fleet projects) already shipped as separate per-project PRs. Docs-only change to AGENTS.md section 6.

What Changed

  • Updates AGENTS.md project initialization guidance to state that no-mistakes init configures the local gate, no-mistakes remote, hook, and database record instead of vendoring skill files.
  • Removes the instruction to commit generated skill files after init and clarifies that init produces nothing to commit because the no-mistakes skill is now user-level.
  • Notes that local-only projects skip the pipeline and have no remote.

Risk Assessment

✅ Low: The change is a narrow documentation update to AGENTS.md that aligns the initialization instructions with the user-level no-mistakes skill model and does not alter executable behavior.

Testing

Confirmed the range diff removes the old vendored-skill commit workflow, verified the new AGENTS.md initialize instructions match no-mistakes init --help, searched for stale vendoring language, captured a rendered documentation excerpt as evidence, and confirmed the working tree was left clean.

Evidence: Rendered AGENTS.md section 6 evidence

Rendered excerpt shows line 213: no-mistakes init sets up the local gate and does not vendor any skill into the project; line 214 says init produces nothing to commit.

<!doctype html><html><head><meta charset="utf-8"><title>AGENTS.md Section 6 Evidence</title><style>body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;margin:40px;line-height:1.5;color:#172033;background:#f7f8fb}main{max-width:980px;margin:auto;background:white;border:1px solid #d8deea;border-radius:14px;padding:28px;box-shadow:0 8px 30px #1b2a4a14}h1{margin-top:0} .ok{border-left:5px solid #238636;background:#eef8f0;padding:14px 16px;border-radius:8px;margin:18px 0}table{border-collapse:collapse;width:100%;font-size:14px}td{border-top:1px solid #e6e9f0;padding:7px 10px;vertical-align:top}td:first-child{width:52px;color:#667085;text-align:right;background:#fafbff}code{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}</style></head><body><main><h1>Rendered Evidence: AGENTS.md Section 6</h1><p>This excerpt demonstrates that the initialize instructions now describe <code>no-mistakes init</code> as local gate setup only, explicitly stating that it does not vendor a skill and produces nothing to commit.</p><div class="ok"><strong>Intent check:</strong> The old project-vendored skill workflow is absent from the Initialize section, and the user-level skill behavior is visible in the rendered documentation.</div><table><tr><td>206</td><td><code></code></td></tr>
<tr><td>207</td><td><code>**Initialize (`no-mistakes` mode only):**</code></td></tr>
<tr><td>208</td><td><code></code></td></tr>
<tr><td>209</td><td><code>`` `sh</code></td></tr>
<tr><td>210</td><td><code>cd projects/&lt;name&gt; &amp;&amp; no-mistakes init &amp;&amp; no-mistakes doctor</code></td></tr>
<tr><td>211</td><td><code>`` `</code></td></tr>
<tr><td>212</td><td><code></code></td></tr>
<tr><td>213</td><td><code>`no-mistakes init` sets up the local gate: a bare repo plus post-receive hook, the `no-mistakes` git remote, and a database record for the repo (it needs an `origin` remote). It does **not** vendor any skill into the project - the no-mistakes skill is user-level now, available to every crewmate without a per-project copy.</code></td></tr>
<tr><td>214</td><td><code>So init produces nothing to commit; it is a sanctioned exception to the never-write rule (section 1) only in that it runs git remote/config setup inside the project. Touch nothing else.</code></td></tr>
<tr><td>215</td><td><code>`direct-PR` and `local-only` projects skip init entirely - they do not run the pipeline (`local-only` has no remote at all).</code></td></tr>
<tr><td>216</td><td><code></code></td></tr>
<tr><td>217</td><td><code>If `no-mistakes doctor` reports problems, fix the environment (auth, daemon) before dispatching work to that project.</code></td></tr></table></main></body></html>
Evidence: no-mistakes init help contract
Sets up or refreshes a local bare repo as a gate, installs a post-receive hook, best-effort isolates the gate hook path from shared local git config writes when Git supports `config --worktree`, adds or repairs the "no-mistakes" git remote, and records the repo in the database.

Run this from inside a git repository that has an "origin" remote.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Read AGENTS.md section 6 lines 207-217 to verify the rendered instructions state init does not vendor skills and produces nothing to commit.
  • git diff bed9bc27f79db039c6ea8066d3299218c339e30b..05b3d2d7ecdde96161a8979e6a1ab70298dd8eea -- AGENTS.md
  • no-mistakes init --help
  • Searched Markdown for stale instructions with writes skill|vendor|vendored|\.claude/skills|\.agents/skills|no-mistakes skill.
  • Generated rendered HTML evidence at /var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KV26TCRKJKWRKNMPATPXKSE5/agents-section-6-rendered.html.
  • git status --short
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid merged commit 84e7d32 into main Jun 14, 2026
3 checks passed
@kunchenguid
kunchenguid deleted the docs/nm-init-no-vendor branch June 14, 2026 04:45

@lndshk lndshk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: focused terminal-state supervision fixes validated locally; GitHub reports no CI configured, so this is PR-ready/no-CI.

prodempsey added a commit to prodempsey/firstmate that referenced this pull request Jul 25, 2026
Commit the 11 canonical, immutable, schema-versioned governed agent profiles
(profile matrix, ord-223-report.md §G) as tracked template material, with a
fail-closed validator and the T.2 test group in full.

- docs/model-economy/governed-profiles.manifest.json: single committed source of
  truth (schema firstmate/governed-profiles/v1) - per-profile model, effort,
  tools, writes, nesting, maxTurns range, version; prohibited-name and effort
  constraints (no opus-max, no fable-xhigh/max, no haiku effort, sonnet fixed
  high).
- .claude/agents/*.md (11): IN-SESSION profile definitions; each carries
  profile_version. Haiku profiles omit EFFORT entirely; non-nesting profiles
  exclude Agent and disallow it; fable profiles list Agent, never disallow it.
- bin/fm-profile-matrix-check.sh: fail-closed matrix validator, one stable
  PROFILE_* code per drift; optional --bindings cross-check of the SHELL-CREW
  surface (clean no-op on today's legacy bindings).
- tests/fm-profile-matrix-check.test.sh: T.2 static rules in full, per-rule
  negative cases. shellcheck-clean.

Additive only - no dispatch is routed through these profiles yet (S4/S5). Lands
in the template repo per design decision B.1 kunchenguid#15; runtime home picks up via the
fold path. Slice scope: ord-223-report.md §U "S3".
vipentti pushed a commit to vipentti/firstmate that referenced this pull request Aug 5, 2026
* docs: no-mistakes init no longer vendors a skill (now user-level)

* no-mistakes(document): Align no-mistakes init documentation
@adampoti

Copy link
Copy Markdown

Nem olvad be. A típusellenőrzés, az egységteszt és a böngészős ellenőrzés zöld, de két ismert hiba még a feltöltött változatban van. A futó ellenőrzés csak beolvasztás vagy lezárás után engedi a javítást. Beolvasztás nincs. Lezárom, hogy a két hiba a meglévő változaton javuljon, majd új ellenőrzés induljon. A lezárás visszafordítható.

@adampoti

Copy link
Copy Markdown

Helyreigazítás: az előző megjegyzés rossz változásra került, figyelmen kívül hagyandó. Ehhez a júniusi, már beolvadt változáshoz nincs köze. Nem zártam le és nem vontam vissza semmit.

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 1 of 7: savings were converted to the display currency twice (020d4fe)

The PR notes say PriceInfo amounts are in base currency. They are not: Magento converts them when they are built.
Magento\Catalog\Pricing\Price\RegularPrice::getValue() returns $this->priceCurrency->convertAndRound($product->getPrice()) (vendor/magento/module-catalog/Pricing/Price/RegularPrice.php:31), and the special and catalog-rule prices that feed the final price do the same (SpecialPrice.php:76, CatalogRulePrice.php:100).
So $regular - $final is already in the display currency, and convert() / convertAndFormat() applied the rate a second time.

Favelin is EGP-only today (base, default and allowed currency are all EGP), so the rate is 1 and nothing is visibly wrong yet. It would show the moment a second display currency is enabled.

Change: number_format(round($saving)) for {save_amount} and $priceCurrency->format($saving, false, 0) for {save_price}. The unit tests fail if convert, convertAndFormat or convertAndRound is ever called.

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 2 of 7: {save_percent} could round down one point too far (5b15c52)

floor($saving / $regular * 100) hits binary float noise: for a price of 100 on sale at 71, 29 / 100 * 100 is 28.999999999999996 and floor() gives 28, so the tag says 28% for a 29% saving (57% shows 56 the same way).
It now multiplies before dividing and rounds to 6 places before flooring: floor(round($saving * 100 / $regular, 6)). It still rounds down, so it never overstates. The saving itself is rounded to cents before it is compared.
Covered by testPercentIsRoundedDown (17.72 -> 17, 29, 57, 33.33 -> 33, 99.9 -> 99).

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 3 of 7: a real saving under 1% hid amount labels (dd510cf)

The label was hidden when $percent < 1 even if it only printed {save_amount} or {save_price}. A product at 2,000 on sale at 1,985 lost "وفر 15" while the price box still showed the struck-through price.
A sub-1% saving is still a saving. Now $saving < 1 hides every savings label as before, and a sub-1% saving hides only a label that prints {save_percent} (which would read "0%").

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 4 of 7: read the exact amounts the price box prints (2d21d00)

Both prices now come from getAmount()->getValue() for every product type, with no method_exists() branches:

  • configurable: ConfigurableRegularPrice::getAmount() already returns getMinRegularAmount(), and the configurable final price resolves to the cheapest child. That is what the theme's Magento_ConfigurableProduct/templates/product/price/final_price.phtml renders.
  • bundle: BundleRegularPrice::getMinimalPrice() and the bundle FinalPrice::getMinimalPrice() are both just getAmount(), so the result is the same.
  • simple: the final price used getMinimalPrice(), which on a product from a listing collection is the price index's minimal_price, the tier-price "as low as" figure. With a tier price the tag would claim a bigger saving than the price shown next to it. final_price.phtml renders getAmount().

This changes no number today: Favelin has no tier prices and no tax rules, and your dry run loaded products with getById, which carry no minimal_price, so getMinimalPrice() fell back to the plain value there. It matters once the label reads the listing's own product (fix 5), and for any future tier price.

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 5 of 7: no second product load per labelled product (c23503d)

SavingsPlaceholder loaded each product with ProductRepository::getById($id, false, $storeId). On listings the image plugin has already loaded the same product with getById($id), but the repository keys its instance cache on [$editMode, $storeId], and null is not 2, so every labelled product was loaded in full a second time (EAV, media gallery, stock and so on).
Each renderer already holds the product: the price renderer's saleable item, the product page's current_product, and the product the image plugin loaded.
getLabelHtml() / getProductLabels() now take an optional product and pass it to resolve(), which uses its PriceInfo when the id matches. It falls back to the repository otherwise (configurable child ids, the cart row total). The per-request cache stays.
A side effect is consistency: the tag reads the same PriceInfo the price box beside it renders from, in the same request and customer-group context, so the two cannot disagree, including in a full-page-cached page.

Measured on a local copy of the store (uncached Arabic listing exclusive-bundles, MySQL statements per request, 5 runs): page 1 with 4 placeholder labels 1166 -> 1096, page 2 with 5 placeholder labels 960 -> 858, about 17-20 statements saved per labelled product.
The pipeline review extended the same idea to configurable children in 17ec37b: the three configurable renderers now pass the children getUsedProducts() already loaded, so a child label (for example from the new Label Two default) no longer triggers a repository load per child.

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - 6 of 7: unit tests for SavingsPlaceholder (085630a)

The module had no tests, so I added Test/Unit/Model/SavingsPlaceholderTest.php with 20 cases: every placeholder on the Groovy Growth Deluxe Set numbers (2,065 -> 1,699 = وفر 366 / 17%), simple / configurable / bundle price sources, no discount / negative / sub-1 savings hidden, the sub-1% rule, percent flooring including the float trap, thousands separator, display-currency formatting, reuse of the rendered product, the per-store per-product cache, and unavailable prices.
Run in the phpfpm container (PHPUnit is not in the --no-dev vendor): cd app/code/Ocean/ProductLabel/Test && php phpunit-9.6.phar -c phpunit.xml. All 20 pass. Run against the original class, 15 fail (most because it converts the saving to the display currency a second time; the rest on the percent flooring, the sub-1% rule, the price source and the product reuse).

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - 7 of 7: a store default for an empty Label Two, so new discounted products are tagged automatically (9eece8a)

With placeholders the amount is live, but a new discounted product still got no tag until someone typed one into its Label Two.
New setting under Ocean > Product labels: Label Two Default Text (ocean/product_image/label2_default, store-view scope, empty by default).
When a product's own Label Two is empty, including a product the label index has no row for yet, getProductLabels() uses that text. It goes through SavingsPlaceholder like any label, so وفر {save_amount} on the Arabic store view tags every discounted product and shows nothing where there is no saving. A product whose Label Two holds other text ("مختارات أساسية") keeps it; labels 3 and 4 are untouched; with the setting empty nothing changes.
It is read at render time, so changing it needs no "Reindex labels", only a full-page-cache clean. Products that still carry the old hand-typed savings text in the index keep that text until their Label Two is cleared and labels are reindexed.
Tests: Test/Unit/Helper/ProductLabelTest.php, 7 cases (default applied, own text wins, no saving hides, no index row, all-stores row fallback, unset default, price labels untouched).

@MoemenDarwish

Copy link
Copy Markdown

@salmanasser-lab - fix 1 of 7: savings were converted to the display currency twice (020d4fe)

The PR notes say PriceInfo amounts are in base currency. They are not: Magento converts them when they are built.
Magento\Catalog\Pricing\Price\RegularPrice::getValue() returns $this->priceCurrency->convertAndRound($product->getPrice()) (vendor/magento/module-catalog/Pricing/Price/RegularPrice.php:31), and the special and catalog-rule prices that feed the final price do the same (SpecialPrice.php:76, CatalogRulePrice.php:100).
So $regular - $final is already in the display currency, and convert() / convertAndFormat() applied the rate a second time.

Favelin is EGP-only today (base, default and allowed currency are all EGP), so the rate is 1 and nothing is visibly wrong yet. It would show the moment a second display currency is enabled.

Change: number_format(round($saving)) for {save_amount} and $priceCurrency->format($saving, false, 0) for {save_price}. The unit tests fail if convert, convertAndFormat or convertAndRound is ever called.

NewAiCoder added a commit to NewAiCoder/firstmate that referenced this pull request Sep 26, 2026
…aiting forever (kunchenguid#15)

* fix(idle-compact): make the post-compaction ring durable and unmissable

A worker that appends `paused: awaiting compaction before validation` is
waiting on firstmate, not on an external event. Twice overnight on
2026-09-06 (pt-checkin-fidelity-lane3 at 07:08, pt-checkin-fidelity-lane8
at 09:31) the idle-compact episode reached phase=done with the ring never
sent, and the worker sat idle 35 to 60 minutes until firstmate rang it by
hand.

Cause: fm_idle_compact_declared_paused required the status log's latest
line to EQUAL the phrase. The same ship brief asks the worker to note its
measured lane size, so the line that actually lands carries trailing
detail - lane8's surviving log ends
"paused: awaiting compaction before validation (commit 3985d693a, 1292
changed lines, over-cap accepted)", and lane3's precompact-notes.md proves
it took the notes-save route. The equality test missed both, the sweep ran
the ORDINARY save-then-compact path, which never sets declared=1 and has
no ring at all, and the episode landed at phase=done leaving the worker
waiting. Secondary seam: even on the declared path the ring was gated
behind fm_idle_compact_safe_to_send, a live-typing gate a durable inbox
record does not need, so a busy pane deferred it indefinitely.

- The declared phrase now matches as a word-boundary PREFIX of the status
  line, so trailing detail no longer hides the declaration.
- The settling->done transition rings on either signal: the episode's own
  declared=1 field, or a status log that still declares the pause. The
  ordinary path leaves the same waiting worker and now rings too.
- The ring drops the live safety gate. It rides fm-send's durable inbox
  plane, where the watcher's re-ring ladder covers a swallowed doorbell; a
  busy pane is the case that record exists for. The episode advances to
  phase=done only once the record exists.
- fm_idle_compact_ring_backstop: an unchanged phase=done marker older than
  FM_IDLE_COMPACT_RING_BACKSTOP_SECS (600) over a still-declared pause,
  with no ring record in the inbox pending or acknowledged, gets one
  re-send and one line in state/.idle-compact.log.
- The worker-facing brief text now says the phrase must start the line and
  detail may follow.

Attended and away mode reach all of this through the one shared
fm_idle_compact_tick both bin/fm-watch.sh and bin/fm-supervise-daemon.sh
already call, so they cannot drift; a test pins that.

* no-mistakes(review): {"summary": "Replace grep-only wiring test with behavioral proof; document idle-compact tunables"}

* no-mistakes(review): {"summary": "Scope ring-backstop dedup to current episode; fix plane docs"}

* no-mistakes(review): summary: Add settle_epoch to save-timeout abandon path; fix stale docstring

* no-mistakes(review): summary: Assert settle_epoch stamped by save-timeout abandon path

* no-mistakes(document): Fix stale settle_epoch write-site comment for save-timeout abandon path

* no-mistakes(lint): test: silence spurious SC2153/SC2034 shellcheck findings in idle-compact test

---------

Co-authored-by: NewAiCoder <[email protected]>
@pragyancf

Copy link
Copy Markdown

What this does

WS-1/T5 Bay-to-repo attachment model: how a Bay binds to exactly one repo root plus one base branch, the .garage state layout, multi-Bay ceilings, dirty-repo behavior, and the two-daemon runtime (port allocation past 4040, discovery registry, per-Bay routing). Includes the bay attach CLI spike. Implements your recorded rulings: one daemon per repo, two daemons for cross-repo work; monorepo subpaths explicitly refused (ND-08 stays open).

Review path (in this order)

  1. docs/bay-attachment.md — start here. The normative model: binding triple, [DEFAULT]-marked proposals you can adjust without restructuring, refusal codes (SUBPATH, ALREADY_ATTACHED), re-attach/detach semantics. This is the file your opinion matters most on.
  2. daemon/src/bay/attachment.ts — the implementation of the binding rule: path canonicalization, subpath refusal, branch-exists check, bayId segment rule.
  3. tools/garage-axi/src/bay.ts + src/cli.ts — the bay attach --repo --base surface.
  4. daemon/test/bay-attachment.test.ts, tools/garage-axi/test/bay.test.ts — refusal cases and happy paths.

How to verify

  • npm run ci green (required check on this PR).
  • Try bay attach against a fixture repo, including a subpath (must refuse) and a dirty repo.

Decisions to opine on

  • The [DEFAULT] numbers (ceilings, port scheme) — adjust freely, they don't restructure the model.
  • Subpath refusal: correct to refuse rather than guess, given ND-08 is open?
  • --force rebind semantics: rewrite + re-pin acceptable, or should rebind always require detach first?

This was referenced Oct 2, 2026
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…nguid#15)

* feat(bootstrap): surface fork upstream drift at session start

Detect when a configured upstream remote has commits this home lacks, and
report count plus subjects through the existing bootstrap diagnostic path
so forks stop silently drifting behind without auto-merging third-party
changes.

Co-authored-by: Cursor <[email protected]>

* no-mistakes(document): document FM_UPSTREAM_* env knobs in configuration reference

---------

Co-authored-by: Cursor <[email protected]>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…ew-names leak check (kunchenguid#15)

A catch-up merge brings the upstream's public files and commit messages
onto the branch, and the new-names check refused every name-shaped word
in them. With upstream_base recorded in fork-surface.conf, the words in
the tracked files at that commit are now known and the messages of
commits reachable from it are skipped for new names only. Private words,
customer data shapes and key shapes are still checked everywhere, this
home's own lines and commit messages are still checked for new names,
and a recorded base that is no commit here or already holds the
branch's merge base is named and ignored.
ghazni101 pushed a commit to ghazni101/firstmate-dsh that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants