0. The title of this legislation shall be the "Securing Our Freedom To Write
And Read Everything (SOFTWARE) Act".
1. Definitions. 
 1a. Free Software
For the purposes of New Hampshire law, "Free software" shall mean software that 
respects users' freedom and community. It shall mean that for software to be 
considered "Free software" under New Hampshire law, it must be software that 
guarantees its users have the freedom to run, copy, distribute, study, change, and 
improve the software. Thus, for the purposes of New Hampshire law, "free software"
shall be considered a matter of liberty, not price. To understand the concept,
interpreters of this legislation should think of "free" as in "free speech," or as
in "Live Free or Die," not as in "free beer". Sometimes it is called
"libre software," borrowing the French or Spanish word for "free" as in 
freedom, to show that the person using the term does not mean the software is
gratis. Given that English does not have this same "libre/gratis" distinction
that the Romance languages do, sometimes this legislation shall use alternate
terms to clarify which is meant: "Free-and-open-source software (FOSS)",
"Freedom-preserving software", and "Software that is free-as-in-freedom" may all
be used to mean "Free software" in the sense of "libre software", while the term
"Freeware" may be used to mean "Free software" in the sense of "gratis software".
Note that when the term "Free-and-open-source software" is used to clarify that the
"libre" meaning of "free software" is meant, the term "free" must be preserved in
the wording, as it is possible for there to be non-free open-source software,
and that is not what is meant here.
 1b. Copyleft
For the purposes of New Hampshire law, "copyleft" shall be defined as the practice
of using copyright law to ensure that any free intellectual property, in particular
free software, remains free even after redistribution, modification, and use. A
"copyleft software license" is a license designed specifically to facilitate the
use of copyright in this way. A "copyleft free software project" is a collaborative
project with the aim of developing software with such a license. The term
"copyleft" may also be used as a verb, meaning to release a product under such a
license.
 1c. App store
For the purposes of New Hampshire law, an "app store" shall be defined as any
online software distribution platform in which one company allows other developers
to sell software to end-users for download.
 1d. Patch (in the context of software development)
For the purposes of this legislation, the term "patch", as used in the context of
software development, shall refer to a set of changes to a computer program or its
supporting data that are intended to update, fix, or improve it.
 1e. Upstream/downstream (in the context of software development)
For the purposes of this legislation, the term "upstream", as
used in the context of software development, shall refer to the original authors
or maintainers of a software project, while the term "downstream", used in the
same context, shall refer to redistributors or repackagers of a software project
away from its upstream maintainers.
 1f. Fork (in the context of software development)
For the purposes of this legislation, the term "fork", as used in the context of
software development, shall be defined as a copy of a software project in which
a subset of its developers use its source code to begin independent development
of the project in a different direction, resulting in a distinct and separate
piece of software.
 1g. Non-compete clause
For the purposes of this legislation, a "non-compete clause" shall refer to a
clause of a contract in which an employer requires an employee to agree not to
provide assistance to the employer's competitors. Such clauses may also be referred
to as "restrictive covenants". This definition of "non-compete clause" shall be
held in accordance to the references to non-compete clauses in RSA 275:70 and RSA
329:31-a.
 1h. Non-disclosure agreement
For the purposes of this legislation, a "non-disclosure agreement" shall refer to
any contract or clause of a contract that restricts access to the sharing of
certain information between the signing parties. This definition of "non-disclosure
agreement" shall be held in accordance to the references to non-disclosure
agreements found in RSA 275:70 and RSA 649-A:7, and with the definitions of
confidentiality as set forth in RSA 410:18.
 1i. Proprietary software
For the purposes of New Hampshire law, "proprietary software" shall be understood
to mean the opposite of "free software" as defined in 1a.
2. Legal status of copyleft
 2a. In general
The State of New Hampshire officially recognizes copyleft as a valid, beneficent,
and commendable form of copyright.
 2b. In civil suits
Any copyright holder for a copyleft free software project has a right to defend
civil claims against their project, and to request that others be held in
compliance with the terms of their copyleft license, in New Hampshire courts.
Free software projects, and especially those that use copyleft software licenses,
shall enjoy presumptions in their favor in New Hampshire courts, given all other
aspects of their cases being equal.
 2c. Between different versions of the same project
In cases where there are multiple versions of the same copylefted free software
project, applying a patch between upstream and downstream instances of that
project, that hold the same free copyleft license, and differ only in copyright
holder, or, in cases where copyright holder is the same, differ only in author,
shall always be legal in the state of New Hampshire.
3. Relative to noncompete clauses adversely affecting contribution to Free Software
projects
No noncompete clause by which an employer prevents an employee from contributing
to a Free Software project they might wish to contribute to, shall be enforced in
the State of New Hampshire. This provision shall not be construed so as to allow
violation of federal security clearance protocols.
4. Relative to the state government usage of external software
 4a. Study committee
