@passioncode-ai/passioncode 0.1.7 → 0.1.9

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +22 -5
  3. package/SECURITY.md +1 -1
  4. package/bin/passioncode.js +5 -5
  5. package/family.json +1 -1
  6. package/package.json +1 -1
  7. package/payload/.claude-plugin/marketplace.json +2 -2
  8. package/payload/manifest.json +8 -8
  9. package/payload/plugins/fabric-agent-adapter/.claude-plugin/plugin.json +1 -1
  10. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/SKILL.md +20 -4
  11. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/provider-entry.md +53 -0
  12. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/adapt_project.py +15 -2
  13. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/fabric_provider.py +242 -0
  14. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/SKILL.md +19 -3
  15. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/interop.md +77 -0
  16. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/protocol.md +1 -1
  17. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/check_service.py +174 -0
  18. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-interop.mjs +188 -0
  19. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-service.mjs +8 -1
  20. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_interop.py +424 -0
  21. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_service.py +14 -2
  22. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/sample_service.py +116 -1
  23. package/payload/plugins/fabric-agent-adapter/skills/creating-fabric-agents/SKILL.md +9 -3
  24. package/payload/plugins/passioncode/.claude-plugin/plugin.json +1 -1
  25. package/payload/plugins/passioncode/hooks/repo-rules.js +36 -0
  26. package/payload/plugins/passioncode/hooks/session-start.js +6 -0
  27. package/payload/plugins/passioncode/skills/working-in-passioncode/SKILL.md +12 -0
@@ -5,9 +5,9 @@ license: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0
5
5
  compatibility: Requires filesystem access and Python 3.9+. Exact schema checks additionally need git, Node.js, pnpm, and the pinned private fabric-agent-contract checkout. Works without those tools in an explicitly degraded structural-check mode. Ships in one plugin with adapting-projects-to-fabric, whose scripts it reuses.
6
6
  metadata:
7
7
  author: PassionCode.ai
8
- version: "0.4.3"
8
+ version: "0.5.0"
9
9
  contract-version: "0.1.0"
10
- contract-commit: "a5a27092ba0dcc5facfbeae8b359146dfb403e9a"
10
+ contract-commit: "a22dea359ba04b8fe549abe81a5131552cb90eff"
11
11
  ---
12
12
 
13
13
  # Creating Fabric-compatible agents
@@ -93,7 +93,7 @@ python3 <plugin-dir>/skills/adapting-projects-to-fabric/scripts/adapt_project.py
93
93
  --schema-base <immutable-base-uri>
94
94
  ```
95
95
 
96
- Pin exactly contract `0.1.0` at commit `a5a27092ba0dcc5facfbeae8b359146dfb403e9a` and
96
+ Pin exactly contract `0.1.0` at commit `a22dea359ba04b8fe549abe81a5131552cb90eff` and
97
97
  read the pinned guide before implementing protocol details. If this skill is installed
98
98
  without its sibling, the scaffolder is absent: create the bundle by hand from the pinned
99
99
  contract's `docs/guides/connecting-compatible-agents.md` and mark the structural check
@@ -102,6 +102,12 @@ contract's `docs/guides/connecting-compatible-agents.md` and mark the structural
102
102
  The generated placeholders are deliberate blockers; a bundle still containing one is not
103
103
  ready for admission.
104
104
 
105
+ A new agent is called the `fabric-interop/0.1` way from its first version: add `--job`
106
+ for a capability whose work may outlive one request, serve each capability as the MCP
107
+ tool of its name, and carry the caller's trace (the `building-fabric-services` interop
108
+ reference). An agent that is not a service is announced with a provider entry
109
+ (`adapting-projects-to-fabric`, `scripts/fabric_provider.py`).
110
+
105
111
  ## Step 4 — implement against the observables
106
112
 
107
113
  If the agent keeps running on the operator's computer — it answers other agents, runs
@@ -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.9",
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 |