scientific-writer 2.2.2__py3-none-any.whl → 2.2.3__py3-none-any.whl

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.

Potentially problematic release.


This version of scientific-writer might be problematic. Click here for more details.

@@ -29,7 +29,7 @@ Example:
29
29
  from .api import generate_paper
30
30
  from .models import ProgressUpdate, PaperResult, PaperMetadata, PaperFiles
31
31
 
32
- __version__ = "2.2.2"
32
+ __version__ = "2.2.3"
33
33
  __author__ = "K-Dense"
34
34
  __license__ = "MIT"
35
35
 
scientific_writer/api.py CHANGED
@@ -80,10 +80,10 @@ async def generate_paper(
80
80
  # Default to user's current working directory
81
81
  work_dir = Path.cwd()
82
82
 
83
- # Get package directory for loading system instructions and skills
83
+ # Get package directory for copying skills to working directory
84
84
  package_dir = Path(__file__).parent.absolute() # scientific_writer/ directory
85
85
 
86
- # Set up Claude skills in the working directory
86
+ # Set up Claude skills in the working directory (includes WRITER.md)
87
87
  setup_claude_skills(package_dir, work_dir)
88
88
 
89
89
  # Ensure output folder exists in user's directory
@@ -96,8 +96,8 @@ async def generate_paper(
96
96
  percentage=0,
97
97
  ).to_dict()
98
98
 
99
- # Load system instructions from package
100
- system_instructions = load_system_instructions(package_dir)
99
+ # Load system instructions from .claude/WRITER.md in working directory
100
+ system_instructions = load_system_instructions(work_dir)
101
101
 
102
102
  # Add conversation continuity instruction
103
103
  system_instructions += "\n\n" + """
scientific_writer/cli.py CHANGED
@@ -38,14 +38,14 @@ async def main():
38
38
  cwd = Path.cwd() # User's current working directory
39
39
  package_dir = Path(__file__).parent.absolute() # Package installation directory (scientific_writer/)
40
40
 
41
- # Set up Claude skills in the working directory
41
+ # Set up Claude skills in the working directory (includes WRITER.md)
42
42
  setup_claude_skills(package_dir, cwd)
43
43
 
44
44
  # Ensure paper_outputs folder exists in user's directory
45
45
  output_folder = ensure_output_folder(cwd)
46
46
 
47
- # Load system instructions from package CLAUDE.md
48
- system_instructions = load_system_instructions(package_dir)
47
+ # Load system instructions from .claude/WRITER.md in working directory
48
+ system_instructions = load_system_instructions(cwd)
49
49
 
50
50
  # Add conversation continuity instruction
51
51
  # Note: The Python CLI handles session tracking via current_paper_path
@@ -62,7 +62,7 @@ IMPORTANT - CONVERSATION CONTINUITY:
62
62
  # Configure the Claude agent options
63
63
  options = ClaudeAgentOptions(
64
64
  system_prompt=system_instructions,
65
- model="claude-sonnet-4-20250514", # Always use Claude Sonnet 4.5
65
+ model="claude-sonnet-4-5", # Always use Claude Sonnet 4.5
66
66
  allowed_tools=["Read", "Write", "Edit", "Bash", "research-lookup"], # Default Claude Code tools + research lookup
67
67
  permission_mode="bypassPermissions", # Execute immediately without approval prompts
68
68
  setting_sources=["project"], # Load skills from project .claude directory
scientific_writer/core.py CHANGED
@@ -12,7 +12,7 @@ load_dotenv()
12
12
 
13
13
  def setup_claude_skills(package_dir: Path, work_dir: Path) -> None:
14
14
  """
15
- Set up Claude skills by copying from package to working directory.
15
+ Set up Claude skills and WRITER.md by copying .claude/ from package to working directory.
16
16
 
17
17
  Args:
18
18
  package_dir: Package installation directory containing .claude/
@@ -21,15 +21,16 @@ def setup_claude_skills(package_dir: Path, work_dir: Path) -> None:
21
21
  source_claude = package_dir / ".claude"
22
22
  dest_claude = work_dir / ".claude"
23
23
 
24
- # Only copy if source exists and destination doesn't
24
+ # Copy .claude directory (which includes skills/ and WRITER.md) if source exists and destination doesn't
25
25
  if source_claude.exists() and not dest_claude.exists():
26
26
  try:
27
27
  shutil.copytree(source_claude, dest_claude)
28
- print(f"✓ Initialized Claude skills in {dest_claude}")
28
+ print(f"✓ Initialized Claude configuration in {dest_claude}")
29
+ print(f"✓ Skills and system instructions (WRITER.md) ready")
29
30
  except Exception as e:
30
- print(f"Warning: Could not copy Claude skills: {e}")
31
+ print(f"Warning: Could not copy Claude configuration: {e}")
31
32
  elif not source_claude.exists():
32
- print(f"Warning: Skills directory not found in package: {source_claude}")
33
+ print(f"Warning: .claude directory not found in package: {source_claude}")
33
34
 
34
35
 
35
36
  def get_api_key(api_key: Optional[str] = None) -> str:
@@ -57,23 +58,23 @@ def get_api_key(api_key: Optional[str] = None) -> str:
57
58
  return env_key
58
59
 
59
60
 
60
- def load_system_instructions(package_dir: Path) -> str:
61
+ def load_system_instructions(work_dir: Path) -> str:
61
62
  """
62
- Load system instructions from package's CLAUDE.md file.
63
+ Load system instructions from .claude/WRITER.md in the working directory.
63
64
 
64
65
  Args:
65
- package_dir: Package installation directory containing CLAUDE.md.
66
+ work_dir: Working directory containing .claude/WRITER.md.
66
67
 
67
68
  Returns:
68
69
  System instructions string.
69
70
  """
70
- instructions_file = package_dir / "CLAUDE.md"
71
+ instructions_file = work_dir / ".claude" / "WRITER.md"
71
72
 
72
73
  if instructions_file.exists():
73
74
  with open(instructions_file, 'r', encoding='utf-8') as f:
74
75
  return f.read()
75
76
  else:
76
- # Fallback if CLAUDE.md doesn't exist in package
77
+ # Fallback if WRITER.md doesn't exist
77
78
  return (
78
79
  "You are a scientific writing assistant. Follow best practices for "
79
80
  "scientific communication and always present a plan before execution."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scientific-writer
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: AI-powered scientific writing with programmatic API and CLI - powered by Claude Sonnet 4.5 and the Claude Agents SDK
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,10 +1,10 @@
1
- scientific_writer/CLAUDE.md,sha256=O-ThWtw-XJmeZF8MqGoF_bwGq3XNRKsF_Xog81k_3FM,32256
2
- scientific_writer/__init__.py,sha256=f7DQaHTD_J8ZLqjCN9KWj7rMIDuX9BagEbWbVwZjZfc,1159
3
- scientific_writer/api.py,sha256=-9ZXhTqDt3wDC-iL3d2BeKEk5RlkqrNFYVZNftRMigo,12826
4
- scientific_writer/cli.py,sha256=zEF7EZkJT7xOa5SeWATa3mHoHBmOF3oFXz7fkpK9QHw,14913
5
- scientific_writer/core.py,sha256=phsDtLIngod4MyVh9wQB1pNDkni7XvYUu-WGT6CyuX4,7486
1
+ scientific_writer/__init__.py,sha256=9BVGd3cosRJSt25lC0pEHoZBxHlbvmepGPx1AXsnagc,1159
2
+ scientific_writer/api.py,sha256=E2PKi3gszuw_PZU8edswkvk8enBOfhIM8S_KxNWRcUc,12872
3
+ scientific_writer/cli.py,sha256=PzwcNwPY_af4VcLFtIBSTk3xJQ7D79dSfOXUZxIcBM0,14940
4
+ scientific_writer/core.py,sha256=EXhh9p_y0gkuXFD0a47F9vlVaRipQ6W5Ng5Lyzieg4A,7656
6
5
  scientific_writer/models.py,sha256=KjRjMjn4GtbHLIUrx2EZB4omGcZeLbflaTJmfNV1M6Y,2629
7
6
  scientific_writer/utils.py,sha256=z2nX3PDEcfW4pN_w47TDDC6Kmdcw5uFUGrT8T6lZYSg,9032
7
+ scientific_writer/.claude/WRITER.md,sha256=O-ThWtw-XJmeZF8MqGoF_bwGq3XNRKsF_Xog81k_3FM,32256
8
8
  scientific_writer/.claude/settings.local.json,sha256=PVPFjrrlwJo6J3KgeGwxqfh2w0N4xW9r5cefTC36fX8,780
9
9
  scientific_writer/.claude/skills/citation-management/SKILL.md,sha256=guNDqOIuvqK1YHbVc5JGiM4MwSmyiytoUqzahNZHrrw,29916
10
10
  scientific_writer/.claude/skills/citation-management/assets/bibtex_template.bib,sha256=vwPMZG5rxqq6hdYyuOJbJsKDBBmJLzwXp9hEgF06ch4,9201
@@ -305,8 +305,8 @@ scientific_writer/.claude/skills/venue-templates/references/posters_guidelines.m
305
305
  scientific_writer/.claude/skills/venue-templates/scripts/customize_template.py,sha256=ikTF2rMjexS4y3udwtZR8XauleXwU1drG9RDf1M2-Co,6875
306
306
  scientific_writer/.claude/skills/venue-templates/scripts/query_template.py,sha256=RI0dzZB-igJZl8dJjbA7teiJy3T-j3reGf62sQpN8g4,8959
307
307
  scientific_writer/.claude/skills/venue-templates/scripts/validate_format.py,sha256=acRsRY4hqDsHrkzKIHeRZT7vle9q5SEjkFG3S4Vc5PQ,8766
308
- scientific_writer-2.2.2.dist-info/METADATA,sha256=mktLf2jN9bfv6WfoTaaezfbVs1LmXnzWwD7TrdTFbzU,9992
309
- scientific_writer-2.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
310
- scientific_writer-2.2.2.dist-info/entry_points.txt,sha256=pI1zUsWVV6eMkNEKfEmkKozOlLRZnhAZfXBsEyqXtqg,69
311
- scientific_writer-2.2.2.dist-info/licenses/LICENSE,sha256=H6FOLY6X6QMEnqcbDoq5BM0sBf-K-e1SIBAv0zSwxa4,1070
312
- scientific_writer-2.2.2.dist-info/RECORD,,
308
+ scientific_writer-2.2.3.dist-info/METADATA,sha256=2vKPGJa5r18o5uw_Mgyaav94gBA74cLldMEjUV4iX20,9992
309
+ scientific_writer-2.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
310
+ scientific_writer-2.2.3.dist-info/entry_points.txt,sha256=pI1zUsWVV6eMkNEKfEmkKozOlLRZnhAZfXBsEyqXtqg,69
311
+ scientific_writer-2.2.3.dist-info/licenses/LICENSE,sha256=H6FOLY6X6QMEnqcbDoq5BM0sBf-K-e1SIBAv0zSwxa4,1070
312
+ scientific_writer-2.2.3.dist-info/RECORD,,
File without changes