Whereas the state government currently uses much proprietary software in its
day-to-day business, this legislation shall provide for the creation of a study
committee to study the possible costs and feasibility of replacing all proprietary
software used by state government with free software, to be done by a date of the
committee's choosing. The committee shall also study all relevant compliance and
security concerns associated with making such a transition. [TODO: specify
composition of committee... besides legislators, also include members of relevant
executive departments, including the Department of IT, and any IT officers of other
departments... see HB 558 for inspiration]
 4b. Funding
This legislation authorizes the spending of money to transition from proprietary
software to free software at the recommendation of the study committee, the
precise amounts of which are to be appropriated in future state budgets.
5. Relative to the state government's writing of its own software
 5a. Public domain vs. copyleft
Currently, it is the understanding of this legislator that any software funded
by state tax dollars are NOT subject to copyright, and are thus released into
the public domain. This legislation shall modify state law to clarify that any
software released by the State of New Hampshire, that would currently be released
into the public domain, may be released under a free copyleft license instead, at
the determination of the State Department of Information Technology. In such cases,
the copyright holder of such software shall be considered to be the entire State of
New Hampshire, claims against which are to be defended by the State Department of
Justice.
 5b. Alternative for case where previous clause is wrong
If the initial understanding underlying the previous clause turns out to be false,
and the State of New Hampshire is actually already capable of copyrighting software
that it writes, all such software shall be released under a free software license,
preferrably a copyleft one. This clause shall apply only to the source code of the
software itself, and shall not apply to any data being stored with that software
that is required to be kept private. Furthermore, an exception to this clause may
be granted in order to remain in compliance with the terms of any contract
negotiated between the State of New Hampshire and any labor union representing
state employees that has been negotiated via a standard collective bargaining
process.
6. Relative to app stores with terms of service that prohibit distribution of
software with copyleft software licenses
Any app store that requires developers to agree to terms of service that prohibit
distribution of software with free software licenses (and, more specifically,
copyleft ones) shall be liable to civil action from any developers of free
software who are prevented from distributing their software in New Hampshire by
these terms of service. Such cases may be tried in New Hampshire courts, and the
remedy for any findings in favor of the free software developers bringing an action
under the terms of this clause shall be to require the software in question to be
allowed to be distributed on the app store in question.
7. Legal assistance for developers of Free Software
Any indigent developer of free-and-open-source software who would qualify for 
defense by a public defender in a criminal case may also qualify for legal 
assistance from the public defenders' office in civil disputes arising from the 
copyright of software they develop under a copyleft license. In years in which the
state has a surplus, the public defenders' office may seek reimbursement from the
state from the surplus funds for any additional costs incurred by the provision of
legal assistance under the terms of this clause.
8. Relative to evidence in criminal law created by proprietary software
All defendants in cases of criminal law in the State of New Hampshire shall have 
the right, either on their own or thru their legal representation, to review the 
source code of any proprietary software used to generate evidence being used 
against them in court, in order to guarantee the reliability of said evidence.
Prosecutors may obviate the need for the exercise of this right by ensuring that
all evidence in cases they prosecute that is generated by software is generated by
software that is free-and-open-source instead, preferably with a copyleft license.
9. Software the government requires civilians to use
 9a. Proprietary software in general
No person in the State of New Hampshire shall be required to use proprietary 
software for any interaction with the government that is required by law, including
but not limited to: the filing or payment of taxes, remote appearance for court 
proceedings, the taking of standardized tests or the completion of coursework by
school students, applying for or receiving unemployment benefits (or other similar
benefits), etcetera etcetera. In cases where proprietary software is the only
current venue for fulfilling such a required interaction, the government shall seek
to provide a free-and-open-source alternative to the in-use proprietary software
instead, or shall provide for a non-software-based alternative instead.
 9b. Proprietary javascript on state websites
Furthermore, no person in the State of New Hampshire shall be required to allow
the execution of proprietary javascript in their browser when visiting websites
administered by the State of New Hampshire. The State Department of Information
Technology shall verify that this is the case via the use of browser extensions
of their choice that are designed to detect and block the execution of proprietary
javascript in their browsers, and by confirming that no proprietary javascript
blocks the functioning of any third-party online archiving services that are
attempting to archive state websites.
 9c. Proprietary fonts
