Skip to content

Commit 6d7d2d7

Browse files
committed
Merge remote-tracking branch 'origin/main' into HEAD
2 parents dda5742 + 8ac20f0 commit 6d7d2d7

259 files changed

Lines changed: 12559 additions & 740 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/add-discussion-mode.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": minor
3+
---
4+
5+
Add experimental Expert Talk for automatic two-model analysis, reciprocal review, and fused answers.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": patch
3+
---
4+
5+
Use a refreshed New Chat icon across desktop and mobile navigation.

AGENTS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,48 @@ Gate behind flags. Env: `PYTHINKER_CODE_EXPERIMENTAL_<NAME>` toggles one; `PYTHI
127127
- Hard rules that affect almost every task: update the root `AGENTS.md`.
128128
- Rules that only affect a specific directory: update the nearest sub-directory `AGENTS.md`.
129129
- Project-map entries stay at 1–2 sentences; deep package docs live in the package's own `AGENTS.md`.
130+
131+
<!-- gitnexus:start -->
132+
# GitNexus — Code Intelligence
133+
134+
This project is indexed by GitNexus as **pythinker-code** (91454 symbols, 263612 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
135+
136+
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
137+
138+
## Always Do
139+
140+
- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
141+
- **MUST run `detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. For regression review, compare against the default branch: `detect_changes({scope: "compare", base_ref: "main"})`.
142+
- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
143+
- When exploring unfamiliar code, use `query({search_query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
144+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `context({name: "symbolName"})`.
145+
- For security review, `explain({target: "fileOrSymbol"})` lists taint findings (source→sink flows; needs `analyze --pdg`).
146+
147+
## Never Do
148+
149+
- NEVER edit a function, class, or method without first running `impact` on it.
150+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
151+
- NEVER rename symbols with find-and-replace — use `rename` which understands the call graph.
152+
- NEVER commit changes without running `detect_changes()` to check affected scope.
153+
154+
## Resources
155+
156+
| Resource | Use for |
157+
|----------|---------|
158+
| `gitnexus://repo/pythinker-code/context` | Codebase overview, check index freshness |
159+
| `gitnexus://repo/pythinker-code/clusters` | All functional areas |
160+
| `gitnexus://repo/pythinker-code/processes` | All execution flows |
161+
| `gitnexus://repo/pythinker-code/process/{name}` | Step-by-step execution trace |
162+
163+
## CLI
164+
165+
| Task | Read this skill file |
166+
|------|---------------------|
167+
| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` |
168+
| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` |
169+
| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` |
170+
| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` |
171+
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
172+
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |
173+
174+
<!-- gitnexus:end -->

