generator-folklore 3.0.54 → 3.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ class AgentsGenerator extends _generator.default {
22
22
  const hasPackageJson = this.fs.exists(this.destinationPath('package.json'));
23
23
  const existingContent = this.fs.exists(destPath) ? this.fs.read(destPath) : '';
24
24
  const separator = '\n\n---\n\n';
25
- const parts = [this.fs.read(this.templatePath('general.md')), hasComposerJson ? this.fs.read(this.templatePath('laravel.md')) : null, hasPackageJson ? this.fs.read(this.templatePath('frontend.md')) : null, this.fs.read(this.templatePath('after.md'))].filter(it => it !== null).join(separator);
25
+ const parts = [this.fs.read(this.templatePath('general.md')), this.fs.read(this.templatePath('workflow.md')), hasComposerJson ? this.fs.read(this.templatePath('laravel.md')) : null, hasPackageJson ? this.fs.read(this.templatePath('frontend.md')) : null, hasComposerJson ? this.fs.read(this.templatePath('serve-laravel.md')) : null, !hasComposerJson && hasPackageJson ? this.fs.read(this.templatePath('serve-html.md')) : null, this.fs.read(this.templatePath('after.md'))].filter(it => it !== null).join(separator);
26
26
  const newContent = existingContent.length > 0 ? `${existingContent}${separator}${parts}` : parts;
27
27
  this.fs.write(destPath, newContent);
28
28
  }
@@ -8,8 +8,8 @@ This file defines how coding agents should work in this repository.
8
8
 
9
9
  ## Language Rules
10
10
 
11
- - Write all code, comments, identifiers, commit messages, and technical docs in English.
12
- - User-facing chat can be in French, but repository content stays in English.
11
+ - Everything written for people is in French: conversations, GitHub issues and their comments, pull request titles, bodies and review comments.
12
+ - Code is always in English: identifiers, comments, file names, and commit messages.
13
13
 
14
14
  ## Editing Guidelines
15
15
 