Furthermore, no person in the State of New Hampshire shall be required to install
proprietary fonts on their computer in order to properly render any document
provided by the state government that they are required by law to read.
10. Data portability
The State of New Hampshire recognizes a fundamental right to data portability held
by computer users, and shall enact policies to ensure that the right to data
portability is protected. The relevant departments of the executive branch shall
implement this provision of this legislation at their own discretion.
11. Law enforcement [non]cooperation
No member of law enforcement in the State of New Hampshire, or any of its
constituent sub-jurisdictions (county or municipal), shall assist federal law
enforcement in any investigation or prosecution of copyright claims or other
claims of intellectual property crimes brought by makers of proprietary software
against makers of competing free-and-open-software projects.
12. State hardware purchases
 12a. Inspection of software run by hardware
No governmental entity under the jurisdiction of the State of New Hampshire 
(including state, county, municipal, and local bodies) shall make any new purchases
of machinery, computing hardware, or robots that require proprietary software in
order to run. All state purchases of hardware capable of running software must be
of hardware that can run free-and-open-source software instead. To verify the
freedom of any software to be run on new state hardware purchases, the source code
of said software may be subject to review by the State Department of Information
Technology, who may also assess said source code for any potential harm that that
software may cause when run. Any purchase of hardware running software that is
found to be altogether harmful in such an assessment shall be rejected. In order to
ease regulatory burden, identical purchases need not be reviewed separately;
instead, the results of each review shall be stored so that they may be reused in
cases where identical software is encountered, so that each review only has to be
done once. The implementation of this provision may be postponed until after the
study committee described in section 4a of this legislation completes its study
and submits its recommendations.
 12b. Funding
This legislation authorizes the spending of money to set up and run the inspection
process of software to be run on any new state hardware purchases, the exact amount
for which is to be appropriated in the budgets that the legislature routinely
passes. In years in which an insufficient amount of money is appropriated for this
purpose, any inspections costing more than what is available may be skipped.
13. Non-disclosure agreements
No employer in the State of New Hampshire shall use non-disclosure agreements to
prevent employees from sharing the source code of free-and-open-source software
that they would otherwise normally be able to share due to the software's license.
In simpler terms, in cases of conflicts between a non-disclosure agreement and a
free-and-open-source software license, the free-and-open-source software license
wins. This provision shall not be construed so as to allow violation of federal
security clearance protocols.
14. Information Technology Council
The Information Technology Council established under RSA Title I Chapter 21-R 
Section 21 R:6 shall add the use of free and open source software to the list of
topics upon which it advises the commissioner.

Sources:
https://copyleft.org/
https://www.theregister.com/2021/02/04/dna_testing_software/
https://legiscan.com/NH/bill/HB558/2021
https://www.nhbar.org/the-changing-landscape-of-restrictive-covenants/
http://www.gencourt.state.nh.us/rsa/html/xxiii/275/275-70.htm
https://www.gencourt.state.nh.us/rsa/html/XXX/329/329-31-a.htm
https://www.gencourt.state.nh.us/rsa/html/XXXVII/410/410-18.htm
https://arstechnica.com/tech-policy/2024/01/fujitsu-bugs-that-sent-innocent-people-to-prison-were-known-from-the-start/

(This became LSR 2022-2270)
It then became HB1273:
http://gencourt.state.nh.us/bill_status/legacy/bs2016/bill_status.aspx?lsr=2270&sy=2022&sortoption=&txtsessionyear=2022&ddlsponsors=409026

The feedback from the ED&A committee was that it was trying to do too much in a
single bill, so for 2023 I split it up into the following LSRs:
- LSR 2023-0187, became HB366, prohibiting certain noncompete clauses and nondisclosure agreements regarding free software projects and the sharing of open source software: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=187&type=4
- LSR 2023-0188, became HB617, prohibiting, with limited exceptions, state agencies from requiring use of proprietary software in interactions with the public: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=188&type=4
- LSR 2023-0189, became HB327, prohibiting the state from requiring the public use proprietary software when visiting state websites: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=189&type=4
- LSR 2023-0190 (this one, relative to a right to data portability of state agency information, I withdrew upon folding into one of the others; I forget which, though...) (planning to re-file separately)
- LSR 2023-0192, became HB589, prohibiting state and local law enforcement from participating in the enforcement of copyright claims against free and open source software projects: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=192&type=4
- LSR 2023-0193, became HB556, relative to the duties of the information technology council: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=193&type=4
- LSR 2023-0194, became HB67, relative to the right to review source code of software in criminal cases: https://gencourt.state.nh.us/lsr_search/billText.aspx?id=194&type=4

See further discussion in the replies to:
https://social.treehouse.systems/@egallager/111783939956822142