CLAUDE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
11
@AGENTS.md
2+
3+
<!-- gitnexus:start -->
4+
# GitNexus — Code Intelligence
5+
6+
This project is indexed by GitNexus as **pythinker-code** (91454 symbols, 263612 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
7+
8+
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
9+
10+
## Always Do
11+
12+
- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
13+
- **MUST run `detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. For regression review, compare against the default branch: `detect_changes({scope: "compare", base_ref: "main"})`.
14+
- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
15+
- When exploring unfamiliar code, use `query({search_query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
16+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `context({name: "symbolName"})`.
17+
- For security review, `explain({target: "fileOrSymbol"})` lists taint findings (source→sink flows; needs `analyze --pdg`).
18+
19+
## Never Do
20+
21+
- NEVER edit a function, class, or method without first running `impact` on it.
22+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
23+
- NEVER rename symbols with find-and-replace — use `rename` which understands the call graph.
24+
- NEVER commit changes without running `detect_changes()` to check affected scope.
25+
26+
## Resources
27+
28+
| Resource | Use for |
29+
|----------|---------|
30+
| `gitnexus://repo/pythinker-code/context` | Codebase overview, check index freshness |
31+
| `gitnexus://repo/pythinker-code/clusters` | All functional areas |
32+
| `gitnexus://repo/pythinker-code/processes` | All execution flows |
33+
| `gitnexus://repo/pythinker-code/process/{name}` | Step-by-step execution trace |
34+
35+
## CLI
36+
37+
| Task | Read this skill file |
38+
|------|---------------------|
39+
| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` |
40+
| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` |
41+
| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` |
42+
| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` |
43+
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
44+
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |
45+
46+
<!-- gitnexus:end -->

CONTEXT.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Pythinker Code
2+
3+
Pythinker Code is a provider-agnostic AI coding agent for terminal, browser, desktop, and editor workflows.
4+
5+
## Language
6+
7+
**Expert Talk**:
8+
A structured conversation between two user-selected AI models that returns one fused answer.
9+
_Avoid_: Debate mode, fusion mode
10+
11+
**Expert Talk pair**:
12+
The two ordered configured model IDs saved for future Expert Talk runs.
13+
_Avoid_: Global pair, secondary model
14+
15+
**Configured model ID**:
16+
The stable catalog key that identifies one configured model record and can be stored in an Expert Talk pair.
17+
_Avoid_: Display name, provider model name, loose alias
18+
19+
**Effective model binding**:
20+
The immutable execution identity produced for one Expert Talk role after current catalog and routing validation.
21+
_Avoid_: Selected model, live alias
22+
23+
**Pair collapse**:
24+
An Expert Talk admission failure where two configured selections resolve to the same effective execution target.
25+
_Avoid_: Duplicate model choice
26+
27+
**Expert Talk admission**:
28+
The pre-acceptance validation that resolves and freezes an eligible, distinct pair for one run.
29+
_Avoid_: Provider ping, opening stage
30+
31+
**Fusion Lead**:
32+
The first model in an Expert Talk pair. It participates as an equal expert, then its immutable model binding supplies a fresh inference for fusion.
33+
_Avoid_: Architect, judge, Model 1
34+
35+
**Peer Expert**:
36+
The second model in an Expert Talk pair. It participates as an equal expert in opening and peer review but does not own fusion.
37+
_Avoid_: Secondary model, Model 2
38+
39+
**Expert Talk activation**:
40+
The transient intent to use Expert Talk for the next accepted user turn.
41+
_Avoid_: Expert Talk mode, persistent activation
42+
43+
**Expert Talk run**:
44+
One recorded Expert Talk execution owned by one accepted user turn.
45+
_Avoid_: Resumed run, shared run
46+
47+
**Expert Talk exchange**:
48+
Two independent openings followed by one symmetric peer review between the run-scoped Fusion Lead and Peer Expert.
49+
_Avoid_: Debate, adaptive conversation
50+
51+
**Fused answer**:
52+
The single direct response produced by a fresh Fusion Lead inference after the Expert Talk exchange.
53+
_Avoid_: Verdict, winning answer
54+
55+
**Fusion notes**:
56+
Structured consensus, divergence, uncertainty, and attribution stored with an Expert Talk run but excluded from the normal assistant answer.
57+
_Avoid_: Diagnostic appendix, debate transcript
58+
59+
**Expert Talk stage artifact**:
60+
An immutable complete or partial opening, review, or fusion output owned by one role and stage and kept outside the normal transcript.
61+
_Avoid_: Participant message, hidden memory
62+
63+
**Expert Talk result**:
64+
The versioned successful-run record that contains the fused answer and separate fusion notes.
65+
_Avoid_: Meeting transcript, winning opinion
66+
67+
**Expert Talk retry**:
68+
A new run for the same accepted turn input that reruns admission and every stage without resuming participants or reusing artifacts.
69+
_Avoid_: Resume, fusion-only retry
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "f7cf5febcdf56552c8623ab242e49ecff60f2d3bb0a307d139a04c7225217ed1",
3-
"sourceFileCount": 412
2+
"sourceHash": "0a37c819db91d9c13c59e2b4cd1b26e5e6eda54d5dab911b7d233bc3e6a1868a",
3+
"sourceFileCount": 417
44
}

0 commit comments

Comments
 (0)