@@ -0,0 +1,12 @@
1
+ ## Serving the project (HTML, no Laravel backend)
2
+
3
+ Without a backend, the dev server serves the project directly on `localhost`.
4
+
5
+ 1. Start the dev server over HTTP, without opening a browser: `npm run server -- --server http --no-open`.
6
+ 2. Test at `http://localhost:<port>`, the port printed by the dev server (`8080` unless taken).
7
+
8
+ Notes:
9
+
10
+ - Options reach `flklr` from `package.json` (`build` key), the environment (`FLKLR_*`) and the command line, the command line winning. Leave `package.json` as is and pass overrides on the command line.
11
+ - HTTP avoids the dev server's self-signed certificate, which browsers reject. Use the default HTTPS only when a feature requires a secure context the browser won't grant to `localhost`.
12
+ - Stop the dev server once testing is done.
@@ -0,0 +1,42 @@
1
+ ## Serving the project (Laravel)
2
+
3
+ Always test a Laravel project through its `.test` domain, never `localhost`: some behaviour depends on the domain (multi-site routing, subdomains, absolute URLs, cookies).
4
+
5
+ 1. Valet serves the Laravel app at `https://<project>.test`. Check it with `valet links`.
6
+ 2. Start the dev server without opening a browser: `npm run server -- --no-open`. It proxies Valet (`FLKLR_PROXY` in `.env`) and serves the assets with hot reload.
7
+ 3. Test at `https://<project>.test:8080`. `flklr serve` picks up the site's Valet certificate on its own (from `~/.config/valet/Certificates`), so the browser trusts it like the site itself.
8
+
9
+ Notes:
10
+
11
+ - Options reach `flklr` from `package.json` (`build` key), the environment (`FLKLR_*`) and the command line, the command line winning. Leave `package.json` as is and pass overrides on the command line.
12
+ - On a certificate error, see [Fixing Valet certificates](#fixing-valet-certificates) rather than switching to `localhost` or plain HTTP.
13
+ - Stop the dev server once testing is done.
14
+
15
+ ### Fixing Valet certificates
16
+
17
+ **Why it breaks.** Valet signs each site's certificate with its own certificate authority (CA), which it adds to the macOS keychain. The browser trusts a site only while that chain holds. When the CA expires (older Valet CAs lasted only two years), the keychain no longer trusts it, or a site certificate is missing or expired, the browser rejects the site: usually `ERR_CERT_DATE_INVALID` or `ERR_CERT_AUTHORITY_INVALID`. The dev server on `:8080` reuses the same certificate, so it breaks at the same time. Renewing the certificates fixes it; switching to `localhost` or plain HTTP only hides it and breaks domain-dependent behaviour.
18
+
19
+ **Check**
20
+
21
+ ```bash
22
+ npx flklr certificates <project>.test # one site (a parent domain's certificate counts)
23
+ npx flklr certificates # every site secured by Valet
24
+ ```
25
+
26
+ Each line shows ✔ or ✖ with the first problem found, and the command exits with 1 when something fails. The check is read-only, so an agent may run it.
27
+
28
+ **Fix**
29
+
30
+ ```bash
31
+ npx flklr certificates --fix
32
+ ```
33
+
34
+ - A failing site is secured again with `valet secure`.
35
+ - When the CA is missing, expired or untrusted, the command deletes it and secures every site again: every site certificate depends on the CA, so renewing it alone would break the others.
36
+ - It then runs the check again. Restart `npm run server` and reload the browser, since the dev server reads the certificate at startup.
37
+
38
+ `--fix` asks for the sudo password and changes the system keychain: an agent explains it and lets the developer run it.
39
+
40
+ If the check passes but `:8080` is still rejected, `flklr serve` found no certificate for the proxy's host and fell back to its self-signed `localhost` certificate: check that `FLKLR_PROXY` in `.env` uses the `.test` domain.
41
+
42
+ With Herd instead of Valet, renew certificates from Herd's settings.
@@ -0,0 +1,43 @@
1
+ ## Development Workflow
2
+
3
+ Branching follows Gitflow, kept light. `develop` is where development happens: every commit and every merge lands there first. `main` is production: it only receives `develop` when deploying to prod. The backlog is the repository's GitHub Issues; pull requests are where reviewed work lands. Most day-to-day work skips both: the issue/PR flow exists to run work in parallel and to review what deserves it, not to slow down small changes.
4
+
5
+ On GitHub, `develop` is the default branch (so PRs target it and `Closes #<number>` closes issues on merge), and the `bug`, `enhancement` and `in-progress` labels exist.
6
+
7
+ ### Commit straight to `develop` (default)
8
+
9
+ - Small changes asked for directly in conversation: fixes, style or copy tweaks, translations, content. The request was reviewed by being asked for.
10
+ - Documentation, comments and config with no runtime effect.
11
+ - Run the checks before committing. Never push unless asked.
12
+
13
+ ### Use an issue and a PR
14
+
15
+ - A feature or a chunk of work that spans several sessions, or needs a written plan.
16
+ - Work meant to run in parallel with other sessions.
17
+ - Risky or broad changes: migrations, refactors, dependencies, routing, or any diff the maintainer would want to read.
18
+ - Anything started from an existing issue.
19
+
20
+ What decides the flow is where the request came from and what it touches, not the size of the diff. When unsure, ask.
21
+
22
+ ### Working an issue
23
+
24
+ 1. Read the issue and its comments first; they may change the plan.
25
+ 2. Add the `in-progress` label before starting: it stops a second session from picking the same issue. Remove it if the work is abandoned.
26
+ 3. For an `enhancement`, write a short plan in the issue body before coding. `bug` issues skip the plan.
27
+ 4. One branch per issue, prefixed by its type: `feature/<number>-<slug>` for an `enhancement`, `bug/<number>-<slug>` for a `bug` (other types follow the same pattern, e.g. `docs/`, `refactor/`). Branch from an up-to-date `develop`, in its own worktree under `.claude/worktrees/<number>-<slug>` so parallel sessions don't share a checkout.
28
+ 5. Run the checks, push and open the PR against `develop` with `Closes #<number>` in its body, without asking. If the change couldn't be verified in the session, list the test scenario as a checkbox list in the PR body.
29
+ 6. The issue closes when the PR merges into `develop`, never just because code was pushed. Remove the worktree (`git worktree remove`) once merged.
30
+
31
+ Something out of scope noticed along the way becomes a new issue (title, context, files involved) rather than growing the current change. Every issue carries a type label: `bug` or `enhancement`.
32
+
33
+ ### Releasing to production
34
+
35
+ When deploying, merge `develop` into `main` (only when asked). An urgent fix for prod goes on a `hotfix/<slug>` branch from `main`, merged into `main` and then into `develop` so the two don't diverge.
36
+
37
+ ### Checks
38
+
39
+ Run the project's lint, format, typecheck and test scripts (see `package.json` and `composer.json`) on what changed. When the codebase has pre-existing errors, a check passes when it reports nothing new in the files touched.
40
+
41
+ ### Rules live in this file
42
+
43
+ Rules that always apply to this project (workflow, conventions, setup) are written here, not in an agent's private memory, so every session and every teammate shares them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-folklore",
3
- "version": "3.0.54",
3
+ "version": "3.0.56",
4
4
  "description": "Yeoman generator for projects at Folklore",
5
5
  "keywords": [
6
6
  "yeoman-generator"
@@ -40,5 +40,5 @@
40
40
  "yeoman-generator": "5.9.0",
41
41
  "yeoman-remote": "^1.0.1"
42
42
  },
43
- "gitHead": "9405e6a69d84448512ac33d3bbdb8cac44637140"
43
+ "gitHead": "588abc69c30c5a8954352431f3aed90375582714"
44
44
  }