@passioncode-ai/passioncode 0.1.7 → 0.1.8

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.8 - 2026-09-29
4
+
5
+ ### Added
6
+
7
+ - **Read the rules first.** In a passioncode-ai repository the session-start hook now prints one
8
+ line sending the agent to the repository's `AGENTS.md` and the organization's `CONTRIBUTING.md`
9
+ before its first edit; anywhere else it prints nothing, and a missing or slow git prints
10
+ nothing (`hooks/repo-rules.js`).
11
+ - `working-in-passioncode` carries the names of Fabric ADR-0090 and the code region marker rule.
12
+
3
13
  ## 0.1.7 - 2026-09-29
4
14
 
5
15
  - Observatory Log 0.12.3 (Observatory v0.8.2) in the set: source-available license and PassionCode.ai metadata; no behaviour change.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passioncode-ai/passioncode",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Every PassionCode.ai agent skill — Fabric Agent Adapter, Observatory Log and the organisation's working rules — for Claude Code and every other agent on the machine, updated as one set.",
5
5
  "bin": {
6
6
  "passioncode": "bin/passioncode.js"
@@ -35,7 +35,7 @@
35
35
  "name": "passioncode",
36
36
  "displayName": "PassionCode.ai",
37
37
  "source": "./plugins/passioncode",
38
- "version": "0.1.7",
38
+ "version": "0.1.8",
39
39
  "description": "The organisation's working rules for every contributor's agent (working-in-passioncode), and a once-a-day check that keeps the PassionCode.ai set current.",
40
40
  "author": {
41
41
  "name": "PassionCode.ai",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "family": "passioncode",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "release": true,
5
5
  "members": [
6
6
  {
@@ -61,16 +61,16 @@
61
61
  "name": "passioncode",
62
62
  "displayName": "PassionCode.ai",
63
63
  "repo": "passioncode-ai/passioncode",
64
- "ref": "v0.1.7",
64
+ "ref": "v0.1.8",
65
65
  "commit": null,
66
- "version": "0.1.7",
66
+ "version": "0.1.8",
67
67
  "via": "this repository",
68
68
  "skills": [
69
69
  "working-in-passioncode"
70
70
  ],
71
71
  "legacyPluginIds": [],
72
72
  "legacyMarketplaces": [],
73
- "contentHash": "sha256:9c7431ba81678924da9764acfb828c1f6714c24facfc5aed69cb31eee413e7d1",
73
+ "contentHash": "sha256:e233f0c95abb4f060aa8428c4a1509e4ef1a3777b5597a6771d7abd2a3a439ef",
74
74
  "description": "The organisation's working rules for every contributor's agent (working-in-passioncode), and a once-a-day check that keeps the PassionCode.ai set current.",
75
75
  "author": {
76
76
  "name": "PassionCode.ai",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "passioncode",
4
4
  "displayName": "PassionCode.ai",
5
- "version": "0.1.7",
5
+ "version": "0.1.8",
6
6
  "description": "The organisation's working rules for every contributor's agent (working-in-passioncode), and a once-a-day check at session start that keeps the PassionCode.ai skill set current.",
7
7
  "author": {
8
8
  "name": "PassionCode.ai",
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+ /**
3
+ * The read-first reminder. In a passioncode-ai repository an agent reads the repository's
4
+ * AGENTS.md and the organization's CONTRIBUTING.md before its first edit — names, landing
5
+ * rules, code region markers, the shared tools. A rule an agent has to remember is a rule it
6
+ * forgets in the one repository where it mattered, so the session start says it, in one line,
7
+ * and only where it applies. Anything unexpected (no git, no origin, a slow git) prints nothing:
8
+ * a reminder must never cost a session.
9
+ */
10
+ const { execFileSync } = require('child_process');
11
+
12
+ const CONTRIBUTING = 'https://github.com/passioncode-ai/.github/blob/main/CONTRIBUTING.md';
13
+
14
+ /** The GitHub organization an origin URL belongs to, when it is passioncode-ai; else null. */
15
+ function orgOf(url) {
16
+ const m = String(url || '').trim().match(/^(?:git@github\.com:|ssh:\/\/git@github\.com\/|https:\/\/github\.com\/)([^/]+)\//);
17
+ return m && m[1] === 'passioncode-ai' ? 'passioncode-ai' : null;
18
+ }
19
+
20
+ function originOf(dir) {
21
+ try {
22
+ return execFileSync('git', ['-C', dir, 'remote', 'get-url', 'origin'], {
23
+ encoding: 'utf8', timeout: 2000, stdio: ['ignore', 'pipe', 'ignore'],
24
+ }).trim();
25
+ } catch (_) {
26
+ return '';
27
+ }
28
+ }
29
+
30
+ /** The one line to print at session start in `dir`, or null. */
31
+ function rulesLine(dir) {
32
+ if (!orgOf(originOf(dir))) return null;
33
+ return `[passioncode] passioncode-ai repository: read AGENTS.md and the organization's CONTRIBUTING.md (${CONTRIBUTING}) before the first edit — names, landing rules, code region markers.`;
34
+ }
35
+
36
+ module.exports = { CONTRIBUTING, orgOf, rulesLine };
@@ -10,6 +10,7 @@ const fs = require('fs');
10
10
  const os = require('os');
11
11
  const path = require('path');
12
12
  const { decide, loadTrust } = require('./update-check');
13
+ const { rulesLine } = require('./repo-rules');
13
14
 
14
15
  const DIR = process.env.PASSIONCODE_HOME || path.join(os.homedir(), '.passioncode');
15
16
  const STATE = path.join(DIR, 'state.json');
@@ -41,5 +42,10 @@ try {
41
42
  fs.writeFileSync(tmp, JSON.stringify(fresh, null, 2));
42
43
  fs.renameSync(tmp, STATE);
43
44
  }
45
+ // Claude Code passes the session's directory on stdin; the process cwd is the fallback.
46
+ let cwd = process.cwd();
47
+ try { const input = JSON.parse(fs.readFileSync(0, 'utf8') || '{}'); if (input && typeof input.cwd === 'string') cwd = input.cwd; } catch (_) { /* no stdin */ }
48
+ const rules = rulesLine(cwd);
49
+ if (rules) lines.unshift(rules);
44
50
  if (lines.length) process.stdout.write(lines.join('\n') + '\n');
45
51
  } catch (_) { /* never fail a session start */ }
@@ -44,6 +44,18 @@ where a repository's own `AGENTS.md` is stricter, **that file wins**.
44
44
  No org-index clone: `gh repo clone passioncode-ai/org-index`. No access at all: say so,
45
45
  follow the repository's `AGENTS.md`, and name that you worked from it alone.
46
46
 
47
+ Also, before the first edit:
48
+
49
+ - **Read the organization's [CONTRIBUTING.md](https://github.com/passioncode-ai/.github/blob/main/CONTRIBUTING.md)**
50
+ — the session-start hook of this plugin prints that line in every passioncode-ai repository.
51
+ - **Names** (Fabric ADR-0090): PassionCode.ai is the organization; **Fabric** is the product,
52
+ the CEO AI agent; Fabric's tools carry its full name before any short form (Fabric Inbox,
53
+ Fabric Dashboards, Fabric Switchboard); the Fabric Agent Contract and Adapter make any agent
54
+ Fabric-compatible; Project Observatory keeps its own name. Never "PassionCode app".
55
+ - **Code region markers**: fence a feature, module or special condition with
56
+ `#region <slug> — docs: <path>#<anchor>` … `#endregion <slug>` in the file's comment syntax;
57
+ the reference must resolve. Repositories that ship `check-regions` fail a broken one.
58
+
47
59
  ## 2. Landing on main
48
60
 
49
61
  | `main` is | Land by |